/* Understudy: a 1970s mission poster printed in two inks, after the app's own globals.css. */
:root {
  --paper: #f7efe2;
  --paper-card: #fbf6ec;
  --paper-deep: #efe3cf;
  --ink: #16283f;
  --ink-deep: #0c1a2e;
  --accent: #a33d15;
  --accent-bright: #cf5220;
  --accent-text: #9b3a12;
  --sun: #efb340;
  --muted: #4f5d71;
  --hair: rgba(22, 40, 63, .18);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .09 0 0 0 0 .16 0 0 0 0 .25 0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --text: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--ink);
  font: 18px/1.65 var(--text);
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--sun); color: var(--ink-deep); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.display {
  font-family: var(--display);
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 0;
  letter-spacing: -.02em;
  line-height: .98;
  font-weight: 650;
}
.misprint { text-shadow: .035em .03em 0 var(--accent-bright); }
h2.display { font-size: clamp(32px, 4.6vw, 54px); margin: 0 0 22px; color: var(--ink-deep); }
p { margin: 0 0 16px; max-width: 62ch; }

/* ---------- Hero: the Earth's limb in riso bands ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--ink-deep); color: var(--paper); }
.limb { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-in { padding-top: 72px; padding-bottom: clamp(190px, 26vw, 300px); }
.mission { font-size: 16px; color: rgba(247, 239, 226, .78); margin-bottom: 12px; }
.hero h1 {
  font-size: clamp(64px, 15vw, 176px);
  margin: 0 0 26px;
  font-weight: 750;
  font-variation-settings: "opsz" 144, "SOFT" 80, "WONK" 1;
  color: var(--paper);
}
.lede { font-size: clamp(21px, 2.5vw, 28px); line-height: 1.35; max-width: 34ch; margin-bottom: 34px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.pill {
  display: inline-block;
  font: 600 21px/1 var(--text);
  padding: 16px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink-deep);
  text-decoration: none;
  box-shadow: 5px 6px 0 var(--accent-bright);
  cursor: pointer;
  transition: transform .15s;
}
.pill:hover { transform: translateY(-2px); }
.pill:active { transform: translate(3px, 4px); box-shadow: 2px 2px 0 var(--accent-bright); }
.ghost { font-size: 18px; color: var(--paper); text-underline-offset: 4px; text-decoration-color: rgba(239, 179, 64, .7); }
.ghost:hover { text-decoration-color: var(--sun); }

/* ---------- Why ---------- */
.why { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 88px; }
.why h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.06; }
.print { margin: 0; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--paper-card); }
.print figcaption { padding: 14px 18px 16px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.card-sun { box-shadow: 9px 10px 0 var(--sun); }
.card-ink { box-shadow: 9px 10px 0 var(--accent-bright); }

.duotone { position: relative; isolation: isolate; background: var(--sun); overflow: hidden; aspect-ratio: 16 / 9; }
.duotone img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.25) brightness(1.08); mix-blend-mode: multiply; }
.duotone::after { content: ""; position: absolute; inset: 0; background: var(--ink); mix-blend-mode: lighten; pointer-events: none; }

