/* ==========================================================================
   tokens.css — every colour, size and timing in one place.

   Brand colours are sampled from the official logo:
     navy   #0A0E9C  left arc of the "a", the dark gem facet
     blue   #0048A9  the stem of the "a"
     sky    #0270B4  the bowl of the "d", the right gem facet
     purple #8805A9  the "d" and the gem
     amber  #F1AC17  the tittle and the lower arc
     rust   #C56021  the centre gem facet
   The hero photograph sits on a flat #1F1F1F, which is also --night.
   ========================================================================== */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-latin-wght-normal.a147f99cd533.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: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-latin-ext-wght-normal.4841e590e2a9.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    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;
}

:root {
  /* --- brand (fixed in both themes) ---------------------------------- */
  --brand-navy: #0a0e9c;
  --brand-blue: #0048a9;
  --brand-sky: #0270b4;
  --brand-purple: #8805a9;
  --brand-amber: #f1ac17;
  --brand-rust: #c56021;
  --night: #1f1f1f;
  --night-soft: #2a2a2b;
  --brand-gradient: linear-gradient(100deg, #0a0e9c 0%, #0048a9 45%, #0270b4 100%);
  /* A lighter cut of the logo gradient for text on --night (all ≥ 6:1). */
  --glow-gradient: linear-gradient(95deg, #7cc0ff 0%, #c595ff 58%, #f6c453 100%);

  /* --- light theme ---------------------------------------------------- */
  --bg: #f7f7f9;
  --bg-alt: #eff0f4;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --ink: #15171d;
  --ink-soft: #343844;
  --muted: #5a6070; /* 6.3:1 on white */
  --border: #e3e5eb;
  --border-strong: #c9cdd7;

  --primary: #0048a9; /* 8.6:1 with white */
  --primary-hover: #003b8c;
  --on-primary: #ffffff;
  --primary-soft: #e8f0fb;
  --link: #0048a9;
  --accent: #8805a9;
  --accent-soft: #f5e8fa;
  --highlight: #f1ac17;
  --highlight-ink: #7a5200; /* amber text on light: 6.7:1 */
  --highlight-soft: #fdf4df;

  --success: #0d7a4f;
  --success-soft: #e3f4ec;
  --warning: #8a5a00;
  --warning-soft: #fdf1d8;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --info: #0270b4;
  --info-soft: #e5f2fa;

  --focus: #0270b4;
  --scrim: rgb(10 12 20 / 0.56);

  /* --- type ------------------------------------------------------------ */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: clamp(1.375rem, 1.1rem + 1vw, 1.625rem);
  --text-3xl: clamp(1.75rem, 1.3rem + 1.8vw, 2.25rem);
  --text-4xl: clamp(2.125rem, 1.4rem + 3vw, 3.25rem);
  --text-hero: clamp(2.5rem, 1.2rem + 5.2vw, 4.75rem);

  /* --- space (4pt grid) ------------------------------------------------ */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --section-y: clamp(2rem, 1.25rem + 2.5vw, 3.25rem);
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);
  --container: 75rem;

  /* --- shape and depth -------------------------------------------------- */
  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgb(16 20 40 / 0.06), 0 1px 1px rgb(16 20 40 / 0.04);
  --shadow: 0 1px 2px rgb(16 20 40 / 0.05), 0 8px 24px -8px rgb(16 20 40 / 0.14);
  --shadow-lg: 0 2px 6px rgb(16 20 40 / 0.06), 0 24px 56px -16px rgb(16 20 40 / 0.24);

  /* --- motion ---------------------------------------------------------- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms;
  --dur: 240ms;
  --dur-slow: 420ms;

  /* --- layers ---------------------------------------------------------- */
  --z-raised: 10;
  --z-sticky: 40;
  --z-nav: 50;
  --z-float: 60;
  --z-overlay: 100;
  --z-toast: 200;

  color-scheme: light;
}

/* Dark theme: the site follows the device unless the visitor chooses
   (Section 18). The choice is stored and applied before first paint. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131417;
    --bg-alt: #18191d;
    --surface: #1c1d22;
    --surface-raised: #23252b;
    --ink: #f2f3f6;
    --ink-soft: #d5d8e0;
    --muted: #a4a9b6; /* 7.6:1 on --bg */
    --border: #2d2f37;
    --border-strong: #3e414b;
    --primary: #2a6cd6; /* 5.0:1 with white */
    --primary-hover: #235fbe;
    --primary-soft: #16233b;
    --link: #8ab8ff;
    --accent: #c98cf0;
    --accent-soft: #2a1733;
    --highlight-ink: #f6c453;
    --highlight-soft: #2c2310;
    --success: #4cc794;
    --success-soft: #11291f;
    --warning: #f1c35a;
    --warning-soft: #2c230f;
    --danger: #ff8b80;
    --danger-soft: #2f1512;
    --info: #6cc0f2;
    --info-soft: #102533;
    --focus: #6cc0f2;
    --scrim: rgb(0 0 0 / 0.66);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 28px -10px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.3), 0 28px 60px -18px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131417;
  --bg-alt: #18191d;
  --surface: #1c1d22;
  --surface-raised: #23252b;
  --ink: #f2f3f6;
  --ink-soft: #d5d8e0;
  --muted: #a4a9b6;
  --border: #2d2f37;
  --border-strong: #3e414b;
  --primary: #2a6cd6;
  --primary-hover: #235fbe;
  --primary-soft: #16233b;
  --link: #8ab8ff;
  --accent: #c98cf0;
  --accent-soft: #2a1733;
  --highlight-ink: #f6c453;
  --highlight-soft: #2c2310;
  --success: #4cc794;
  --success-soft: #11291f;
  --warning: #f1c35a;
  --warning-soft: #2c230f;
  --danger: #ff8b80;
  --danger-soft: #2f1512;
  --info: #6cc0f2;
  --info-soft: #102533;
  --focus: #6cc0f2;
  --scrim: rgb(0 0 0 / 0.66);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 28px -10px rgb(0 0 0 / 0.6);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.3), 0 28px 60px -18px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}
