/* ==========================================================================
   HEZARNAVA — Color tokens
   Dark is the default and primary (only) UI theme. Light mode is NOT a
   parallel theme — see assets/wordmark for the inverted-logo-only treatment.

   Palette rationale:
   - Ground is a warm near-black (not neutral gray, not pure #000) so it
     reads like ink/vinyl rather than a UI-generic "dark mode".
   - Off-white foreground is warm (paper/manuscript), matching the accepted
     wordmark treatment (off-white on near-black).
   - Zar (gold/brass) — primary accent. Evokes gold leaf in Persian
     manuscripts and metalwork; used for the wordmark's editorial warmth,
     links, and the record label center.
   - Firuze (turquoise) — secondary accent. Persian architectural turquoise
     (Isfahan tilework); used for interactive/secondary emphasis, distinct
     from gold so the two never compete for the same job.
   - Anar (pomegranate) — error/critical. Sabz (leaf green) — success.
   All values defined in oklch for perceptual consistency across the ramp;
   hex fallback given in comments for quick reference.
   ========================================================================== */

:root {
  /* ---- Ground (surfaces) ---- */
  --color-bg-0: oklch(14% 0.004 90);   /* #0c0b0a — canvas / page */
  --color-bg-1: oklch(18% 0.005 85);   /* #151313 — raised surface (nav, player dock) */
  --color-bg-2: oklch(22% 0.006 80);   /* #1d1a19 — card / elevated surface */
  --color-bg-3: oklch(27% 0.007 78);   /* #26221f — highest elevation / popover */

  /* ---- Foreground (ink) ---- */
  --color-fg-0: oklch(96% 0.010 85);   /* #f4efe6 — primary text, headlines */
  --color-fg-1: oklch(80% 0.014 82);   /* #c8bfaf — secondary text, body on dark */
  --color-fg-2: oklch(68% 0.018 78);   /* #a09585 — tertiary / meta / captions (round 19 س۶۳: +10L so the step above fg-3 survives its lift) */
  --color-fg-3: oklch(59% 0.016 76);   /* #857c70 — third-rank text; round 19 س۶۳ lifted it from 40% to clear 4.5:1 on the page ground */

  /* ---- Structure ---- */
  --color-border: oklch(30% 0.008 80);       /* #322d29 — hairline on dark */
  --color-border-strong: oklch(40% 0.010 80);/* #453e37 — emphasized rule */

  /* ---- Zar (gold) — primary accent ---- */
  --color-zar-100: oklch(93% 0.045 85);  /* #e9dcc0 — gold tint, subtle bg */
  --color-zar-300: oklch(80% 0.090 82);  /* #cbab6c — muted gold */
  --color-zar-500: oklch(72% 0.130 80);  /* #c19a4e — Zar, core brand gold */
  --color-zar-600: oklch(66% 0.135 78);  /* #ab853c — Zar hover/pressed */
  --color-zar-700: oklch(56% 0.120 76);  /* #886a2f — Zar on light / deep */

  /* Zar as *ink* — gold that carries a whole word of text rather than an accent mark.
     In dark it IS the accent (the ground is near-black, so 72% L clears 4.5:1 everywhere).
     In light the accent and the ink have to part ways: light --color-zar-500 is 58% L, which
     on warm paper lands at 2.95-3.96:1 depending on the surface. The light override below
     drops it to the deepest gold that still reads as gold. T37 round 20 (س۷۱ الف).
     Use for gold TEXT; keep --color-zar-500 for icons, rules, pills and fills. */
  --color-zar-ink: var(--color-zar-500);

  /* ---- Firuze (turquoise) — secondary accent ---- */
  --color-firuze-300: oklch(78% 0.075 195); /* #93c9c6 — tint */
  --color-firuze-500: oklch(62% 0.095 195); /* #3f9a96 — Firuze, core */
  --color-firuze-600: oklch(54% 0.090 195); /* #2f7d7a — Firuze hover/pressed */

  /* ---- Semantic states ---- */
  --color-success: oklch(58% 0.110 145);   /* #4c8a58 — Sabz */
  --color-success-bg: oklch(24% 0.030 145);
  --color-error: oklch(55% 0.160 25);      /* #af3f38 — Anar */
  --color-error-bg: oklch(24% 0.045 25);
  --color-warning: oklch(70% 0.130 70);    /* saffron-adjacent, sparing use */
  --color-warning-bg: oklch(26% 0.035 70);

  /* ---- Links ---- */
  --color-link: var(--color-zar-500);
  --color-link-hover: var(--color-zar-300);
  --color-link-visited: var(--color-firuze-500);

  /* ---- Overlays / scrims ---- */
  --color-overlay-scrim: oklch(10% 0.005 85 / 0.72);
  --color-hairline-on-image: oklch(96% 0.01 85 / 0.16);

  /* ---- Focus ---- */
  --color-focus-ring: var(--color-firuze-500);
}
