/* ═══════════════════════════════════════════════════════════
   GROKBIT — mission-control aesthetic
   ═══════════════════════════════════════════════════════════ */
:root {
  --black: #000000;
  --space: #050608;
  --panel: #0b0d10;
  --line: rgba(255, 255, 255, 0.10);
  --white: #f5f7fa;
  --dim: #9aa3ad;
  --accent: #4da3ff;          /* ion-engine blue */
  --accent-hot: #7dc0ff;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --sans: "Barlow", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --cond: "Barlow Condensed", "Barlow", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hot); }
code, kbd {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.08em 0.4em;
  color: var(--white);
}
strong { font-weight: 600; color: var(--white); }
em { color: var(--white); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.wrap--center { text-align: center; }

/* ── Reveal on scroll ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Nav ──────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 68px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0));
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}
.nav.is-scrolled { background: rgba(0,0,0,0.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav__brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--white); font-family: var(--cond); font-weight: 700;
  font-size: 22px; letter-spacing: 0.32em;
}
.nav__brand:hover { color: var(--white); }
.nav__links { display: flex; align-items: center; gap: 34px; }
.nav__links a {
  color: var(--white); font-size: 12px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  padding-bottom: 4px; border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.nav__links a:hover { border-color: var(--white); }
.nav__cta {
  border: 1px solid var(--white) !important;
  padding: 9px 22px 8px !important; border-radius: 2px;
}
.nav__cta:hover { background: var(--white); color: var(--black) !important; }
.nav__burger { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.nav__burger span { display: block; width: 24px; height: 2px; background: var(--white); transition: 0.3s; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  background: radial-gradient(ellipse 120% 70% at 50% 115%, #0d1622 0%, #05070a 45%, #000 100%);
}
#stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__horizon {
  position: absolute; left: 50%; bottom: -42vw; transform: translateX(-50%);
  width: 160vw; height: 60vw; border-radius: 50%;
  background: #000;
  box-shadow: 0 -2px 60px rgba(77,163,255,0.35), 0 -1px 12px rgba(180,220,255,0.5);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; padding: 140px 24px 120px; max-width: 900px; }
.hero__kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.5em;
  color: var(--accent); margin-bottom: 28px;
}
.hero__title {
  font-family: var(--cond); font-weight: 700;
  font-size: clamp(52px, 9vw, 118px);
  line-height: 0.98; letter-spacing: 0.02em; text-transform: uppercase;
}
.hero__title span { color: var(--dim); }
.hero__sub {
  margin: 32px auto 0; max-width: 640px;
  font-size: 17px; color: var(--dim);
}
.hero__actions { display: flex; gap: 18px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.btn {
  font-family: var(--sans); font-weight: 600; font-size: 13px;
  letter-spacing: 0.22em; padding: 17px 38px; border-radius: 2px;
  transition: all 0.25s ease; white-space: nowrap;
}
.btn--primary { background: var(--white); color: var(--black); }
.btn--primary:hover { background: var(--accent-hot); color: var(--black); box-shadow: 0 0 34px rgba(77,163,255,0.45); }
.btn--ghost { border: 1px solid rgba(255,255,255,0.45); color: var(--white); }
.btn--ghost:hover { border-color: var(--white); color: var(--white); background: rgba(255,255,255,0.06); }

.hero__stats {
  display: flex; justify-content: center; gap: clamp(28px, 6vw, 72px);
  margin-top: 72px; flex-wrap: wrap;
}
.hero__stats div { display: flex; flex-direction: column; gap: 4px; }
.hero__stats em {
  font-style: normal; font-family: var(--cond); font-weight: 600;
  font-size: 30px; letter-spacing: 0.06em;
}
.hero__stats span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; color: var(--dim); }

.hero__scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 44px; border: 1px solid rgba(255,255,255,0.4);
  border-radius: 14px; z-index: 2;
}
.hero__scroll span {
  position: absolute; top: 8px; left: 50%; width: 3px; height: 8px;
  margin-left: -1.5px; background: var(--white); border-radius: 2px;
  animation: scrollhint 2s infinite;
}
@keyframes scrollhint { 0%{opacity:1;transform:translateY(0)} 70%{opacity:0;transform:translateY(16px)} 100%{opacity:0} }

/* ── Sections ─────────────────────────────────────────────── */
.section { padding: 130px 0; position: relative; }
.section__index {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.5em;
  color: var(--accent); margin-bottom: 18px;
}
.section__title {
  font-family: var(--cond); font-weight: 700; text-transform: uppercase;
  font-size: clamp(34px, 5vw, 62px); line-height: 1.04; letter-spacing: 0.02em;
  margin-bottom: 54px;
}

/* Mission */
.section--mission { background: var(--black); border-top: 1px solid var(--line); }
.mission__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  font-size: 17px; color: var(--dim); max-width: 1020px;
}
.mission__shot { margin-top: 72px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }

/* Systems */
.section--systems { background: linear-gradient(to bottom, #000, #06080b 30%, #000); }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { background: var(--space); padding: 36px 28px 40px; transition: background 0.3s ease; position: relative; }
.card:hover { background: #0c1017; }
.card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s ease;
}
.card:hover::after { transform: scaleX(1); }
.card__num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em; color: var(--accent); }
.card h3 {
  font-family: var(--cond); font-weight: 600; text-transform: uppercase;
  font-size: 21px; letter-spacing: 0.05em; margin: 14px 0 12px;
}
.card p { font-size: 14.5px; color: var(--dim); }

/* Modes */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.mode {
  border: 1px solid var(--line); border-radius: 6px; padding: 38px 32px;
  background: var(--space); display: flex; flex-direction: column; gap: 18px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.mode:hover { border-color: rgba(77,163,255,0.5); transform: translateY(-4px); }
.mode--featured { border-color: rgba(77,163,255,0.45); background: linear-gradient(180deg, rgba(77,163,255,0.07), var(--space) 55%); }
.mode__head { display: flex; align-items: baseline; justify-content: space-between; }
.mode h3 { font-family: var(--cond); font-weight: 700; font-size: 30px; letter-spacing: 0.06em; }
.mode__badge {
  order: 2; font-family: var(--mono); font-size: 10px; letter-spacing: 0.25em;
  color: var(--accent); border: 1px solid rgba(77,163,255,0.4);
  padding: 4px 10px; border-radius: 20px;
}
.mode p { color: var(--dim); font-size: 15px; flex: 1; }
.mode__meter { display: block; height: 3px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.mode__meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hot)); }
.mode__label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; color: var(--dim); }

