/* ═══════════════════════════════════════════════════════════════
   Perihelion X — Planet Page Template
   All planet pages share this stylesheet. Per-planet accent colour
   is set via --accent on <body data-planet="..."> by planet.js.
   ═══════════════════════════════════════════════════════════════ */

html, body {
  background-color: var(--bg);
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ── Back navigation ─────────────────────────────────────────── */
.back-nav {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.25s ease, opacity 0.25s ease;
  /* Hidden until page overlay finishes — JS sets opacity:1 */
  opacity: 0;
  /* Prevent it from being giant if CSS loads before JS */
  max-width: 160px;
}

.back-nav svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.back-nav span {
  /* Hide text label on small screens — arrow alone is sufficient */
  display: inline;
}

.back-nav:hover {
  color: #fff;
}

.back-nav:hover svg {
  transform: translateX(-3px);
}

.back-nav:focus-visible {
  outline: 2px solid var(--accent, #fff);
  outline-offset: 4px;
  border-radius: 2px;
}

@media (max-width: 480px) {
  .back-nav span {
    display: none;
  }
  .back-nav {
    top: 1rem;
    left: 1rem;
  }
}

/* ── Transition overlay ──────────────────────────────────────── */
.page-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #080810;
  opacity: 1;
  pointer-events: none;
  /* CSS failsafe: if JS never fires, fade out after 2s so page isn't stuck black */
  animation: overlayFallback 0.6s ease-out 2s forwards;
}

@keyframes overlayFallback {
  to { opacity: 0; visibility: hidden; }
}

/* ── Mute toggle ─────────────────────────────────────────────── */
.mute-toggle {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  z-index: 200;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.mute-toggle:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.05);
}

.mute-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.mute-icon {
  width: 18px;
  height: 18px;
  position: absolute;
  transition: opacity 0.2s ease;
}

.mute-icon.mute-off { opacity: 0; }
.mute-toggle[aria-pressed="true"] .mute-icon.mute-on  { opacity: 0; }
.mute-toggle[aria-pressed="true"] .mute-icon.mute-off { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   SECTION 1 — HERO
   ═══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 500px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 4rem 5vw;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Slow ken-burns scale */
  animation: heroBgScale 20s ease-in-out infinite alternate;
  transform-origin: center;
  /* Fade in after image loads */
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-bg.loaded {
  opacity: 1;
}

/* Fallback gradient shown before image loads */
.hero-bg-fallback {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, var(--accent, #4B9CD3) 0%, #080810 65%);
  opacity: 0.4;
}

@keyframes heroBgScale {
  from { transform: scale(1.0); }
  to   { transform: scale(1.05); }
}

/* Bottom gradient overlay */
.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8, 8, 16, 0.15) 0%,
    rgba(8, 8, 16, 0.0)  30%,
    rgba(8, 8, 16, 0.6)  60%,
    rgba(8, 8, 16, 0.96) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 700px;
}

.hero-label {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent, #fff);
  opacity: 0.8;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 0.9;
  color: #fff;
  margin-bottom: 1rem;
}

.hero-descriptor {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  max-width: 480px;
  line-height: 1.6;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  right: 5vw;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-indicator-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50%       { transform: scaleY(0.5) translateY(-12px); opacity: 0.8; }
}

/* ═══════════════════════════════════════════════════════════════
   SECTION 2 — CHARACTER PARAGRAPH
   ═══════════════════════════════════════════════════════════════ */
.section-character {
  background: #080810;
  padding: 8rem 5vw;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.character-text {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.75);
  max-width: 680px;
  /* Visibility controlled by word-token children (A7) */
}

