:root {
  --bg-0: #050a17;
  --bg-1: #0a1428;
  --bg-2: #0f1d38;
  --ink-0: #f6f8ff;
  --ink-1: #c9d4ec;
  --ink-2: #7d8db0;
  --ink-3: #4b5a7d;
  --line: #1a2a4a;
  --brand-deep: #1E3A5F;
  --brand: #2E75B6;
  --brand-light: #4A90CC;
  --brand-glow: #7ab8ff;
  --alert: #E74C3C;
  --ok: #5fd29a;

  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--ink-0);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ─────────────────── Background atmosphere ─────────────────── */

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(74, 144, 204, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(74, 144, 204, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.85'/></svg>");
}

/* ─────────────────── Top nav ─────────────────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 36px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-1);
  mix-blend-mode: difference;
}

.nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink-0);
}

.nav .brand .dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--brand-light);
  box-shadow: 0 0 12px var(--brand-glow);
}

.nav .links {
  display: flex;
  gap: 28px;
}

.nav .links a:hover { color: var(--ink-0); }

.nav .cta {
  padding: 10px 18px;
  border: 1px solid var(--ink-3);
  border-radius: 999px;
  color: var(--ink-0);
  transition: all 0.2s ease;
}
.nav .cta:hover {
  background: var(--ink-0);
  color: var(--bg-0);
  border-color: var(--ink-0);
}

/* ─────────────────── Hero ─────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px 48px 80px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-eyebrow .pulse {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
}
.hero-eyebrow .pulse::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--ok);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(56px, 7.2vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--ink-0);
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(180deg, var(--brand-light) 0%, var(--brand) 60%, var(--brand-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.hero p.lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-1);
  max-width: 540px;
  margin: 0;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: 999px;
  font-family: var(--body);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--ink-0);
  color: var(--bg-0);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -10px rgba(122, 184, 255, 0.4); }
.btn-ghost {
  background: transparent;
  color: var(--ink-0);
  border-color: var(--ink-3);
}
.btn-ghost:hover { border-color: var(--ink-1); background: rgba(255,255,255,0.03); }

.hero-right {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 560px;
}

.hero-luna-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-luna-stage::before {
  content: '';
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 144, 204, 0.22) 0%, rgba(74, 144, 204, 0) 65%);
  animation: float 7s ease-in-out infinite;
}

.hero-luna-stage::after {
  content: '';
  position: absolute;
  width: 360px; height: 360px;
  border: 1px solid var(--line);
  border-radius: 50%;
  animation: spin 40s linear infinite;
  background-image:
    radial-gradient(circle at 50% 0%, var(--brand-light) 0 3px, transparent 4px),
    radial-gradient(circle at 100% 50%, var(--brand) 0 2px, transparent 3px),
    radial-gradient(circle at 50% 100%, var(--brand-light) 0 2px, transparent 3px);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.luna-shadow {
  position: absolute;
  bottom: 60px;
  width: 240px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,0.6), transparent 70%);
  filter: blur(8px);
  animation: shadow-bob 7s ease-in-out infinite;
}
@keyframes shadow-bob {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(0.85); opacity: 0.6; }
}

.hero-corner {
  position: absolute;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-corner .bar { width: 24px; height: 1px; background: var(--ink-3); }

.hero-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-2);
  text-transform: uppercase;
  z-index: 3;
}
.hero-scroll-hint .line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--brand-light), transparent);
  animation: scroll-line 2.2s ease-in-out infinite;
}
@keyframes scroll-line {
  0% { transform: scaleY(0.3); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0.3); transform-origin: bottom; opacity: 0.4; }
}

/* ─────────────────── Cinematic auto-playing stage ─────────────────── */

.cinematic {
  position: relative;
  height: 100vh;
  z-index: 1;
}

.stage {
  position: relative;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(46, 117, 182, 0.16), transparent 70%),
    linear-gradient(180deg, #050a17 0%, #081227 60%, #0a1530 100%);
}

/* playback controls bar */
.stage-controls {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(5, 10, 23, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-1);
  text-transform: uppercase;
  z-index: 6;
}
.stage-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink-0);
  color: var(--bg-0);
  border: none;
  cursor: pointer;
  transition: transform 0.15s;
}
.stage-controls button:hover { transform: scale(1.06); }
.stage-controls button.secondary {
  background: transparent;
  color: var(--ink-1);
  border: 1px solid var(--ink-3);
  width: 32px;
  height: 32px;
}
.stage-controls button.secondary:hover { border-color: var(--ink-0); color: var(--ink-0); }

