/* HELIOS — scroll-driven solar system. Same cinematic language as SCROLLFILM. */

:root {
  --bg: #04060d;
  --ink: #eef2f7;
  --muted: #9aa7bd;
  --amber: #ffb454;
  --cyan: #57e6ff;
  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#film {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(0, 0, 0, 0.6) 100%);
}

#content { position: relative; z-index: 2; }

.chapter { min-height: 122vh; position: relative; }
.chapter:first-child { min-height: 108vh; }

.chapter-inner {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 6vw;
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}
.chapter.is-active .chapter-inner { opacity: 1; transform: translateY(0); }
/* soft dark halo behind the text so names and facts stay readable over bright 3D */
.chapter-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 62% 58% at 50% 50%, rgba(2, 4, 10, 0.62), rgba(2, 4, 10, 0) 70%);
  pointer-events: none;
}
.chapter-inner > * { position: relative; z-index: 1; }

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 1.2rem;
}

.mega {
  font-size: clamp(3.5rem, 15vw, 10rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 1.5rem;
  text-shadow: 0 4px 60px rgba(0, 0, 0, 0.8);
}
.mega.small { font-size: clamp(2.4rem, 9vw, 6rem); letter-spacing: 0.04em; }

h2 {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  margin: 0 0 1.2rem;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.85);
}

.lede {
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  line-height: 1.5;
  margin: 0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.9);
}

.body-copy {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.65;
  color: #d7dee9;
  max-width: 34em;
  margin: 0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.9);
}
.body-copy strong { color: #fff; }
.body-copy em { color: var(--cyan); font-style: normal; font-weight: 500; }
.nomoon { color: var(--muted); font-style: italic; }

/* moon chips */
.moons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.6rem;
  max-width: 36em;
}
.moon-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.4rem;
}
.moon-chip {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(6px);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  text-shadow: none;
}
.moon-more {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.scroll-hint {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.scroll-hint-arrow {
  display: inline-block;
  animation: bob 1.8s ease-in-out infinite;
  color: var(--amber);
}
@keyframes bob { 0%, 100% { transform: translateY(-4px); } 50% { transform: translateY(4px); } }

/* HUD */
.hud {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  padding: 0.7rem 1.2rem 0.9rem;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}
.hud-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.hud-title { color: var(--ink); font-weight: 700; }
.hud-stop { color: var(--amber); font-weight: 500; }
.hud-fps { margin-left: auto; font-family: var(--font-mono); letter-spacing: 0.05em; }
.hud-fps.good { color: #7dffa8; }
.hud-fps.warn { color: var(--amber); }
.hud-track {
  position: relative;
  height: 3px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 2px;
}
.hud-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  border-radius: 2px;
}
.hud-knob {
  position: absolute; top: 50%;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
  left: 0%;
  box-shadow: 0 0 12px rgba(255, 180, 84, 0.9);
}

.footer {
  position: relative;
  z-index: 2;
  background: #070a12;
  color: var(--muted);
  text-align: center;
  padding: 3rem 6vw;
  font-size: 0.95rem;
}
.footer a { color: var(--cyan); }
.footer .fineprint { margin-top: 0.5rem; font-size: 0.85rem; }

.nogl {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 20;
  background: #3a2b00;
  color: #ffe9bd;
  padding: 1rem;
  text-align: center;
  font-size: 0.95rem;
}
body.no-webgl .chapter-inner { opacity: 1; transform: none; }
body.no-webgl #film, body.no-webgl .vignette, body.no-webgl .hud { display: none; }

@media (prefers-reduced-motion: reduce) {
  .scroll-hint-arrow { animation: none; }
  .chapter-inner { transition: none; }
}

@media (max-width: 640px) {
  .chapter-inner { padding: 0 8vw; }
  .hud-row { font-size: 0.62rem; gap: 0.6rem; }
  .mega { letter-spacing: 0.04em; }
}

.small-note {
  font-size: clamp(0.85rem, 1.9vw, 1rem);
  color: var(--muted);
  margin-top: 1.1rem;
}
