/* marketing.freddiesparrow.co.uk
 *
 * ON THE 3D ESSENTIALS DESIGN SYSTEM, deliberately and closely. The earlier
 * draft was dark, because it started from freddiesparrow.co.uk — and that one
 * is dark for a reason that does not apply here: it is a register, a page of
 * legal facts that should look the same to everybody and sells nothing.
 *
 * This site sells. It shows client work, it publishes prices, and the person
 * reading it may well have arrived from 3dessentials.co.uk or be about to be
 * sent there to pay. Two hostnames of one business that look like two
 * businesses is a problem at exactly that moment, and the hand-off to the
 * basket is the moment trust matters most.
 *
 * So: the same tokens, the same Fraunces headings, the same radii, shadows
 * and rhythm. Values are copied rather than imported because there is no
 * build step here and no shared package — which means THEY CAN DRIFT. If the
 * other site's palette moves, this file has to be updated by hand, and the
 * comments below name what each value is so a diff is readable.
 *
 * WHAT IS NOT COPIED: the full component library. That stylesheet is three
 * thousand lines serving a shop, an account area and an order desk. This is
 * seven pages. Only the parts these pages use are here.
 *
 * CONTRAST RULES CARRIED OVER, because they were learned the hard way over
 * there and the note in their file is explicit about it:
 *   - --accent (#2E90E5) does NOT clear 4.5:1 on white. Links and small
 *     emphasis use --accent-ink.
 *   - Anything carrying WHITE TEXT uses --grad-action, never --grad-brand.
 *     A customer once asked whether a button was switched off, which is what
 *     3.4:1 white-on-blue looks like.
 */

:root {
  --ground:   #ffffff;
  --ground-2: #f1f5fa;
  --paper:    #f5f8fc;
  --text:     #14171f;
  --muted:    #626c7c;
  --line:     #e3e9f1;
  --line-2:   #cfd9e5;
  --accent:     #2E90E5;
  --accent-2:   #0B4A80;
  --accent-ink: #0E5FA3;   /* 6.6:1 on white — the one text may use */
  --ink:      #121a26;

  --grad-brand:  linear-gradient(100deg, #2E90E5 0%, #1F7ACB 55%, #2E90E5 100%);
  --grad-action: linear-gradient(100deg, #1C6FB8 0%, #155A97 55%, #1C6FB8 100%);

  --r-sm: 12px;
  --r:    18px;
  --r-lg: 26px;
  --r-pill: 980px;

  --shadow-sm: 0 1px 2px rgba(16,24,40,.04), 0 2px 8px -4px rgba(16,24,40,.08);
  --shadow:    0 4px 14px -6px rgba(16,24,40,.10), 0 18px 40px -28px rgba(16,24,40,.22);
  --shadow-lg: 0 10px 30px -12px rgba(16,24,40,.16), 0 40px 80px -40px rgba(16,24,40,.30);

  --maxw:  1200px;
  --readw: 760px;

  --fs-h1:   clamp(2rem, 1.35rem + 2.6vw, 3rem);
  --fs-h2:   clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem);
  --fs-lead: clamp(1.125rem, 1.05rem + .4vw, 1.375rem);
  --fs-body: 17px;

  --tracking-h: -0.02em;
  --display: 'Fraunces', system-ui, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --section-y: clamp(56px, 6vw, 88px);

  --ease-out: cubic-bezier(.2,.7,.2,1);
  --dur-1: 160ms;
  --dur-2: 280ms;
}

/* ---- Fraunces, self-hosted -------------------------------------------
   Headings only. The latin/latin-ext split is the same as the other site's,
   for the same reason: most visitors need only the first file. Licence in
   assets/fonts/OFL-fraunces.txt. */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/fraunces-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/fraunces-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/fraunces-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: var(--fs-body)/1.65 system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display); font-weight: 600;
  line-height: 1.08; letter-spacing: var(--tracking-h); margin: 0;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); margin-bottom: var(--s-4); }
h3 { font-size: 19px; margin: var(--s-5) 0 var(--s-2); }

p { margin: 0 0 var(--s-4); }
a { color: var(--accent-ink); }
a:hover { color: var(--accent-2); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s-5); }

/* The company blocks stay hidden until the register says there is a company.
   Same contract as the other two sites. */
[data-when="limited"] { display: none; }

/* ---------- header ---------- */

.top {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--s-5); flex-wrap: wrap;
  padding: var(--s-5) 0; border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; flex-direction: column; gap: 2px;
  text-decoration: none; color: var(--text);
}
.brand b { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand span { font: 12px/1.4 var(--mono); color: var(--muted); letter-spacing: .04em; }
.top nav ul { display: flex; flex-wrap: wrap; gap: var(--s-5); list-style: none; margin: 0; padding: 0; }
.top nav a { font-size: 15px; text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--text); }
.top nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---------- sections ---------- */

section { padding: var(--section-y) 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }

.first { padding-top: var(--s-8); border-bottom: 0; }
.lede { font-size: var(--fs-lead); color: var(--muted); max-width: 40ch; }
.sm { font-size: 15.5px; color: var(--muted); max-width: var(--readw); }
.eyebrow {
  font: 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0 0 var(--s-4);
}

.card {
  background: var(--ground); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: var(--s-5);
  box-shadow: var(--shadow-sm);
}

.pill {
  display: flex; gap: var(--s-3); align-items: flex-start;
  font-size: 15px; color: var(--muted);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: var(--s-4) var(--s-5); margin-top: var(--s-5);
}
.pill i { flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--accent); }
.pill.warn { background: #fff8ec; border-color: #f0dfc0; }
.pill.warn i { background: #b8801f; }

/* ---------- the form ---------- */

form { max-width: var(--readw); }
label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin: var(--s-4) 0 6px; }
input, textarea, select {
  width: 100%; font: 16px system-ui, sans-serif; color: var(--text);
  background: var(--ground); border: 1.5px solid var(--line-2);
  border-radius: 10px; padding: 12px 14px;
}
input:focus, textarea:focus, select:focus {
  outline: 3px solid rgba(46,144,229,.28); outline-offset: 1px; border-color: var(--accent);
}
textarea { min-height: 130px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* WHITE TEXT, SO --grad-action AND NOT --grad-brand. See the note at the top
   of this file: the decorative gradient leaves a 16px white label at 3.4:1,
   which reads as a disabled button. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: var(--s-5); cursor: pointer; border: none;
  font: 600 16px system-ui, sans-serif; letter-spacing: -0.01em;
  color: #fff; background: var(--grad-action);
  border-radius: var(--r-pill); padding: 15px 28px;
  box-shadow: 0 6px 22px -10px rgba(28,111,184,.8);
  transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(28,111,184,.8); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }

.result { min-height: 22px; font-size: 15px; margin: var(--s-3) 0 0; }
.result.ok { color: #1b7a4b; }
.result.bad { color: #a8321f; }
.formnote { font-size: 14px; color: var(--muted); margin-top: var(--s-5); max-width: 60ch; }

/* ---------- footer ---------- */

footer { padding: var(--s-7) 0 var(--s-8); border-top: 1px solid var(--line); }
footer ul { display: flex; flex-wrap: wrap; gap: var(--s-5); list-style: none; margin: 0 0 var(--s-4); padding: 0; }
footer a { font-size: 15px; text-decoration: none; }
.disclose { font: 12px/1.7 var(--mono); color: var(--muted); max-width: 80ch; margin: 0; }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; transition-duration: .001ms !important;
  }
  .btn:hover { transform: none; }
}
