:root {
  --bg: #09080c;
  --bg-raise: rgba(255, 244, 230, 0.035);
  --sand: #f6efe4;
  --sand-dim: rgba(246, 239, 228, 0.72);
  --muted: rgba(246, 239, 228, 0.58);
  --line: rgba(246, 239, 228, 0.14);
  --rust: #c4512c;
  --ember: #e07a3d;
  --dust: #e7a27a;
  --gold: #f0c27a;
  --ice: #e7f1f6;
  --serif: "Instrument Serif", Palatino, Georgia, serif;
  --sans: Outfit, "Segoe UI", sans-serif;
  --wrap: min(1120px, calc(100% - 48px));
  --radius: 22px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--sand);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; }

a { color: inherit; }

::selection {
  background: #c4512c;
  color: #fff8f2;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  background: var(--sand);
  color: #1a0d0a;
  padding: 8px 12px;
  z-index: 80;
  border-radius: 8px;
}

.skip:focus { top: 12px; }

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 60;
  background: linear-gradient(90deg, #8a3418, var(--gold));
  pointer-events: none;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-content: center;
  gap: 18px;
  background: #09080c;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader p {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--dust);
}

.loader-track {
  width: 180px;
  height: 1px;
  background: rgba(246, 239, 228, 0.15);
  overflow: hidden;
}

.loader-track i {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--ember);
  animation: load 1s ease-in-out infinite;
}

.loader.hide {
  opacity: 0;
  visibility: hidden;
}

@keyframes load {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 6vw;
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  border-bottom-color: var(--line);
}

.nav.scrolled::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(9, 8, 12, 0.82);
  backdrop-filter: blur(16px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 2;
}

.logo-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #f0b48a, #c4512c 45%, #6a2414 72%);
  box-shadow: 0 0 12px rgba(224, 122, 61, 0.7);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: var(--sand-dim);
  font-size: 0.92rem;
}

.nav-links a:hover,
.nav-links a:focus-visible { color: var(--sand); }

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.nav-toggle i {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 1px;
  background: var(--sand);
  transition: transform 0.25s ease, top 0.25s ease;
}

.nav-toggle i:first-of-type { top: 16px; }
.nav-toggle i:nth-of-type(2) { top: 22px; }
.nav-toggle i:nth-of-type(3) { top: 28px; }

.nav-toggle[aria-expanded="true"] i:first-of-type {
  top: 22px;
  transform: rotate(40deg);
}

.nav-toggle[aria-expanded="true"] i:nth-of-type(2) { opacity: 0; }

.nav-toggle[aria-expanded="true"] i:nth-of-type(3) {
  top: 22px;
  transform: rotate(-40deg);
}

main { position: relative; z-index: 1; }

.wrap { width: var(--wrap); margin: 0 auto; }

section { padding: 96px 0; scroll-margin-top: 84px; }

.hero {
  min-height: 100vh;
  width: var(--wrap);
  margin: 0 auto;
  padding: 128px 0 88px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 20px;
  position: relative;
}

.kicker {
  margin: 0 0 14px;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dust);
  font-weight: 500;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.96;
  margin: 0;
}

h1 {
  font-size: clamp(5.5rem, 12vw, 9.5rem);
}

h2 {
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  max-width: 14ch;
  margin-bottom: 18px;
}

h3 { font-size: 1.85rem; letter-spacing: -0.02em; }

.tagline {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 2.4vw, 2.15rem);
  color: var(--dust);
  letter-spacing: -0.02em;
}

.lede, .prose, .split p, .atmo p, .window p, .moon-card p, .event p, figcaption p {
  color: var(--sand-dim);
}

.lede {
  font-size: 1.08rem;
  font-weight: 300;
  max-width: 38ch;
  margin: 18px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.btn-primary { background: var(--sand); color: #1a0d0a; }
.btn-primary:hover { background: #fff; }

.btn-ghost { border-color: rgba(246, 239, 228, 0.28); color: var(--sand); }
.btn-ghost:hover { border-color: var(--sand); }

.btn:focus-visible,
.nav-links a:focus-visible,
.logo:focus-visible,
.nav-toggle:focus-visible,
.scroll-cue:focus-visible,
.foot a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.meta-row {
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.stage {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 540px);
  margin-inline: auto;
}

#mars {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
}

#mars.grabbing { cursor: grabbing; }

.stage::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 78, 36, 0.55), rgba(196, 78, 36, 0) 68%);
  filter: blur(8px);
  z-index: 0;
}

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(246, 239, 228, 0.16);
  pointer-events: none;
  animation: spin linear infinite;
}

