/* ============================================================
   HAIL MARY — Companion Site
   Mobile-first, space-themed, delightful
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --bg-deep:    #060912;
  --bg-dark:    #0a0e1a;
  --bg-mid:     #0f172a;
  --bg-card:    #111827;
  --bg-card2:   #141e33;

  --text-primary:   #e8edf8;
  --text-secondary: #8b9cc4;
  --text-muted:     #4a5578;

  --accent-amber:  #F4A261;
  --accent-teal:   #48CAE4;
  --accent-gold:   #fbbf24;
  --accent-glow:   rgba(244, 162, 97, 0.15);

  --border:        rgba(72, 202, 228, 0.12);
  --border-bright: rgba(72, 202, 228, 0.3);

  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'Space Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --nav-h: 60px;
  --section-pad: 80px 0;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: var(--accent-teal); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---------- Starfield ---------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Nav ---------- */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(6, 9, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent-amber);
}

.nav-links {
  display: none;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text-primary); text-decoration: none; }
.nav-links .nav-spoiler { color: var(--accent-amber); }

/* Hamburger */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 20px 20px;
  gap: 4px;
  border-top: 1px solid var(--border);
}

.mobile-menu.open { display: flex; }

.mobile-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  transition: color 0.2s;
}

.mobile-link:hover { color: var(--text-primary); text-decoration: none; }
.mobile-link.spoiler-link { color: var(--accent-amber); }

/* ---------- Hero ---------- */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px 80px;
  z-index: 1;
}

.hero-content {
  max-width: 700px;
  animation: heroFadeIn 1.2s ease both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--accent-amber);
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0.9;
}

.hero-title {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
  margin-bottom: 28px;
}

.title-line {
  font-size: clamp(4rem, 18vw, 9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-shadow: 0 0 80px rgba(72, 202, 228, 0.12);
}

.title-line.accent {
  color: var(--accent-amber);
  text-shadow: 0 0 80px rgba(244, 162, 97, 0.3);
}

.hero-tagline {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-bright);
  color: var(--text-secondary);
  background: rgba(72, 202, 228, 0.04);
}

.hero-cta {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent-amber);
  color: var(--bg-deep);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 40px;
  transition: all 0.25s;
  box-shadow: 0 0 40px rgba(244, 162, 97, 0.3);
}

.hero-cta:hover {
  background: #f7b97a;
  box-shadow: 0 0 60px rgba(244, 162, 97, 0.5);
  transform: translateY(-2px);
  text-decoration: none;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 0.9; transform: translateX(-50%) translateY(6px); }
}

.scroll-arrow {
  width: 16px;
  height: 16px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
}

/* ---------- Shared Section Styles ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: var(--section-pad);
}

.section-dark {
  background: var(--bg-mid);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-teal);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 48px;
  line-height: 1.7;
}

/* ---------- Mission ---------- */
.lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.mission-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.mission-text p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
}

.mission-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}

.stat-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-amber);
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Ship ---------- */
.ship-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.ship-svg-wrap {
  background: radial-gradient(ellipse at center, rgba(72,202,228,0.05) 0%, transparent 70%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 30px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ship-svg { width: 100%; max-width: 380px; }

.engine-glow {
  animation: enginePulse 2s ease-in-out infinite;
}

@keyframes enginePulse {
  0%, 100% { opacity: 0.1; }
  50%       { opacity: 0.35; }
}

.thrust {
  animation: thrustFlicker 0.3s ease-in-out infinite alternate;
}

@keyframes thrustFlicker {
  from { opacity: 0.25; transform: scaleY(0.9); }
  to   { opacity: 0.5;  transform: scaleY(1.1); }
}

.ship-specs h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-teal);
  margin-bottom: 20px;
}

.spec-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.spec-item:last-child { border-bottom: none; }

.spec-key {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.spec-val {
  font-size: 0.88rem;
  color: var(--text-primary);
  text-align: right;
}

/* ---------- Science Grid ---------- */
.science-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.science-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.35s ease;
  opacity: 0;
  transform: translateY(20px);
}

