/* ============================================================
   ORBIT — Space Exploration  |  style.css
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg:       #05060A;
  --bg2:      #080D1A;
  --text:     #F5F7FF;
  --muted:    #9299AD;
  --accent:   #8CC8FF;
  --purple:   #A78BFA;
  --border:   rgba(255,255,255,0.08);
  --glow:     rgba(140,200,255,0.15);
  --font:     'Space Grotesk', sans-serif;
  --mono:     'Space Mono', monospace;
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
ul { list-style: none; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.accent { color: var(--accent); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #05060A;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 100px;
  transition: background 0.3s var(--ease), transform 0.2s var(--ease), box-shadow 0.3s;
}
.btn-primary:hover {
  background: #b0d8ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(140,200,255,0.35);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.btn-sm  { padding: 10px 20px; font-size: 0.8rem; }
.btn-primary.btn-xl  { padding: 18px 40px; font-size: 1rem; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 24px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: color 0.3s, border-color 0.3s, transform 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.2); transform: translateY(-2px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  background: transparent;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(140,200,255,0.3);
  border-radius: 100px;
  transition: background 0.3s, border-color 0.3s, transform 0.2s;
}
.btn-outline:hover {
  background: rgba(140,200,255,0.08);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ============================================================
   HEADER
   ============================================================ */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), backdrop-filter 0.4s;
}
#header.scrolled {
  background: rgba(5, 6, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon { font-size: 1.4rem; color: var(--accent); line-height: 1; }
.logo-text  { font-family: var(--mono); font-size: 1.1rem; font-weight: 700; letter-spacing: 0.12em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  flex: 1;
  justify-content: center;
}
.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--muted);
  transition: color 0.25s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after, .nav-link:hover::after { transform: scaleX(1); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5, 6, 10, 0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.mobile-menu.open { opacity: 1; pointer-events: all; display: flex; }
.mobile-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}
.mobile-links a, .mobile-links button {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.25s;
}
.mobile-links a:hover { color: var(--accent); }

/* ============================================================
   SECTION SHARED STYLES
   ============================================================ */
.section {
  padding: 140px 0;
  position: relative;
}
.section-head {
  max-width: 1400px;
  margin: 0 auto 80px;
  padding: 0 40px;
}
.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 20px;
}
.section-title {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.section-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 60% 50%, #0d1a3a 0%, var(--bg) 70%);
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 120px 40px 80px;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.3s var(--ease) forwards;
}

.hero-title {
  display: flex;
  flex-direction: column;
  font-size: clamp(3rem, 7vw, 7.5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
  max-width: 800px;
}
.ht-line1, .ht-line2, .ht-line3 {
  display: block;
  opacity: 0;
  transform: translateY(40px);
}
.ht-line1 { animation: fadeUp 0.9s 0.5s var(--ease) forwards; }
.ht-line2 { animation: fadeUp 0.9s 0.65s var(--ease) forwards; }
.ht-line3 { 
  animation: fadeUp 0.9s 0.8s var(--ease) forwards;
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--muted);
  line-height: 1.8;
  max-width: 450px;
  margin-bottom: 44px;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s 1.0s var(--ease) forwards;
}

.hero-btns {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s 1.2s var(--ease) forwards;
}
.hero-btn-main { padding: 16px 36px; font-size: 0.95rem; }

/* Scroll Hint */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeIn 1s 1.8s forwards;
}
.scroll-line-anim {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}
.scroll-hint span {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

/* Hero Planet */
.hero-planet-wrap {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  animation: float 10s ease-in-out infinite, fadeIn 1.2s 0.5s both;
}

.planet {
  width: clamp(300px, 38vw, 560px);
  height: clamp(300px, 38vw, 560px);
  border-radius: 50%;
  position: relative;
}

.planet-surface {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(140,200,255,0.18) 0%, transparent 45%),
    radial-gradient(circle at 65% 55%, rgba(80,60,180,0.2) 0%, transparent 40%),
    conic-gradient(from 0deg,
      #0c1e55 0deg, #163570 30deg, #0e264a 70deg,
      #1a3f75 100deg, #091840 150deg, #1d4a88 200deg,
      #0a2060 240deg, #2055a0 280deg, #102a60 320deg, #0c1e55 360deg);
  overflow: hidden;
  animation: planet-spin 50s linear infinite;
}
.planet-surface::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    8deg,
    transparent 0px, transparent 18px,
    rgba(255,255,255,0.025) 18px, rgba(255,255,255,0.025) 19px,
    transparent 19px, transparent 38px,
    rgba(100,150,255,0.04) 38px, rgba(100,150,255,0.04) 39px
  );
}
.planet-surface::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255,255,255,0.10) 0%, transparent 35%),
    radial-gradient(circle at 75% 70%, rgba(0,10,40,0.75) 0%, transparent 45%);
}