.orbit span {
  position: absolute;
  top: -4px;
  left: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd0c2;
  box-shadow: 0 0 10px rgba(255, 230, 200, 0.8);
}

.orbit-a { inset: -4%; animation-duration: 22s; }
.orbit-b { inset: -12%; animation-duration: 41s; }
.orbit-b span { width: 6px; height: 6px; top: -3px; background: #b7aa9c; }

@keyframes spin { to { transform: rotate(360deg); } }

.drag-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 2;
}

.drag-hint .touch { display: none; }

.scroll-cue {
  position: absolute;
  left: 0;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.scroll-cue i {
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--ember), transparent);
  display: block;
  transform-origin: top;
  animation: cue 1.8s ease-in-out infinite;
}

@keyframes cue {
  0%, 100% { transform: scaleY(0.35); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

.split {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 48px;
  margin-top: 28px;
  align-items: start;
}

.split p { margin: 0 0 16px; max-width: 62ch; }

.fine { margin: 0; }

.fine div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.fine div:last-child { border-bottom: 1px solid var(--line); }

.fine dt { color: var(--muted); font-weight: 400; }
.fine dd { margin: 0; text-align: right; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 36px;
}

.stat {
  padding: 22px 20px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-raise);
}

.stat b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 2.4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 10px;
}

.stat span { color: var(--muted); font-size: 0.92rem; }

.compare {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 36px 48px;
  align-items: center;
}

.compare .prose { max-width: 46ch; }

.planet-pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 36px;
  min-height: 280px;
}

.planet-pair figure { margin: 0; text-align: center; }

.globe {
  border-radius: 50%;
  margin-inline: auto;
  box-shadow:
    inset -18px -14px 30px rgba(0, 0, 0, 0.45),
    inset 8px 8px 16px rgba(255, 255, 255, 0.18);
}

