:root {
  color-scheme: dark;
  --bg: #080b0f;
  --bg-soft: #0b1016;
  --panel: #10151b;
  --panel-2: #161c24;
  --panel-3: #1c242e;
  --line: #29313b;
  --line-strong: #3b4652;
  --text: #e6ebf2;
  --muted: #98a2ad;
  --muted-2: #6f7a86;
  --primary: #8fb3ff;
  --primary-soft: rgba(143, 179, 255, 0.12);
  --attention: #f5a623;
  --attention-soft: rgba(245, 166, 35, 0.12);
  --success: #6ee7b7;
  --success-soft: rgba(110, 231, 183, 0.08);
  --danger: #ff7a66;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 14% -8%, rgba(143, 179, 255, 0.06), transparent 28rem),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { color: inherit; font: inherit; }
code, pre { font-family: var(--mono); }

:focus-visible {
  outline: 2px solid var(--attention);
  outline-offset: 3px;
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.wrap--narrow { width: min(780px, calc(100% - 40px)); }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(41, 49, 59, 0.84);
  background: rgba(8, 11, 15, 0.9);
  backdrop-filter: blur(14px);
}

.site-nav__inner {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font: 600 13px var(--mono);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand img { width: 27px; height: 27px; }

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

.site-nav__links a {
  text-decoration: none;
  transition: color 140ms ease;
}

.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] { color: var(--text); }

.site-nav__links .nav-github {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 94px 0 64px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 25%, rgba(143, 179, 255, 0.15), transparent 31%),
    radial-gradient(circle at 78% 10%, rgba(245, 166, 35, 0.1), transparent 25%);
}

.hero__content { position: relative; max-width: 900px; }

.hero__content--center {
  margin-inline: auto;
  text-align: center;
}

.hero__content--center h1,
.hero__content--center .lede { margin-inline: auto; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--attention);
  font: 600 12px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.99;
  letter-spacing: -0.045em;
}

.lede {
  max-width: 66ch;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2.3vw, 22px);
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.hero__content--center .actions { justify-content: center; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.button:hover { border-color: var(--primary); transform: translateY(-1px); }

.button--primary {
  border-color: var(--attention);
  background: var(--attention);
  color: #111;
  font-weight: 700;
}

.button--primary:hover { border-color: #ffbb49; background: #ffbb49; }
.button--quiet { background: transparent; }
.button--small { min-height: 36px; padding-inline: 12px; font: 12px var(--mono); }

.microcopy {
  margin: 14px 0 0;
  color: var(--muted-2);
  font: 12px var(--mono);
}

section {
  padding: 78px 0;
  border-top: 1px solid var(--line);
}

.section-heading { max-width: 730px; margin-bottom: 34px; }
.section-heading--center { margin-inline: auto; text-align: center; }

.section-heading h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.section-heading p { margin: 0; color: var(--muted); font-size: 18px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}

.card__number {
  display: block;
  margin-bottom: 20px;
  color: var(--attention);
  font: 12px var(--mono);
}

.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); }
.card code { color: var(--primary); }

.terminal {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #050709;
  box-shadow: var(--shadow);
}

.terminal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 12px var(--mono);
}

.terminal__lights { display: flex; gap: 6px; }
.terminal__lights span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.terminal__lights span:first-child { background: var(--danger); }
.terminal__lights span:nth-child(2) { background: var(--attention); }
.terminal__lights span:nth-child(3) { background: var(--success); }

.terminal pre {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  color: var(--text);
  font: 14px/1.75 var(--mono);
}

.terminal .prompt { color: var(--success); }
.terminal .comment { color: var(--muted-2); }
.terminal .value { color: var(--primary); }

.command-wrap { position: relative; }
.command-copy { position: absolute; top: 16px; right: 16px; z-index: 2; }

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
}

.stack { display: grid; gap: 14px; }

.callout {
  padding: 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--attention);
  border-radius: 12px;
  background: var(--panel);
}

.callout h3 { margin: 0 0 8px; }
.callout p { margin: 0; color: var(--muted); }

.receipt {
  padding: 20px;
  border: 1px solid rgba(110, 231, 183, 0.35);
  border-left: 3px solid var(--success);
  border-radius: 10px;
  background: var(--success-soft);
}

.receipt strong { color: var(--success); }
.receipt p { margin: 7px 0 0; color: var(--muted); }

.receipt-list {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
  color: var(--muted);
}

.receipt-list li::before { content: "✓"; color: var(--success); margin-right: 9px; }

.comparison {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}

.comparison__row {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.comparison__row:last-child { border-bottom: 0; }
.comparison__row > * { padding: 16px; border-right: 1px solid var(--line); }
.comparison__row > *:last-child { border-right: 0; }
.comparison__row strong { color: var(--text); }
.comparison__row span { color: var(--muted); }
.comparison__row .good { background: var(--success-soft); }

.demo-shell {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #080b0f;
  box-shadow: var(--shadow);
}

.demo-shell__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 12px var(--mono);
}

