:root {
  --bg: #07111f;
  --bg-elevated: rgba(11, 23, 39, 0.82);
  --panel: rgba(14, 28, 46, 0.84);
  --panel-strong: #0e2137;
  --line: rgba(156, 190, 214, 0.16);
  --text: #ecf3f9;
  --muted: #9bb2c4;
  --accent: #8fe3c1;
  --accent-strong: #49c58d;
  --accent-warm: #ffbf69;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(73, 197, 141, 0.18), transparent 24%),
    radial-gradient(circle at 85% 12%, rgba(255, 191, 105, 0.14), transparent 18%),
    linear-gradient(180deg, #08111c 0%, #0b1727 50%, #07111f 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 90%);
  pointer-events: none;
}

.site-shell {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  position: relative;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0 30px;
  padding: 16px 20px;
  background: rgba(7, 17, 31, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand,
.nav a,
.button {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  box-shadow: 0 0 22px rgba(143, 227, 193, 0.65);
}

.nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-size: 0.96rem;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

body.js-ready .hero,
body.js-ready .stats-band,
body.js-ready .section-grid,
body.js-ready .footer {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

body.js-ready .is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 28px;
  align-items: stretch;
  padding: 42px 0 34px;
}

.hero-copy,
.hero-panel,
.info-card,
.process-card,
.stack-card,
.chart-card,
.results-card,
.stats-band article {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  padding: 44px;
}

.eyebrow,
.stat-kicker,
.card-label {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.84rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 18px;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.92;
}

.hero-text,
.stats-band p,
.section-heading,
.info-card p,
.results-card p,
.process-list li,
.result-highlights span,
.file-list li {
  color: var(--muted);
}

.hero-text {
  max-width: 58ch;
  font-size: 1.06rem;
  line-height: 1.7;
}

code,
pre {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: #051019;
  background: linear-gradient(135deg, var(--accent), #dff8ed);
}

.button-secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.hero-points,
.stack-list,
.file-list {
  margin: 0;
  padding-left: 18px;
}

.hero-points li,
.stack-list li,
.file-list li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.hero-panel {
  display: grid;
  gap: 20px;
}

.mission-card,
.terminal-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(14, 33, 55, 0.95), rgba(10, 21, 34, 0.9));
  border: 1px solid var(--line);
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.metric-value {
  display: block;
  margin-bottom: 6px;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
}

.metric-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.flight-path {
  position: relative;
  height: 90px;
  margin-top: 22px;
  border-radius: 999px;
  border: 1px dashed rgba(143, 227, 193, 0.28);
  overflow: hidden;
}

.flight-path::before {
  content: "";
  position: absolute;
  inset: 14px 18px;
  border-radius: 999px;
  border-top: 2px solid rgba(255, 191, 105, 0.45);
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  transform: rotate(-8deg);
}

.flight-dot {
  position: absolute;
  top: 50%;
  left: 12%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px rgba(143, 227, 193, 0.85);
  animation: drift 5s ease-in-out infinite alternate;
}

.terminal-card pre {
  margin: 0;
  overflow-x: auto;
  color: #d6f5e8;
  line-height: 1.7;
}

.terminal-top {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.terminal-top span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.terminal-top span:nth-child(1) {
  background: #ff6b6b;
}

.terminal-top span:nth-child(2) {
  background: #ffd166;
}

.terminal-top span:nth-child(3) {
  background: #06d6a0;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 18px 0 74px;
}

.stats-band article,
.info-card,
.process-card,
.stack-card,
.chart-card,
.results-card {
  padding: 30px;
}

.section-grid {
  margin-bottom: 74px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
  color: var(--text);
}

.cards {
  display: grid;
  gap: 20px;
}

.demo-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.demo-card,
.demo-notes {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 30px;
}

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

.demo-copy {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.demo-button {
  flex-shrink: 0;
}

.demo-stage {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(156, 190, 214, 0.2);
  background:
    radial-gradient(circle at 22% 18%, rgba(143, 227, 193, 0.1), transparent 24%),
    linear-gradient(180deg, #05111d 0%, #0a1b2d 68%, #10243b 100%);
}

.demo-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.demo-badge {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.78);
  border: 1px solid rgba(156, 190, 214, 0.24);
  color: var(--text);
  font-size: 0.9rem;
  backdrop-filter: blur(12px);
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
}

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

.info-card h3,
.process-card h3,
.stack-card h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.process-layout,
.results-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.process-list {
  margin: 0;
  padding-left: 22px;
}

.process-list li {
  margin-bottom: 12px;
  line-height: 1.65;
}

.stack-list li::marker,
.file-list li::marker,
.hero-points li::marker,
.process-list li::marker {
  color: var(--accent-warm);
}

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

.timeline-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 14px;
}

.timeline-row span,
.timeline-row strong {
  font-size: 0.95rem;
}

.bar {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  position: relative;
  overflow: hidden;
}

.bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
}

.bar-low::after {
  width: 22%;
  background: linear-gradient(90deg, #ff6b6b, #ff9f7f);
}

.bar-mid::after {
  width: 46%;
  background: linear-gradient(90deg, #ffbf69, #ffe29a);
}

.bar-high::after {
  width: 76%;
  background: linear-gradient(90deg, #73d2de, #9ef0ff);
}

.bar-top::after {
  width: 94%;
  background: linear-gradient(90deg, #49c58d, #b8f3d7);
}

.result-highlights {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.result-highlights strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.15rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px 42px;
  color: var(--muted);
  font-size: 0.94rem;
}

@keyframes drift {
  from {
    transform: translateX(0) translateY(-10px);
  }
  to {
    transform: translateX(510px) translateY(12px);
  }
}

@media (max-width: 980px) {
  .hero,
  .three-up,
  .two-up,
  .demo-layout,
  .stats-band,
  .process-layout,
  .results-layout {
    grid-template-columns: 1fr;
  }

  .topbar,
  .footer {
    border-radius: 26px;
    flex-direction: column;
    align-items: flex-start;
  }

  h1 {
    max-width: 100%;
  }

  .hero-copy,
  .mission-card,
  .terminal-card {
    padding: 28px;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(var(--max-width), calc(100% - 24px));
  }

  .topbar {
    top: 12px;
    margin-top: 12px;
    padding: 14px 16px;
  }

  .nav {
    gap: 12px;
  }

  .hero {
    padding-top: 20px;
  }

  .hero-copy,
  .stats-band article,
  .demo-card,
  .demo-notes,
  .info-card,
  .process-card,
  .stack-card,
  .chart-card,
  .results-card {
    padding: 22px;
    border-radius: var(--radius-lg);
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .demo-meta {
    flex-direction: column;
  }

  .mission-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    padding-bottom: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero,
  .stats-band,
  .section-grid,
  .footer,
  .button,
  .flight-dot {
    animation: none !important;
    transition: none !important;
  }
}