.planet-shade {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 75% 65%, rgba(0,0,15,0.85) 0%, transparent 55%);
  z-index: 1;
}

.planet-atmo {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(ellipse,
    transparent 48%,
    rgba(100,170,255,0.10) 58%,
    rgba(80,130,255,0.05) 72%,
    transparent 80%
  );
  z-index: 2;
  animation: atmo-pulse 7s ease-in-out infinite;
}

.planet-glow {
  position: absolute;
  inset: -50px;
  border-radius: 50%;
  background: radial-gradient(ellipse,
    transparent 42%,
    rgba(140,200,255,0.07) 60%,
    rgba(100,160,255,0.03) 75%,
    transparent 85%
  );
  z-index: 2;
  animation: glow-pulse 9s ease-in-out infinite alternate;
}

.planet-ring-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotateX(72deg);
  width: 140%;
  height: 140%;
  pointer-events: none;
  z-index: 0;
}
.planet-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: clamp(6px, 1.5vw, 14px) solid transparent;
  border-top-color: rgba(140,200,255,0.15);
  border-bottom-color: rgba(140,200,255,0.08);
  box-shadow: 0 0 30px rgba(140,200,255,0.06);
}

/* ============================================================
   UNIVERSE SECTION
   ============================================================ */
.universe-section { background: var(--bg); }

.universe-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

.ugrid-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: border-color 0.4s;
}
.ugrid-item:hover { border-color: rgba(140,200,255,0.2); }

.ugrid-large { grid-row: 1; grid-column: 1; min-height: 480px; }
.ugrid-small { min-height: 230px; }
.ugrid-wide  { grid-column: 1 / -1; min-height: 280px; }

.ugrid-img-wrap { position: absolute; inset: 0; }
.ugrid-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.4s;
  filter: brightness(0.65) saturate(0.85);
}
.ugrid-item:hover .ugrid-img { transform: scale(1.06); filter: brightness(0.75) saturate(1); }

.ugrid-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,6,10,0.90) 0%, rgba(5,6,10,0.30) 50%, transparent 100%);
}

.ugrid-content {
  position: absolute;
  bottom: 28px; left: 28px;
  z-index: 1;
}
.ugrid-wide .ugrid-content {
  bottom: auto; top: 50%; left: 40px;
  transform: translateY(-50%);
}

.ugrid-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}
.ugrid-title {
  font-size: clamp(1.1rem, 2.2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  transition: color 0.3s;
}
.ugrid-desc {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 300px;
  line-height: 1.5;
  margin-bottom: 14px;
  transition: color 0.3s;
}
.ugrid-arrow {
  font-size: 1.2rem;
  color: var(--accent);
  display: inline-block;
  transition: transform 0.3s var(--ease), opacity 0.3s;
  opacity: 0.7;
}
.ugrid-item:hover .ugrid-arrow { transform: translateX(8px); opacity: 1; }
.ugrid-item:hover .ugrid-title { color: var(--accent); }
.ugrid-item:hover .ugrid-desc  { color: rgba(255,255,255,0.85); }

/* ============================================================
   SOLAR SYSTEM SECTION
   ============================================================ */
.solar-section { background: var(--bg2); }

.solar-wrap {
  position: relative;
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 0 40px;
}

#solarCanvas {
  width: 100%;
  height: 580px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: radial-gradient(ellipse at center, #060e20 0%, #030710 100%);
  display: block;
  cursor: pointer;
}

/* Planet Info Panel */
.planet-panel {
  position: absolute;
  top: 50%;
  right: 30px;
  transform: translateY(-50%) translateX(20px);
  width: 320px;
  background: rgba(8, 13, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(140,200,255,0.2);
  border-radius: 20px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  z-index: 10;
}
.planet-panel.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(-50%) translateX(0);
}

.panel-close {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 1rem;
  color: var(--muted);
  z-index: 1;
  padding: 4px 8px;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}
.panel-close:hover { color: var(--text); background: rgba(255,255,255,0.08); }

.panel-img-wrap { height: 160px; overflow: hidden; }
.panel-img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.9); }

.panel-body { padding: 20px; }
.panel-name { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
.panel-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }

