/* blue hour — color tokens (DESIGN.md §4)
   Concept: dusk & dawn of the same blue hour.
   Dusk (dark) is primary and the default. Dawn (light) is the toggle: [data-theme="light"].
   One variable name, two modes. Never hardcode hex in components — always reference a token. */

:root {
  /* ---- Dusk — dark (primary / default) ---- */

  /* backgrounds — depth comes from surface steps, not shadow */
  --bg: #0E0A1F;          /* page */
  --surface: #1A1438;     /* cards, panels */
  --raised: #221A45;      /* raised, hover */

  /* purple — the night sky; height & depth */
  --purple-soft: #B7A4FA; /* accent text, icons */
  --purple: #8B5CF6;      /* primary: buttons, links */
  --purple-deep: #6D4ED6; /* hover/pressed, borders */

  /* cyan — the last daylight */
  --cyan-soft: #7DECFB;   /* highlight */
  --cyan: #22D3EE;        /* accent, handwritten tagline */
  --cyan-deep: #0EA5C0;   /* deep line, hover */

  /* warm — that one sun point; rarest light, smallest accent only */
  --warm-soft: #FFC79C;   /* soft glow */
  --warm: #FFB27A;        /* golden-hour accent + eyebrow/label text */
  --warm-deep: #F2974F;   /* emphasis within warm */

  /* neutrals (dark) */
  --ink: #ECEDFF;         /* body text, headings */
  --lede: #D7D2F2;        /* lede / intro — visible lavender-white */
  --muted: #B5AFD6;       /* subtitles, captions */
  --faint: #8E88B8;       /* meta, page numbers — tertiary only, never body */
  --line: rgba(150, 160, 255, .13); /* borders, dividers */

  --eyebrow: var(--warm); /* eyebrow/label text colour (warm on dusk) */

  /* ---- Semantic aliases (mode-agnostic; reference these in components) ---- */
  --text-strong: var(--ink);
  --text-body: var(--ink);
  --text-lede: var(--lede);
  --text-muted: var(--muted);
  --text-faint: var(--faint);
  --text-link: var(--cyan);

  --surface-page: var(--bg);
  --surface-card: var(--surface);
  --surface-raised: var(--raised);

  --accent: var(--purple);          /* primary action */
  --accent-hover: var(--purple-deep);
  --accent-2: var(--cyan);          /* secondary accent */
  --accent-warm: var(--warm);       /* smallest accent */

  --border: var(--line);
  --border-strong: var(--purple-deep);

  /* on-accent text — dark ink sits on bright purple/cyan fills (DESIGN.md §19) */
  --on-accent: var(--bg);
}

[data-theme="light"] {
  /* ---- Dawn — light (secondary) — same hues, inverted brightness ---- */

  --bg: #F4F3FB;          /* page (lavender-white) */
  --surface: #EAE8F5;     /* cards */
  --raised: #DEDAF0;      /* raised */

  --purple-soft: #8B5CF6; /* accent, fills */
  --purple: #6D4ED6;      /* primary: links, buttons (text-safe) */
  --purple-deep: #4F3CB0; /* headings, emphasis */

  --cyan-soft: #1FB6D4;   /* accent, fills */
  --cyan: #0E9FB8;        /* handwritten tagline on light */
  --cyan-deep: #0A7C90;   /* text / links (text-safe) */

  --warm-soft: #FFB27A;   /* smallest accents, fills */
  --warm: #E8843B;        /* emphasis */
  --warm-deep: #B5621F;   /* warm text on light (text-safe) */

  --ink: #140E2C;         /* body text, headings */
  --lede: #2E2754;        /* lede / intro */
  --muted: #5E588A;       /* subtitles, captions */
  --faint: #8A84AE;       /* meta */
  --line: rgba(20, 14, 44, .12); /* borders */

  --eyebrow: #C2691F;     /* warm-deep, readable on light */

  /* on light: links/text use the -deep tints */
  --text-link: var(--cyan-deep);
  --on-accent: #FFFFFF;   /* white ink on the darker dawn purple/cyan fills */
}
