/* $MARSCOIN — mission-control launch webcast.
   variance 6 · motion 4 · density 4. One accent (ember orange), one radius
   system (10px), one dark theme: warm Mars night + mono telemetry. */

:root {
  --bg: #0b0604;           /* warm near-black, never pure */
  --bg-2: #120a06;
  --panel: #150c07;
  --line: rgba(232, 147, 95, 0.14);
  --line-strong: rgba(232, 147, 95, 0.3);
  --ink: #f3eae0;          /* warm near-white */
  --ink-2: #a3948a;
  --accent: #e85d25;       /* ember orange, the one accent */
  --accent-soft: rgba(232, 93, 37, 0.14);
  --radius: 10px;
  --nav-h: 54px;
  --display: "Michroma", "Archivo", sans-serif;
  --body: "Archivo", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── atmosphere: starfield + grain ─────────────────────── */
.stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 238, 214, 0.9), transparent 55%),
    radial-gradient(1px 1px at 33% 64%, rgba(255, 238, 214, 0.55), transparent 55%),
    radial-gradient(1.4px 1.4px at 51% 12%, rgba(255, 224, 189, 0.8), transparent 55%),
    radial-gradient(1px 1px at 68% 42%, rgba(255, 238, 214, 0.5), transparent 55%),
    radial-gradient(1.6px 1.6px at 82% 74%, rgba(255, 231, 199, 0.75), transparent 55%),
    radial-gradient(1px 1px at 91% 26%, rgba(255, 238, 214, 0.6), transparent 55%),
    radial-gradient(1px 1px at 22% 88%, rgba(255, 238, 214, 0.45), transparent 55%),
    radial-gradient(1.2px 1.2px at 44% 36%, rgba(255, 238, 214, 0.65), transparent 55%);
  background-size: 620px 620px;
  animation: twinkle 9s ease-in-out infinite alternate;
}
.stars::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 8% 42%, rgba(255, 238, 214, 0.5), transparent 55%),
    radial-gradient(1.3px 1.3px at 27% 9%, rgba(255, 224, 189, 0.7), transparent 55%),
    radial-gradient(1px 1px at 59% 78%, rgba(255, 238, 214, 0.45), transparent 55%),
    radial-gradient(1px 1px at 74% 16%, rgba(255, 238, 214, 0.6), transparent 55%),
    radial-gradient(1.5px 1.5px at 95% 58%, rgba(255, 231, 199, 0.65), transparent 55%);
  background-size: 890px 890px;
}
@keyframes twinkle { from { opacity: 0.55; } to { opacity: 1; } }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}
.nav, .hero, .drops, .how, .live, .specs, .footer { position: relative; z-index: 2; }

/* ── nav ───────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11, 6, 4, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 20px;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 22px;
}
.nav-mark {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-size: 13px; letter-spacing: 0.14em;
}
.nav-mark img { border-radius: 50%; }
.nav-links { display: flex; gap: 20px; margin-left: auto; }
.nav-links a {
  color: var(--ink-2); text-decoration: none; font-size: 14px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-ca {
  display: flex; align-items: center; gap: 7px;
  background: var(--accent-soft); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 999px;
  font-family: var(--mono); font-size: 12px;
  padding: 7px 13px; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.nav-ca:hover { border-color: var(--accent); }

/* ── hero ──────────────────────────────────────────────── */
.hero {
  max-width: 1080px; margin: 0 auto;
  padding: clamp(56px, 9vh, 110px) 20px 0;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px; align-items: center;
  min-height: calc(92vh - var(--nav-h));
}
.hero-kicker {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 18px;
}
.hero-title {
  font-family: var(--display);
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.14; letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 20px;
}
.hero-title em {
  font-style: normal; color: var(--accent);
  text-shadow: 0 0 34px rgba(232, 93, 37, 0.45);
}
.hero-sub { color: var(--ink-2); max-width: 46ch; margin: 0 0 26px; }
.hero-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 0 0 34px; }
.hero-tminus {
  display: inline-flex; align-items: baseline; gap: 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(21, 12, 7, 0.6);
  padding: 12px 18px;
}
.tminus-label {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-2);
}
.tminus-clock {
  font-family: var(--mono); font-size: 26px; font-weight: 500;
  color: var(--accent); font-variant-numeric: tabular-nums;
}