.science-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.science-card:hover {
  border-color: rgba(72, 202, 228, 0.25);
  background: var(--bg-card2);
  transform: translateY(-3px);
}

.sci-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
}

.science-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.science-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
}

.sci-fact {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 10px 14px;
  background: rgba(72, 202, 228, 0.04);
  border-left: 3px solid var(--accent-teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.5;
}

.sci-fact strong { color: var(--accent-teal); }

/* ---------- Crew ---------- */
.crew-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.crew-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all 0.3s;
}

.crew-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
}

.crew-card.featured {
  border-color: rgba(244, 162, 97, 0.3);
  background: linear-gradient(135deg, var(--bg-card), rgba(244, 162, 97, 0.04));
}

.crew-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.rg-avatar {
  background: linear-gradient(135deg, #1a2545, #2a3f6e);
  color: var(--accent-amber);
  border: 2px solid rgba(244, 162, 97, 0.4);
  box-shadow: 0 0 30px rgba(244, 162, 97, 0.15);
}

.dir-avatar {
  background: linear-gradient(135deg, #0f2235, #1a3a5c);
  color: var(--accent-teal);
  border: 2px solid rgba(72, 202, 228, 0.3);
}

.scr-avatar {
  background: linear-gradient(135deg, #1a1a2e, #2d2d4e);
  color: #a78bfa;
  border: 2px solid rgba(167, 139, 250, 0.3);
}

.avatar-initials { font-size: 0.9rem; }

.crew-role {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.crew-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.crew-bio {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 10px;
}

.crew-credits {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- Profile ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: all 0.3s;
}

.profile-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
}

.profile-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
}

.profile-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.profile-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- Book ---------- */
.book-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.book-cover-wrap {
  display: flex;
  justify-content: center;
}

.book-cover {
  width: 200px;
  aspect-ratio: 2/3;
  background: linear-gradient(160deg, #1a2a4a 0%, #0a0e1a 100%);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-bright);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow:
    6px 6px 0 rgba(0,0,0,0.4),
    0 20px 60px rgba(72, 202, 228, 0.1),
    inset 0 0 40px rgba(72, 202, 228, 0.04);
  transition: transform 0.3s;
}

.book-cover:hover {
  transform: rotate(-2deg) translateY(-4px);
}

.book-cover-title {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-teal);
  line-height: 1.2;
  letter-spacing: 0.05em;
}

.book-cover-author {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
}

.book-cover-stars {
  font-size: 0.85rem;
  color: var(--accent-gold);
  letter-spacing: 0.1em;
}

.book-text .lead {
  margin-bottom: 16px;
}

.book-text p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.book-quotes {
  margin: 24px 0;
}

blockquote {
  border-left: 3px solid var(--accent-amber);
  padding: 14px 18px;
  background: rgba(244, 162, 97, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

blockquote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.book-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.bstat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bstat-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-amber);
}

.bstat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Facts ---------- */
.facts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fact-item {
  display: flex;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
  align-items: flex-start;
}

.fact-item:last-child { border-bottom: none; }

.fact-item:hover .fact-num {
  color: var(--accent-amber);
}

.fact-num {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.3s;
  flex-shrink: 0;
  min-width: 44px;
  line-height: 1;
  padding-top: 4px;
}

.fact-text h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.fact-text p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- Spoiler Section ---------- */
.spoiler-section { min-height: 400px; }

.spoiler-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.spoiler-gate-inner {
  text-align: center;
  max-width: 400px;
}

.spoiler-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 20px;
  filter: grayscale(0.3);
}

.spoiler-gate-inner h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.spoiler-gate-inner p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.6;
}

.unlock-btn {
  background: transparent;
  border: 2px solid var(--accent-amber);
  color: var(--accent-amber);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.25s;
}

.unlock-btn:hover {
  background: var(--accent-amber);
  color: var(--bg-deep);
  box-shadow: 0 0 40px rgba(244, 162, 97, 0.3);
}

.spoiler-content {
  animation: fadeSlideIn 0.6s ease both;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.spoiler-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.spoiler-card {
  background: rgba(244, 162, 97, 0.05);
  border: 1px solid rgba(244, 162, 97, 0.2);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.3s;
}

.spoiler-card:hover {
  border-color: rgba(244, 162, 97, 0.4);
  background: rgba(244, 162, 97, 0.08);
}

.spoiler-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--accent-amber);
}