.panel-stats { margin-bottom: 20px; }
.pstat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.pstat:last-child { border-bottom: none; }
.pstat-l { font-size: 0.75rem; color: var(--muted); }
.pstat-v { font-size: 0.8rem; font-weight: 600; color: var(--accent); text-align: right; }
.panel-btn { width: 100%; justify-content: center; }

/* Planet Selector */
.planet-selector {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.psel-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.psel-btn:hover, .psel-btn.active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(140,200,255,0.08);
}

/* ============================================================
   DISCOVERIES SECTION
   ============================================================ */
.disc-section { background: var(--bg); }

.disc-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
}
.disc-featured { grid-column: 1 / -1; }

.disc-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.4s, transform 0.4s var(--ease);
}
.disc-card:hover { border-color: rgba(140,200,255,0.25); transform: translateY(-4px); }

.disc-img-wrap { position: relative; height: 280px; }
.disc-featured .disc-img-wrap { height: 420px; }
.disc-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease), filter 0.4s; filter: brightness(0.6) saturate(0.8); }
.disc-card:hover .disc-img { transform: scale(1.04); filter: brightness(0.7) saturate(1); }

.disc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,6,10,0.98) 0%, rgba(5,6,10,0.5) 50%, transparent 100%);
}

.disc-content {
  padding: 28px 32px 32px;
  background: var(--bg);
}
.disc-featured .disc-content { background: transparent; position: absolute; bottom: 0; left: 0; right: 0; }

.disc-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  display: block;
  margin-bottom: 12px;
}
.disc-title {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.2;
}
.disc-text {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 18px;
}
.disc-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  transition: color 0.25s, gap 0.25s;
  display: inline-flex;
  align-items: center;
}
.disc-link:hover { color: #b0d8ff; }

/* ============================================================
   MISSIONS SECTION
   ============================================================ */
.missions-section { background: var(--bg2); overflow: hidden; }

.missions-outer {
  overflow: hidden;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}
.missions-track {
  display: flex;
  gap: 24px;
  transition: transform 0.6s var(--ease);
  cursor: grab;
}
.missions-track:active { cursor: grabbing; }

.mission-card {
  flex: 0 0 380px;
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: rgba(8,13,26,0.6);
  transition: border-color 0.4s, transform 0.4s var(--ease);
}
.mission-card:hover { border-color: rgba(140,200,255,0.25); transform: translateY(-4px); }

.mission-img-wrap { height: 240px; overflow: hidden; }
.mission-img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.65) saturate(0.8); transition: transform 0.8s var(--ease), filter 0.4s; }
.mission-card:hover .mission-img { transform: scale(1.05); filter: brightness(0.75) saturate(1); }

.mission-body { padding: 24px; }
.mission-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mission-org { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--muted); }
.mission-status {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 100px;
}
.s-active       { background: rgba(74,222,128,0.15); color: #4ade80; }
.s-interstellar { background: rgba(167,139,250,0.15); color: #c4b5fd; }
.s-transit      { background: rgba(251,191,36,0.15);  color: #fbbf24; }

.mission-name { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.mission-year { font-size: 0.78rem; color: var(--accent); margin-bottom: 12px; font-family: var(--mono); }
.mission-desc { font-size: 0.83rem; color: var(--muted); line-height: 1.65; margin-bottom: 20px; }

.missions-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 36px;
  padding: 0 40px;
}
.mnav-btn {
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1rem;
  color: var(--muted);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
  display: flex; align-items: center; justify-content: center;
}
.mnav-btn:hover { color: var(--text); border-color: var(--accent); background: rgba(140,200,255,0.08); }

.missions-dots { display: flex; gap: 8px; }
.mdot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s, transform 0.3s;
}
.mdot.active { background: var(--accent); transform: scale(1.4); }

/* ============================================================
   STARFIELD SECTION
   ============================================================ */
.starfield-section {
  position: relative;
  height: 80vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
}

#starfieldCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.starfield-text {
  position: relative;
  z-index: 1;
  text-align: center;
  pointer-events: none;
}
.sf-title {
  font-size: clamp(2.5rem, 6vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 16px;
  text-shadow: 0 0 60px rgba(140,200,255,0.2);
}
.sf-sub {
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.star-tip {
  position: absolute;
  background: rgba(8,13,26,0.92);
  border: 1px solid rgba(140,200,255,0.3);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.78rem;
  color: var(--text);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 2;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}
.star-tip.show { opacity: 1; }

/* ============================================================
   FINAL CTA SECTION
   ============================================================ */
.cta-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.cta-bg-img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.25) saturate(0.7); }
.cta-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(8,13,26,0.4) 0%, var(--bg) 80%),
    linear-gradient(to top, var(--bg) 0%, transparent 40%);
}

.cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px;
  max-width: 800px;
}
.cta-title {
  font-size: clamp(2.5rem, 5.5vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 20px 0 24px;
}
.cta-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 44px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}
.footer-top {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.footer-tagline { font-size: 0.9rem; color: var(--muted); margin-bottom: 24px; max-width: 300px; line-height: 1.5; }
.src-label { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.05em; display: block; margin-bottom: 10px; }
.src-links { display: flex; flex-wrap: wrap; gap: 12px; }
.src-links a {
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.25s;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
}
.src-links a:hover { color: var(--accent); border-color: var(--accent); }

.fnav-title { font-size: 0.75rem; letter-spacing: 0.15em; color: var(--muted); margin-bottom: 16px; font-family: var(--mono); }
.fnav-list { display: flex; flex-direction: column; gap: 10px; }
.fnav-list a { font-size: 0.9rem; color: var(--muted); transition: color 0.25s; }
.fnav-list a:hover { color: var(--text); }

.footer-divider {
  max-width: 1400px;
  margin: 0 auto 32px;
  padding: 0 40px;
  border-top: 1px solid var(--border);
}
.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy { font-size: 0.78rem; color: var(--muted); }

.back-top {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s;
  letter-spacing: 0.05em;
}
.back-top:hover { color: var(--accent); }

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}
@keyframes float {
  0%,100% { transform: translateY(-50%) translateY(0px); }
  50%      { transform: translateY(-50%) translateY(-20px); }
}
@keyframes planet-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes atmo-pulse {
  0%,100% { opacity: 0.8; transform: scale(1); }
  50%     { opacity: 1; transform: scale(1.015); }
}
@keyframes glow-pulse {
  from { opacity: 0.7; transform: scale(1); }
  to   { opacity: 1; transform: scale(1.02); }
}
@keyframes scroll-pulse {
  0%    { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50%   { opacity: 1; transform: scaleY(1); transform-origin: top; }
  100%  { opacity: 0; transform: scaleY(1) translateY(100%); transform-origin: top; }
}
@keyframes orbit-dot {
  from { transform: rotate(var(--start, 0deg)) translateX(var(--r, 100px)) rotate(calc(-1 * var(--start, 0deg))); }
  to   { transform: rotate(calc(var(--start, 0deg) + 360deg)) translateX(var(--r, 100px)) rotate(calc(-1 * (var(--start, 0deg) + 360deg))); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-planet-wrap { right: -80px; opacity: 0.6; }
  .universe-grid { grid-template-columns: 1fr 1fr; }
  .ugrid-large { grid-column: 1 / -1; }
  .ugrid-wide  { grid-column: 1 / -1; }
  .disc-grid { grid-template-columns: 1fr; }
  .disc-featured { grid-column: 1; }
  .planet-panel { position: relative; transform: none !important; top: auto; right: auto; width: 100%; margin-top: 16px; }
  .planet-panel.open { transform: none; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-right .btn-primary:not(.hamburger) { display: none; }
  .hamburger { display: flex; }

  .hero-planet-wrap { opacity: 0.35; right: -100px; }
  .hero-content { padding: 110px 24px 80px; }

  .section { padding: 80px 0; }
  .section-head { padding: 0 24px; margin-bottom: 48px; }

  .universe-grid { padding: 0 24px; grid-template-columns: 1fr; gap: 12px; }
  .ugrid-large, .ugrid-small, .ugrid-wide { min-height: 260px; }

  .solar-wrap { padding: 0 24px; }
  #solarCanvas { height: 360px; }
  .planet-selector { padding: 0 24px; gap: 8px; }
  .psel-btn { padding: 6px 14px; font-size: 0.75rem; }

  .disc-grid { padding: 0 24px; }
  .disc-img-wrap { height: 200px; }
  .disc-featured .disc-img-wrap { height: 260px; }
  .disc-content { padding: 20px; }

  .missions-outer { padding: 0 24px; }
  .mission-card { flex: 0 0 300px; }

  .footer-top { flex-direction: column; padding: 0 24px; gap: 32px; }
  .footer-bottom { padding: 0 24px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-divider { padding: 0 24px; }

  .cta-content { padding: 24px; }
  .missions-nav-row { padding: 0 24px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.4rem; }
  .hero-btns { flex-direction: column; align-items: flex-start; }
  .missions-track { padding-left: 0; }
  .mission-card { flex: 0 0 280px; }
  .sf-title { font-size: 2rem; }
}