:root {
  --bg: #070b14;
  --surface: #0d1424;
  --surface2: #111c30;
  --border: #1a2540;
  --indigo: #4f46e5;
  --indigo-hover: #4338ca;
  --cyan: #06b6d4;
  --white: #ffffff;
  --muted: #8899bb;
  --dim: #445566;
  --font: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'DM Mono', 'Courier New', monospace;
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 48px;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--white);
  text-decoration: none;
}
.nav-tag {
  font-size: 11px;
  color: var(--cyan);
  font-family: var(--mono);
  padding: 3px 8px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 20px;
  background: rgba(6, 182, 212, 0.05);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-cta {
  padding: 9px 20px;
  background: var(--indigo);
  color: var(--white);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--indigo-hover); }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 48px 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(79, 70, 229, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 80% 30%, rgba(6, 182, 212, 0.06) 0%, transparent 60%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
}
.hero-headline {
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero-headline .gradient {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 480px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 48px;
}
.btn-primary {
  padding: 14px 28px;
  background: var(--indigo);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--indigo-hover); transform: translateY(-1px); }
.btn-secondary {
  padding: 14px 28px;
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.btn-secondary:hover { border-color: var(--muted); background: rgba(255,255,255,0.04); }
.hero-stats {
  display: flex;
  gap: 32px;
}
.hero-stat-label {
  font-size: 12px;
  color: var(--dim);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.hero-stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* HERO VISUAL */
.hero-visual {
  position: relative;
}
.code-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #28ca41; }
.code-window-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--muted);
}
.code-body {
  padding: 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
}
.code-line { display: flex; gap: 16px; }
.code-num { color: var(--dim); min-width: 20px; text-align: right; }
.code-content { color: #e2e8f0; }
.code-keyword { color: #c792ea; }
.code-string { color: #c3e88d; }
.code-comment { color: var(--dim); font-style: italic; }
.code-func { color: #82aaff; }
.code-var { color: #f78c6c; }
.code-pipeline-step {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background 0.15s;
}
.code-pipeline-step:last-child { border-bottom: none; }
.code-pipeline-step.active { background: rgba(79, 70, 229, 0.08); }
.step-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.step-icon.planner { background: rgba(79, 70, 229, 0.2); color: #818cf8; }
.step-icon.generator { background: rgba(6, 182, 212, 0.2); color: var(--cyan); }
.step-icon.validator { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.step-icon.deployer { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.step-info { flex: 1; }
.step-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.step-desc { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.step-status {
  font-size: 11px;
  font-family: var(--mono);
  padding: 4px 10px;
  border-radius: 20px;
}
.step-status.done { background: rgba(34,197,94,0.15); color: #4ade80; }
.step-status.active { background: rgba(6,182,212,0.15); color: var(--cyan); animation: pulse 1.5s infinite; }
.step-status.pending { background: rgba(68,85,102,0.3); color: var(--dim); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* HOW IT WORKS */
.section {
  padding: 100px 48px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
}
.section-title {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.1;
}
.section-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 64px;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}
.step-card:hover {
  border-color: rgba(79, 70, 229, 0.4);
  transform: translateY(-4px);
}
.step-number {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--border);
  margin-bottom: 16px;
}
.step-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}
.step-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* SUBMIT SECTION */
.submit-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 64px;
  text-align: center;
}
.submit-section .section-title { margin-bottom: 12px; }
.submit-section .section-sub { margin-bottom: 48px; }

/* CTA SECTION */
.cta-section {
  text-align: center;
  padding: 120px 48px;
}
.cta-section .section-title {
  font-size: clamp(40px, 5vw, 64px);
  margin-bottom: 24px;
}
.cta-section .section-sub {
  margin: 0 auto 48px;
  font-size: 18px;
}
.features-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.feature-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  font-family: var(--mono);
}
.feature-tag::before {
  content: '✓';
  color: var(--cyan);
  font-size: 12px;
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-brand { font-weight: 700; font-size: 16px; color: var(--muted); }
.footer-copy { font-size: 13px; color: var(--dim); font-family: var(--mono); }

/* DASHBOARD (app pages) */
.app-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
  display: flex;
  align-items: center;
  gap: 0;
}
.app-nav-link {
  padding: 20px 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.app-nav-link:hover, .app-nav-link.active {
  color: var(--white);
  border-bottom-color: var(--indigo);
}
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px;
}

/* SPEC FORM */
.spec-form { max-width: 640px; }
.form-group { margin-bottom: 24px; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--white);
}
.form-hint {
  font-size: 12px;
  color: var(--dim);
  font-family: var(--mono);
  margin-top: 6px;
}
textarea, input[type="text"] {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--white);
  font-family: var(--font);
  font-size: 15px;
  resize: vertical;
  transition: border-color 0.15s;
  outline: none;
}
textarea:focus, input:focus { border-color: var(--indigo); }
textarea { min-height: 120px; }
.btn-submit {
  padding: 14px 32px;
  background: var(--indigo);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  width: 100%;
  transition: background 0.15s;
}
.btn-submit:hover { background: var(--indigo-hover); }

/* SPECS LIST */
.specs-list { display: flex; flex-direction: column; gap: 16px; }
.spec-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: border-color 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.spec-card:hover { border-color: rgba(79, 70, 229, 0.4); }
.spec-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.spec-title { font-size: 18px; font-weight: 700; }
.spec-status {
  font-size: 12px;
  font-family: var(--mono);
  padding: 4px 12px;
  border-radius: 20px;
  flex-shrink: 0;
}
.spec-status.submitted { background: rgba(6,182,212,0.15); color: var(--cyan); }
.spec-status.planning { background: rgba(167,139,250,0.15); color: #a78bfa; }
.spec-status.generating { background: rgba(251,191,36,0.15); color: #fbbf24; }
.spec-status.validating { background: rgba(245,158,11,0.15); color: #f59e0b; }
.spec-status.deploying { background: rgba(99,102,241,0.15); color: #818cf8; }
.spec-status.deployed { background: rgba(34,197,94,0.15); color: #4ade80; }
.spec-status.failed { background: rgba(239,68,68,0.15); color: #f87171; }
.spec-desc { font-size: 14px; color: var(--muted); margin-bottom: 16px; line-height: 1.6; }
.spec-meta { display: flex; gap: 24px; font-size: 12px; font-family: var(--mono); color: var(--dim); }

/* PIPELINE VIEW */
.pipeline-view { margin-top: 32px; }
.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.pipeline-stages { display: flex; flex-direction: column; gap: 12px; }
.pipeline-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.pipeline-stage.active { border-color: rgba(79,70,229,0.4); background: rgba(79,70,229,0.05); }
.stage-icon-lg {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.stage-icon-lg.planner { background: rgba(79,70,229,0.2); color: #818cf8; }
.stage-icon-lg.generator { background: rgba(6,182,212,0.2); color: var(--cyan); }
.stage-icon-lg.validator { background: rgba(245,158,11,0.2); color: #fbbf24; }
.stage-icon-lg.deployer { background: rgba(34,197,94,0.2); color: #4ade80; }
.stage-info { flex: 1; }
.stage-name { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.stage-log {
  font-size: 13px;
  color: var(--dim);
  font-family: var(--mono);
  max-height: 60px;
  overflow: hidden;
  white-space: pre-wrap;
}
.stage-badge { font-size: 12px; font-family: var(--mono); padding: 4px 12px; border-radius: 20px; }
.stage-badge.pending { background: rgba(68,85,102,0.3); color: var(--dim); }
.stage-badge.running { background: rgba(6,182,212,0.15); color: var(--cyan); animation: pulse 1.5s infinite; }
.stage-badge.done { background: rgba(34,197,94,0.15); color: #4ade80; }
.stage-badge.failed { background: rgba(239,68,68,0.15); color: #f87171; }

/* DEPLOYED OUTPUT */
.deployed-banner {
  background: linear-gradient(135deg, rgba(34,197,94,0.1) 0%, rgba(16,185,129,0.05) 100%);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}
.deployed-icon { font-size: 32px; }
.deployed-info { flex: 1; }
.deployed-label { font-size: 12px; color: #4ade80; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.deployed-url { font-size: 18px; font-weight: 700; color: var(--white); text-decoration: none; }
.deployed-url:hover { color: var(--cyan); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .steps-grid { grid-template-columns: 1fr; }
  .nav { padding: 16px 24px; }
  .hero { padding: 100px 24px 60px; }
  .section { padding: 64px 24px; }
  .submit-section { padding: 40px 24px; }
}