/* Wipeout AI - design tokens. The only place colours, type and radii are defined (design/BRIEF.md).
   Dark is direction A (the wipeoutlabs.com family); light is direction B (cream, coral, sunny gold).
   The site follows the system setting; html[data-theme] (set by js/app.js from a manual toggle) overrides it.
   CONTRAST (the 2026-10 design QA): body text in --muted, --dim, --gold-text, --coral-text, --teal, --sky and --live
   reads at 4.5:1 or more on every surface (bg, bg-2, surface 1-3) in both themes - check a new token the same way.
   The QA proposed --gold-text #9a6400, teal #0b7a6e, dim #7a6f64 (light) / #8a909c (dark): each read 4.2-4.45 on
   bg-2 / surface-3 (teal 4.0 on its own soft fill), so the nearest shades that clear 4.5 everywhere are used. */
:root {
  color-scheme: dark;
  --bg: #121318;
  --bg-2: #191b22;
  --surface: #1f222b;
  --surface-2: #262a35;
  --surface-3: #2e3340;
  --line: #2c303b;
  --line-2: #3a3f4c;
  --text: #f2f3f5;
  --muted: #9aa0ad;
  --dim: #969ca8;   /* 4.6:1 on every dark surface (was #6d7380, 2.7-3.9:1 - the design QA) */
  --gold: #f0b43c;
  --gold-2: #ffd47a;
  --gold-ink: #241703;
  /* TEXT in an accent colour: the accent itself on dark, a darker shade on light (the fills keep the bright one) */
  --gold-text: var(--gold);
  --coral-text: var(--coral);
  --teal-ink: #04221e;   /* text ON a teal fill */
  --teal: #2fd4c0;
  --teal-soft: rgba(47, 212, 192, 0.14);
  --coral: #ff6b57;
  --coral-soft: rgba(255, 107, 87, 0.14);
  --sky: #5ab8ff;
  --live: #3ddc84;
  --danger: #ff5d5d;
  --danger-soft: rgba(255, 93, 93, 0.14);
  --gold-soft: rgba(240, 180, 60, 0.14);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.3);
  --glow: radial-gradient(1200px 700px at 70% -10%, #1f2334 0%, transparent 60%);
  --scrim: rgba(8, 9, 12, 0.66);

  --font-body: "Noto Sans", "Noto Sans Fallback", "Segoe UI", system-ui, sans-serif;
  --font-display: "Fredoka", "Fredoka Fallback", "Noto Sans", "Segoe UI", system-ui, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --fs-2xl: 28px;
  --fs-3xl: clamp(30px, 4vw, 44px);
  --fs-4xl: clamp(38px, 6vw, 64px);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
  --max: 1320px;
  --head: 64px;
  --gutter: 16px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #fbf6ec;
    --bg-2: #f4ecdd;
    --surface: #ffffff;
    --surface-2: #fff8ec;
    --surface-3: #f6eedf;
    --line: #eadfcb;
    --line-2: #dccfb6;
    --text: #2a2320;
    --muted: #6f655c;
    --dim: #73685e;
    --gold: #f2a91f;
    --gold-2: #ffd06a;
    --gold-text: #946000;
    --coral-text: #b8402f;
    --teal-ink: #ffffff;
    --teal: #08665b;
    --teal-soft: rgba(8, 102, 91, 0.12);
    --coral: #ef5a45;
    --coral-soft: rgba(239, 90, 69, 0.12);
    --sky: #1f6fb5;
    --live: #127a46;
    --danger: #d93a3a;
    --danger-soft: rgba(217, 58, 58, 0.1);
    --gold-soft: rgba(242, 169, 31, 0.16);
    --shadow: 0 18px 40px rgba(92, 64, 30, 0.16);
    --shadow-sm: 0 6px 16px rgba(92, 64, 30, 0.12);
    --glow: radial-gradient(1200px 700px at 70% -10%, #fff1d6 0%, transparent 60%);
    --scrim: rgba(42, 35, 32, 0.5);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fbf6ec;
  --bg-2: #f4ecdd;
  --surface: #ffffff;
  --surface-2: #fff8ec;
  --surface-3: #f6eedf;
  --line: #eadfcb;
  --line-2: #dccfb6;
  --text: #2a2320;
  --muted: #6f655c;
  --dim: #73685e;
  --gold: #f2a91f;
  --gold-2: #ffd06a;
  --gold-text: #946000;
  --coral-text: #b8402f;
  --teal-ink: #ffffff;
  --teal: #08665b;
  --teal-soft: rgba(8, 102, 91, 0.12);
  --coral: #ef5a45;
  --coral-soft: rgba(239, 90, 69, 0.12);
  --sky: #1f6fb5;
  --live: #127a46;
  --danger: #d93a3a;
  --danger-soft: rgba(217, 58, 58, 0.1);
  --gold-soft: rgba(242, 169, 31, 0.16);
  --shadow: 0 18px 40px rgba(92, 64, 30, 0.16);
  --shadow-sm: 0 6px 16px rgba(92, 64, 30, 0.12);
  --glow: radial-gradient(1200px 700px at 70% -10%, #fff1d6 0%, transparent 60%);
  --scrim: rgba(42, 35, 32, 0.5);
}

/* SIZE-MATCHED FALLBACKS: while Google's fonts load, Arial is drawn at Fredoka's / Noto Sans's measured width and line
   height, so the swap moves nothing (the QA's homepage CLS 0.07-0.14 was this swap). Measured in Chrome at 100 px on
   one sentence: Fredoka 600 = 0.931 x Arial Bold, ascent 97, descent 24; Noto Sans 400 = 1.050 x Arial, 700 = 1.036 x
   Arial Bold, ascent 107, descent 29 (overrides are divided by the size adjust). */
@font-face { font-family: "Fredoka Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Arial"); font-weight: 500 800; size-adjust: 93.1%; ascent-override: 104.2%; descent-override: 25.8%; line-gap-override: 0%; }
@font-face { font-family: "Noto Sans Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 100 500; size-adjust: 105%; ascent-override: 101.9%; descent-override: 27.6%; line-gap-override: 0%; }
@font-face { font-family: "Noto Sans Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 600 900; size-adjust: 103.6%; ascent-override: 103.3%; descent-override: 28%; line-gap-override: 0%; }
