/* ==========================================================================
   CTMS Studio — 13-Point Design System · tokens.css
   Three layers, never competing:
     SURFACE  (where)  — the field
     FAMILY   (who)    — 6 band tokens named for people, span moons
     MOON     (when)   — 13 sequence accents, one per New Moon
   Every token ships as a PAIR:
     --*-base  → use on LIGHT grounds (parchment / starlight)
     --*-lift  → use on DARK  grounds (void / navy / slate)
   All pairs verified >= 4.5:1 WCAG AA against their intended ground.
   Never signal meaning with colour alone — pair with the shape token.
   ========================================================================== */

:root {

  /* --- Layer 3 · SURFACE ------------------------------------------ */
  --surface-cosmos-void: #07070F;
  --surface-douglas-navy: #0B1322;
  --surface-deep-slate: #1B2430;
  --surface-parchment-cream: #F5E9D2;
  --surface-starlight-cream: #FBF5E9;
  --surface-luminary-white: #FFFFFF;

  /* --- Layer 1 · FAMILY BAND -------------------------------------- */
  --family-dale-gold-base: #85641C;   /* ALL 13 — the through-line */
  --family-dale-gold-lift: #D4AF37;
  --family-douglas-navy-base: #0B1322;   /* GROUND of every board */
  --family-douglas-navy-lift: #2E4463;
  --family-christine-blue-base: #2F6183;   /* PROTECT — Moons 1-5 */
  --family-christine-blue-lift: #6FA8CC;
  --family-edward-steel-base: #5E6B75;   /* BUILD — Moons 6-7 */
  --family-edward-steel-lift: #A8B4BE;
  --family-michael-green-base: #3F6B4C;   /* OWN — Moons 8-11 */
  --family-michael-green-lift: #7FB08C;
  --family-krystal-teal-base: #1F7378;   /* PASS ON — Moons 12-13 */
  --family-krystal-teal-lift: #5FBFC4;

  /* --- Layer 2 · MOON ACCENT -------------------------------------- */
  --moon-01-buck-base: #86621F;   /* The Pedicle — Where the Legacy Lives */
  --moon-01-buck-lift: #C99A3D;
  --moon-02-sturgeon-base: #20707A;   /* Deep Memory — Record What Endures */
  --moon-02-sturgeon-lift: #4FC3CE;
  --moon-03-harvest-base: #9A5A1F;   /* Gather the Receipts */
  --moon-03-harvest-lift: #E09A4E;
  --moon-04-hunter-base: #1F5A93;   /* Attention — Hunt for the Connection */
  --moon-04-hunter-lift: #5C9EDC;
  --moon-05-beaver-base: #6B5010;   /* Build the Searchable Vault */
  --moon-05-beaver-lift: #C4A045;
  --moon-06-cold-base: #8D5F1A;   /* Warmth in the Dark — Consent and Care */
  --moon-06-cold-lift: #E5AB53;
  --moon-07-wolf-base: #5E6B75;   /* The Circle of Stewards */
  --moon-07-wolf-lift: #B4C0CA;
  --moon-08-snow-base: #3C6E92;   /* Reflect, Correct, and Rest */
  --moon-08-snow-lift: #8AB8D1;
  --moon-09-worm-base: #41693E;   /* Renew the Story */
  --moon-09-worm-lift: #7FB07A;
  --moon-10-pink-base: #9B3A50;   /* Beauty Makes Memory Return */
  --moon-10-pink-lift: #DB8095;
  --moon-11-flower-base: #63478A;   /* Teach What Grew */
  --moon-11-flower-lift: #A98FCE;
  --moon-12-strawberry-base: #9A2E3D;   /* Sweetness Worth Sharing */
  --moon-12-strawberry-lift: #D96C7C;
  --moon-13-buck-return-base: #86621F;   /* Renew the Constellation */
  --moon-13-buck-return-lift: #E0C069;

  /* --- Semantic · EVIDENCE COMPASS (always + shape) ---------------- */
  --evidence-verified-base: #246CAD;   /* shape: check-in-shield */
  --evidence-verified-lift: #6BA8E0;
  --evidence-interpretation-base: #227279;   /* shape: open-eye */
  --evidence-interpretation-lift: #5FC8D2;
  --evidence-tradition-base: #975A20;   /* shape: column */
  --evidence-tradition-lift: #E5A25C;
  --evidence-personal-base: #4B7347;   /* shape: heart */
  --evidence-personal-lift: #8FBE8B;
  --evidence-open-base: #7A5AA6;   /* shape: question-orb */
  --evidence-open-lift: #AC91D4;

  /* --- Typography ---------------------------------------------------- */
  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;      /* titles only */
  --font-quote:   'Cormorant Garamond', Georgia, serif;         /* pull-quotes */
  --font-body:    'Barlow', 'Helvetica Neue', system-ui, sans-serif;
  --font-data:    'IBM Plex Mono', ui-monospace, monospace;     /* dates, IDs, hex */

  --step--1: clamp(0.80rem, 0.77rem + 0.15vw, 0.88rem);
  --step-0:  clamp(1.00rem, 0.95rem + 0.25vw, 1.13rem);
  --step-1:  clamp(1.25rem, 1.15rem + 0.50vw, 1.50rem);
  --step-2:  clamp(1.56rem, 1.38rem + 0.90vw, 2.00rem);
  --step-3:  clamp(1.95rem, 1.63rem + 1.60vw, 2.67rem);
  --step-4:  clamp(2.44rem, 1.90rem + 2.70vw, 3.55rem);
  --tracking-display: 0.12em;
  --tracking-eyebrow: 0.24em;
  --leading-body: 1.65;

  /* --- Space (4pt base, 13-safe) -------------------------------------- */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --space-9: 104px;

  /* --- Line / radius / elevation --------------------------------------- */
  --rule-hair: 0.5px; --rule-fine: 1px; --rule-bold: 1.6px;
  --radius-sm: 2px; --radius-md: 6px; --radius-pill: 999px;
  --elev-1: 0 1px 2px rgba(7,7,15,.28);
  --elev-2: 0 6px 20px rgba(7,7,15,.42);
  --glow-gold: 0 0 24px rgba(212,175,55,.22);

  /* --- Motion ---------------------------------------------------------- */
  --dur-quick: 140ms; --dur-base: 260ms; --dur-slow: 520ms;
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* Dark is the default ground. Light is the workbook ground. */
[data-ground="dark"]  { --ground: var(--surface-douglas-navy);
                        --ink: #E8EDF3; --ink-quiet: #98A6B8; --accent: var(--family-dale-gold-lift); }
[data-ground="light"] { --ground: var(--surface-parchment-cream);
                        --ink: #1B2430; --ink-quiet: #5E6B75; --accent: var(--family-dale-gold-base); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
