/* ============================================================
   COVALENT BOND — BRAND v1.0 TOKENS
   Single source of truth for both:
     · Tier A — Web / Digital (the website; default)
     · Tier B — Documents / Print (used only by future document
       export modules, never by website pages)

   This file is loaded after base.css so its values override the
   legacy palette. Keep old --black/--text aliases so prior CSS that
   referenced them continues to work and shifts to the new brand
   colours automatically.
   ============================================================ */
:root {
  /* ── TIER A — Web / Digital (default) ───────────────── */
  --ink:          #0A0A0A;
  --graphite:     #14130F;
  --gold:         #C9A961;
  --ivory:        #F5F1E8;
  --dim:          rgba(245, 241, 232, 0.6);
  --line:         rgba(201, 169, 97, 0.22);
  --line-soft:    rgba(245, 241, 232, 0.08);

  /* ── TIER B — Documents / Print (reference only) ────── */
  --doc-bg:        #FBFCFD;
  --doc-surface:   #FFFFFF;
  --doc-ink:       #1A2944;
  --doc-gold:      #C9A84C;
  --doc-gold-deep: #8A6B3E;
  --doc-panel:     #E8D6A8;
  --doc-muted:     #4A5468;
  --doc-line:      rgba(26, 41, 68, 0.12);
  --doc-success:   #2D7A4F;

  /* ── Typography ─────────────────────────────────────── */
  --font-display:  'Cormorant Garamond', Georgia, serif;
  --font-body:     'Inter Tight', system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, monospace;
  --font-arabic:   'IBM Plex Sans Arabic', sans-serif;

  /* ── Spacing scale (8px base) ───────────────────────── */
  --space-1:  8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --space-8: 128px;

  /* ── Back-compat aliases for the legacy palette ─────────
     Existing CSS uses --black, --text, --td, --tm, --s0..--s3,
     --b1..--b3, --gold-l, --gold-d, --gold-f, --green, --blue.
     Map them onto the new tokens so the site shifts to brand v1.0
     colours without rewriting every inline-style block. ──────── */
  --black:    var(--ink);
  --text:     var(--ivory);
  --td:       rgba(245, 241, 232, 0.62);
  --tm:       rgba(245, 241, 232, 0.42);
  --s0:       #0F0E0B;
  --s1:       #131210;
  --s2:       #161512;
  --s3:       #1B1A15;
  --b1:       rgba(201, 169, 97, 0.14);
  --b2:       rgba(201, 169, 97, 0.18);
  --b3:       rgba(201, 169, 97, 0.28);
  --gold-l:   #D9BE7E;
  --gold-d:   #9A7D42;
  --gold-f:   rgba(201, 169, 97, 0.07);
  --green:    #2D7A4F;
  --blue:     #3A6A9C;
}

/* ── Arabic font when document direction is RTL or lang=ar ──── */
[lang="ar"],
[dir="rtl"] {
  font-family: var(--font-arabic) !important;
}
[lang="ar"] *,
[dir="rtl"] * {
  font-family: var(--font-arabic);
}
/* Display serif inside Arabic still uses Cormorant where authored */
[lang="ar"] [style*="Cormorant"],
[dir="rtl"] [style*="Cormorant"] {
  font-family: var(--font-display) !important;
}
