:root {
  color-scheme: dark;
  --bg: #04040a;
  --fg: #f5f5f7;
  --muted: #9b9bab;
  --line: rgba(255, 255, 255, 0.14);
  --glass: rgba(18, 16, 32, 0.55);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  font: 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(ellipse at 50% 38%, #1a1233 0%, #090714 45%, var(--bg) 78%);
  background-attachment: fixed;
}
a { color: inherit; }

/* The canvas is a transparent overlay on the gradient above, so the page still looks fine without WebGL. */
canvas[data-galaxy] {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
}
canvas[data-galaxy].ready { opacity: 1; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  color: var(--fg);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.pill:hover, .pill:focus-visible { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.35); }
.pill:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(1rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) 1rem max(1.25rem, env(safe-area-inset-left));
}
.mark { font-weight: 600; letter-spacing: -0.01em; text-decoration: none; opacity: 0; transition: opacity 0.5s; }
.scrolled .mark { opacity: 0.9; }

/* ---------- scroll story ---------- */
.spacer { display: none; }
.stage { position: relative; z-index: 2; }
.panel {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  background: radial-gradient(ellipse 55% 38% at 50% 50%, rgba(4, 4, 10, 0.62), transparent 100%);
}
.js .spacer { display: block; height: 650vh; }
.js .stage { position: fixed; inset: 0; pointer-events: none; }
.js .panel { position: absolute; inset: 0; min-height: 0; opacity: 0; will-change: opacity, transform, filter; }
.js .panel a { pointer-events: auto; }

h1 {
  margin: 0;
  font-size: clamp(3.2rem, 13vw, 9.5rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.045em;
  background: linear-gradient(180deg, #fff 20%, #b9b0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 6rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #fff 30%, #a9b8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.panel p { margin: 0; max-width: 28rem; color: #c9c9d8; text-shadow: 0 1px 24px rgba(4, 4, 10, 0.9); font-size: clamp(1rem, 2.4vw, 1.35rem); }
.cue { margin-top: 2rem !important; font-size: 0.8rem !important; letter-spacing: 0.3em; text-transform: uppercase; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(8px); opacity: 1; } }
.cta { margin-top: 1rem; padding: 0.8rem 1.8rem; font-size: 1.05rem; }

@media (prefers-reduced-motion: reduce) { .cue { animation: none; } canvas[data-galaxy] { transition: none; } }
