/* ============================================================
   EL-LADI · DESIGN TOKENS
   Single source of truth for color, type, spacing, radii,
   shadows, motion and z-index. Ported from the design-system
   handoff (colors.css + typography.css + spacing.css + base.css
   variables), resolved against tokens/final.css — the locked
   Tweaks-panel decisions, which override the pre-lock values
   below and are the values that actually render. Do not
   re-derive or re-tune; treat every value here as final.

   Frozen selections baked into the values below:
     Atmosphere Sunlit · Pace Intimate · Section rhythm Sand
     Hero scrim Neutral · Hero overlay Balanced · Hero focus Center
     Texture Paper · Dark section Espresso · Greek heading Garamond
     Letterspacing Default · Edges Soft · CTA buttons Pill
     Depth Soft · Gold Logo · Origin watermark Subtle
   ============================================================ */
:root {
  /* —— Brand gold (from the EL-LADI logo) —— */
  --gold-100: #F6EFD8;   /* faint wash / tint backgrounds */
  --gold-200: #EBDDB4;
  --gold-300: #DCC68C;
  --gold-400: #C8B273;   /* PRIMARY gold — the logo gold */
  --gold-500: #B89C57;
  --gold-600: #A8893F;   /* deep gold — hover / large text only: 3.08:1 on cream (AA-large) */
  --gold-700: #8A6E30;   /* 4.47:1 on cream — just under AA for small text */
  --gold-800: #7A5F26;   /* small gold text on cream — 5.6:1, the only AA-safe gold for body/label sizes */

  /* —— Warm ink (near-black, never pure #000) —— */
  --ink-900: #1F1B16;    /* headings */
  --ink-800: #2A241C;
  --ink-700: #4A443B;    /* body copy */
  --ink-500: #6F675A;    /* secondary text */
  --ink-400: #8A8275;    /* muted / captions */
  --ink-300: #B6AE9E;    /* disabled */

  /* —— Cream / ivory surfaces (Atmosphere: Sunlit) —— */
  --cream:   #FAF6EC;    /* default page background */
  --ivory:   #FFFFFF;    /* cards, raised surfaces */
  --sand:    #F2EADA;    /* alternating section band */
  --linen:   #ECE3D1;    /* deeper warm neutral / dividers */
  --img-filter: saturate(1.03);
  --atmo-tint: transparent;

  /* —— Olive grove greens (from packaging imagery) —— */
  --olive-100: #E8EADD;
  --olive-300: #A7B187;
  --olive-500: #6B7A4F;  /* sage olive accent */
  --olive-700: #3E472F;  /* deep grove green */

  /* —— Warm dark surface (Dark section: Espresso) —— */
  --espresso: #16130E;
  --espresso-soft: #221D15;
  --scrim-rgb: 18, 14, 10;   /* photo scrim base */
  --hero-rgb: 18, 14, 10;    /* hero scrim — locked Neutral */

  /* —— Lines & shadows base —— */
  --border-rgb: 31, 27, 22;
  --gold-rgb: 168, 137, 63;

  /* ============================================================
     SEMANTIC COLOR ALIASES — reference these in components.
     ============================================================ */
  --surface-page:   var(--cream);
  --surface-card:   var(--ivory);
  --surface-alt:    var(--sand);
  --surface-dark:   var(--espresso);
  --surface-tint:   var(--gold-100);
  --band-alt:       var(--sand);   /* Section rhythm: Sand */

  --text-heading:   var(--ink-900);
  --text-body:      var(--ink-700);
  --text-muted:     var(--ink-400);   /* 3.52:1 on cream — fails AA at --fs-label sizes; contrast pass parked until after launch (var(--ink-500) is the 5.17:1 fix) */
  --text-on-dark:   #F4EEDF;
  --text-on-dark-muted: rgba(244, 238, 223, 0.66);

  /* —— Gold: Logo (locked accent mapping) —— */
  --accent:         #C8B273;
  --accent-strong:  #A8893F;
  --accent-ink:     #8A6E30;
  --accent-text:    var(--accent-strong);   /* small gold text on cream. Contrast pass parked until after launch (accent-strong is ~3.08:1, fails AA below ~24px) — repoint to var(--gold-800) to fix in one line */

  --border:         rgba(var(--border-rgb), 0.12);
  --border-strong:  rgba(var(--border-rgb), 0.22);
  --border-gold:    rgba(var(--gold-rgb), 0.45);
  --border-on-dark: rgba(244, 238, 223, 0.18);

  --focus-ring:     var(--gold-700);   /* solid: the old 55% tint composited to ~1.8:1, under the 3:1 minimum for focus indicators */

  /* ============================================================
     TYPOGRAPHY
     ============================================================ */

  /* Families */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gr-display:   'EB Garamond', 'Cormorant Garamond', Georgia, serif; /* Greek headings only — swap --font-display to this on the GR document (Phase 5/6) */

  /* Fluid type scale (min → max via viewport) — Pace: Intimate */
  --fs-display:  clamp(3.5rem, 1.8rem + 7.5vw, 8rem);     /* hero wordmark */
  --fs-h1:       clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  --fs-h2:       clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem);
  --fs-h3:       clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --fs-h4:       clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-lead:     clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --fs-body:     1.0625rem;   /* 17px */
  --fs-sm:       0.9375rem;   /* 15px */
  --fs-xs:       0.8125rem;   /* 13px */
  --fs-label:    0.75rem;     /* 12px uppercase labels */

  /* Weights */
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Line heights */
  --lh-tight: 1.05;
  --lh-snug: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.56;

  /* Letter spacing (Letterspacing: Default) */
  --ls-tight: -0.01em;
  --ls-normal: 0;
  --ls-wide: 0.08em;
  --ls-label: 0.22em;   /* uppercase eyebrow labels */

  /* ============================================================
     SPACING / LAYOUT
     ============================================================ */

  /* Spacing scale (8px base) */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4 */
  --space-2: 0.5rem;    /* 8 */
  --space-3: 0.75rem;   /* 12 */
  --space-4: 1rem;      /* 16 */
  --space-5: 1.5rem;    /* 24 */
  --space-6: 2rem;      /* 32 */
  --space-7: 3rem;      /* 48 */
  --space-8: 4rem;      /* 64 */
  --space-9: 6rem;      /* 96 */
  --space-10: 8rem;     /* 128 */

  /* Section vertical rhythm — Pace: Intimate */
  --section-y: clamp(2.5rem, 1.6rem + 4vw, 5.5rem);

  /* Content widths */
  --content-narrow: 44rem;   /* editorial prose */
  --content-base:   64rem;
  --content-wide:   80rem;
  --content-max:    90rem;

  /* Radii — Edges: Soft */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --btn-radius: 999px;   /* CTA buttons: Pill */

  /* Shadows — Depth: Soft */
  --shadow-xs: 0 1px 2px rgba(var(--border-rgb), 0.05);
  --shadow-sm: 0 2px 8px rgba(var(--border-rgb), 0.06);
  --shadow-md: 0 10px 30px rgba(var(--border-rgb), 0.08);
  --shadow-lg: 0 24px 60px rgba(var(--border-rgb), 0.12);
  --shadow-gold: 0 12px 36px rgba(var(--gold-rgb), 0.22);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 0.25s;
  --dur-base: 0.45s;
  --dur-slow: 0.9s;

  /* Z-index */
  --z-nav: 50;
  --z-overlay: 100;
  --z-modal: 110;

  /* ============================================================
     LOCKED SECTION-SPECIFIC TOKENS
     Values from tokens/final.css that don't fold into a category
     above — consumed directly by the Hero, Craft/dark-section,
     and Story sections when those are built (Phase 6).
     ============================================================ */
  --hd-a1: 0.78;   /* Hero overlay: Balanced — scrim alpha stop 1 */
  --hd-a2: 0.55;   /* Hero overlay: Balanced — scrim alpha stop 2 */
  --hd-a3: 0.22;   /* Hero overlay: Balanced — scrim alpha stop 3 */
  --hd-v1: 0.28;   /* Hero overlay: Balanced — vignette stop 1 */
  --hd-v2: 0.42;   /* Hero overlay: Balanced — vignette stop 2 */
  --hero-pos: center;   /* Hero focus: Center */
  --tex-opacity: 0.09;   /* Texture: Paper (paper-grain overlay, Phase 7) */
  --story-wm-opacity: 0.05;   /* Origin watermark: Subtle (Story section) */
}

/* Cormorant Garamond has no Greek glyphs, so on Greek pages every heading was silently
   falling through the font stack past it to Georgia — the 4 self-hosted EB Garamond files
   were never actually used. This was flagged as a to-do on --gr-display above but the
   actual swap was never written. `html[lang^="el"]` beats plain `:root` by specificity. */
html[lang^="el"] {
  --font-display: var(--gr-display);
}
