/* Design tokens match the product app (app.dev.spawningpool.ai): shadcn dark theme,
   cool neutral greys, mint brand green. Keep them in sync if the app's theme changes. */
:root {
  color-scheme: dark;
  --background: oklch(15.5% 0.006 260);
  --foreground: oklch(96% 0.004 260);
  --card: oklch(19% 0.007 260);
  --muted: oklch(23% 0.007 260);
  --muted-foreground: oklch(70% 0.012 260);
  --border: oklch(100% 0 0 / 0.09);
  --input: oklch(100% 0 0 / 0.14);
  --brand: oklch(86% 0.17 152);
  --brand-muted: oklch(86% 0.17 152 / 0.12);
  --brand-foreground: oklch(20% 0.04 152);
  --ring: oklch(86% 0.17 152 / 0.55);
  --destructive: oklch(68% 0.2 25);
  --radius: 0.625rem;
  --max: 72rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after { box-sizing: border-box; border-color: var(--border); }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--background);
  color: var(--foreground);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; }
p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

.muted { color: var(--muted-foreground); }
.brand-text { color: var(--brand); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 50;
  background: var(--brand);
  color: var(--brand-foreground);
  padding: 8px 12px;
  border-radius: 8px;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: 500 14px/1 var(--font);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }

.btn-primary { background: var(--brand); color: var(--brand-foreground); }
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }

.btn-outline { background: transparent; border-color: var(--input); color: var(--foreground); }
.btn-outline:hover { background: var(--muted); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid oklch(100% 0 0 / 0.054);
  background: oklch(15.5% 0.006 260 / 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-decoration: none;
}
.brand img { width: 28px; height: 28px; display: block; }

/* ---------- Sections ---------- */

main > section { border-top: 1px solid var(--border); scroll-margin-top: 80px; }
main > section:first-child { border-top: 0; }
.section { padding: 96px 0; }

.label { font-size: 14px; font-weight: 500; color: var(--brand); }
.section-title {
  margin-top: 12px;
  max-width: 36rem;
  font-size: 30px;
  line-height: 1.2;
}
.section-lede {
  margin-top: 12px;
  max-width: 40rem;
  color: var(--muted-foreground);
  line-height: 1.65;
}

/* ---------- Hero ---------- */

#hero { position: relative; overflow: hidden; }
#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(at 50% 0%, oklch(86% 0.17 152 / 0.12), transparent 65%);
  pointer-events: none;
}
#hero .container { position: relative; padding-top: 96px; padding-bottom: 96px; text-align: center; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: oklch(19% 0.007 260 / 0.6);
  font-size: 12px;
  color: var(--muted-foreground);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

h1 {
  margin: 24px auto 0;
  max-width: 48rem;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.05;
  text-wrap: balance;
}

.lede {
  margin: 24px auto 0;
  max-width: 42rem;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.assurances {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 20px 0 0;
  padding: 0;
  font-size: 14px;
  color: var(--muted-foreground);
}
.assurances li { display: inline-flex; align-items: center; gap: 6px; }
.assurances svg { width: 16px; height: 16px; color: var(--brand); }

/* ---------- Demo window ---------- */

.demo {
  max-width: 42rem;
  margin: 64px auto 0;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: oklch(19% 0.007 260 / 0.8);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.4), 0 0 0 1px rgb(255 255 255 / 0.05);
  overflow: hidden;
}

.demo-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font: 13px var(--mono);
  color: var(--muted-foreground);
}
.demo-dots { display: flex; gap: 6px; }
.demo-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.demo-tag {
  margin-left: auto;
  font: 500 11px var(--font);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.demo-body { padding: 20px; display: grid; gap: 16px; font-size: 14px; line-height: 1.6; }

.who {
  display: inline-block;
  margin-bottom: 6px;
  font: 500 12px var(--mono);
  color: var(--muted-foreground);
}
.who.agent { color: var(--brand); }

.prompt {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--muted);
}

.plan {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.plan-intro { color: var(--muted-foreground); }

.plan-steps {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.plan-steps li { display: flex; align-items: flex-start; gap: 10px; transition: color 0.2s; }
.step-state {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border-radius: 50%;
  border: 1.5px solid var(--input);
  transition: background 0.2s, border-color 0.2s;
}
.plan-steps li.active .step-state {
  border-color: var(--brand);
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}
.plan-steps li.done { color: var(--muted-foreground); }
.plan-steps li.done .step-state {
  border-color: var(--brand);
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-4.9' fill='none' stroke='%23061b0d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@keyframes spin { to { transform: rotate(360deg); } }

.estimates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.estimates div {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--muted);
}
.est-label { display: block; font-size: 11px; color: var(--muted-foreground); }
.est-value { font: 600 14px var(--mono); }

.plan-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.run-status { font-size: 13px; color: var(--muted-foreground); }
.run-status.running { color: var(--foreground); }
.run-status.complete { color: var(--brand); }

.result {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid oklch(86% 0.17 152 / 0.3);
  background: var(--brand-muted);
}

/* ---------- Problem ---------- */

.problem p.section-lede { font-size: 18px; }

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.step {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: oklch(19% 0.007 260 / 0.5);
}
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font: 14px var(--mono);
  color: var(--brand);
}
.step h3 { margin-top: 20px; font-size: 16px; font-weight: 500; letter-spacing: 0; }
.step p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--muted-foreground); }

/* ---------- Principles ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
  margin-top: 48px;
}
.principle svg { width: 20px; height: 20px; color: var(--brand); }
.principle h3 { margin-top: 16px; font-size: 16px; font-weight: 500; letter-spacing: 0; }
.principle p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--muted-foreground); }

/* ---------- Labs statement ---------- */

.statement {
  margin: 0 auto;
  max-width: 48rem;
  text-align: center;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-wrap: balance;
}

/* ---------- Early access (Typeform embed) ---------- */

.waitlist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.form-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: oklch(19% 0.007 260 / 0.5);
}

.typeform { padding: 0; overflow: hidden; }
.typeform [data-tf-widget] { width: 100%; height: 520px; }
.typeform noscript .btn { margin: 24px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--border); }
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 40px;
  padding-bottom: 40px;
  font-size: 14px;
  color: var(--muted-foreground);
}
.site-footer .brand { color: var(--foreground); }

/* ---------- 404 ---------- */

.not-found {
  min-height: 80vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
}
.not-found h1 { margin: 0; }
.not-found p { color: var(--muted-foreground); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .steps, .principles { grid-template-columns: repeat(2, 1fr); }
  .waitlist { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 72px 0; }
  #hero .container { padding-top: 64px; padding-bottom: 72px; }
  .steps, .principles { grid-template-columns: 1fr; }
  .demo-body { padding: 14px; }
  .estimates { grid-template-columns: 1fr 1fr; }
  .estimates div:last-child { grid-column: span 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plan-steps li.active .step-state { animation: none; }
  .btn, .plan-steps li, .step-state { transition: none; }
}
