/* ==========================================================================
   Legible — design tokens
   Palette, type, spacing, motion. The brand colours are defined only here;
   other files use them as tokens or as rgba() alphas of the same values.
   Exceptions: the fictional client sites inside the Lens mock, whose themes,
   shapes, star and button colours live in hero.css (the saas chart's
   remainder is --mock-chart-rest below, kept here as a named token).
   Brand: Midnight #0A2540 · Blue #3B82F6 · Mist #E5E7EB · Charcoal #1F2937.
   Derived page surface: night #071A2E (Midnight darkened toward near-black);
   Midnight is the raised surface (inputs, panels, the Lens stage).
   Accessible tints of Blue (derived, for text):
     blue-600 #2563EB · blue-700 #1D4ED8 · blue-400 #60A5FA · slate #4B5563.
   One dark theme on every page. Contrast (WCAG 2.x, measured):
     mist on night 14.2 · mist on midnight 12.5
     fg-soft (mist at .66) on night 6.7 · on midnight 6.2
       · on the bloom's brightest point (blue at .22 over night, #12315A) 5.5
     blue-400 on night 6.9 · on midnight 6.1 · on bloom peak 5.1
     night on mist (pressed controls) 14.2 · white on midnight 15.5
     field borders: mist at .45 over the night field, 3.8 against the field
       and 3.4 against the Midnight form panel (non-text, WCAG 1.4.11 ≥ 3)
     raw blue: on night 4.8 · on midnight 4.2 · on bloom peak 3.5
     hero over video (home; scrim of night/midnight alphas over a Blue .14 wash, main.css): worst
       case at the brightest pixel under each text box, over both renditions,
       every 0.25 s plus every 0.1 s over the last 1.6 s and the frame before the
       loop point, at 375, 768 and 1440 (tools/browser/hero-contrast.mjs):
       (Pexels 6981292, mirrored, unfiltered, under the Blue .14 scrim layer in main.css):
       h1 mist 6.9 · h1 em fg-soft 4.3 (large text, ≥ 3) · sub fg-soft 4.9
       · CTA mist 10.6 · cue fg-soft 5.9
       · Pause/Play fg-soft on its night .6 backing 5.8
     over the ocean band (site header on all 11 pages, inner-page heroes on the 10
       that have one), worst pixel under each text box at 375, 768 and 1440
       (tools/browser/band-contrast.mjs; pills measured inside their border):
       wordmark 13.6 · nav links 7.6 · "Get started" and Menu on their night .6
       backing 11.0, on the night .8 hover backing 12.6 · Technologies fg-soft 6.6
       (from 960, where it first shows) · page-hero title 9.4 · title em 5.4 (large)
       · lede 5.3
     focus ring (--focus, 2px at a 3px offset) against the brightest band pixel
       beside it, every header control at 375, 768 and 1440: worst 3.3 (Menu at
       375, "Get started" at 768; non-text, ≥ 3)
     print / light contexts: charcoal on white 14.7 · slate on white 7.6
       · blue-700 on white 6.7 · midnight on white 15.5
   Rules: raw Blue (#3B82F6) is for fills, graphics, the logo, the bloom and
   small dots only — never text. Blue text, where any remains, is blue-400 on
   night or Midnight. Hairlines (--line, --line-strong, --grid-line) are
   decorative separators, not control boundaries.
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2-variations"),
       url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.woff2") format("woff2-variations"),
       url("../fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* --- palette (brand) --- */
  --midnight: #0A2540;
  --blue: #3B82F6;
  --mist: #E5E7EB;
  --charcoal: #1F2937;
  --white: #FFFFFF;

  /* --- derived surface (see the header) --- */
  --night: #071A2E;

  /* --- accessible tints (derived; see the header) --- */
  --blue-400: #60A5FA;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --slate: #4B5563;

  /* --- fictional mock (not Legible's brand): the saas client's chart remainder --- */
  --mock-chart-rest: #CDC6FD;

  /* --- semantic tokens: one dark theme everywhere (print re-declares them light) --- */
  --bg: var(--night);
  --surface: var(--midnight);
  --fg: var(--mist);
  --fg-soft: rgba(229, 231, 235, .66);  /* 6.7:1 on night, 5.5:1 on the bloom peak */
  --line: rgba(229, 231, 235, .10);
  --line-strong: rgba(229, 231, 235, .22);
  --grid-line: rgba(229, 231, 235, .05);
  --field-line: rgba(229, 231, 235, .45); /* ≥ 3:1 against the field and the panel (measured 3.8 / 3.4) */
  --accent-text: var(--blue-400);
  --focus: var(--blue-400);

  /* --- gradients --- */
  --bloom: radial-gradient(closest-side, rgba(59, 130, 246, .22), rgba(59, 130, 246, .08) 55%, rgba(59, 130, 246, 0));

  /* --- type families --- */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; /* system only: the fictional coffee mock */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* --- fluid type scale --- */
  --fs-hero: clamp(2.5rem, 7.4vw, 7.5rem);    /* 40px at 375 so "understands&nbsp;you." fits; 107px at 1440 */
  --fs-display: clamp(3rem, 7vw, 6.5rem);
  --fs-h2: clamp(2.5rem, 5.5vw, 4.75rem);
  --fs-h3: clamp(1.5rem, 2.2vw, 2rem);
  --fs-num: clamp(3rem, 2rem + 3vw, 4.5rem);   /* big light numerals "01" */
  --fs-lede: clamp(1.1875rem, 1.05rem + .55vw, 1.4375rem);
  --fs-body: 1.125rem;                          /* 18px */
  --fs-small: .9375rem;
  --fs-mono: .75rem;                            /* 12px */
  --fs-mono-s: .6875rem;                        /* 11px */
  --fs-mono-l: .8125rem;                        /* 13px */

  --lh-display: .95;
  --lh-heading: 1.04;
  --lh-body: 1.6;
  --track-display: -.045em;
  --track-heading: -.035em;
  --track-mono: .12em;
  --fw-heading: 400;
  --fw-light: 300;
  --measure: 64ch;

  /* --- spacing --- */
  --space-3xs: .25rem;
  --space-2xs: .5rem;
  --space-xs: .75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2.25rem;
  --space-xl: clamp(3rem, 2rem + 4vw, 5rem);
  --space-2xl: clamp(6rem, 4rem + 8vw, 12rem);
  --gutter: clamp(1.25rem, .75rem + 2.5vw, 3rem);
  --max: 90rem;
  --col-gap: clamp(1rem, .5rem + 1.6vw, 2rem);

  /* --- motion: precise, not bouncy --- */
  --ease-scan: cubic-bezier(.2, .7, .1, 1);
  --ease-linear: linear;
  --dur-fast: 300ms;
  --dur-mid: 500ms;
  --dur-slow: 700ms;
  --dur-scan: 6s;

  --radius-s: 6px;
  --radius: 14px;
  --radius-l: 22px;        /* the one large panel radius */
  --radius-pill: 999px;
  --nav-h: 4rem;
}