.demo-shell__status { display: inline-flex; align-items: center; gap: 8px; }
.demo-shell__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--attention); }

.demo-workspace {
  display: grid;
  grid-template-columns: 44px minmax(280px, 0.95fr) minmax(360px, 1.15fr);
  min-height: 540px;
}

.app-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-right: 1px solid var(--line);
  background: var(--bg-soft);
}

.app-rail__item {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font: 10px var(--mono);
}

.app-rail__item--active {
  border-color: var(--attention);
  background: var(--attention);
  color: #111;
  font-weight: 800;
}

.app-rail__item--bottom { margin-top: auto; }

.captain-terminal {
  padding: 26px;
  border-right: 1px solid var(--line);
  background: #06090c;
}

.pane-label {
  color: var(--muted-2);
  font: 11px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.goal-line {
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--primary);
  border-radius: 9px;
  background: rgba(143, 179, 255, 0.05);
  color: var(--text);
  font: 13px/1.65 var(--mono);
}

.goal-line::before { content: "› "; color: var(--success); font-weight: 700; }

.terminal-log {
  display: grid;
  gap: 9px;
  margin-top: 24px;
  color: var(--muted-2);
  font: 12px/1.55 var(--mono);
}

.terminal-log__row { opacity: 1; transition: color 160ms ease, opacity 160ms ease; }
.js .terminal-log__row { opacity: 0.42; }
.terminal-log__row.is-active { color: var(--muted); opacity: 1; }
.terminal-log__row.is-active::before { content: "→ "; color: var(--attention); }

.captain-operation {
  min-width: 0;
  padding: 26px;
  background: var(--panel);
}

.operation-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.operation-heading h3 { margin: 3px 0 0; font-size: 21px; }

.operation-chip {
  padding: 4px 8px;
  border: 1px solid rgba(110, 231, 183, 0.35);
  border-radius: 99px;
  color: var(--success);
  background: var(--success-soft);
  font: 10px var(--mono);
  white-space: nowrap;
}

.event-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.event-item {
  position: relative;
  padding: 10px 12px 10px 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  opacity: 1;
  transition: opacity 160ms ease, border-color 160ms ease, background 160ms ease;
}

.js .event-item { opacity: 0.35; }

.event-item::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 17px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.event-item.is-active { opacity: 1; border-color: var(--line); background: var(--panel-2); }
.event-item.is-active::before { background: var(--success); box-shadow: 0 0 12px rgba(110, 231, 183, 0.45); }
.event-item strong { display: block; font-size: 13px; }
.event-item span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

.demo-receipt {
  display: none;
  margin-top: 16px;
  padding: 13px;
  border: 1px solid rgba(110, 231, 183, 0.35);
  border-left: 3px solid var(--success);
  border-radius: 9px;
  background: var(--success-soft);
  color: var(--muted);
  font-size: 12px;
}

.demo-receipt.is-visible { display: block; }
.no-js .demo-receipt { display: block; }
.demo-receipt strong { display: block; color: var(--success); margin-bottom: 4px; }

.demo-controls {
  display: grid;
  grid-template-columns: auto auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--line);
}

.progress-track__fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--attention));
}

.demo-time { color: var(--muted); font: 11px var(--mono); }

.truth-label {
  margin: 13px 0 0;
  color: var(--muted-2);
  text-align: center;
  font: 11px var(--mono);
}

.cta-band {
  text-align: center;
  background: linear-gradient(180deg, var(--attention-soft), transparent 80%);
}

.cta-band .actions { justify-content: center; }

.site-footer { padding: 46px 0 72px; border-top: 1px solid var(--line); color: var(--muted); }

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.site-footer__links { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .demo-workspace { grid-template-columns: 44px 0.9fr 1.1fr; }
  .captain-terminal, .captain-operation { padding: 18px; }
}

@media (max-width: 760px) {
  .wrap, .wrap--narrow { width: min(100% - 28px, 1120px); }
  .site-nav__links a:not([aria-current="page"]):not(.nav-github) { display: none; }
  .hero { padding-top: 64px; }
  h1 { font-size: clamp(40px, 13vw, 62px); }
  .card-grid, .card-grid--two, .split { grid-template-columns: 1fr; }
  .comparison { overflow-x: auto; }
  .comparison__row { min-width: 680px; }
  .demo-workspace { display: flex; flex-direction: column; }
  .app-rail {
    width: auto;
    height: 44px;
    flex-direction: row;
    justify-content: center;
    padding: 0 9px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .app-rail__item--bottom { margin: 0 0 0 auto; }
  .captain-terminal { border-right: 0; border-bottom: 1px solid var(--line); }
  .captain-operation { min-height: 480px; }
  .demo-controls { grid-template-columns: auto auto 1fr; }
  .demo-time { grid-column: 1 / -1; text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
