/* Moon Coverage — design system
   One family (Geist), true black, a monochrome interface. The only colour on the page is physical colour in
   the scene: gold foil on the spacecraft and the blue of Earth. Glass is reserved for controls that float over
   the Moon. Labels in the scene are drawn like a technical illustration: a mark, a dotted leader, a number. */
:root {
  color-scheme: dark;
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2.6 7.4l4.8-4.8M3.4 2.6h4v4' fill='none' stroke='black' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --black: #000;
  --ink-1: #f4f4f2;
  --ink-2: #a6a6a4;
  --ink-3: #7c7c7a;
  --ink-4: #4a4a49;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);
  --glass-bg: rgba(22, 22, 24, 0.74);
  --glass-line: rgba(255, 255, 255, 0.09);
  --glass-hi: rgba(255, 255, 255, 0.13);
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --margin: clamp(20px, 3.6vw, 56px);
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: env(safe-area-inset-top, 0px);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; background: var(--black); color: var(--ink-1); font-family: var(--font); font-size: 16px; line-height: 1.6;
  font-feature-settings: 'ss01' on; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow-x: hidden; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; }
img { max-width: 100%; }
[hidden]:not([hidden="until-found" i]) { display: none !important; }
ol, ul { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1.5px solid var(--ink-1); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(255, 255, 255, 0.85); color: #000; }

/* ---------- stage ---------- */
#stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#stage canvas { display: block; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity 1.4s var(--ease); }
#stage.on canvas { opacity: 1; }
/* a still of the hero Moon, for browsers that can't run WebGL */
#poster { display: none; position: absolute; width: 180vh; height: 180vh; left: calc(50% - 90vh); top: calc(146% - 90vh);
  background: url(../tex/poster.webp) center / contain no-repeat; }
body.nogl #poster { display: block; }
/* a fixed wash of darkness on the text side while the story runs */
#scrim { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 0.6s var(--ease);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.7) 26%, rgba(0, 0, 0, 0.25) 44%, transparent 58%); }
body.in-story #scrim { opacity: 1; }
body.scrim-right #scrim { opacity: 1; background: linear-gradient(270deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.7) 26%, rgba(0, 0, 0, 0.25) 44%, transparent 58%); }
#fade { position: fixed; inset: 0; z-index: 1; background: #000; opacity: 0; pointer-events: none; }
#labels { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }

/* ---------- top bar ---------- */
.nav { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; gap: 32px; padding: 0 var(--margin); }
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 1px 0 var(--line); opacity: 0; transition: opacity 0.3s var(--ease); }
body.navsolid .nav::before, body.exploring .nav::before { opacity: 1; }
/* a soft fall-off under the bar so text scrolling past never collides with it */
.nav::after { content: ""; position: absolute; z-index: -2; left: 0; right: 0; top: calc(-1 * env(safe-area-inset-top, 0px)); height: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 36px);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.55) 55%, transparent); pointer-events: none; }
body.exploring .nav nav { visibility: hidden; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; flex-shrink: 0; }
.brand-mark { width: 18px; height: 18px; display: inline-block; color: var(--ink-1); }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.nav nav { display: flex; gap: 4px; margin-left: auto; }
.nav nav a { font-size: 14px; color: var(--ink-2); text-decoration: none; padding: 6px 12px; border-radius: 999px; transition: color 0.2s, background-color 0.2s; }
.nav nav a:hover { color: var(--ink-1); background: rgba(255, 255, 255, 0.06); }
.nav nav a[aria-current="true"] { color: var(--ink-1); }
.nav nav a[aria-current="page"] { color: var(--ink-1); }
.nav-acts { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav .menu-btn { display: none; width: 34px; height: 34px; margin-right: -8px; }
.menu-btn svg { width: 16px; height: 16px; }
.menu-btn .i-close, .menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }
/* below this width the section links move into the menu */
@media (max-width: 1100px) { .nav nav { display: none; } .nav-acts { margin-left: auto; } .nav .menu-btn { display: inline-grid; } .nav .nav-alerts { display: none; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; letter-spacing: -0.005em; text-decoration: none; white-space: nowrap; cursor: pointer; border: 0;
  transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease); }
.btn:active { transform: scale(0.98); }
.btn--light { background: var(--ink-1); color: #000; }
.btn--light:hover { background: #fff; }
.btn--glass { background: rgba(255, 255, 255, 0.07); color: var(--ink-1); box-shadow: inset 0 0 0 1px var(--glass-line), inset 0 1px 0 var(--glass-hi);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.btn--glass:hover { background: rgba(255, 255, 255, 0.12); }
.nav .btn { height: 34px; padding: 0 14px; font-size: 13px; }
.textbtn { background: none; border: 0; padding: 0; font-size: 14px; color: var(--ink-2); cursor: pointer; text-decoration: none; justify-self: start; transition: color 0.2s; }
.textbtn:hover { color: var(--ink-1); }
a[target="_blank"].textbtn::after, .rr-c a::after, .ob-n a::after, .further a::after { content: ""; display: inline-block; width: 0.6em; height: 0.6em; margin-left: 0.32em; vertical-align: 0.06em; background: currentColor; opacity: 0.5;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2.6 7.4l4.8-4.8M3.4 2.6h4v4' fill='none' stroke='black' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2.6 7.4l4.8-4.8M3.4 2.6h4v4' fill='none' stroke='black' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: opacity 0.2s, transform 0.25s var(--ease); }
a[target="_blank"].textbtn:hover::after, .rr-c a:hover::after, .ob-n a:hover::after, .further a:hover::after { opacity: 1; transform: translate(1px, -1px); }
.glass { background: var(--glass-bg); -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  box-shadow: inset 0 0 0 1px var(--glass-line), inset 0 1px 0 var(--glass-hi), 0 18px 50px rgba(0, 0, 0, 0.45); }

/* ---------- type ---------- */
.lede { font-size: clamp(17px, 1.35vw, 19px); line-height: 1.55; color: var(--ink-2); max-width: 36em; letter-spacing: -0.005em; }
.note { font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.sub-head { font-size: 15px; font-weight: 500; color: var(--ink-1); margin: 64px 0 16px; letter-spacing: -0.01em; }
