/* Vyzora Design Tokens — Primitives Layer (ADR-008-A)
 * ----------------------------------------------------------------------------
 * Architectural Mid-Tone direction. Raw scales. Zero semantic meaning.
 * Pages MUST consume role tokens from semantic.css, never these directly.
 *
 * Locked 2026-05-09 by ADR-008-A:
 *  - Lock 1A: bg-primary = #1F2128 (AAA-7:1 on warm cream; warm undertone)
 *  - Architectural charcoal, NOT black canvas, NOT void-black
 *  - Sienna + brass two-accent system (state-domain only)
 *  - Cool-blue-slate enters chart-domain only (heat-cold, NOT a state token)
 *
 * Verified WCAG AAA on body / AA on UI markers via check_wcag_tokens.py.
 * ============================================================================
 */

:root {
  /* ── Charcoal (warm, mineral) — operational dark surfaces ─────────────────
   * Lifted secondary surfaces with VISIBLE tonal separation. Anti-near-black.
   * ~3.5% L* shift per step preserves "constructed not void" guardrail. */
  --charcoal-50:  #F0E9D6;  /* warm cream — text-primary on dark */
  --charcoal-100: #C9C0A8;  /* text-secondary */
  --charcoal-200: #9C9582;  /* text-tertiary */
  --charcoal-300: #5A5C68;  /* border-strong, candle-doji */
  --charcoal-400: #3D3F49;  /* border-hairline, conviction-dot-inactive */
  --charcoal-500: #363842;  /* surface-3 (elevated chip) */
  --charcoal-600: #2D2F38;  /* surface-2 (panel) */
  --charcoal-700: #262830;  /* surface-1 (cell substrate) */
  --charcoal-800: #1F2128;  /* bg-primary — Lock 1A architectural charcoal */

  /* ── Linen (warm fog) — public/editorial light surfaces ──────────────────
   * Drafting-paper register, not pure white. Same brand family as charcoal. */
  --linen-50:  #FFFFFF;  /* surface-1 light */
  --linen-100: #F4F0E5;  /* bg-primary light — drafting linen off-white */
  --linen-200: #EDE7D6;  /* surface-2 light */
  --linen-300: #D8D0BC;  /* border-hairline light */
  --linen-400: #A8A294;  /* border-strong light */
  --linen-500: #7A7560;  /* text-tertiary light */
  --linen-600: #54503F;  /* text-secondary light */
  --linen-700: #1F1D17;  /* text-primary light — warm ink */

  /* ── Burnt sienna — warning paint on control panels ──────────────────────
   * State token domain only (pending, blocked, action-primary fill). */
  --sienna-300: #E68A6A;
  --sienna-400: #D87357;
  --sienna-500: #C45D43;  /* core; lens-candle-down, lens-heat-hot */
  --sienna-600: #A34A33;  /* action-primary fill (AA-clearing on cream) */
  --sienna-700: #7C3825;

  /* ── Oxidized brass — plate hardware patina ──────────────────────────────
   * State token domain only (approved, in-progress, accent-trace, action border).
   * MUST read industrial/oxidized/functional — NOT luxury metallic. */
  --brass-300: #D9B872;
  --brass-400: #C5A35A;  /* core; state-approved, conviction-dot-active */
  --brass-500: #A88A45;  /* state-in-progress, lens-candle-up */
  --brass-600: #8A7035;  /* state-approved on light parchment */
  --brass-700: #5F4D24;

  /* ── Cool-blue-slate — chart-domain ONLY (heat-cold) ────────────────────
   * Cyanotype-faded; LCH H ~230–250. Per quant C1: brass-tarnish for cold
   * leaks into state-approved cognitive prior. Slate stays firewalled to
   * chart-domain; never appears in state semantics. */
  --slate-300: #8AA8BD;
  --slate-400: #6E91A7;
  --slate-500: #5A7E97;  /* lens-heat-cold core */
  --slate-600: #45637A;
  --slate-700: #314A5E;

  /* ── Heat ramp midpoints (LCH-interpolated; mid-chroma brass-grey) ───────
   * Per quant C2: --lens-heat-neutral is a TRUE midpoint, not surface-graphite.
   * surface-graphite is reserved for --lens-heat-nodata + hatch overlay. */
  --heat-cool-mid:    #7E8D8C;  /* between slate-500 cold + neutral */
  --heat-neutral-mid: #8C8576;  /* mid-chroma brass-grey, true midpoint */
  --heat-warm-mid:    #B57C5A;  /* between neutral + sienna-500 hot */

  /* ── Spacing scale (4px-base hybrid; no 6/10/14/20) ──────────────────── */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;

  /* ── Radius scale (cap 8px; default 2px — Bloomberg/CAD geometry) ────── */
  --radius-1: 2px;
  --radius-2: 2px;  /* default — sharp not pillowy per founder guardrail 1 */
  --radius-3: 4px;
  --radius-4: 6px;
  --radius-pill: 999px;

  /* ── Type scale (8 sizes) ────────────────────────────────────────────── */
  --type-11: 11px;
  --type-12: 12px;
  --type-13: 13px;
  --type-14: 14px;
  --type-16: 16px;
  --type-18: 18px;
  --type-22: 22px;
  --type-28: 28px;

  /* ── Line-height ratios ──────────────────────────────────────────────── */
  --lh-tight: 1.2;
  --lh-body:  1.45;
  --lh-dense: 1.3;

  /* ── Font stacks — Bricolage / Spectral / JuliaMono (Lock per ADR-008-E)
   * Locked 2026-05-09. IBM Plex family RETIRED. Recursive RETIRED.
   * --font-display = 216pt cover, masthead labels via wdth axis
   * --font-body    = clause body, lede, long-form
   * --font-mono    = timestamps, hashes, run IDs, governance glyphs (§ ¶ ∴)
   * Use --font-display via .vyz-display { font-family: var(--font-display); }
   * NEVER use IBM Plex on Vyzora pages — kept on disk for rollback only.
   */
  --font-display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --font-sans:    'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Spectral', Georgia, 'Times New Roman', serif;
  --font-serif:   'Spectral', Georgia, 'Times New Roman', serif;
  --font-mono:    'JuliaMono', ui-monospace, 'SF Mono', 'Menlo', monospace;

  /* ── Motion (cap 240ms; no values above) ─────────────────────────────── */
  --dur-1: 120ms;
  --dur-2: 160ms;
  --dur-3: 200ms;
  --dur-4: 240ms;

  /* ── Motion easing ────────────────────────────────────────────────────
   * Default --ease-out; --ease-in-out reserved for state-escalation only. */
  --ease-out:      cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-standard: cubic-bezier(0.2, 0.0, 0.0, 1);
  --ease-in-out:   cubic-bezier(0.4, 0.0, 0.2, 1);

  /* ── Border widths ───────────────────────────────────────────────────── */
  --border-hair: 1px;
  --border-thin: 2px;
  --border-rail: 3px;  /* reserved: active rail / Live-Execution Gate framing */

  /* ── Letter-spacing primitives (eyebrow / mono caps register) ────────── */
  --eyebrow-tracking: 0.10em;  /* governs the universal mono-eyebrow opener
                                * (was inline at 0.06/0.08/0.10em across stave) */

  /* ── Z-index scale ───────────────────────────────────────────────────── */
  --z-base:    0;
  --z-rail:    10;
  --z-sticky:  50;
  --z-overlay: 100;
  --z-modal:   1000;
}

/* ── Material presence — subliminal grain (founder lock: no skeuomorphism) ──
 * Single SVG noise applied at root, multiplied at 3% alpha. Disappears below
 * 24px viewing distance per spec. NOT applied per-cell (paint-once). */
html[data-theme="dark"] body::before,
html[data-theme="light"] body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='2'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}
