/* ------------------------------------------------------------
   Spray face — used only for the "Race Day" mark behind the
   countdown. Subsetted to the eleven glyphs that word needs, so
   it is 9KB rather than a whole alphabet.

   LICENCE: Sister Spray is free for personal use. Jarryd has
   confirmed this project is personal use, so it ships as-is.

   It is an ALL-CAPS face — the lowercase slots are present in the
   cmap but have empty outlines, so anything lowercase renders as
   blank space. The subset covers "RACE DAY" only.
   ------------------------------------------------------------ */
@font-face {
  font-family: "Spray";
  src: url("../assets/fonts/spray-racedaykit.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   GRID+CLUB — design tokens
   Four worlds. One engine. Swapping [data-world] re-skins the site.
   ============================================================ */

:root {
  /* Type */
  --font-display: "Chakra Petch", "Arial Narrow", sans-serif;
  --font-kinetic: "Mona Sans", "Inter", system-ui, sans-serif;
  --font-body:    "Mona Sans", "Inter", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --text-hero:    clamp(3.2rem, 0.5rem + 11vw, 13rem);
  --text-display: clamp(2.4rem, 1rem + 6vw, 7rem);
  --text-section: clamp(1.9rem, 1rem + 3.6vw, 4.25rem);
  --text-body:    clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --text-mono:    clamp(0.5625rem, 0.53rem + 0.13vw, 0.6875rem);

  --track-mono: 0.22em;

  /* Rhythm — intentionally uneven */
  --space-section: clamp(4.5rem, 2.5rem + 8vw, 11rem);
  --gutter: clamp(1rem, 0.4rem + 2.6vw, 4rem);

  /* Motion — quantised. Four durations, two easings. */
  --d1: 120ms;
  --d2: 240ms;
  --d3: 480ms;
  --d4: 960ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io:  cubic-bezier(0.76, 0, 0.24, 1);
}

/* ---------- WORLD 1 · GRID+CLUB ---------- */
[data-world="grid"] {
  --ground:     #0a0a0a;
  --ground-alt: #f4f4ed;
  --surface:    #111111;
  --ink:        #f4f4ed;
  --ink-invert: #0a0a0a;
  --accent:     #d4ff00;
  --accent-dim: #5f7400;
  --accent-ink: #0a0a0a;
  --line:       #232323;
  --line-light: #dbdbd2;
  --muted:      #6f7168;
  --grain:      0.055;
  --display-face: var(--font-display);
}

/* ---------- WORLD 2 · GIRL+GRID ----------

   GLOSS & GRID. Two grounds, not one: this world alternates between a
   warm off-white and a cool near-black as you scroll, which is what
   makes it read as chapters rather than as one long dark page. The
   flip is driven by [data-tone] on each section — see scripts/tone.js.

   THE COLOUR RULE, and it is the one thing to hold to:
     · PINK FEELS  — names, headlines, the join CTA.
     · BLUE THINKS — numbers, tables, rules, the points ladder.
     · CYAN IS LIVE — on-sale, racing now, on air. Nothing else.
   No gradient ever mixes pink with cyan. The single polychrome
   element on the page is the join button's rainbow border.
   ------------------------------------------------------ */
[data-world="girl"] {
  --ground:     #0b0b12;
  --ground-alt: #f4f1ec;
  --surface:    #14121a;
  --ink:        #f6f2f4;
  --ink-invert: #0b0b12;
  --accent:     #ff1568;
  /* Orchid, not cyan: live state still gets its own colour, but it
     stays inside the pink family (4 Oct 2026, "make it more girly"). */
  --accent-2:   #e7a3ff;
  --accent-dim: #7a0a32;
  /* Near-black on the pink, not white. White on #ff1568 measures 3.78
     against a 4.5 requirement, and the CTA sets its label at 9px — so
     white-on-pink fails the one element the page most needs read.
     Dark on hot pink measures 5.19 and is the stronger look anyway. */
  --accent-ink: #0b0b12;
  --line:       #2a2433;
  --line-light: #ded5cd;
  --muted:      #8b7f8a;
  --grain:      0.03;
  /* Bodoni Moda since 4 Oct 2026 ("change the font, make it a lot more
     girly"): a fashion-magazine Didone, roman for the words and italic
     pink for the hot ones. It has an optical-size axis, so the same
     family stays crisp at 2rem and at 12rem. Anton read as sport. */
  --display-face: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;

  /* Pink and blue as TEXT, which is a different problem from pink and
     blue as fills. #ff1568 reads 5.19 on the dark ground but only 3.36
     on the light one, and #2b4bff is the other way round — 5.26 on
     light, 3.31 on dark. So each tone gets the variant that passes on
     it, and no small label is ever set in the one that does not. */
  --accent-text: #ff1568;
  --blue-text:   #ff9fcf;

  /* The whisper voice. Set against Anton's condensed caps, this
     contrast is what makes the page read as a magazine rather than
     as a product site. */
  --font-whisper: "Bodoni Moda", "Didot", Georgia, serif;

  /* Rose thinks. The token keeps its old name (--blue) so nothing
     downstream had to be renamed, but since 4 Oct 2026 the second
     colour of this world is bubblegum, not cobalt: two pinks, one
     hot (feels) and one soft (thinks). */
  --blue:      #ff6fb5;
  --blue-dim:  #7a1048;
  --blue-soft: #ffe4f1;

  /* Gloss. --pearl is the barely-there iridescent sheen on cards;
     --halo is the soft pink bloom behind hero type. Both are
     deliberately weak — at full strength they read as cheap. */
  --pearl: conic-gradient(from 210deg,
            rgba(255,21,104,.10), rgba(231,163,255,.09),
            rgba(255,111,181,.08), rgba(255,209,230,.07),
            rgba(255,21,104,.10));
  --halo: radial-gradient(60% 60% at 50% 55%,
            rgba(255,21,104,.34), rgba(255,21,104,0) 70%);

  /* Glass. One definition so every frosted surface matches, and one
     place to dial the blur back if a section gets heavy. */
  --glass-bg:     rgba(255,255,255,.07);
  --glass-line:   rgba(255,255,255,.16);
  --glass-blur:   18px;
  --glass-lip:    linear-gradient(180deg,
                    rgba(255,255,255,.55), rgba(255,255,255,0) 42%);
}

/* The light chapters. Only the ground/ink pair and the lines flip —
   pink, blue and cyan stay put so the world keeps its identity
   across the fold. Glass re-tints because white-on-white has no lip. */
[data-world="girl"] [data-tone="light"] {
  --ground:     #f4f1ec;
  --ground-alt: #0b0b12;
  --surface:    #fffdfa;
  --ink:        #17131c;
  --ink-invert: #f4f1ec;
  --line:       #ded5cd;
  --line-light: #2a2433;
  /* #7a6f78 measured 4.26 on this ground — close enough to look fine
     and still a fail. Darkened to clear 4.5 with room to spare. */
  --muted:      #6b6169;
  --accent-ink: #0b0b12;
  /* Deeper pink for TEXT on the light ground; the fill pink stays
     #ff1568 so buttons and bars keep the brand colour. */
  --accent-text: #c40a4c;
  --blue-text:   #b3135f;
  --glass-bg:   rgba(255,255,255,.55);
  --glass-line: rgba(23,19,28,.12);
  --glass-lip:  linear-gradient(180deg,
                  rgba(255,255,255,.95), rgba(255,255,255,0) 42%);
}

/* ---------- WORLD 3 · TGC ---------- */
[data-world="tgc"] {
  --ground:     #050505;
  --ground-alt: #0e0a06;
  --surface:    #0f0c08;
  --ink:        #f4f0ea;
  --ink-invert: #050505;
  --accent:     #ff4d00;
  --accent-dim: #742300;
  --accent-ink: #050505;
  --line:       #241c14;
  --line-light: #d8cfc2;
  --muted:      #7a6d5e;
  --grain:      0.07;
  --display-face: var(--font-display);
}

/* ---------- WORLD 4 · OFF+GRID ---------- */
[data-world="off"] {
  --ground:     #f2f2f0;
  --ground-alt: #0c0c0c;
  --surface:    #ffffff;
  --ink:        #0c0c0c;
  --ink-invert: #f2f2f0;
  /* Safety-tape yellow, not GRID+CLUB's volt. OFF+GRID was running the
     homepage's accent, which made the two worlds read as one skin with
     a different photo. This is hazard-marking yellow and it is used as
     TAPE — a stamp, a label, a warning — never as a wash. */
  --accent:     #ffe600;
  --accent-dim: #b3a200;
  --accent-ink: #0c0c0c;
  --line:       #0c0c0c;
  --line-light: #0c0c0c;
  --muted:      #6a6a66;
  --grain:      0.02;
  --display-face: "Archivo Black", var(--font-display);
}

/* ============================================================
   RACE STATE — the site knows what day it is
   ============================================================ */

[data-state="quiet"] {
  --state-accent: var(--accent);
  --marquee-rate: 1;
  --state-label: "OFF SEASON";
}

[data-state="raceweek"] {
  --state-accent: var(--accent);
  --marquee-rate: 1.9;
  --state-label: "RACE WEEK";
}

[data-state="lightsout"] {
  --state-accent: var(--accent);
  --marquee-rate: 3.1;
  --state-label: "LIVE";
}

[data-state="cooldown"] {
  --state-accent: var(--accent);
  --marquee-rate: 1.3;
  --state-label: "COOL DOWN";
}

/* Red flag overrides everything, in every world. */
[data-flag="red"] {
  --accent: #ff1d1d;
  --accent-dim: #5c0000;
  --ground: #0b0000;
  --surface: #150202;
}