.stage-scrub {
  width: 280px;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  overflow: visible;
}
.stage-scrub .fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--brand-light), var(--brand));
  border-radius: 2px;
  transform-origin: left;
  transition: width 0.05s linear;
}
.stage-scrub .head {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink-0);
  box-shadow: 0 0 0 3px rgba(122, 184, 255, 0.25);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.stage-scrub .marker {
  position: absolute;
  top: -3px;
  width: 1px;
  height: 10px;
  background: var(--ink-3);
  opacity: 0.7;
}
.stage-scrub .marker.passed { background: var(--brand-light); opacity: 1; }

.stage-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stage-caption {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 5;
  pointer-events: none;
  text-align: center;
}

.stage-caption .step {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.stage-caption .title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink-0);
  max-width: 720px;
}

.stage-caption .sub {
  font-size: 16px;
  color: var(--ink-1);
  max-width: 560px;
}

.stage-progress {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-2);
  text-transform: uppercase;
}
.stage-progress .dots {
  display: flex;
  gap: 8px;
}
.stage-progress .dot {
  width: 28px;
  height: 3px;
  background: var(--ink-3);
  border-radius: 2px;
  transition: background 0.25s, transform 0.25s;
}
.stage-progress .dot.active {
  background: var(--brand-light);
  box-shadow: 0 0 12px var(--brand-glow);
}
.stage-progress .dot.done {
  background: var(--ink-2);
}

/* HUD style overlay */
.stage-hud {
  position: absolute;
  top: 32px;
  left: 32px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-2);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}
.stage-hud .row { display: flex; gap: 10px; align-items: center; }
.stage-hud .label { color: var(--ink-3); }
.stage-hud .val { color: var(--ink-0); }
.stage-hud .pip {
  width: 8px; height: 8px; border-radius: 1px;
  background: var(--ink-3);
}
.stage-hud .pip.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.stage-hud .pip.alert { background: var(--alert); box-shadow: 0 0 8px var(--alert); }

.stage-hud-right {
  position: absolute;
  top: 32px;
  right: 32px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-2);
  text-transform: uppercase;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}

/* ─────────────────── Generic section styles ─────────────────── */

.section {
  position: relative;
  z-index: 2;
  padding: 140px 48px;
  max-width: 1440px;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-light);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--brand-light);
}

.section h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  max-width: 900px;
}

.section .lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-1);
  max-width: 640px;
  margin: 0 0 64px;
}

/* features grid */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.feature {
  background: var(--bg-1);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 240px;
  transition: background 0.25s;
}
.feature:hover { background: var(--bg-2); }
.feature .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.1em;
}
.feature h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
  color: var(--ink-0);
  letter-spacing: -0.01em;
}
.feature p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-1);
  margin: 0;
}

/* how it works */
.howitworks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.step-card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.step-card .step-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 56px;
  color: var(--brand);
  line-height: 1;
  letter-spacing: -0.04em;
}
.step-card h4 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  margin: 0;
  letter-spacing: -0.01em;
}
.step-card p { font-size: 15px; color: var(--ink-1); margin: 0; line-height: 1.55; }
.step-card .tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* metrics */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 56px 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 24px;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.metric .big {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(40px, 4.6vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink-0);
}
.metric .big em { font-style: normal; color: var(--brand-light); }
.metric .lbl { font-size: 14px; color: var(--ink-2); }

/* CTA */
.cta-section {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  max-width: 1440px;
  padding: 0 48px 120px;
}
.cta-card {
  position: relative;
  overflow: hidden;
  padding: 72px;
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(74,144,204,0.3), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(231,76,60,0.18), transparent 50%),
    linear-gradient(135deg, #0c1a36, #061026);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.cta-card h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 4.2vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 16px;
}
.cta-card p { color: var(--ink-1); margin: 0 0 24px; font-size: 17px; line-height: 1.55; max-width: 520px; }

.cta-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border-radius: 16px;
  background: rgba(5, 10, 23, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
}
.cta-form label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.cta-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--ink-0);
  font-family: var(--body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.cta-form input:focus { border-color: var(--brand-light); }
.cta-form button {
  margin-top: 6px;
  padding: 14px;
  border-radius: 10px;
  border: 0;
  background: var(--ink-0);
  color: var(--bg-0);
  font-weight: 600;
  cursor: pointer;
}

/* footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
  max-width: 1440px;
  margin: 0 auto;
}

/* ─────────────────── Tablet/phone ─────────────────── */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding: 120px 24px 60px; }
  .hero-right { height: 420px; }
  .features { grid-template-columns: 1fr; }
  .howitworks { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .cta-card { grid-template-columns: 1fr; padding: 36px; }
  .nav .links { display: none; }
  .section { padding: 80px 24px; }
}