.spoiler-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.discussion-prompts {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.discussion-prompts h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-teal);
  margin-bottom: 20px;
}

.discussion-prompts ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.discussion-prompts li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 12px 16px;
  background: rgba(72, 202, 228, 0.04);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-teal);
  line-height: 1.5;
}

/* ---------- Soundtrack ---------- */
.soundtrack-content {
  max-width: 680px;
}

.soundtrack-content .lead {
  margin-bottom: 32px;
}

.audio-viz {
  margin: 32px 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 80px;
}

.viz-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 100%;
}

.viz-bars span {
  display: block;
  width: 8px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, var(--accent-teal), var(--accent-amber));
  animation: vizAnim 1.4s ease-in-out infinite;
}

.viz-bars span:nth-child(odd)  { animation-duration: 1.1s; }
.viz-bars span:nth-child(3n)   { animation-duration: 1.7s; }
.viz-bars span:nth-child(5n)   { animation-duration: 0.9s; }

@keyframes vizAnim {
  0%   { height: 20%; }
  50%  { height: 100%; }
  100% { height: 20%; }
}

/* offset each bar slightly */
.viz-bars span:nth-child(1)  { animation-delay: 0.0s; }
.viz-bars span:nth-child(2)  { animation-delay: 0.1s; }
.viz-bars span:nth-child(3)  { animation-delay: 0.2s; }
.viz-bars span:nth-child(4)  { animation-delay: 0.3s; }
.viz-bars span:nth-child(5)  { animation-delay: 0.4s; }
.viz-bars span:nth-child(6)  { animation-delay: 0.35s; }
.viz-bars span:nth-child(7)  { animation-delay: 0.25s; }
.viz-bars span:nth-child(8)  { animation-delay: 0.15s; }
.viz-bars span:nth-child(9)  { animation-delay: 0.05s; }
.viz-bars span:nth-child(10) { animation-delay: 0.45s; }
.viz-bars span:nth-child(11) { animation-delay: 0.55s; }
.viz-bars span:nth-child(12) { animation-delay: 0.6s; }
.viz-bars span:nth-child(13) { animation-delay: 0.5s; }
.viz-bars span:nth-child(14) { animation-delay: 0.4s; }
.viz-bars span:nth-child(15) { animation-delay: 0.3s; }
.viz-bars span:nth-child(16) { animation-delay: 0.2s; }
.viz-bars span:nth-child(17) { animation-delay: 0.1s; }
.viz-bars span:nth-child(18) { animation-delay: 0.65s; }
.viz-bars span:nth-child(19) { animation-delay: 0.7s; }
.viz-bars span:nth-child(20) { animation-delay: 0.55s; }

.music-note {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  line-height: 1.6;
}

.music-note strong { color: var(--text-primary); }

/* ---------- Footer ---------- */
#footer {
  position: relative;
  z-index: 1;
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  text-align: center;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--accent-amber);
  margin-bottom: 12px;
}

.footer-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.footer-credit {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text-primary); }

/* ---------- Scroll-reveal utility ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE: Tablet (≥ 640px) ---------- */
@media (min-width: 640px) {
  :root { --section-pad: 96px 0; }

  .mission-grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
  }

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

  .profile-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .crew-card {
    flex-direction: row;
    align-items: flex-start;
  }

  .book-layout {
    grid-template-columns: auto 1fr;
    gap: 48px;
  }
}

/* ---------- RESPONSIVE: Desktop (≥ 1024px) ---------- */
@media (min-width: 1024px) {
  :root { --section-pad: 120px 0; }

  .nav-links { display: flex; }
  .hamburger { display: none; }
  .mobile-menu { display: none !important; }

  .science-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ship-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 60px;
  }

  .ship-svg { max-width: none; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  #starfield { display: none; }
  .hero-content { animation: none; }
}

/* ---------- Selection ---------- */
::selection {
  background: rgba(244, 162, 97, 0.3);
  color: var(--text-primary);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
