/* ============================================================
   SOD TORI — design tokens
   Generated from DESIGN.md (the SSOT). Components read these;
   nothing re-declares a brand value.
   Provenance: [context] extracted from Brett's direction
   (2026-08-05: dark mode, earth browns/greens, the shimmer
   horizon) + sod_tori_x theme.dart for game colors; [derived]
   computed; [proposed] draft, awaiting lock.
   ============================================================ */

:root {
  /* ---- Surfaces — dark earth, dusk light [context: Brett 2026-08-05] ---- */
  --night: #14100A;  /* page ground — the sky after sundown */
  --soil:  #1E1811;  /* alternating section panel */
  --loam:  #2B2213;  /* card fill */
  --soot:  #0F0C07;  /* sidebar / deepest surface */
  --bark:  #55402A;  /* card + frame borders */
  --moss:  #2F3A22;  /* green surface — nav active, quiet emphasis */
  --line:  #000000;  /* the opaque offset shadow — unchanged */

  /* ---- The coin — sampled from the Tato coin's own pixels [context] ---- */
  --coin:      #ECB550;  /* the coin face — scrollbar thumb, precious accents */
  --coin-glint: #FCD23E; /* the highlight pixel */
  --coin-deep: #B97319;  /* the struck edge — the divider color [context: Brett 2026-08-05] */
  --russet:    #7A4E1F;  /* the unrevealed coin — goop's seed state [context: Brett 2026-08-06] */
  --panel-border: var(--coin-deep);  /* dividers carry the coin */

  /* ---- Text — wheat on dark earth [context: Brett 2026-08-05] ---- */
  --wheat: #F0E7D2;  /* primary */
  --straw: #C8BA9C;  /* secondary */
  --dust:  #93866C;  /* tertiary / disabled */
  --ink:   #303030;  /* dark text reserved for light chips (gold, shell) */

  /* ---- Greens — the living field [context: el-earth lineage] ---- */
  --fern:  #6B8E4E;  /* accent green — passes on night (5.1:1) */

  /* ---- The Potatuhs tri-orange shimmer [context: shell gradient] ---- */
  --brand-orange: #E16416;
  --brand-sienna: #E19816;
  --brand-gold:   #E1C916;
  --gradient-shell: linear-gradient(135deg, var(--brand-orange), var(--brand-sienna) 50%, var(--brand-gold));
  /* The horizon — the core theme. Shimmer where sky meets sod. */
  --gradient-horizon: linear-gradient(90deg, transparent 0%, var(--brand-orange) 22%, var(--brand-sienna) 50%, var(--brand-gold) 78%, transparent 100%);

  /* ---- Doc alerts (not game colors) [derived: legibility on dark] ---- */
  --alert: #E06A57;

  /* ---- Sides & vitals [context: theme.dart — unchanged game colors] ---- */
  --player:  #2E8B57;  /* player-side indicators */
  --enemy:   #C0392B;  /* enemy-side indicators — indicators only on dark (3.5:1) */
  --hp-full: #4ADF6A;
  --hp-mid:  #DFDF4A;
  --hp-low:  #DF4A4A;

  /* ---- The element bench — sod_tori_x inventory [context: elementColor()] ---- */
  --el-fire:      #E8573A;
  --el-water:     #3A8FE8;
  --el-earth:     #6B8E4E;
  --el-air:       #8ABCD6;
  --el-body:      #CC7832;
  --el-mind:      #7B68AE;
  --el-soul:      #5C6B7A;
  --el-heart:     #D9617B;
  --el-solar:     #E8B830;
  --el-lunar:     #8890B0;
  --el-ecliptic:  #4A4A6A;
  --el-seasonal:  #6AAE6A;
  --el-dream:     #B088CC;
  --el-nightmare: #5A3A6A;
  --el-lucid:     #50BFBF;
  --el-prophetic: #4A4A6A; /* [placeholder] source hex is MALFORMED
                              (#DAAEF50, 7 digits, theme.dart) —
                              renders ecliptic slate until fixed at reingest */

  /* ---- Typography — the app is monospace-only [context] ---- */
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
  --font-display: 'JetBrains Mono', 'Courier New', monospace; /* mono IS the voice */
  --font-body:    'Outfit', 'Helvetica Neue', sans-serif;     /* [proposed] doc prose only */

  /* App scale [context]: xs 8 · sm 10 · md 12 · lg 14 · xl 18 (GBA px) */
  --text-hero:    clamp(2.4rem, 1.7rem + 3.5vw, 4.4rem);
  --text-h1:      clamp(1.8rem, 1.35rem + 2vw, 2.6rem);
  --text-h2:      clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem);
  --text-h3:      clamp(1.1rem, 1rem + 0.6vw, 1.35rem);
  --text-h4:      1.02rem;
  --text-body-lg: clamp(1.02rem, 0.94rem + 0.45vw, 1.15rem);
  --text-body:    clamp(0.94rem, 0.88rem + 0.35vw, 1.02rem);
  --text-body-sm: 0.87rem;
  --text-caption: 0.78rem;
  --text-label:   0.7rem;

  /* ---- Spacing [proposed: 8px base] ---- */
  --sp-1: 0.5rem;
  --sp-2: 0.75rem;
  --sp-3: 1rem;
  --sp-4: 1.5rem;
  --sp-5: 2rem;
  --sp-6: 3rem;
  --sp-7: 4rem;
  --sp-8: 6rem;
  --section-pad: clamp(4rem, 8vw, 7rem);

  /* ---- Radii [context: card 12] ---- */
  --r-sm: 4px;
  --r-md: 8px;
  --r-card: 12px;
  --r-pill: 999px;

  /* ---- Borders & the one shadow [context: Brett 2026-08-05 — borders
     carry the coin's struck edge, same family as the dividers] ---- */
  --border-w: 2px;
  --border: var(--border-w) solid var(--coin-deep);
  --border-frame: var(--border-w) solid var(--coin-deep);
  --border-panel: 1px solid var(--panel-border);
  --sh-card: 3px 3px 0 var(--line);       /* opaque, offset, no blur — the only shadow */
  --sh-lift: 5px 5px 0 var(--line);       /* [derived] highlighted state */

  /* ---- Motion [proposed — no measured values exist yet] ---- */
  --dur-step: 400ms;    /* one readable resolution step */
  --dur-fast: 120ms;
  --dur-normal: 260ms;
  --dur-slow: 480ms;
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-step: steps(1, end);             /* GBA snap — no tween */

  /* ---- Layout ---- */
  --stage-w: 240;       /* GBA logical resolution [context: sod_tori_x] */
  --stage-h: 160;
  --max-w: 72rem;
  --max-w-narrow: 46rem;
  --max-w-wide: 88rem;
  --nav-w: 232px;

  /* ---- Legacy aliases (light era, retired 2026-08-05) ----
     Kept so nothing renders unstyled if an old reference survives.
     Do not author against these. */
  --paper: var(--wheat);
  --panel: var(--soil);
  --muted: var(--straw);
  --subtle: var(--dust);
  --slate: var(--bark);
}
