/* ---------- hero: the Moon rising from the bottom edge ---------- */
.hero { position: relative; z-index: 3; min-height: 100svh; padding: calc(var(--nav-h) + clamp(24px, 6vh, 72px)) var(--margin) 0; }
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 32px; max-width: 1560px; margin: 0 auto; }
.hero-title { grid-column: 1 / span 9; font-size: clamp(44px, 5.4vw, 88px); line-height: 0.98; letter-spacing: -0.045em; font-weight: 500; }
.hero-title span { display: block; }
.hero-copy { grid-column: 1 / span 5; display: grid; gap: 24px; align-content: start; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.status { grid-column: 7 / span 6; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 20px; align-self: start; }
.status > div { border-top: 1px solid var(--line-2); padding-top: 14px; display: grid; gap: 2px; align-content: start; min-width: 0; }
.status dt { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status .v { font-size: clamp(22px, 2.05vw, 30px); line-height: 1.1; font-weight: 300; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; }
.status .v svg { width: 0.8em; height: 0.8em; flex-shrink: 0; }
.status .s { font-size: 13px; line-height: 1.4; color: var(--ink-3); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* one orchestrated moment: the title settles in as the Moon rises */
.hero-title span, .hero-copy, .status { opacity: 0; transform: translateY(14px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
body.intro .hero-title span, body.intro .hero-copy, body.intro .status { opacity: 1; transform: none; }
body.intro .hero-title span:nth-child(2) { transition-delay: 0.08s; }
body.intro .hero-copy { transition-delay: 0.2s; }
body.intro .status { transition-delay: 0.32s; }

/* ---------- chapter rail ---------- */
.rail { position: fixed; z-index: 30; right: var(--margin); top: 50%; transform: translateY(-50%); opacity: 0; transition: opacity 0.4s var(--ease); }
body.in-story .rail { opacity: 1; }
.rail ol { position: relative; display: grid; gap: 0; }
.rail ol::before { content: ""; position: absolute; right: 0; top: 4px; bottom: 4px; width: 1px; background: var(--line-2); }
.rail li { position: relative; height: 22px; }
.rail a { position: absolute; right: 0; top: 0; height: 22px; display: flex; align-items: center; gap: 10px; text-decoration: none; padding-left: 12px; }
.rail a::after { content: ""; width: 8px; height: 1px; background: var(--ink-3); transition: width 0.3s var(--ease), background-color 0.3s; }
.rail a span { white-space: nowrap; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; opacity: 0; transform: translateX(4px); transition: opacity 0.25s, transform 0.3s var(--ease), color 0.25s; }
.rail a:hover span, .rail a:focus-visible span { opacity: 1; transform: none; }
.rail a[aria-current="step"]::after { width: 22px; background: var(--ink-1); }
.rail a[aria-current="step"] span { opacity: 1; transform: none; color: var(--ink-1); }
@media (max-width: 900px), (max-aspect-ratio: 4/5) { .rail { display: none; } }

/* ---------- story chapters ---------- */
.story, .base-intro { position: relative; z-index: 3; }
.chapter { min-height: 120svh; display: flex; align-items: center; padding: 0 var(--margin); }
.chapter--tall { min-height: 150svh; }
.ch { position: relative; width: min(420px, 100%); display: grid; gap: 18px; padding: 40px 0; }
.ch > p:not(.yr):not(.note) { color: var(--ink-2); font-size: 16px; line-height: 1.62; }
.ch strong { color: var(--ink-1); font-weight: 500; }
.yr { font-size: clamp(76px, 8.4vw, 128px); line-height: 0.82; font-weight: 200; letter-spacing: -0.055em; font-variant-numeric: tabular-nums; color: var(--ink-1); margin: 0 0 6px -0.04em; }
.yr--range { font-size: clamp(52px, 5.2vw, 76px); letter-spacing: -0.05em; }
.ch-title { font-size: clamp(26px, 2.2vw, 32px); line-height: 1.1; letter-spacing: -0.03em; }
.spec { display: grid; border-top: 1px solid var(--line-2); }
.spec > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.spec dt { color: var(--ink-3); }
.spec dd { color: var(--ink-1); font-variant-numeric: tabular-nums; }
.nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 16px; border-top: 1px solid var(--line-2); padding-top: 18px; }
.nums > div { display: flex; flex-direction: column-reverse; gap: 4px; }
.nums dt { font-size: 13px; color: var(--ink-3); line-height: 1.35; }
.nums dd { font-size: 30px; line-height: 1; font-weight: 300; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.sun { margin: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: end; }
.sun svg { width: 96px; height: 40px; display: block; overflow: visible; }
.sun figcaption { font-size: 13px; line-height: 1.4; color: var(--ink-2); padding-bottom: 2px; }
.sun figcaption b { display: block; color: var(--ink-1); font-weight: 500; font-variant-numeric: tabular-nums; }
.legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; border-top: 1px solid var(--line-2); padding-top: 16px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.attempts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; border-top: 1px solid var(--line-2); }
.attempts li { display: grid; grid-template-columns: 40px minmax(0, 1fr) 14px; gap: 6px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.3; }
.attempts .y { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.attempts .n { color: var(--ink-1); }
.attempts .n small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.attempts .n a { color: inherit; text-decoration: none; }
.attempts .n a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
.attempts .sym { align-self: center; }

/* symbols: shape, not colour, says what happened. Each glyph is a mask so it takes its colour from CSS */
.sym { position: relative; display: inline-block; width: 12px; height: 12px; flex-shrink: 0; }
.sym::before { content: ""; position: absolute; inset: 0; margin: auto; width: 12px; height: 12px; background: var(--ink-1);
  -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat; }
/* astronaut */
.sym--crewed { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='3.2' r='2.3'/%3E%3Cpath d='M1.6 11.6V10a4.4 3.6 0 0 1 8.8 0v1.6z'/%3E%3C/svg%3E"); }
/* lander standing on its legs */
.sym--landed, .sym--partial { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Crect x='3.5' y='1' width='5' height='5' rx='1'/%3E%3Cpath d='M4.6 6 2.2 10.6M7.4 6l2.4 4.6M1 10.6h2.4m5.2 0H11' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"); }
/* the same lander, tipped over */
.sym--partial::before { transform: rotate(-60deg); }
/* failed landing */
.sym--crashed { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 2.5 7 7m0-7-7 7' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
/* something coming in fast: a dot with a streak behind it */
.sym--impact { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M11 1 5.6 9.6 2.4 6.4z' opacity='.5'/%3E%3Ccircle cx='4' cy='8' r='2.2'/%3E%3C/svg%3E"); }
/* not there yet */
.sym--planned { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='5' fill='none' stroke='%23000' stroke-width='1.2' stroke-dasharray='2.2 1.73'/%3E%3C/svg%3E"); }
.legend .sym, .legend .sym::before { width: 14px; height: 14px; }

/* ---------- labels in the scene ---------- */
.mk { position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; border: 0; background: none; transform: translate3d(-200px, -200px, 0);
  opacity: 0; transition: opacity 0.35s var(--ease); pointer-events: none; will-change: transform; cursor: default; }
.mk.show { opacity: 1; }
.mk.show.dim { opacity: 0.38; }
.mk .sym { position: absolute; left: -6px; top: -6px; transition: opacity 0.3s; filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.6)); }
.mk.onm .sym { opacity: 0; }
.mk .lbl { position: absolute; left: 10px; top: -9px; font-size: 12px; line-height: 18px; color: var(--ink-1); white-space: nowrap; letter-spacing: -0.005em;
  text-shadow: 0 0 2px #000, 0 1px 6px rgba(0, 0, 0, 0.9); opacity: 0; transition: opacity 0.25s; }
.mk.lab .lbl { opacity: 1; }
/* featured: a dotted leader up to a numbered tag, like a plate in a technical atlas */
.mk .lead { position: absolute; left: -0.5px; bottom: calc(var(--ty, 0px) + 8px); width: 1px; height: var(--L, 88px); opacity: 0;
  background-image: linear-gradient(to top, rgba(255, 255, 255, 0.9) 45%, transparent 45%); background-size: 1px 4px; transition: opacity 0.35s; }
.mk .tag { position: absolute; left: 10px; bottom: calc(var(--ty, 0px) + 8px + var(--L, 88px) - 52px); display: grid; gap: 1px; white-space: nowrap; opacity: 0;
  transition: opacity 0.35s; text-shadow: 0 0 2px #000, 0 1px 8px rgba(0, 0, 0, 0.9); }
.mk .tag b { font-size: 20px; line-height: 20px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink-1); }
.mk .tag span { font-size: 13px; line-height: 17px; font-weight: 500; color: var(--ink-1); letter-spacing: -0.01em; }
.mk .tag small { font-size: 12px; line-height: 15px; color: var(--ink-2); }
.mk--block .tag { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55), 0 0 14px rgba(0, 0, 0, 0.45); }
.mk.feat .lead, .mk.feat .tag { opacity: 1; }
.mk.feat .lbl { opacity: 0; }
.mk.sel .sym::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid var(--ink-1); }
body.exploring .mk.show { pointer-events: auto; cursor: pointer; }
body.exploring .mk.show .sym { width: 28px; height: 28px; left: -14px; top: -14px; }
body.exploring .mk:hover .lbl, body.exploring .mk:focus-visible .lbl { opacity: 1; }
.flt { position: absolute; left: 0; top: 0; width: 0; height: 0; transform: translate3d(-500px, -500px, 0); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.flt.show { opacity: 1; }
.flt .sym { position: absolute; left: -6px; top: -6px; }
.flt .lead { position: absolute; left: -0.5px; bottom: 8px; width: 1px; height: 120px; background-image: linear-gradient(to top, rgba(255, 255, 255, 0.9) 45%, transparent 45%); background-size: 1px 4px; }
.flt .tag { position: absolute; left: 10px; bottom: 90px; display: grid; gap: 1px; white-space: nowrap; }
.flt .tag b { font-size: 20px; line-height: 20px; font-weight: 600; letter-spacing: -0.03em; }
.flt .tag span { font-size: 13px; line-height: 17px; font-weight: 500; }
.flt .tag small { font-size: 12px; line-height: 15px; color: var(--ink-2); }
.flt--down .lead { bottom: auto; top: 8px; }
.flt--down .tag { bottom: auto; top: 90px; }
