/* ============================================================
   DEATH DREAMS STUDIO — design tokens (website build)
   Derived from the exported design system (design-system/
   colors_and_type.css, v1.0 May 2026). Palette and scales are
   verbatim; fonts are the licensed web substitutes (see FONT
   NOTES); the light theme is new for the website rebuild.

   Theme resolution:
   1. :root            → dark (brand default)
   2. system light     → light, unless the visitor chose dark
   3. data-theme attr  → explicit visitor choice, wins over system
   ============================================================ */

/* FONT NOTES — licensing:
   The design system's local faces CANNOT ship on a commercial site:
   Germanika is Personal Use; Bogart is a trial (the system itself
   says to license it for production). Web substitutes, all Google
   Fonts / OFL, named by the design system's own README:
   blackletter → UnifrakturMaguntia, display → Cinzel Decorative.
   If Bogart (or Seagull SB) is ever licensed, swap it into
   --font-display and self-host under assets/fonts/. */

:root {
  /* --- Base palette (design system, verbatim) --- */
  /* Darks */
  --color-void:      #0a0a0a;
  --color-ash:       #141414;
  --color-charcoal:  #1e1e1e;
  --color-stone:     #2e2e2e;
  --color-iron:      #3d3d3d;
  --color-flint:     #545454;
  /* Light / text */
  --color-bone:      #e8e0d0;
  --color-pale-bone: #c8bfb0;
  --color-dust:      #7a7060;
  --color-parchment: #d4b896;
  --color-white:     #ffffff;
  /* Blood reds */
  --color-blood:     #8b0000;
  --color-crimson:   #c0392b;
  --color-scarlet:   #d63031;
  --color-rust:      #6b1c1c;
  /* Gold / metal */
  --color-gold:      #b8960c;
  --color-old-gold:  #8a6e0a;
  --color-bronze:    #7c5c1a;

  /* Show palettes */
  --color-eodas-mint:       #5ce8a0;
  --color-eodas-mint-dim:   #2ea86b;
  --color-eodas-purple:     #7c5cbf;
  --color-eodas-purple-dim: #5a3e9a;
  --color-eodas-bg:         #0d1a14;
  --color-wod-gold:  #d4a017;
  --color-wod-fire:  #c45c1a;
  --color-wod-deep:  #1a0a00;
  --color-wod-sky:   #1a3d5c;
  --color-ded-parchment: #d4b896;
  --color-ded-red:   #c0392b;
  --color-ded-dark:  #1a1008;

  /* --- Type (licensed web stacks) ---
     Hierarchy: Roman names places, Eczar makes statements.
     nameplate = interior page titles (The Library, Merch…), once per page;
     display   = hero statements, H2 sections, H3 card titles. */
  --font-blackletter: 'UnifrakturMaguntia', serif;             /* DDS wordmark, metal titles */
  --font-nameplate:   'Luxurious Roman', serif;                 /* H1 page titles — single weight, inscription */
  --font-display:     'Eczar', serif;                           /* hero + H2/H3 working headings */
  --font-display-alt: 'Eczar', serif;                           /* kept for compat with design-system names */
  --font-body:        'Crimson Pro', 'IM Fell English', Georgia, serif;
  --font-body-alt:    'IM Fell English', Georgia, serif;        /* flavor / in-world text */
  --font-ui:          'Rajdhani', 'Trebuchet MS', sans-serif;   /* labels, nav, CTAs */
  --font-mono:        'Share Tech Mono', 'Courier New', monospace;

  /* --- Spacing / radius (design system, verbatim) --- */
  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.25rem;  --space-6: 1.5rem;
  --space-8: 2rem;     --space-10: 2.5rem;  --space-12: 3rem;
  --space-16: 4rem;    --space-20: 5rem;    --space-24: 6rem;
  --radius-sm: 2px; --radius-md: 4px; --radius-lg: 8px; --radius-full: 9999px;
  --gutter: 16px;

  /* --- Semantic: dark theme (default) --- */
  --bg: var(--color-void);
  --bg-raised: var(--color-ash);
  --bg-elevated: var(--color-charcoal);
  --ink: var(--color-bone);
  --ink-muted: var(--color-pale-bone);
  --ink-faint: var(--color-dust);
  --accent: var(--color-crimson);        /* links */
  --accent-strong: var(--color-scarlet); /* hover, active */
  --accent-deep: var(--color-blood);     /* large fills, borders — not small text on Void */
  --gold: var(--color-gold);
  --border: var(--color-stone);
  --focus-ring: var(--color-scarlet);
}

/* --- Semantic: light theme — aged parchment and ink (new for the
   website; AA-adjusted, so some values differ from the raw palette) --- */
:root[data-theme="light"] {
  --bg: #e8e0d0;
  --bg-raised: #efe8da;
  --bg-elevated: #f5efe2;
  --ink: #1a1410;
  --ink-muted: #5d5346;
  --ink-faint: #7a7060;
  --accent: #8b0000;
  --accent-strong: #a31f12;
  --accent-deep: #6e0000;
  --gold: #7a6308;        /* darkened: raw gold fails AA on parchment */
  --border: #cfc4ae;
  --focus-ring: #8b0000;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #e8e0d0;
    --bg-raised: #efe8da;
    --bg-elevated: #f5efe2;
    --ink: #1a1410;
    --ink-muted: #5d5346;
    --ink-faint: #7a7060;
    --accent: #8b0000;
    --accent-strong: #a31f12;
    --accent-deep: #6e0000;
    --gold: #7a6308;
    --border: #cfc4ae;
    --focus-ring: #8b0000;
  }
}
