:root {
  --bg: #0a0c10;
  --bg-card: #12151c;
  --bg-elevated: #1a1e28;
  --fg: #e8eaed;
  --fg-muted: #8b919e;
  --accent: #f59e0b;
  --accent-dim: #b45309;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
  --border: #2a2f3a;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- HERO ---- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: 
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(245,158,11,0.08) 0%, transparent 60%),
    var(--bg);
}

.hero-inner {
  max-width: 800px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 0.35rem 1rem;
  border-radius: 2px;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero .accent {
  color: var(--accent);
}

.lede {
  font-size: 1.15rem;
  color: var(--fg-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.hero-cta-primary {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.hero-cta-primary:hover { opacity: 0.88; }

.hero-cta-secondary {
  display: inline-block;
  background: transparent;
  color: var(--fg-muted);
  font-size: 0.9rem;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.hero-cta-secondary:hover { color: var(--fg); border-color: var(--fg-muted); }

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
}
.stat-label {
  font-size: 0.8rem;
  color: var(--fg-muted);
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ---- PROBLEM ---- */
.problem {
  padding: 6rem 2rem;
  background: var(--bg-card);
}

.problem-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.problem h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.problem-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
}

.problem-icon {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.problem-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--fg);
}

.problem-card p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ---- FEATURES ---- */
.features {
  padding: 6rem 2rem;
}

.features-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 6rem;
}

.feature-block.reverse {
  direction: rtl;
}

.feature-block.reverse > * {
  direction: ltr;
}

.feature-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.feature-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.feature-content p {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.7;
}

/* Flow demo */
.flow-demo {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.flow-node {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  margin: 0.25rem 0;
}

.flow-start {
  background: var(--accent-dim);
  color: #fff;
  font-weight: 600;
}

.flow-test {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--fg);
}

.flow-fix {
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  color: var(--green);
}

.flow-arrow {
  color: var(--fg-muted);
  font-size: 1.2rem;
  line-height: 1;
  margin: 0.3rem 0;
}

.flow-branch {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 0.5rem;
}

.flow-path {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flow-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

.flow-label.yes { background: rgba(34,197,94,0.15); color: var(--green); }
.flow-label.no { background: rgba(239,68,68,0.15); color: var(--red); }

/* Vehicle demo */
.vehicle-demo {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.vehicle-header {
  background: var(--bg-elevated);
  padding: 1rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
}

.known-issues {
  padding: 0.5rem 0;
}

.issue {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.issue:last-child { border-bottom: none; }

.issue-freq {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  flex-shrink: 0;
  min-width: 70px;
  text-align: center;
}

.issue:nth-child(1) .issue-freq { background: rgba(239,68,68,0.15); color: var(--red); }
.issue:nth-child(2) .issue-freq { background: rgba(245,158,11,0.15); color: var(--accent); }
.issue:nth-child(3) .issue-freq { background: rgba(59,130,246,0.15); color: var(--blue); }

.issue-text {
  font-size: 0.85rem;
  color: var(--fg);
}

/* Wiring demo */
.wiring-demo {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
}

.wire-path {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1rem;
}

.wire-component {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.wire-component.ecu {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--fg);
}

.wire-component.sensor {
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.3);
  color: var(--blue);
}

.wire-connector {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--fg-muted);
  background: var(--bg-elevated);
  padding: 0.3rem 0.6rem;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.wire-line {
  height: 2px;
  width: 40px;
  background: var(--border);
}

.wire-line.active {
  background: var(--green);
  box-shadow: 0 0 8px rgba(34,197,94,0.3);
}

.wire-info {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  text-align: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ---- HOW ---- */
.how {
  padding: 6rem 2rem;
  background: var(--bg-card);
}

.how-inner {
  max-width: 900px;
  margin: 0 auto;
}

.how h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 3.5rem;
  letter-spacing: -0.02em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step { padding: 1.5rem; }

.step-num {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.6;
  line-height: 1;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ---- CLOSING ---- */
.closing {
  padding: 8rem 2rem;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(245,158,11,0.06) 0%, transparent 60%),
    var(--bg);
}

.closing-inner {
  max-width: 650px;
  margin: 0 auto;
}

.closing h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.closing p {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.8;
}

/* ---- FOOTER ---- */
.site-footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.footer-brand {
  font-weight: 600;
  color: var(--fg);
}

.footer-sep { opacity: 0.3; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  .stat-divider {
    width: 40px;
    height: 1px;
  }
  .feature-block,
  .feature-block.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .flow-branch {
    flex-direction: column;
    gap: 1rem;
  }
  .wire-path {
    flex-direction: column;
    gap: 0.5rem;
  }
  .wire-line {
    width: 2px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .hero { padding: 3rem 1.25rem; }
  .problem, .features, .how, .closing { padding: 4rem 1.25rem; }
  .problem-card { padding: 1.5rem; }
}