/* Theme tokens: mirror the product's teaser-video theme
   (agentic-coder/marketing/teaser-video/src/theme.ts) so the site,
   the demo video, and the app read as one brand. */
:root {
  --bg: #0b0e15;
  --panel: #121722;
  --panel-2: #0e1320;
  --line: #232b3d;
  --ink: #ece7da;
  --muted: #8b93a7;
  --faint: #5a627a;
  --amber: #ffb454;
  --amber-dim: rgba(255, 180, 84, 0.14);
  --green: #4cc38a;
  --green-dim: rgba(76, 195, 138, 0.14);
  --btn-ink: #1d1405;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 1100px;
}

/* Contrast (on --bg #0b0e15): --ink ≈ 15:1, --muted ≈ 6.3:1 (AA body),
   --amber ≈ 10:1; --btn-ink on --amber ≈ 9:1 (AA). */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

code {
  font-family: var(--mono);
  background: var(--amber-dim);
  color: var(--amber);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  font-size: 0.85em;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 1rem;
}

/* ---- Buttons ---- */
.cta, .signup button {
  display: inline-block;
  background: var(--amber);
  color: var(--btn-ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  padding: 0.85rem 1.6rem;
  min-height: 44px;
  border-radius: 10px;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.cta:hover, .signup button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.cta:active, .signup button:active { transform: translateY(0); }
.signup button:disabled { filter: saturate(0.4) brightness(0.8); cursor: default; }

/* ---- Hero ---- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 7rem);
  overflow: hidden;
}
/* Ambient amber glow, same trick as the video's backdrop */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 420px at 72% 42%, rgba(255, 180, 84, 0.07), transparent 70%);
  pointer-events: none;
}

.hero-grid { position: relative; display: grid; gap: 2.75rem; align-items: center; }

.hero-copy h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.3rem);
  font-weight: 700;
  margin: 0 0 1.1rem;
}

.subhead {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 38ch;
}
.subhead strong { color: var(--ink); }

.cta-row { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.cta-note {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--faint);
  margin: 0;
}

/* ---- Demo: macOS-style terminal window ---- */
.demo {
  margin: 0;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.term-bar .dot { width: 12px; height: 12px; border-radius: 50%; background: #2a3247; }
.term-title {
  margin-left: 0.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
}

.term-body {
  padding: 1.1rem 1.2rem 1.3rem;
  font-family: var(--mono);
  font-size: clamp(0.78rem, 1.5vw, 0.92rem);
  line-height: 2;
  min-height: 13.5em;
}
.t-line { display: block; white-space: nowrap; }
.t-prompt { color: var(--amber); }
.t-cmd { color: var(--ink); }
.t-ok { color: var(--green); }
.t-dim { color: var(--muted); }
.t-pr { color: var(--amber); }

.caret {
  display: inline-block;
  width: 0.55em;
  height: 1.15em;
  vertical-align: text-bottom;
  background: var(--amber);
}

/* Real recording overlays the mock when present (see app.js) */
.demo-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  background: var(--panel);
}
.demo.has-video .demo-video { display: block; }

/* ---- Sections ---- */
section { padding-block: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--line); }
section h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 2rem; }

/* ---- How it works ---- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}
.step-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--amber);
  background: var(--amber-dim);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  margin-bottom: 0.6rem;
}
.step-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
  display: block;
  margin-bottom: 0.5rem;
}
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---- Features ---- */
.features-grid { display: grid; gap: 1.25rem; }
.feature {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.4rem 1.5rem;
}
.feature h3 { font-size: 1.05rem; margin: 0 0 0.4rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---- Trust ---- */
.trust { text-align: center; }
.trust-line {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  max-width: 44ch;
  margin: 0 auto 1.25rem;
}
.trust-facts {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}
.trust-facts .sep { color: var(--faint); padding-inline: 0.6rem; }
.trust a { color: var(--amber); }

/* ---- Sign-up ---- */
.signup h2 { margin-bottom: 0.5rem; }
.signup .muted { color: var(--muted); margin: 0 0 1.5rem; }

#signup-form { display: flex; gap: 0.75rem; flex-wrap: wrap; max-width: 34rem; }
#signup-form input[type="email"] {
  flex: 1 1 16rem;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  min-height: 44px;
}
#signup-form input[type="email"]::placeholder { color: var(--faint); }
#signup-form input[type="email"]:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-dim);
}
#status { color: var(--muted); min-height: 1.5em; margin: 0.75rem 0 0; }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem;
  font-size: 0.9rem;
  color: var(--faint);
}
footer .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
footer a { color: var(--muted); }
footer a:hover { color: var(--amber); }

/* ---- Breakpoints ---- */
@media (min-width: 700px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 880px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; }
}

/* ---- Motion ---- */
@media (prefers-reduced-motion: no-preference) {
  .term-body .t-line { opacity: 0; animation: t-reveal 0.4s ease forwards; }
  .t-line:nth-child(1) { animation-delay: 0.3s; }
  .t-line:nth-child(2) { animation-delay: 1.1s; }
  .t-line:nth-child(3) { animation-delay: 1.9s; }
  .t-line:nth-child(4) { animation-delay: 2.7s; }
  .t-line:nth-child(5) { animation-delay: 3.5s; }
  .caret { animation: blink 1.1s steps(1) infinite 4s; }
}
@keyframes t-reveal { to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta, .signup button { transition: none; }
  /* Show the static mock instead of a moving video */
  .demo-video { display: none; }
}
