/* ===== Design tokens ===== */
:root {
  --font-ui: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;

  --accent: #6ef0c2;
  --accent-2: #7aa7ff;
  --accent-3: #c38bff;
  --warm: #ffb36b;
  --rain-ink: #8fd0ff;

  /* Anything drawn directly over the 3D scene stays light, whatever the theme. */
  --on-scene: #f6f9fd;
  --on-scene-2: rgba(246, 249, 253, .82);
  --on-scene-3: rgba(246, 249, 253, .62);

  --i-sun: #ffc85a;
  --i-moon: #eceff7;
  --i-cloud: #e9eff8;
  --i-cloud-2: #aeb9cb;
  --i-rain: #7cc4ff;
  --i-snow: #ffffff;
  --i-bolt: #ffd84d;
  --moon-dark: #1b2030;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070a12;
  --text: #eef2f8;
  --text-2: rgba(238, 242, 248, .7);
  --text-3: rgba(238, 242, 248, .58); /* ≥ 4.5:1 on the dark glass */
  --glass: rgba(16, 20, 32, .4);
  --glass-strong: rgba(13, 17, 27, .78);
  --card-solid: #151b29;
  --stroke: rgba(255, 255, 255, .08);
  --stroke-2: rgba(255, 255, 255, .12);
  --track: rgba(255, 255, 255, .11);
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, .6);
  --veil: #070a12;
  --accent-ink: var(--accent);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #e9eef5;
  --text: #0f1726;
  --text-2: rgba(15, 23, 38, .68);
  --text-3: rgba(15, 23, 38, .62); /* ≥ 4.5:1 on the light glass */
  --glass: rgba(255, 255, 255, .52);
  --glass-strong: rgba(250, 252, 255, .88);
  --card-solid: #ffffff;
  --stroke: rgba(255, 255, 255, .8);
  --stroke-2: rgba(15, 23, 38, .09);
  --track: rgba(15, 23, 38, .09);
  --shadow: 0 30px 70px -34px rgba(30, 45, 80, .38);
  --veil: #e9eef5;
  --accent-ink: color-mix(in oklab, var(--accent) 52%, #0b1220);
  --rain-ink: #2b8fe0;
  --i-cloud: #9fb0c6;
  --i-cloud-2: #6f84a2;
  --i-moon: #8e9bb8;
  --i-snow: #8fbfec;
  --i-sun: #ffa91a;
  --moon-dark: #7e899c;
}

[data-palette="aurora"] { --accent: #6ef0c2; --accent-2: #7aa7ff; --accent-3: #c38bff; --warm: #ffb36b; }
[data-palette="frost"] { --accent: #9fd8ff; --accent-2: #c9e6ff; --accent-3: #7fa2ff; --warm: #ffd6a8; }
[data-palette="golden"] { --accent: #ffb45e; --accent-2: #ff7b6b; --accent-3: #ffd98a; --warm: #ff9a4d; }
[data-palette="neon"] { --accent: #ff4fd8; --accent-2: #3df2ff; --accent-3: #a66bff; --warm: #ffcf5c; }
[data-palette="paper"] { --accent: #e8e4dc; --accent-2: #bdb8ae; --accent-3: #8f8a80; --warm: #d9cbb4; }
[data-theme="light"][data-palette="paper"] { --accent: #4a4741; --accent-2: #8f8a80; --accent-3: #bdb8ae; }
[data-theme="light"][data-palette="frost"] { --accent-2: #5f8fd8; }

/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
  overflow-x: hidden;
}
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:disabled { cursor: default; }
a { color: inherit; }
svg { display: block; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  color: #06111c;
  background: var(--accent);
  transform: translate(-50%, -160%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }
[hidden] { display: none !important; }
.muted { color: var(--text-2); }

/* Solid surfaces for people who ask the system for less transparency. */
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: var(--card-solid); --glass-strong: var(--card-solid); }
}

[data-motion="reduced"] *, [data-motion="reduced"] *::before, [data-motion="reduced"] *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
}