/* Launch */
.section--launch { background: var(--black); border-top: 1px solid var(--line); }
.launch { display: flex; flex-direction: column; gap: 0; max-width: 860px; }
.launch__step { display: flex; gap: 40px; padding: 44px 0; border-bottom: 1px solid var(--line); }
.launch__step:last-child { border-bottom: 0; }
.launch__count {
  font-family: var(--cond); font-weight: 700; font-size: 44px;
  color: var(--dim); min-width: 96px; line-height: 1;
}
.launch__count--go { color: var(--accent); text-shadow: 0 0 24px rgba(77,163,255,0.6); }
.launch__body { flex: 1; min-width: 0; }
.launch__body h3 {
  font-family: var(--cond); font-weight: 600; font-size: 21px;
  letter-spacing: 0.08em; margin-bottom: 18px;
}
.launch__note { color: var(--dim); font-size: 15px; margin-top: 14px; }
pre {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 20px 90px 20px 22px; overflow-x: auto;
}
pre code { background: none; border: 0; padding: 0; font-size: 14px; line-height: 1.8; color: #cfe3f7; }
.copy {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  color: var(--dim); background: rgba(255,255,255,0.05);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 6px 12px; cursor: pointer; transition: all 0.2s ease;
}
.copy:hover { color: var(--white); border-color: rgba(255,255,255,0.4); }
.copy.is-copied { color: var(--accent); border-color: var(--accent); }

.tabs__bar { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs__btn {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.15em;
  color: var(--dim); background: none; border: 1px solid var(--line);
  border-radius: 4px; padding: 8px 18px; cursor: pointer; transition: all 0.2s ease;
}
.tabs__btn.is-active { color: var(--black); background: var(--white); border-color: var(--white); }
.tabs__panel { display: none; }
.tabs__panel.is-active { display: block; }

/* Telemetry */
.section--telemetry { background: linear-gradient(to bottom, #000, #05070a 40%, #000); }
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.shots figure {
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background: var(--space); transition: border-color 0.3s ease;
}
.shots figure:hover { border-color: rgba(77,163,255,0.5); }
.shots img { width: 100%; height: 340px; object-fit: cover; object-position: top; }
.shots figcaption {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--dim); padding: 16px 20px;
  border-top: 1px solid var(--line);
}

/* Flight Log / Changelog */
.section--changelog { background: var(--black); border-top: 1px solid var(--line); }
.changelog__lede {
  color: var(--dim); font-size: 17px; max-width: 680px; margin: -30px 0 46px;
}
.changelog { max-width: 900px; display: flex; flex-direction: column; gap: 14px; }
.changelog__status { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; color: var(--dim); }
.changelog__status--error { color: var(--dim); }

.cl-entry {
  border: 1px solid var(--line); border-radius: 6px; background: var(--space);
  overflow: hidden; transition: border-color 0.3s ease;
}
.cl-entry[open] { border-color: rgba(77,163,255,0.4); }
.cl-entry:hover { border-color: rgba(77,163,255,0.3); }

.cl-head {
  display: flex; align-items: center; gap: 18px; cursor: pointer;
  padding: 22px 26px; list-style: none; user-select: none;
}
.cl-head::-webkit-details-marker { display: none; }
.cl-version {
  font-family: var(--cond); font-weight: 700; font-size: 26px;
  letter-spacing: 0.04em; color: var(--white); line-height: 1;
}
.cl-entry[open] .cl-version { color: var(--accent-hot); }
.cl-date {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--dim);
}
.cl-latest {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em;
  color: var(--accent); border: 1px solid rgba(77,163,255,0.4);
  padding: 3px 9px; border-radius: 20px;
}
.cl-chevron {
  margin-left: auto; width: 9px; height: 9px; flex: none;
  border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim);
  transform: rotate(45deg); transition: transform 0.3s ease, border-color 0.3s ease;
}
.cl-entry[open] .cl-chevron { transform: rotate(-135deg); border-color: var(--accent); }

.cl-body { padding: 4px 26px 28px; border-top: 1px solid var(--line); }
.cl-summary {
  color: var(--white); font-size: 15.5px; font-style: italic;
  margin: 20px 0 4px; padding-left: 14px; border-left: 2px solid rgba(77,163,255,0.5);
}
.cl-cat {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-weight: 500; font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim);
  margin: 24px 0 12px;
}
.cl-cat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.cl-cat--add { color: #63d29b; } .cl-cat--add::before { background: #63d29b; }
.cl-cat--fix { color: var(--accent-hot); } .cl-cat--fix::before { background: var(--accent-hot); }
.cl-cat--chg { color: #c9a6ff; } .cl-cat--chg::before { background: #c9a6ff; }

.cl-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.cl-list li {
  position: relative; padding-left: 20px; color: var(--dim); font-size: 15px; line-height: 1.6;
}
.cl-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 5px; height: 5px; border: 1px solid var(--dim); border-radius: 50%;
}
.cl-list li strong { color: var(--white); }
.cl-list li code { font-size: 0.82em; }

/* Final CTA */
.section--final {
  background: radial-gradient(ellipse 90% 90% at 50% 120%, #0d1622 0%, #000 70%);
  border-top: 1px solid var(--line); padding: 160px 0;
}
.final__title {
  font-family: var(--cond); font-weight: 700; text-transform: uppercase;
  font-size: clamp(36px, 6vw, 72px); letter-spacing: 0.02em; line-height: 1.02;
}
.final__sub { color: var(--dim); font-size: 18px; margin-top: 20px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 56px 0 48px; background: #000; }
.footer__top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 34px; }
.footer__links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer__links a { color: var(--dim); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }
.footer__links a:hover { color: var(--white); }
.footer__legal { color: #6b7580; font-size: 13px; max-width: 860px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .modes { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav__links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column;
    background: rgba(0,0,0,0.96); backdrop-filter: blur(14px);
    padding: 28px 24px 36px; gap: 24px; border-bottom: 1px solid var(--line);
    transform: translateY(-130%); transition: transform 0.35s ease;
  }
  .nav__links.is-open { transform: none; }
  .nav__burger { display: flex; }
  .mission__grid { grid-template-columns: 1fr; gap: 24px; }
  .grid { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .shots img { height: auto; max-height: 380px; }
  .launch__step { flex-direction: column; gap: 16px; }
  .section { padding: 90px 0; }
  .wrap { padding: 0 20px; }
  pre { padding-right: 22px; }
  .copy { position: static; display: inline-block; margin-top: 12px; }
  .changelog__lede { margin-top: -18px; }
  .cl-head { padding: 18px 18px; gap: 12px; }
  .cl-version { font-size: 22px; }
  .cl-body { padding: 4px 18px 22px; }
}