/* the signature: Mars rising, capsule in orbit */
.hero-planet { position: relative; min-height: 380px; }
.planet-glow {
  position: absolute; left: 50%; top: 52%;
  width: 78%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(232, 93, 37, 0.34), rgba(232, 93, 37, 0.08) 52%, transparent 72%);
  filter: blur(6px);
}
.coin {
  position: relative; display: block;
  width: min(100%, 440px); height: auto; margin: 0 auto;
  border-radius: 50%; /* the medallion is circular, crop the source's black corners */
  box-shadow:
    0 0 60px rgba(232, 93, 37, 0.3),
    0 24px 70px rgba(0, 0, 0, 0.55);
  animation: drift 11s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translateY(-8px); } to { transform: translateY(10px); } }
.coin-motto {
  margin: 22px 0 0; text-align: center;
  font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--ink-2);
}
.orbit {
  position: absolute; left: 50%; top: 50%;
  width: 128%; transform: translate(-50%, -50%) rotate(-9deg);
  color: var(--ink);
}
.capsule {
  position: absolute; left: 50%; top: 50%;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 12px 3px rgba(243, 234, 224, 0.55);
}
/* elliptical orbit via two phase-shifted sine translations */
.capsule { animation: orbX 16s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate; }
@keyframes orbX { from { margin-left: -300px; } to { margin-left: 300px; } }
.capsule::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  animation: orbY 8s cubic-bezier(0.37, 0, 0.63, 1) -4s infinite alternate;
}
.capsule { animation-name: orbX, orbTilt; animation-duration: 16s, 16s; }
@keyframes orbTilt {
  0% { margin-top: 0; } 25% { margin-top: -74px; } 50% { margin-top: 0; }
  75% { margin-top: 74px; } 100% { margin-top: 0; }
}
@keyframes orbY { from { opacity: 1; } to { opacity: 1; } }

/* ── shared section furniture ──────────────────────────── */
.section-kicker {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 12px;
}
.section-title {
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(24px, 3.4vw, 38px); line-height: 1.18;
  margin: 0 0 26px; letter-spacing: 0.01em;
}
.link-arrow {
  color: var(--ink); text-decoration: none; font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px; transition: border-color 0.2s, color 0.2s;
}
.link-arrow::after { content: " \2197"; color: var(--accent); }
.link-arrow:hover { border-color: var(--accent); }
.btn-primary {
  display: inline-block; background: var(--accent); color: #1a0c05;
  font-weight: 600; text-decoration: none;
  border-radius: var(--radius); padding: 13px 26px;
  box-shadow: 0 0 26px rgba(232, 93, 37, 0.35);
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 38px rgba(232, 93, 37, 0.5); }
.btn-ghost {
  background: none; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-family: var(--body); font-size: 16px; font-weight: 500;
  padding: 12px 24px; cursor: pointer; transition: border-color 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); }

/* ── prophecy: the tweet that started it ──────────────── */
.prophecy { max-width: 900px; margin: clamp(70px, 12vh, 130px) auto 0; padding: 0 20px; }
.prophecy-frame {
  margin: 0;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 50px rgba(232, 93, 37, 0.16), 0 24px 60px rgba(0, 0, 0, 0.5);
}
.prophecy-frame img { display: block; width: 100%; height: auto; }
.prophecy-note {
  margin: 18px 0 0; color: var(--ink-2); font-size: 15px;
  font-family: var(--mono);
}

/* ── drops: payload runs over the horizon ─────────────── */
.drops {
  max-width: 1080px; margin: clamp(70px, 12vh, 130px) auto 0;
  padding: 0 20px;
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 34px; align-items: center;
}
.drops-copy h2 {
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(24px, 3.4vw, 38px); line-height: 1.18; margin: 0 0 18px;
}
.drops-copy p { color: var(--ink-2); max-width: 44ch; }
.drops-stage {
  position: relative; height: 380px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-2), var(--panel));
  overflow: hidden;
}
.mars-horizon {
  position: absolute; left: 50%; bottom: -340px;
  width: 720px; height: 420px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 18%, #c14f1e 0%, #7e3210 34%, #3c1708 62%, #1c0b04 100%);
  box-shadow: 0 -18px 60px rgba(232, 93, 37, 0.35);
}
.pods { position: absolute; inset: 0; }
.pod { position: absolute; top: -90px; animation: podfall linear infinite; }
.pod svg { width: 100%; height: auto; display: block; }
@keyframes podfall {
  0%   { transform: translateY(0) rotate(-3deg); opacity: 0; }
  8%   { opacity: 1; }
  86%  { opacity: 1; }
  100% { transform: translateY(440px) rotate(3deg); opacity: 0; }
}