.earth {
  width: 210px;
  height: 210px;
  background:
    radial-gradient(circle at 32% 32%, rgba(255, 255, 255, 0.45), transparent 18%),
    radial-gradient(circle at 38% 46%, #3f8f56 0 16px, transparent 17px),
    radial-gradient(circle at 62% 42%, #2f7a4a 0 22px, transparent 23px),
    radial-gradient(circle at 48% 64%, #d2b072 0 10px, transparent 11px),
    radial-gradient(circle at 70% 62%, #2c6b44 0 14px, transparent 15px),
    radial-gradient(circle at 50% 45%, #1f6aa5, #0c2344 70%);
}

.mars-mini {
  width: 112px;
  height: 112px;
  background:
    radial-gradient(circle at 32% 32%, rgba(255, 220, 190, 0.45), transparent 20%),
    radial-gradient(circle at 60% 58%, rgba(80, 24, 14, 0.45) 0 10px, transparent 12px),
    radial-gradient(circle at 40% 45%, #e08448, #8f3418 62%, #3c140e);
}

.planet-pair figcaption {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.1;
}

.planet-pair small { color: var(--muted); font-family: var(--sans); font-size: 0.85rem; }

.meters {
  grid-column: 1 / -1;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.meter-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.meter-top span:last-child { color: var(--dust); }

.track {
  height: 3px;
  background: rgba(246, 239, 228, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.track i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #8a3418, var(--gold));
  border-radius: inherit;
}

.js .meters.in .track i { width: calc(var(--w, 50) * 1%); transition: width 1.1s ease; }

.bento {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: 390px 340px;
  gap: 16px;
}

.vista {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 280px;
  border: 1px solid rgba(246, 239, 228, 0.08);
}

.v-canyon { grid-row: 1 / span 2; }

.vista .art { position: absolute; inset: 0; }

.vista-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 22px 20px;
  background: linear-gradient(transparent, rgba(8, 6, 8, 0.88) 42%);
  z-index: 2;
}

.vista-copy h3 { margin-bottom: 8px; }
.vista-copy p:last-child { margin: 0; color: var(--sand-dim); font-size: 0.96rem; }

.v-canyon .art {
  background: linear-gradient(#1a0d0c 0%, #c47a52 28%, #e7b08a 46%, #6a2e1c 46%, #2a110e 100%);
}

.rim {
  position: absolute;
  left: -8%;
  right: -8%;
  background: linear-gradient(#a85a3a, #4a1c14);
}

.rim-a {
  top: 18%;
  height: 34%;
  clip-path: polygon(0 20%, 18% 8%, 40% 28%, 63% 4%, 82% 22%, 100% 10%, 100% 78%, 0 96%);
  opacity: 0.95;
}

.rim-b {
  top: 38%;
  height: 28%;
  background: linear-gradient(#d4845c, #6d2c18);
  clip-path: polygon(0 30%, 22% 10%, 48% 36%, 70% 8%, 100% 28%, 100% 100%, 0 84%);
}

.rim-c {
  top: 54%;
  height: 22%;
  background: linear-gradient(#8d4630, #2a100e);
  clip-path: polygon(0 10%, 30% 40%, 58% 12%, 100% 34%, 100% 100%, 0 70%);
}

.canyon-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  background: linear-gradient(#1a0b09, #0c0708);
}

.canyon-haze {
  position: absolute;
  inset: auto 0 18% 0;
  height: 18%;
  background: linear-gradient(transparent, rgba(90, 30, 18, 0.35));
}

.v-volcano .art {
  background: linear-gradient(#140c10 0%, #3a1a16 42%, #c4845c 78%, #5a2418 100%);
}

.shield {
  position: absolute;
  left: -18%;
  right: -18%;
  bottom: -28%;
  height: 78%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #f0b48a 0 7%, #c4623a 8% 16%, #8a341c 42%, #4a1a12 70%);
}

.caldera {
  position: absolute;
  width: 16%;
  aspect-ratio: 2.4;
  left: 42%;
  bottom: 43%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #f2c7a4, #6a2818 42%, #2a100c 70%);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.ash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255, 200, 150, 0.16), transparent 30%);
  animation: ash 7s ease-in-out infinite alternate;
}

@keyframes ash {
  from { transform: translateX(-2%); opacity: 0.6; }
  to { transform: translateX(3%); opacity: 1; }
}

.v-ice .art { background: #071018; }

.ice-sky {
  position: absolute;
  inset: 0 0 42% 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1.5px),
    radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.5px),
    linear-gradient(#05070d, #163044);
}

.ice-sheet {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -20%;
  height: 68%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle at 50% 20%, #ffffff, #d5e4ee 40%, #b9c9d4 70%);
}

.ice-cracks {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -20%;
  height: 68%;
  border-radius: inherit;
  background:
    repeating-linear-gradient(115deg, transparent 0 22px, rgba(70, 90, 110, 0.28) 22px 23px),
    repeating-linear-gradient(70deg, transparent 0 34px, rgba(255, 255, 255, 0.35) 34px 35px);
  border-radius: 50% 50% 0 0;
  mask-image: linear-gradient(transparent, #000 30%);
}

.v-storm .art {
  background: linear-gradient(#a8643a, #d4925a 40%, #8a4324 70%, #4a2016);
}

.storm-sun {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  left: 18%;
  top: 22%;
  background: rgba(255, 220, 170, 0.35);
  filter: blur(2px);
  box-shadow: 0 0 40px 16px rgba(255, 190, 120, 0.25);
}

.storm-band {
  position: absolute;
  inset: -20%;
  background:
    repeating-linear-gradient(
      100deg,
      transparent 0 30px,
      rgba(255, 214, 170, 0.13) 40px 78px,
      transparent 90px 140px
    );
  animation: blow 14s linear infinite;
}

.v-storm .dune-a,
.sunset .dune-a {
  position: absolute;
  left: -10%;
  right: -5%;
  bottom: -20px;
  height: 34%;
  background: #6a301c;
  border-radius: 50% 60% 0 0 / 80% 70% 0 0;
}

.v-storm .dune-b,
.sunset .dune-b {
  position: absolute;
  left: 20%;
  right: -15%;
  bottom: -30px;
  height: 24%;
  background: #3e1a12;
  border-radius: 70% 40% 0 0 / 80% 60% 0 0;
}

@keyframes blow {
  from { transform: translateX(-8%); }
  to { transform: translateX(8%); }
}

.scales {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.scale-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 16px;
  background: var(--bg-raise);
}

.scale-card h3 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.cols {
  height: 210px;
  display: flex;
  align-items: flex-end;
  gap: 28px;
}

.col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.col span {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
  min-height: 2.7em;
}

.bar {
  width: min(64px, 100%);
  height: var(--h);
  border-radius: 10px 10px 2px 2px;
  background: #6d625c;
}

.bar.hot {
  background: linear-gradient(#f0c27a, #c4512c);
}

.js .bar {
  height: 0;
  transition: height 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.js .scales.in .bar { height: var(--h); }

.atmo {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.sunset {
  position: relative;
  height: 520px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 64%, rgba(150, 190, 255, 0.95) 0 10px, rgba(110, 160, 230, 0.55) 12px, rgba(110, 160, 230, 0) 90px),
    linear-gradient(#12080c 0%, #4a2218 46%, #e7a06a 70%, #f0c7a2 76%, #6a2c22 76%);
  border: 1px solid rgba(246, 239, 228, 0.08);
}

.sun {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  left: calc(68% - 11px);
  top: calc(64% - 11px);
  background: #f4fbff;
  box-shadow: 0 0 18px 6px rgba(180, 210, 255, 0.9);
}

.sun-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  left: calc(68% - 90px);
  top: calc(64% - 90px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(190, 216, 255, 0.35), rgba(80, 120, 200, 0) 70%);
}

.veils {
  position: absolute;
  inset: -10% 0 24% 0;
  background: repeating-linear-gradient(
    96deg,
    transparent 0 36px,
    rgba(255, 186, 130, 0.1) 48px 90px
  );
  animation: blow 16s linear infinite;
}

.sunset-label {
  position: absolute;
  left: 20px;
  bottom: 16px;
  margin: 0;
  z-index: 2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: rgba(255, 244, 232, 0.8);
}

.atmo h2 { max-width: 12ch; }
.atmo p { margin: 0 0 14px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 8px 0 0;
  margin: 0;
}

.chips li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--sand-dim);
  font-size: 0.88rem;
}

.eras {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.era {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #100d11;
}

.era-art {
  height: 240px;
  position: relative;
  overflow: hidden;
}

.era-art.past {
  background: linear-gradient(#243044 0%, #6a5038 42%, #8d5a3a 42%, #4a2418 100%);
}

.era-art.now {
  background: linear-gradient(#2a1612 0%, #a86a42 40%, #c4845a 40%, #5a2818 100%);
}

.bank, .water {
  position: absolute;
  left: -5%;
  right: -5%;
}

.bank {
  top: 42%;
  height: 28%;
  background: #6e3a24;
  clip-path: polygon(0 40%, 20% 10%, 45% 36%, 70% 8%, 100% 30%, 100% 100%, 0 100%);
}

.bank.far {
  top: 58%;
  height: 48%;
  background: #3d1c14;
  clip-path: polygon(0 20%, 25% 40%, 55% 12%, 100% 36%, 100% 100%, 0 100%);
}

.water {
  top: 56%;
  height: 16%;
  background: linear-gradient(#7eb0c8, #3e7594);
  clip-path: polygon(8% 40%, 92% 20%, 100% 100%, 0 100%);
  animation: flow 5s ease-in-out infinite;
}

.water.dry {
  background: linear-gradient(#d7a27a, #a86840);
  animation: none;
  opacity: 0.85;
}

@keyframes flow {
  50% { transform: translateX(2%); filter: brightness(1.08); }
}

.era figcaption { padding: 18px 18px 20px; }
.era strong { display: block; font-family: var(--serif); font-size: 1.45rem; font-weight: 400; margin-bottom: 6px; }
.era p { margin: 0; }

.timeline {
  list-style: none;
  margin: 42px 0 0;
  padding: 0 0 0 8px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 118px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(var(--ember), rgba(224, 122, 61, 0.05));
  transform-origin: top;
}

.js .timeline::before { transform: scaleY(0); transition: transform 1.3s ease; }
.js .timeline.in::before { transform: scaleY(1); }

.timeline li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 36px;
  padding: 0 0 34px;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 114px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(240, 194, 122, 0.12);
}

.year {
  font-family: var(--serif);
  font-size: 1.7rem;
  color: var(--dust);
  line-height: 1;
}

.event h3 { font-size: 1.55rem; margin-bottom: 6px; }
.event p { margin: 0; max-width: 62ch; }

.moons {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
}

.orrey {
  position: relative;
  width: min(440px, 100%);
  aspect-ratio: 1;
  margin-inline: auto;
}

.orrey-mars {
  position: absolute;
  inset: 36%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 220, 190, 0.5), transparent 22%),
    radial-gradient(circle at 50% 48%, #e08448, #8a3016 60%, #3a120e);
  box-shadow:
    inset -12px -10px 18px rgba(0, 0, 0, 0.4),
    0 0 50px rgba(196, 70, 30, 0.35);
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(246, 239, 228, 0.28);
  animation: spin linear infinite;
}

.ring b {
  position: absolute;
  top: -5px;
  left: calc(50% - 5px);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #e6d9cc;
  box-shadow: 0 0 12px rgba(255, 230, 210, 0.85);
}

.ring-phobos { inset: 18%; animation-duration: 9s; }
.ring-deimos { inset: 2%; animation-duration: 20s; }
.ring-deimos b { width: 8px; height: 8px; top: -4px; left: calc(50% - 4px); background: #b7aa9c; }

.moon-cards { display: grid; gap: 12px; margin-top: 22px; }

.moon-card {
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-raise);
}

.moon-card h3 { font-size: 1.7rem; margin-bottom: 6px; }
.moon-card p { margin: 0; }

.window-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: end;
}

.window p { max-width: 58ch; }

.big-num span {
  display: block;
  font-family: var(--serif);
  font-size: clamp(7rem, 16vw, 12rem);
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: var(--ember);
}

.big-num small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.foot strong {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
}

.foot p {
  margin: 6px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.92rem;
}

.foot a { color: var(--dust); text-decoration: none; }
.foot a:hover { color: var(--sand); }

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

.stagger .reveal:nth-child(2) { transition-delay: 0.08s; }
.stagger .reveal:nth-child(3) { transition-delay: 0.16s; }
.stagger .reveal:nth-child(4) { transition-delay: 0.24s; }

@media (hover: none) {
  .drag-hint .mouse { display: none; }
  .drag-hint .touch { display: inline; }
}

@media (max-width: 980px) {
  .hero,
  .split,
  .compare,
  .atmo,
  .moons,
  .window-grid,
  .eras,
  .scales,
  .stats {
    grid-template-columns: 1fr;
  }

  .bento {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .v-canyon { grid-row: auto; min-height: 420px; }
  .vista { min-height: 340px; }

  .planet-pair { justify-content: flex-start; }
  .compare .planet-pair { order: -1; }

  h1 { font-size: clamp(4.6rem, 22vw, 7rem); }
  .hero { min-height: auto; padding-top: 112px; }
  .scroll-cue { display: none; }
}

@media (max-width: 760px) {
  .hero { padding-top: 104px; padding-bottom: 36px; }
  .lede { margin-top: 12px; }

  .nav-toggle { display: block; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background: rgba(9, 8, 12, 0.96);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    transform: translateY(-105%);
    transition: transform 0.35s ease;
    pointer-events: none;
    z-index: 1;
  }

  .nav-links.open {
    transform: none;
    pointer-events: auto;
  }

  .nav-links a { font-size: 1.6rem; font-family: var(--serif); color: var(--sand); }

  .timeline li { grid-template-columns: 68px 1fr; gap: 32px; }
  .timeline::before,
  .timeline li::before { left: 76px; }
  .year { font-size: 1.3rem; }

  .sunset { height: 380px; }
  .earth { width: 150px; height: 150px; }
  .mars-mini { width: 80px; height: 80px; }
  .foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .js .bar, .js .scales.in .bar { height: var(--h); }
  .js .timeline::before { transform: none; }
  .loader-track i { transform: none; width: 100%; }
}
