/* ============================================================
   BOOKHOUS & ANKH MEDIA — Design Tokens
   Brand palette derived from the cartouche logo:
   deep ink black · burnished gold · warm stone · aged cream
   ============================================================ */

:root {
  /* --- Brand gold ramp --- */
  --gold:          #C9A84C;
  --gold-light:    #E8C96A;
  --gold-dim:      #8B6914;
  --gold-mute:     #5A4410;
  --gold-on-dark:  #FAC775;   /* gold readable on near-black */

  /* --- Ink / stone backgrounds --- */
  --ink-0:   #080705;   /* deepest: hero backgrounds */
  --ink-1:   #0E0C09;   /* page background */
  --ink-2:   #1A1712;   /* card surfaces */
  --ink-3:   #2A2620;   /* elevated cards, subtle borders */
  --ink-4:   #3A3530;   /* dividers, muted borders */
  --ink-5:   #5A5550;   /* placeholder text */

  /* --- Text on dark backgrounds --- */
  --text-primary:    #E8C96A;   /* headings — warm gold */
  --text-secondary:  #B8B0A0;   /* body prose — aged cream */
  --text-tertiary:   #8B7D6A;   /* captions, meta */
  --text-muted:      #5A5550;   /* disabled, placeholder */

  /* --- Semantic --- */
  --danger:       #D85A5A;
  --danger-dim:   #3A1A1A;
  --success:      #5AAA7A;

  /* --- Typography --- */
  --font-display:  'Cinzel', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --font-body:     'EB Garamond', 'Garamond', 'Times New Roman', Georgia, serif;
  --font-ui:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* --- Spacing scale --- */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;

  /* --- Radius --- */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-pill: 100px;

  /* --- Borders --- */
  --border-subtle:  0.5px solid var(--ink-4);
  --border-mid:     0.5px solid var(--ink-3);
  --border-gold:    0.5px solid var(--gold-dim);
  --border-gold-hi: 1px solid var(--gold);

  /* --- Transitions --- */
  --transition: 150ms ease;
}

/* ============================================================
   LIGHT MODE OVERRIDES
   The site defaults to dark (brand-true). Light mode softens
   backgrounds to warm parchment while keeping gold accents.
   ============================================================ */
[data-theme="light"] {
  --ink-0:   #F5F0E8;
  --ink-1:   #EAE4D8;
  --ink-2:   #FFFFFF;
  --ink-3:   #E0DAD0;
  --ink-4:   #C8C0B0;
  --ink-5:   #A09080;

  --text-primary:   #2A1F0A;
  --text-secondary: #4A3820;
  --text-tertiary:  #7A6040;
  --text-muted:     #A09080;

  --gold:       #8B6010;
  --gold-light: #A07820;
  --gold-dim:   #C8A050;
  --border-gold: 0.5px solid #C8A050;
  --border-gold-hi: 1px solid #8B6010;
}

/* ============================================================
   ACCESSIBILITY MODE
   Larger text, higher contrast, reduced motion, focus rings
   ============================================================ */
[data-a11y="true"] {
  font-size: 112.5%;   /* 18px base from 16px */
  --transition: 0ms;   /* no motion */
}

[data-a11y="true"] *:focus-visible {
  outline: 3px solid var(--gold) !important;
  outline-offset: 3px !important;
}

[data-a11y="true"] body {
  line-height: 1.9;
}

/* Respect OS reduced motion regardless of toggle */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
