/* ============================================================================
   RISHI — DESIGN TOKENS  (single source of truth)
   Brand: "Manuscript, alive" — ink / gold / cream, mystical-editorial.
   Codifies the Atelier direction (DESIGN.md) into a formal token system.
   Structure learned from Geist/Vercel + Apple HIG (one base unit, 3 weights,
   rationed single accent, additive shadow ladder, small radii set).
   Imported by prototype/index.html — change a value here, it changes everywhere.
   ============================================================================ */

:root{
  /* --- COLOR: CREAM GROUND (achromatic base) --- */
  --canvas:    #E8DFCE;   /* page behind the app (desktop) */
  --cream:     #F2ECE1;   /* app surface */
  --card:      #FAF6EE;   /* raised card surface */
  --card-2:    #F6F0E4;   /* slightly recessed / secondary surface */
  --blush:     #E8D8CB;   /* soft love/relationship panels */

  /* --- COLOR: INK CORE (text + structure, 5-stop ramp) --- */
  --ink:       #17171B;   /* near-black — display, primary text, ink panels */
  --ink-2:     #2A2A30;   /* panel gradient end / softer ink */
  --ink-soft:  #413E3A;   /* heavy body on cream */
  --sec:       #8B857A;   /* secondary text / muted labels */
  --parch:     #EDE6D6;   /* text on ink panels */
  --parch-dim: #B9B09C;   /* secondary text on ink */

  /* --- COLOR: GOLD ACCENT (rationed — wheel, active state, one CTA only) --- */
  --gold:       #B08D4A;  /* primary engraving / accent */
  --goldBright: #C9A66B;  /* brighter fill (CTA, bright rings) */
  --goldText:   #8A6D33;  /* gold as legible text on cream */
  --gold-dim:   #8A744A;  /* dim engraving on ink panels */
  --gold-glow:  rgba(201,165,94,.35);

  /* --- COLOR: celestial status hues (tiny accents only, never large fills) --- */
  --oxide:    #9C5B44;    /* warnings / shadow work / low meters */
  --indigo:   #3B3A5A;    /* rare night accent */

  /* --- COLOR: hairlines --- */
  --hair:     rgba(23,23,27,.10);   /* standard divider on cream */
  --hair-2:   rgba(23,23,27,.06);   /* fainter */
  --hair-ink: rgba(201,165,94,.16); /* gold hairline inside ink panels */

  /* --- TYPE --- */
  --serif: "New York","Hoefler Text",Georgia,"Times New Roman",serif;  /* display + reading */
  --sans:  -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",system-ui,sans-serif; /* interface */
  /* weights restricted to 3: 400 / 500 / 600 (hierarchy via weight, not many sizes) */

  /* type scale (display tracks tighter as it grows — Apple/Geist move) */
  --t-display:   38px;  --tr-display:  -0.011em;   /* greeting / screen title */
  --t-display-lg:46px;  --tr-display-lg:-0.018em;  /* desktop hero title */
  --t-title:     25px;  --tr-title:    -0.004em;   /* section / plate title */
  --t-subtitle:  21px;
  --t-pull:      23px;  /* pull-quote hero */
  --t-body:      16px;  --lh-body: 1.62;
  --t-label:     13.5px;
  --t-micro:     10px;  --tr-micro: 0.2em;   /* tracked-caps micro labels (Co-Star move) */

  /* --- SPACING: 4px base, Nx ladder --- */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:20px; --s6:24px;
  --s8:32px; --s10:40px; --s12:48px; --s16:64px; --s20:80px; --s24:96px;

  /* --- RADII: small discrete set --- */
  --r-sm:   13px;   /* controls / chips-as-boxes */
  --r-md:   20px;   /* event cards */
  --r-lg:   22px;   /* standard cards / ink panels */
  --r-xl:   28px;   /* hero panels */
  --r-pill: 999px;

  /* --- ELEVATION: additive warm-ink shadow ladder (never neutral grey) --- */
  --e1: 0 1px 2px rgba(60,44,24,.05);
  --e2: 0 2px 8px rgba(60,44,24,.06), 0 10px 26px rgba(60,44,24,.06);
  --e3: 0 4px 14px rgba(60,44,24,.08), 0 22px 54px rgba(50,36,18,.13);
  --e4: 0 10px 30px rgba(50,36,18,.10), 0 40px 90px rgba(40,28,14,.18);  /* desktop hero / rail */
  --eInk: 0 10px 30px rgba(10,8,6,.34), 0 2px 0 rgba(201,165,94,.10) inset;
  /* shadow-as-border: 1px zero-offset ring, composes with elevation */
  --ring-hair: 0 0 0 1px var(--hair);
  --focus: 0 0 0 2px var(--cream), 0 0 0 4px var(--goldBright);  /* double-ring keyboard focus */

  /* --- MOTION --- */
  --ease:  cubic-bezier(0.32,0.72,0,1);   /* iOS settle */
  --expo:  cubic-bezier(0.16,1,0.3,1);    /* entrance settle */
  --std:   cubic-bezier(0.25,0.1,0.25,1); /* standard ease (desktop) */
  /* SPRING SYSTEM — CSS linear() approximations of real spring physics.
     A spring overshoots then settles; linear() samples the curve so a tap
     feels like it has mass, not a canned ease. Three characters:          */
  --spring:       linear(0,.009,.035 2.1%,.141 4.4%,.723 12.9%,.938,1.077,1.141 20.4%,1.157,1.161,1.154,1.129 26.9%,1.051 32.1%,1.017,.991,.977 39%,.971 44%,.975 51.6%,.997 72.1%,1.003 80.4%,1); /* buttons/cards settle w/ a kiss of overshoot */
  --spring-soft:  linear(0,.007,.028 2.4%,.114,.243 7.4%,.879 23.4%,1.024,1.104,1.128 36%,1.122,1.096,1.072 48.1%,1.013 63%,.996,.993,.995 83.1%,1.001 98.1%,1); /* sheets / larger surfaces */
  --spring-snap:  linear(0,.063,.25,.531,.816,1.028,1.11,1.09,1.03,.992,.986,.994,1); /* row flash / quick pop, short */
  --d-micro: 120ms;   /* taps, color flips */
  --d-press: 240ms;   /* tactile depress-and-settle (spring) */
  --d-hover: 180ms;   /* pointer hover (desktop-only layer) */
  --d-move:  320ms;   /* panel / content swap */
  --d-slow:  480ms;   /* large reveals */

  /* --- DESKTOP LAYOUT GRID --- */
  --sidebar-w: 248px;   /* persistent left nav */
  --rail-w:    356px;   /* right context / reading rail */
  --gutter:    clamp(32px,3.6vw,64px);  /* zone gutter = the "frame" */
  --wheel-max: 600px;   /* birth-chart centerpiece max diameter */
}
