:root {
  --bg: #0b0f14;
  --surface: #131920;
  --surface2: #1a222d;
  --border: #232d3b;
  --text: #e8eaf0;
  --text-dim: #7a8494;
  --accent: #3dffa0;
  --accent-dim: rgba(61, 255, 160, 0.12);
  --warn: #ffb340;
  --critical: #ff5c5c;
  --success: #3dffa0;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(rgba(61, 255, 160, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 255, 160, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ── NAV ── */
.navbar {
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 20, 0.8);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-logo {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.nav-tagline {
  font-size: 13px;
  color: var(--text-dim);
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

/* ── HERO ── */
.hero {
  padding: 80px 40px 60px;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 20px;
}
.hero-headline br { display: block; }
.hero-sub {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 440px;
  margin-bottom: 40px;
  line-height: 1.7;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}
.stat { display: flex; flex-direction: column; }
.stat-val {
  font-family: var(--font-head);
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.stat-sep {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ── TERMINAL ── */
.hero-terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(61,255,160,0.05);
}
.terminal-bar {
  background: var(--surface2);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}
.t-dot { width: 12px; height: 12px; border-radius: 50%; }
.t-red { background: #ff5f57; }
.t-yellow { background: #febc2e; }
.t-green { background: #28c840; }
.t-title { font-size: 12px; color: var(--text-dim); margin-left: 8px; font-family: 'Courier New', monospace; }
.terminal-body { padding: 20px; font-family: 'Courier New', monospace; font-size: 12px; line-height: 1.7; }
.t-line { display: block; }
.t-dim { color: var(--text-dim); }
.t-warn { color: var(--critical); }
.t-success { color: var(--accent); }
.t-comment { color: var(--text-dim); font-style: italic; }

/* ── SECTION COMMON ── */
.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 600;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

/* ── LOOP ── */
.loop {
  padding: 80px 40px;
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}
.loop-header { text-align: center; margin-bottom: 56px; }
.loop-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.loop-step {
  flex: 1;
  padding: 24px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.loop-arrow {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--text-dim);
  flex-shrink: 0;
  padding-top: 28px;
}
.step-num {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 10px;
}
.loop-step h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.loop-step p { font-size: 13px; color: var(--text-dim); line-height: 1.5; }

/* ── FEATURES ── */
.features {
  padding: 80px 40px;
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}
.features-header { text-align: center; margin-bottom: 56px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--accent); }
.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-dim);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 16px;
}
.feature-card h3 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.feature-card p { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

/* ── PROCESS ── */
.process {
  padding: 80px 40px;
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}
.process-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.process-text .section-label { text-align: left; }
.process-body { font-size: 16px; color: var(--text-dim); margin: 16px 0 28px; line-height: 1.7; }
.process-code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.code-line { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-family: 'Courier New', monospace; font-size: 13px; }
.code-line:last-child { margin-bottom: 0; }
.code-prompt { color: var(--accent); font-weight: bold; }
.code-cmd { color: var(--text); }
.process-note { font-size: 12px; color: var(--text-dim); font-style: italic; }

/* PR card */
.process-pr {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.pr-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pr-badge {
  background: rgba(255, 92, 92, 0.15);
  color: var(--critical);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pr-title { font-size: 14px; font-weight: 600; color: var(--text); }
.pr-meta { font-size: 12px; color: var(--text-dim); padding: 10px 20px; border-bottom: 1px solid var(--border); background: rgba(0,0,0,0.2); }
.pr-body { padding: 20px; }
.pr-body p { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }
.pr-body p:last-child { margin-bottom: 0; }
.pr-body strong { color: var(--text); }
.pr-body code { background: var(--surface2); padding: 1px 5px; border-radius: 3px; font-size: 12px; color: var(--accent); }
.pr-diff-label { font-family: 'Courier New', monospace; font-size: 11px; color: var(--text-dim); padding: 8px 20px; background: rgba(0,0,0,0.3); border-top: 1px solid var(--border); }
.pr-diff { padding: 12px 20px; font-family: 'Courier New', monospace; font-size: 12px; }
.diff-minus { display: block; color: var(--critical); margin-bottom: 4px; }
.diff-plus { display: block; color: var(--accent); }

/* ── DIFFERENCE ── */
.difference {
  padding: 80px 40px;
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}
.diff-header { text-align: center; margin-bottom: 48px; }
.diff-header .section-title br { display: block; }
.diff-table {
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.diff-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  align-items: center;
}
.diff-row:last-child { border-bottom: none; }
.diff-head { background: var(--surface); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 600; }
.diff-row:not(.diff-head) span:first-child { color: var(--text); }
.diff-head span:not(:first-child) { text-align: center; }
.check { color: var(--accent); }
.partial { color: var(--warn); }
.cross { color: var(--text-dim); }
.yes-bold { font-weight: 700; }

/* ── CLOSING ── */
.closing {
  padding: 100px 40px;
  border-top: 1px solid var(--border);
}
.closing-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.closing-headline {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 20px;
}
.closing-headline br { display: block; }
.closing-body { font-size: 18px; color: var(--text-dim); margin-bottom: 40px; }
.closing-logos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.closing-lang {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ═══════════════════════════════════════
   DEMO-HERO — primary landing element
   Animated terminal walkthrough. Acts
   as the conversion lever (video equiv).
═══════════════════════════════════════ */
.demo-hero {
  padding: 80px 40px 72px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 90% 60% at 50% -5%, rgba(61,255,160,0.08) 0%, transparent 55%),
    var(--bg);
  text-align: center;
}
.demo-hero .demo-player { max-width: 900px; }
.demo-player {
  max-width: 860px;
  margin: 0 auto;
}

/* Terminal window */
.demo-terminal-window {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 40px 100px rgba(0,0,0,0.6),
    0 0 0 1px rgba(61,255,160,0.07),
    inset 0 1px 0 rgba(255,255,255,0.04);
  cursor: default;
}

/* Title bar */
.dtw-bar {
  background: var(--surface2);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}
.dtw-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dtw-red { background: #ff5f57; }
.dtw-yellow { background: #febc2e; }
.dtw-green { background: #28c840; }
.dtw-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  font-family: 'Courier New', monospace;
}
.dtw-dur {
  font-size: 11px;
  color: var(--text-dim);
  font-family: 'Courier New', monospace;
  opacity: 0.6;
}

/* Terminal body */
.dtw-body {
  padding: 20px 24px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.8;
  min-height: 280px;
}

/* Line states */
.dtw-line {
  display: block;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.dtw-line.dt-visible {
  opacity: 1;
  transform: translateY(0);
}
.dtw-comment { color: var(--text-dim); font-style: italic; }
.dtw-dim { color: var(--text-dim); }
.dtw-warn { color: var(--critical); }
.dtw-success { color: var(--accent); }
.dt-success { color: var(--accent); font-weight: bold; }

/* Typing cursor */
.dtw-cursor {
  display: inline;
  color: var(--accent);
  animation: blink 1s step-end infinite;
  opacity: 0;
}
.dtw-cursor.cursor-on { opacity: 1; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Progress bar */
.dtw-progress-wrap {
  height: 3px;
  background: var(--border);
  position: relative;
  display: flex;
}
.dtw-progress-bar {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(61,255,160,0.4);
}
.dtw-progress-dots {
  display: flex;
  width: 100%;
  gap: 2px;
  align-items: center;
  padding: 0 2px;
}
.progress-dot {
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  transition: background 0.3s ease;
}
.progress-dot.dot-active { background: var(--accent); }

/* Big play/pause button (overlay) */
.demo-play-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(61,255,160,0.12);
  border: 1px solid rgba(61,255,160,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  z-index: 10;
}
.demo-play-btn:hover {
  background: rgba(61,255,160,0.2);
  border-color: var(--accent);
  transform: scale(1.08);
}
.demo-play-btn:focus { outline: none; }
.demo-play-btn:focus-visible { box-shadow: 0 0 0 3px rgba(61,255,160,0.3); }
.demo-play-icon, .demo-icon-pause { width: 20px; height: 20px; }

/* Below-player row */
.demo-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 4px 0;
  gap: 16px;
}
.demo-cta-text { display: flex; align-items: center; gap: 10px; }
.demo-cta-label { font-size: 13px; color: var(--text-dim); }
.demo-cta-sep { color: var(--border); font-size: 18px; }
.demo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: gap 0.2s;
}
.demo-link:hover { gap: 12px; }

/* ── DEMO (old, now a sub-section) ── */
.demo {
  padding: 80px 40px;
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}
.demo-header { text-align: center; margin-bottom: 40px; }
.demo-sub {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 520px;
  margin: 12px auto 0;
  line-height: 1.7;
}
.demo-video-wrapper {
  max-width: 820px;
  margin: 0 auto;
}
.demo-video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.demo-video-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
.demo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0d1520 0%, #0b0f14 100%);
}
.demo-placeholder-inner { text-align: center; margin-bottom: 32px; }
.demo-play-btn-old {
  width: 64px;
  height: 64px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 16px;
  cursor: default;
}
.demo-placeholder-title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.demo-placeholder-sub { font-size: 13px; color: var(--text-dim); }
.demo-terminal-mini {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.6;
}
.dtm-line { display: block; }
.dtm-dim { color: var(--text-dim); }
.dtm-warn { color: var(--critical); }
.dtm-success { color: var(--accent); }
.dtm-comment { color: var(--text-dim); font-style: italic; }
.demo-cta-old { text-align: center; margin-top: 28px; }

/* ── WAITLIST FORM ── */
.waitlist-form-wrapper { margin-bottom: 48px; }
.waitlist-form { max-width: 480px; margin: 0 auto; }
.waitlist-fields {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.waitlist-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text);
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}
.waitlist-input::placeholder { color: var(--text-dim); }
.waitlist-input:focus { border-color: var(--accent); }
.waitlist-btn {
  background: var(--accent);
  color: #0b0f14;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: opacity 0.2s;
  position: relative;
}
.waitlist-btn:hover { opacity: 0.88; }
.waitlist-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.waitlist-btn-loading { display: none; }
.waitlist-btn.loading .waitlist-btn-text { display: none; }
.waitlist-btn.loading .waitlist-btn-loading { display: flex; }
.spin {
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.waitlist-note { font-size: 12px; color: var(--text-dim); text-align: center; }
.waitlist-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  max-width: 480px;
  margin: 0 auto;
}
.waitlist-error {
  text-align: center;
  padding: 10px;
  font-size: 13px;
  color: var(--critical);
  max-width: 480px;
  margin: 8px auto 0;
}

/* ── FOOTER ── */
.footer {
  padding: 28px 40px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand { font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--accent); }
.footer-tagline { font-size: 12px; color: var(--text-dim); padding-left: 12px; border-left: 1px solid var(--border); }
.footer-copy { font-size: 12px; color: var(--text-dim); margin-left: auto; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero-inner,
  .process-inner { grid-template-columns: 1fr; gap: 40px; }
  .features-grid { grid-template-columns: 1fr; }
  .loop-steps { flex-direction: column; gap: 12px; }
  .loop-arrow { transform: rotate(90deg); padding: 0; justify-content: center; }
  .diff-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .diff-row span:nth-child(2),
  .diff-row span:nth-child(3),
  .diff-row span:nth-child(4) { text-align: right; }
  .navbar, .hero, .loop, .features, .process, .demo, .demo-hero, .difference, .closing { padding-left: 20px; padding-right: 20px; }
  .waitlist-fields { flex-direction: column; }
  .waitlist-btn { width: 100%; justify-content: center; }
  .nav-tagline, .footer-tagline, .footer-copy { display: none; }
  .hero-stats { gap: 16px; }
  .stat-val { font-size: 28px; }
  .demo-cta-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .demo-cta-text { flex-direction: column; gap: 4px; }
}