/* Design tokens. Dark "night sky" is the default; light "dawn" follows the device preference.
   Override with <html data-theme="light|dark">. */

:root {
  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-text: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 40px;
  --gutter: 16px;
  --radius: 10px;
  --tap: 48px;

  --glow-pulse: 3.6s;
  --petal-drift: 16s;
  --sway: 7s;
}

:root,
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg-top: #070b24;
  --bg-mid: #121a4a;
  --bg-bottom: #241a52;
  --star: rgba(255, 255, 255, 0.85);
  --text: #eef1ff;
  --text-dim: #aab3dd;
  --panel-top: rgba(34, 48, 120, 0.92);
  --panel-bottom: rgba(14, 20, 66, 0.94);
  --panel-edge: rgba(214, 224, 255, 0.55);
  --panel-inner: rgba(214, 224, 255, 0.18);
  --path-dim: rgba(150, 168, 255, 0.28);
  --path-lit: #bff3ff;
  --node-fill: #0b1236;
  --node-edge: rgba(190, 205, 255, 0.55);
  --accent: #7fe3ff;
  --accent-ink: #04122b;
  --focus-ring: #ffe38a;
  --blossom-edge: rgba(255, 255, 255, 0);
  --halo: #0b1236;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    color-scheme: light;
    --bg-top: #efe9ff;
    --bg-mid: #f8e8f3;
    --bg-bottom: #ffeede;
    --star: rgba(120, 100, 190, 0.35);
    --text: #1d1a45;
    --text-dim: #55507f;
    --panel-top: rgba(255, 255, 255, 0.96);
    --panel-bottom: rgba(244, 238, 255, 0.96);
    --panel-edge: rgba(70, 60, 140, 0.5);
    --panel-inner: rgba(70, 60, 140, 0.14);
    --path-dim: rgba(80, 70, 160, 0.3);
    --path-lit: #4b3fd0;
    --node-fill: #ffffff;
    --node-edge: rgba(60, 50, 130, 0.65);
    --accent: #3a2fb8;
    --accent-ink: #ffffff;
    --focus-ring: #b04a00;
    --blossom-edge: rgba(60, 40, 90, 0.4);
    --halo: #f8f1fb;
  }
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg-top: #efe9ff;
  --bg-mid: #f8e8f3;
  --bg-bottom: #ffeede;
  --star: rgba(120, 100, 190, 0.35);
  --text: #1d1a45;
  --text-dim: #55507f;
  --panel-top: rgba(255, 255, 255, 0.96);
  --panel-bottom: rgba(244, 238, 255, 0.96);
  --panel-edge: rgba(70, 60, 140, 0.5);
  --panel-inner: rgba(70, 60, 140, 0.14);
  --path-dim: rgba(80, 70, 160, 0.3);
  --path-lit: #4b3fd0;
  --node-fill: #ffffff;
  --node-edge: rgba(60, 50, 130, 0.65);
  --accent: #3a2fb8;
  --accent-ink: #ffffff;
  --focus-ring: #b04a00;
  --blossom-edge: rgba(60, 40, 90, 0.4);
  --halo: #f8f1fb;
}

/* Reduced motion: no ambient animation, no flourishes, no smooth scrolling. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --glow-pulse: 0s;
    --petal-drift: 0s;
    --sway: 0s;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
