/* ============================================================
   MERIDIAN — DESIGN TOKENS
   Single source of truth for color, type, spacing, motion timing.
   ============================================================ */

:root {
  /* ---- Color ---- */
  --ivory: #F3F1EA;
  --header-bg: rgba(243, 241, 234, 0.88);
  --paper: #EAE6DC;
  --stone: #B7AF9E;
  --concrete: #6B6558;    /* darkened in Phase 5 for AA text contrast — was #8C8477 */
  --charcoal: #2B2924;
  --ink: #141310;
  --accent: #4B6357;      /* verdigris — interactive / key marks only */
  --accent-dim: #3A4D44;
  --line: rgba(43, 41, 36, 0.14);
  --line-strong: rgba(43, 41, 36, 0.28);
  --line-on-dark: rgba(243, 241, 234, 0.18);

  /* ---- Type ---- */
  --font-display: 'Fraunces', 'Iowan Old Style', serif;
  --font-sans: 'Instrument Sans', -apple-system, 'Segoe UI', sans-serif;

  --fs-hero: clamp(2.75rem, 8vw, 7.5rem);
  --fs-xl: clamp(2rem, 5vw, 4.25rem);
  --fs-lg: clamp(1.5rem, 3vw, 2.5rem);
  --fs-md: clamp(1.15rem, 1.6vw, 1.5rem);
  --fs-body: 1.0625rem;
  --fs-sm: 0.9rem;
  --fs-xs: 0.78rem;

  /* ---- Layout ---- */
  --gutter: clamp(1.5rem, 5vw, 4rem);
  --max-width: 1600px;
  --header-h: 84px;

  /* ---- Motion ---- */
  --ease-architectural: cubic-bezier(0.65, 0, 0.15, 1);
  --dur-fast: 240ms;
  --dur-mid: 520ms;
  --dur-slow: 900ms;

  /* ---- Portfolio plate tones (light mode) ---- */
  --tone-a: #E4E0D4;
  --tone-b: #D9D3C2;
  --tone-c: #E1DED2;
  --tone-d: #DCD6C6;
  --tone-e: #E6E2D6;
  --tone-f: #D6D0BF;

  /* ---- Fixed (never themed) — the final CTA is deliberately always a
     dark, high-contrast panel in BOTH light and dark mode, for rhythm.
     Everything else in the system uses the swappable tokens above. ---- */
  --ink-fixed: #141310;
  --ivory-fixed: #F3F1EA;
}

/* ============================================================
   DARK MODE — art-directed independently, not an inversion.
   "Nighttime architecture": warm near-black, soft off-white type,
   a brighter verdigris so the accent still reads at low light.
   ============================================================ */
[data-theme="dark"] {
  --ivory: #15140F;       /* page background */
  --header-bg: rgba(21, 20, 15, 0.88);
  --paper: #1D1B15;       /* elevated surface / panels */
  --stone: #595445;       /* decorative + large-text only (2.4:1) */
  --concrete: #A79F8D;    /* secondary text — 7:1 on --ivory */
  --charcoal: #ECE8DC;    /* primary text — 15:1 on --ivory */
  --ink: #F1EEE3;         /* adaptive high-contrast fill (buttons, cursor) */
  --accent: #7FA08D;      /* brighter verdigris — 6.4:1 on --ivory */
  --accent-dim: #5B7768;
  --line: rgba(243, 241, 234, 0.10);
  --line-strong: rgba(243, 241, 234, 0.22);
  --line-on-dark: rgba(243, 241, 234, 0.18);

  --tone-a: #23211A;
  --tone-b: #201E17;
  --tone-c: #262319;
  --tone-d: #211F18;
  --tone-e: #24221A;
  --tone-f: #1E1C15;
}