/* ---------- Mission sequence ---------- */
.sequence { background: var(--paper-deep) var(--grain); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding: 80px 0 88px; }
.stages {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2px; background: var(--ink);
  border: 2px solid var(--ink); border-radius: 10px; overflow: hidden;
}
.stages li { background: var(--paper); padding: 26px 26px 28px; position: relative; }
.stages .n { display: block; font-size: 64px; color: var(--accent-bright); margin-bottom: 12px; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.stages h3 { font: 600 24px/1.2 var(--display); margin: 0 0 8px; color: var(--ink-deep); }
.stages p { font-size: 17px; line-height: 1.55; margin: 0; color: var(--ink); }
.stages li:nth-child(4) { background: var(--ink-deep); color: var(--paper); }
.stages li:nth-child(4) h3 { color: var(--sun); }
.stages li:nth-child(4) p { color: var(--paper); }

/* ---------- Bench: Earth vs orbit ---------- */
.bench {
  display: grid; grid-template-columns: .9fr 1.1fr; grid-template-areas: "text stage" "controls stage";
  column-gap: 56px; row-gap: 8px; align-items: start; padding-top: 96px; padding-bottom: 96px;
}
.bench-text { grid-area: text; align-self: end; }
.bench-controls { grid-area: controls; }
.stage-card { grid-area: stage; align-self: center; }
.switch { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; padding: 4px; gap: 4px; margin: 6px 0 22px; background: var(--paper-card); }
.switch button {
  font: 600 17px/1 var(--text); color: var(--ink);
  background: none; border: 0; border-radius: 999px; padding: 11px 18px; cursor: pointer;
}
.switch button[aria-checked="true"] { background: var(--ink-deep); color: var(--paper); }
.release { display: block; margin-bottom: 20px; font-size: 19px; padding: 14px 26px; }
.verdict { font-size: 17px; min-height: 3.3em; color: var(--muted); }
.verdict.pass { color: #2c6045; }
.verdict.fail { color: var(--accent-text); }
.stage-card { border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--ink-deep); }
.stage-card svg { display: block; width: 100%; height: auto; }
.svg-label { font: 600 14px var(--mono); fill: var(--sun); }
.svg-mono { font: 12px var(--mono); fill: rgba(247, 239, 226, .7); }

/* ---------- Mission chart ---------- */
.chart { background: var(--ink-deep); color: var(--paper); padding: 88px 0 92px; position: relative; }
.chart h2.display { color: var(--paper); }
.chart-intro, .chart-note { color: rgba(247, 239, 226, .82); }
.chart-frame { border: 2px solid rgba(247, 239, 226, .5); border-radius: 12px; margin: 28px 0 22px; overflow-x: auto; background: #10223a; }
.chart-frame svg { display: block; width: 100%; min-width: 760px; height: auto; }
.c-zone rect { fill: none; stroke: var(--sun); stroke-width: 1.5; stroke-dasharray: 6 6; }
.c-zt { font: italic 600 18px var(--display); fill: var(--sun); }
.c-box rect { fill: #13294a; stroke: rgba(247, 239, 226, .55); stroke-width: 1.5; }
.c-hot rect { fill: var(--accent-bright); stroke: var(--sun); stroke-width: 2; }
.c-t { font: 600 17px var(--display); fill: var(--paper); }
.c-m { font: 600 15px var(--mono); fill: var(--sun); }
.c-s { font: 14px var(--text); fill: rgba(247, 239, 226, .72); }
.c-th { font: 700 18px var(--display); fill: var(--paper); }
.c-th2 { font: 600 15px var(--text); fill: var(--paper); }
.c-sh { font: 14px var(--text); fill: #fbe6c2; }
.c-ar { stroke: var(--paper); stroke-width: 1.6; fill: none; marker-end: url(#ah); }
.c-loop { stroke: var(--sun); stroke-width: 2; fill: none; stroke-dasharray: 6 5; marker-end: url(#as); }
.c-loopt { font: italic 13px var(--text); fill: var(--sun); }

/* ---------- Telemetry ---------- */
.telemetry { padding-top: 92px; padding-bottom: 72px; }
.readings {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2px; background: var(--ink); border: 2px solid var(--ink); border-radius: 10px; overflow: hidden;
}
.readings li { background: var(--paper); padding: 24px 22px 26px; display: flex; flex-direction: column; gap: 12px; font-size: 17px; line-height: 1.45; }
.readings .fig { font-size: clamp(40px, 4.4vw, 56px); color: var(--accent-bright); font-variant-numeric: tabular-nums lining-nums; }
.fine { font-size: 15px; color: var(--muted); margin-top: 18px; }

/* ---------- Reel ---------- */
.reel { padding: 40px 0 72px; }
.reel-intro { color: var(--muted); }
.strip { list-style: none; margin: 20px auto 0; padding: 0 24px; max-width: 1180px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.strip li { border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: var(--paper-card); }
.strip p { font-size: 15px; line-height: 1.4; padding: 10px 12px 12px; margin: 0; }
.credit { font-size: 14px; color: var(--muted); margin-top: 18px; }

/* ---------- Honest ---------- */
.honest { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; padding-top: 40px; padding-bottom: 88px; }
.h-card { border: 2px solid var(--ink); border-radius: 10px; padding: 28px 30px 24px; background: var(--paper-card); }
.card-ink-line { background: transparent; border-style: dashed; }
.h-card h2.display { font-size: clamp(28px, 3vw, 36px); margin-bottom: 16px; }
.h-card ul { margin: 0; padding-left: 20px; }
.h-card li { margin-bottom: 10px; font-size: 17px; }
.h-card li::marker { color: var(--accent-bright); }

/* ---------- Stack ---------- */
.stack { padding-bottom: 96px; }
.stack h2.display { font-size: clamp(28px, 3vw, 36px); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li { border: 2px solid var(--ink); border-radius: 999px; padding: 6px 16px; font-size: 16px; background: var(--paper-card); }

/* ---------- Footer ---------- */
.foot { background: var(--ink-deep); color: rgba(247, 239, 226, .82); border-top: 6px solid var(--accent-bright); box-shadow: inset 0 6px 0 var(--sun); padding: 34px 0 40px; font-size: 16px; }
.foot-in { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.foot-mark { font-size: 28px; color: var(--paper); text-shadow: .035em .03em 0 var(--accent-bright); }
.foot a { color: var(--sun); }

/* ---------- Narrow screens ---------- */
@media (max-width: 900px) {
  .why, .honest { grid-template-columns: 1fr; gap: 36px; }
  .bench { grid-template-columns: 1fr; grid-template-areas: "text" "stage" "controls"; row-gap: 28px; }
  .stages { grid-template-columns: 1fr 1fr; }
  .readings { grid-template-columns: 1fr 1fr; }
  .strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .wrap, .strip { padding-left: 16px; padding-right: 16px; }
  .hero-in { padding-top: 48px; }
  .stages, .readings { grid-template-columns: 1fr; }
  .stages li { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; padding: 20px 20px 22px; }
  .stages .n { font-size: 44px; margin: 0; grid-row: span 2; }
  .stages h3 { margin-top: 4px; }
  .why, .bench { padding-top: 64px; padding-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .pill, .pill:hover { transition: none; transform: none; }
}