/* ── how: the flight plan rail ────────────────────────── */
.how { max-width: 780px; margin: clamp(80px, 13vh, 150px) auto 0; padding: 0 20px; }
.how-steps {
  list-style: none; margin: 34px 0 0; padding: 0;
  border-left: 1px solid var(--line-strong);
}
.how-steps li { position: relative; padding: 6px 0 34px 34px; }
.how-steps li::before {
  content: ""; position: absolute; left: -5px; top: 14px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(232, 93, 37, 0.7);
}
.step-tag {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
}
.how-steps h3 {
  font-family: var(--display); text-transform: uppercase;
  font-size: 19px; margin: 8px 0 8px;
}
.how-steps p { color: var(--ink-2); margin: 0; max-width: 52ch; }
.how-note {
  margin-top: 6px; padding: 16px 20px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(21, 12, 7, 0.5);
  color: var(--ink-2); font-size: 15px;
}

/* ── live: telemetry console ──────────────────────────── */
.live { max-width: 900px; margin: clamp(80px, 13vh, 150px) auto 0; padding: 0 20px; }
.live-status {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13.5px; color: var(--ink-2);
  margin-bottom: 22px;
}
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #5d5049; flex: none;
}
.dot.on { background: var(--accent); box-shadow: 0 0 10px rgba(232, 93, 37, 0.8); animation: pulse 2s ease-in-out infinite; }
.dot.paper { background: #d9a545; box-shadow: 0 0 10px rgba(217, 165, 69, 0.6); }
@keyframes pulse { 50% { opacity: 0.45; } }
.live-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.live-cell {
  background: var(--panel); padding: 22px 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.live-num {
  font-family: var(--mono); font-size: 27px; font-weight: 500;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.live-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-2);
}
.live-feed {
  margin-top: 26px; border: 1px solid var(--line); border-radius: var(--radius);
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(232, 147, 95, 0.025) 3px 4px),
    var(--panel);
  padding: 20px 22px;
}
.live-feed h3 {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 14px;
}
.live-feed ul { list-style: none; margin: 0; padding: 0; }
.live-feed li {
  display: flex; justify-content: space-between; gap: 18px;
  font-family: var(--mono); font-size: 13.5px;
  padding: 9px 0; border-top: 1px solid var(--line);
}
.live-feed li:first-child { border-top: 0; }
.live-feed li strong { color: var(--accent); font-weight: 500; }
.live-feed .t { color: var(--ink-2); flex: none; }
.feed-empty { color: var(--ink-2); }

/* ── specs: flight manifest ───────────────────────────── */
.specs { max-width: 780px; margin: clamp(80px, 13vh, 150px) auto 0; padding: 0 20px; }
.specs-table { margin: 0 0 30px; }
.specs-table > div {
  display: grid; grid-template-columns: 170px 1fr; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.specs-table dt {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-2); padding-top: 3px;
}
.specs-table dd { margin: 0; }
.mono { font-family: var(--mono); font-size: 13.5px; word-break: break-all; color: var(--accent); }
.specs-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* ── footer ───────────────────────────────────────────── */
.footer {
  margin-top: clamp(90px, 14vh, 160px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(232, 93, 37, 0.05));
}
.footer-inner { max-width: 900px; margin: 0 auto; padding: 40px 20px 50px; }
.footer-links { display: flex; gap: 24px; margin: 0 0 20px; }
.footer-links a {
  color: var(--ink); text-decoration: none; font-weight: 500;
  border-bottom: 1px solid var(--line-strong); padding-bottom: 2px;
}
.footer-links a:hover { border-color: var(--accent); }
.footer-legal { color: var(--ink-2); font-size: 13px; max-width: 72ch; margin: 0; }

/* ── toast ────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 60;
  transform: translate(-50%, 16px);
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-family: var(--mono); font-size: 13px;
  padding: 11px 18px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: min(90vw, 480px); word-break: break-all;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── reveals ──────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal:nth-child(2) { transition-delay: 0.08s; }
.hero .reveal:nth-child(3) { transition-delay: 0.16s; }
.hero .reveal:nth-child(4) { transition-delay: 0.24s; }
.hero .reveal:nth-child(5) { transition-delay: 0.32s; }

/* ── focus + reduced motion + responsive ──────────────── */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stars, .coin, .capsule, .capsule::after, .dot.on { animation: none !important; }
  .pod { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 48px; text-align: left; }
  .hero-planet { min-height: 0; order: -1; }
  .coin { width: min(72vw, 340px); }
  .coin-motto { margin-top: 16px; }
  .orbit, .capsule { display: none; }
  .drops { grid-template-columns: 1fr; }
  .live-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .specs-table > div { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 420px) {
  body { font-size: 16px; }
  .hero-title { font-size: 28px; }
  .tminus-clock { font-size: 21px; }
  .drops-stage { height: 300px; }
}