.pull-quote {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.3;
  color: var(--accent, #fff);
  border-left: 2px solid var(--accent, #fff);
  padding-left: 2rem;
  margin: 3.5rem 0 0 0;
  max-width: 700px;
  /* A7: JS controls reveal via clip-path; start hidden */
  opacity: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION 3 — KEY DATA
   ═══════════════════════════════════════════════════════════════ */
.section-data {
  background: #06060e;
  padding: 8rem 5vw;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-data-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent, rgba(255,255,255,0.4));
  margin-bottom: 3.5rem;
  /* GSAP reveal — starts invisible */
  opacity: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 3rem 4rem;
}

.stat-block {
  /* GSAP reveal */
  opacity: 0;
  transform: translateY(20px);
}

.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.stat-unit {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--accent, rgba(255,255,255,0.5));
  letter-spacing: 0.05em;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.6rem;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION 4 — ONE REMARKABLE THING
   ═══════════════════════════════════════════════════════════════ */
.section-remarkable {
  padding: 10rem 5vw;
  position: relative;
  overflow: hidden;
}

.section-remarkable::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(var(--accent-rgb, 75, 156, 211), 0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.remarkable-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.remarkable-eyebrow {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.remarkable-text {
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.remarkable-text em {
  font-style: normal;
  color: var(--accent, #fff);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   G12 — Remarkable Things Carousel
   ═══════════════════════════════════════════════════════════════ */
.remarkable-label {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent, rgba(255,255,255,0.4));
}

.remarkable-counter {
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.25);
  font-variant-numeric: tabular-nums;
}

.remarkable-track {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remarkable-progress-wrap {
  width: 120px;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 2rem auto 0;
  overflow: hidden;
  border-radius: 1px;
}

.remarkable-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent, rgba(255,255,255,0.5));
  box-shadow: 0 0 6px var(--accent, rgba(255,255,255,0.3));
}

.remarkable-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.remarkable-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.remarkable-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.remarkable-btn:focus-visible {
  outline: 2px solid var(--accent, #fff);
  outline-offset: 3px;
}

.remarkable-btn svg {
  width: 16px;
  height: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION 5 — SCALE VISUALISATION
   ═══════════════════════════════════════════════════════════════ */
.section-scale {
  background: #06060e;
  padding: 8rem 5vw;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-scale-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.scale-svg-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 5rem;
  margin: 4rem 0;
  /* GSAP reveal */
  opacity: 0;
  transform: translateY(20px);
}

.scale-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.scale-circle {
  border-radius: 50%;
  flex-shrink: 0;
  /* GSAP scale from 0 */
  transform: scale(0);
}

.scale-circle.earth-ref {
  background: radial-gradient(circle at 38% 38%, #80c8f0, #4B9CD3 50%, #2a6a9a);
  box-shadow: 0 0 20px rgba(75, 156, 211, 0.3);
}

.scale-circle.planet-target {
  background: radial-gradient(circle at 38% 38%,
    var(--scale-hi, #ccc),
    var(--scale-mid, #888) 50%,
    var(--scale-lo, #444)
  );
  box-shadow: 0 0 30px rgba(var(--accent-rgb, 75, 156, 211), 0.25);
}

.scale-name {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  /* GSAP reveal */
  opacity: 0;
}

.scale-note {
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.3);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.7;
  /* GSAP reveal */
  opacity: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION 6 — NAVIGATION
   ═══════════════════════════════════════════════════════════════ */
.section-nav {
  padding: 6rem 5vw;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.section-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.nav-planet-link {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.nav-planet-link:hover {
  opacity: 1;
}

.nav-planet-link.prev { align-items: flex-start; }
.nav-planet-link.next { align-items: flex-end; }

.nav-planet-direction {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.nav-planet-name {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #fff;
}

.nav-solar-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  opacity: 0.4;
  transition: opacity 0.3s ease;
  color: #fff;
}

.nav-solar-link:hover {
  opacity: 0.9;
}

.nav-solar-icon {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-solar-icon svg {
  width: 14px;
  height: 14px;
}

.nav-solar-label {
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

/* ── Image skeleton ──────────────────────────────────────────── */
.hero-bg-fallback {
  animation: skeletonPulse 2.4s ease-in-out infinite alternate;
}

@keyframes skeletonPulse {
  from { opacity: 0.3; }
  to   { opacity: 0.5; }
}

/* Stop pulsing once real image is loaded */
.hero-bg.loaded ~ .hero-bg-fallback,
.hero-bg.loaded + .hero-gradient + .hero-bg-fallback {
  animation: none;
  opacity: 0.15;
}

/* ── Focus states (global for planet pages) ──────────────────── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent, #fff);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav-planet-link:focus-visible {
  outline: 2px solid var(--accent, rgba(255,255,255,0.6));
  outline-offset: 6px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .section-character,
  .section-remarkable { padding: 6rem 4vw; }
  .section-data        { padding: 6rem 4vw; }
  .section-scale       { padding: 6rem 4vw; }
  .section-nav         { padding: 5rem 4vw; }
}

@media (max-width: 768px) {
  .hero { padding: 3rem 1.5rem; }

  .section-character,
  .section-data-inner,
  .section-scale-inner,
  .remarkable-inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .section-character { padding: 2rem 1.5rem; }
  .section-data      { padding: 2rem 1.5rem; }
  .section-remarkable{ padding: 2rem 1.5rem; }
  .section-scale     { padding: 2rem 1.5rem; }
  .section-nav       { padding: 1.5rem 1.5rem; }
  .section-orbit     { padding: 1.5rem 1.5rem !important; }
  .section-timeline  { padding: 1.5rem 1.5rem !important; }
  .section-compare   { display: none !important; }
  .section-moons     { padding: 2rem 1.5rem; }
  .section-nasa-gallery { padding: 1.5rem 1.5rem !important; }

  .section-label { margin-bottom: 1.25rem; opacity: 1 !important; transform: none !important; }
  .section-orbit-inner { gap: 0.75rem; }
  .orbit-diagram { max-height: 260px; }
  .orbit-diagram-wrap, .orbit-caption { opacity: 1 !important; transform: none !important; }
  .moons-intro { opacity: 1 !important; transform: none !important; }
  .moon-card { opacity: 1 !important; transform: none !important; }
  .stat-block { opacity: 1 !important; transform: none !important; }
  .timeline-track { margin-top: 1rem; }
  .nasa-gallery-intro { margin-bottom: 1rem; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .section-nav-inner {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .nav-solar-link {
    grid-column: 1 / -1;
    order: -1;
  }

  .scale-svg-wrapper {
    gap: 3rem;
  }

  .pull-quote {
    padding-left: 1.25rem;
  }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ── A7: Word token (injected by JS for word-by-word reveal) ──── */
.word-token {
  display: inline-block;
  white-space: pre;
}

/* ── Scroll progress bar (A9) ─────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent, #fff);
  box-shadow: 0 0 8px var(--accent, #fff), 0 0 16px rgba(var(--accent-rgb, 255 255 255) / 0.4);
  z-index: 250;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.scroll-progress.visible {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   G15 — Orbital Position: All-Planets Comparative Diagram
   ═══════════════════════════════════════════════════════════════ */
.section-orbit {
  background: #04040c;
  padding: 6rem 5vw;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-orbit-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.orbit-diagram-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.orbit-diagram {
  width: min(620px, 100%);
  height: auto;
  overflow: visible;
}

.orbit-path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

.orbit-path-current {
  fill: none;
  stroke-width: 1.5;
  stroke: var(--accent, #4B9CD3);
  opacity: 0.3;
}

/* Dot group: rotates around SVG centre (310px 310px) — set via JS */
.orbit-dot-group {
  animation: orbitTravel linear infinite;
  /* transform-origin set inline via JS to match SVG coordinate space */
}

@keyframes orbitTravel {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.orbit-sun-dot {
  fill: #FDB813;
  filter: drop-shadow(0 0 6px rgba(253,184,19,0.7));
}

.orbit-caption {
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.6;
  text-align: center;
  max-width: 560px;
}

.orbit-caption strong {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

/* ── Orbit legend ──────────────────────────────────────────────── */
.orbit-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.5rem;
  max-width: 620px;
  opacity: 0;
}

.orbit-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.orbit-legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--legend-color, rgba(255,255,255,0.4));
}

.orbit-legend-name {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.orbit-legend-period {
  font-size: 0.58rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.05em;
}

.orbit-legend-item.orbit-legend-current .orbit-legend-name {
  color: var(--accent, #fff);
  opacity: 0.9;
}

.orbit-legend-item.orbit-legend-current .orbit-legend-dot {
  box-shadow: 0 0 6px var(--accent, rgba(255,255,255,0.5));
}

.orbit-legend-item.orbit-legend-current .orbit-legend-period {
  color: rgba(255, 255, 255, 0.45);
}

/* ═══════════════════════════════════════════════════════════════
   D2 — Mission Timeline
   ═══════════════════════════════════════════════════════════════ */
.section-timeline {
  background: #080810;
  padding: 6rem 5vw;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-timeline-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.timeline-track {
  display: flex;
  gap: 1px;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  margin-top: 2rem;
  position: relative;
}

.timeline-track::before {
  content: '';
  position: absolute;
  top: 1.6rem;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.timeline-track::-webkit-scrollbar { height: 2px; }
.timeline-track::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

.timeline-item {
  flex-shrink: 0;
  width: 200px;
  padding: 0 1.25rem 0 0;
  position: relative;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, #fff);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 8px var(--accent, rgba(255,255,255,0.5));
  flex-shrink: 0;
}

.timeline-year {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent, #fff);
  opacity: 0.8;
  margin-bottom: 0.35rem;
  display: block;
}

.timeline-mission {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.3rem;
  display: block;
}

.timeline-achievement {
  font-size: 0.7rem;
  font-weight: 300;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.38);
}

.timeline-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent, #fff);
  opacity: 0.5;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.timeline-link:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   B8 — Distance Humaniser
   ═══════════════════════════════════════════════════════════════ */
.stat-humaniser {
  display: block;
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.28);
  margin-top: 0.25rem;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.6s ease 0.3s;
}

.stat-block.revealed .stat-humaniser {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   B9 — Comparative Planet Row
   ═══════════════════════════════════════════════════════════════ */
.section-compare {
  background: #04040c;
  padding: 5rem 5vw;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.compare-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}


.compare-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 2vw, 1.5rem);
  overflow-x: auto;
  padding: 2rem 0 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.compare-row::-webkit-scrollbar { height: 2px; }
.compare-row::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

.compare-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.compare-body:hover { opacity: 0.75; }

.compare-body.current-planet .compare-orb {
  box-shadow: 0 0 0 2px var(--accent, #fff), 0 0 16px var(--accent, rgba(255,255,255,0.3));
}

.compare-orb {
  border-radius: 50%;
  display: block;
}

.compare-label {
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
}

.compare-body.current-planet .compare-label {
  color: var(--accent, #fff);
  opacity: 0.9;
}

/* ═══════════════════════════════════════════════════════════════
   D3 — "You Are Here" Banner (planet pages)
   ═══════════════════════════════════════════════════════════════ */
.you-are-here {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: rgba(8, 8, 16, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2rem;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (max-width: 768px) {
  .you-are-here {
    white-space: normal;
    text-align: center;
    max-width: calc(100vw - 3rem);
    font-size: 0.58rem;
    letter-spacing: 0.04em;
  }

  /* Orbit legend is 8 items at 0.6rem — unreadable on mobile, hide it */
  .orbit-legend {
    display: none;
  }

  /* Timeline: fade right edge to hint there's more to scroll */
  .section-timeline {
    position: relative;
  }

  .section-timeline::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4rem;
    background: linear-gradient(to right, transparent, #080810);
    pointer-events: none;
    z-index: 1;
  }

  /* Make timeline items slightly narrower so ~2 are visible as a hint */
  .timeline-item {
    width: 160px;
  }
}

.you-are-here.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.you-are-here-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4B9CD3;
  box-shadow: 0 0 6px rgba(75, 156, 211, 0.8);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   B3 — NASA Image Gallery
   ═══════════════════════════════════════════════════════════════ */
.section-nasa-gallery {
  background: #04040c;
  padding: 6rem 5vw;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nasa-gallery-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.nasa-gallery-intro {
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 2rem;
}

.nasa-filmstrip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.nasa-filmstrip::-webkit-scrollbar { height: 3px; }
.nasa-filmstrip::-webkit-scrollbar-track { background: transparent; }
.nasa-filmstrip::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.nasa-film-item {
  position: relative;
  flex-shrink: 0;
  width: 200px;
  height: 130px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0a0a14;
  cursor: pointer;
  padding: 0;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.nasa-film-item:hover {
  transform: scale(1.03);
  border-color: rgba(255,255,255,0.25);
}

.nasa-film-item:focus-visible {
  outline: 2px solid var(--accent, #fff);
  outline-offset: 2px;
}

.nasa-film-thumb {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

.nasa-film-item:hover .nasa-film-thumb {
  transform: scale(1.06);
}

.nasa-film-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4,4,12,0.9) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.6rem 0.7rem;
  gap: 0.2rem;
}

.nasa-film-title {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.8);
  line-height: 1.3;
}

.nasa-film-date {
  font-size: 0.58rem;
  font-weight: 300;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.05em;
}

.nasa-gallery-source {
  margin-top: 1.5rem;
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.2);
}

.nasa-source-link {
  color: rgba(255,255,255,0.35);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.15);
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.nasa-source-link:hover { color: rgba(255,255,255,0.7); }

/* ── NASA Image Lightbox ─────────────────────────────────────── */
.nasa-lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nasa-lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.nasa-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 8, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nasa-lightbox-inner {
  position: relative;
  z-index: 1;
  max-width: min(900px, 92vw);
  max-height: 90svh;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
}

.nasa-lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 501;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  transition: color 0.2s, background 0.2s;
}
.nasa-lightbox-close:hover { color: #fff; background: rgba(255,255,255,0.15); }
.nasa-lightbox-close svg { width: 18px; height: 18px; }

.nasa-lightbox-img-wrap {
  border-radius: 8px;
  overflow: hidden;
  background: #04040c;
}

.nasa-lightbox-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 60svh;
  object-fit: contain;
}

.nasa-lightbox-caption {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nasa-lightbox-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.04em;
}

.nasa-lightbox-desc {
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
}

.nasa-lightbox-credit {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════
   Moons Section
   ═══════════════════════════════════════════════════════════════ */
.section-moons {
  background: #06060f;
  padding: 6rem 5vw;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-moons-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.moons-intro {
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.65);
  margin: 0.5rem 0 2.5rem;
  line-height: 1.7;
}

.moons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.moon-card {
  background: #06060f;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: background 0.2s ease;
}

.moon-card:hover {
  background: #0c0c1e;
}

.moon-card-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.moon-name {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent, #fff);
}

.moon-designation {
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
}

.moon-desc {
  font-size: 0.72rem;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.5);
}

.moon-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-top: 0.25rem;
}

.moon-fact {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.moon-fact-value {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

.moon-fact-label {
  font-size: 0.58rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
}

.moon-card.moon-featured {
  grid-column: 1 / -1;
}

@media (max-width: 600px) {
  .moons-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-bg,
  .scroll-indicator-line,
  .orbit-dot-group,
  .word-token,
  .scroll-progress,
  .you-are-here,
  .remarkable-progress-bar,
  .remarkable-track {
    animation: none !important;
    transition: none !important;
  }
  .hero-bg {
    filter: none !important;
    transform: none !important;
  }
}
