/*
  Tokens vendored from web/src/app/globals.css (dark theme). Theme is LOCKED
  to dark for the whole page. Accent is cyan only. Shape rule: radius 12px on
  cards, 10px on inputs/buttons, pill on the status badge, rounded square on
  the brand mark. Single amber touch appears only inside code/JSON strings.
*/
:root {
  --bg: #0d1117;
  --fg: #e6edf3;
  --muted: #9ca3af;
  --faint: #7d8a9c;
  --surface: #1c2333;
  --surface-low: #1a2029;
  --surface-high: #2a3140;
  --band: #151b23;
  --border-ghost: rgba(42, 53, 69, 0.7);

  --accent: #22d3ee;       /* primary-400, bright cyan for dark bg */
  --accent-mid: #06b6d4;   /* primary-500 */
  --accent-deep: #0891b2;  /* primary-600 */
  --accent-soft: rgba(34, 211, 238, 0.12);
  --string: #fcd34d;       /* amber, code strings only */

  --r-card: 12px;
  --r-ctl: 10px;
  --maxw: 1140px;

  --font-display: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(56% 46% at 78% 4%, rgba(34, 211, 238, 0.12), transparent 70%),
    radial-gradient(50% 40% at 6% 8%, rgba(8, 145, 178, 0.08), transparent 70%);
}

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Navigation ---------- */
.nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
}
.brand .mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--surface-high);
  display: grid; place-items: center;
  flex: none;
}
.nav-link {
  font-size: 14px; font-weight: 500;
  color: var(--muted); text-decoration: none;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--fg); }

/* ---------- Hero ---------- */
main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 40px 0 64px;
}
.hero {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 56px;
  align-items: center;
  width: 100%;
}

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.badge .dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(34, 211, 238, 0); }
}

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.4vw, 3.7rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 22px 0 0;
}
h1 .accent { color: var(--accent); }

.sub {
  margin: 20px 0 0;
  font-size: 1.075rem;
  color: var(--muted);
  max-width: 46ch;
}

/* ---------- Waitlist ---------- */
.signup { margin-top: 30px; max-width: 460px; }
.signup label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--fg); margin-bottom: 8px;
}
.field { display: flex; gap: 10px; }
.field input[type="email"] {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--border-ghost);
  background: var(--surface-low);
  color: var(--fg); font-size: 15px; font-family: inherit;
  transition: border-color 0.2s ease;
}
.field input::placeholder { color: var(--faint); }
.field input:focus {
  outline: 2px solid var(--accent-mid); outline-offset: 2px;
  border-color: transparent;
}
.btn {
  height: 46px; padding: 0 20px; border: none;
  border-radius: var(--r-ctl);
  background: var(--accent); color: #0d1117;
  font-family: var(--font-sans); font-size: 15px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.12s ease, background 0.2s ease;
}
.btn:hover { background: #67e8f9; }
.btn:active { transform: translateY(1px); }
.helper { margin-top: 10px; font-size: 13px; color: var(--muted); }
.field-error { display: none; margin-top: 8px; font-size: 13px; color: #fca5a5; }
.form-success {
  display: none; margin-top: 30px; max-width: 460px;
  padding: 16px 18px; border-radius: var(--r-ctl);
  background: var(--surface); font-size: 15px;
}
.form-success strong { color: var(--accent); font-weight: 600; }

/* ===================================================================
   SIGNATURE VISUAL: the extraction pipeline
   Raw skewed document  ->  scan beam  ->  flowing pipe  ->  clean JSON
   =================================================================== */
.engine { display: grid; gap: 10px; justify-items: stretch; }
.stage-label {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint); font-weight: 600;
}

/* Raw document (abstract, deliberately imperfect) */
.doc {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-ghost);
  border-radius: var(--r-card);
  padding: 22px 22px 24px;
  overflow: hidden;
  transform: rotate(-1.1deg);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}
.doc .row { display: flex; gap: 10px; align-items: center; margin-bottom: 11px; }
.ln { height: 8px; border-radius: 3px; background: var(--surface-high); }
.ln.head { height: 11px; background: #3b4458; }
.ln.w90 { width: 90%; } .ln.w75 { width: 75%; } .ln.w60 { width: 60%; }
.ln.w45 { width: 45%; } .ln.w30 { width: 30%; } .ln.grow { flex: 1; }
/* redaction-style block: implies messy / PII the API will detect */
.redact { height: 10px; width: 34%; border-radius: 3px;
  background: repeating-linear-gradient(45deg, #2a3140, #2a3140 4px, #222a36 4px, #222a36 8px); }
.tbl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0 4px; }
.cell { height: 16px; border-radius: 4px; background: var(--surface-low);
  border: 1px solid var(--border-ghost); }
.scan {
  position: absolute; left: 0; right: 0; top: 0; height: 72px;
  pointer-events: none; will-change: transform;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(34, 211, 238, 0.16) 42%,
    rgba(34, 211, 238, 0.42) 50%,
    rgba(34, 211, 238, 0.16) 58%,
    transparent 100%);
  animation: scan 5.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.scan::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px;
  background: var(--accent); box-shadow: 0 0 14px 1px rgba(34, 211, 238, 0.7);
}
@keyframes scan {
  0%   { transform: translateY(-72px); opacity: 0; }
  8%   { opacity: 1; }
  58%  { transform: translateY(240px); opacity: 1; }
  66%  { transform: translateY(240px); opacity: 0; }
  100% { transform: translateY(-72px); opacity: 0; }
}

/* Pipe connecting input to output */
.pipe { position: relative; height: 40px; width: 2px; margin: 0 auto;
  background: linear-gradient(to bottom, rgba(34,211,238,0.28), rgba(34,211,238,0.05)); }
.flow { position: absolute; left: -2px; width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent); box-shadow: 0 0 8px 1px rgba(34,211,238,0.7);
  animation: flow 1.6s linear infinite; }
.flow.f2 { animation-delay: 0.53s; }
.flow.f3 { animation-delay: 1.06s; }
@keyframes flow {
  0%   { top: -6px; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Clean output (real JSON, straight, revealed top-down in sync with scan) */
.out,
.code-card {
  background: var(--surface-low);
  border: 1px solid var(--border-ghost);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}
.out-head,
.code-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.out-head .ok { margin-left: auto; color: var(--accent); font-weight: 600; }
.out-body { position: relative; }
.out-body pre {
  margin: 0; padding: 16px 20px; overflow: hidden;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.65;
  color: var(--fg);
  animation: reveal 5.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  clip-path: inset(0 0 100% 0);
}
@keyframes reveal {
  0%   { clip-path: inset(0 0 100% 0); opacity: 1; }
  58%  { clip-path: inset(0 0 0% 0); opacity: 1; }
  92%  { clip-path: inset(0 0 0% 0); opacity: 1; }
  97%  { opacity: 0; }
  100% { clip-path: inset(0 0 100% 0); opacity: 0; }
}
pre .k { color: var(--accent); }
pre .s { color: var(--string); }
pre .n { color: #e6edf3; }
pre .p { color: var(--faint); }

/* ---------- Argument: LLM vs doXtract contrast ---------- */
.argument {
  position: relative;
  z-index: 1;
  padding: 72px 0 80px;
}
.section-h {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 40px;
  color: var(--fg);
}
.contrast {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.col {
  border-radius: var(--r-card);
  padding: 32px 28px;
}
.col h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}
.col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.col ul li {
  font-size: 0.9375rem;
  line-height: 1.5;
  padding-left: 0;
}

/* Naive column: muted, no accent, plain bullets */
.col-naive {
  border: 1px solid var(--border-ghost);
}
.col-naive h3 { color: var(--muted); }
.col-naive ul li { color: var(--muted); padding-left: 18px; position: relative; }
.col-naive ul li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: var(--faint);
}

/* doXtract column: emphasized, surface bg, cyan check glyphs */
.col-dox {
  background: var(--surface);
  border: 1px solid rgba(34, 211, 238, 0.18);
}
.col-dox h3 { color: var(--accent); }
.col-dox ul li { color: var(--fg); padding-left: 22px; position: relative; }
.col-dox ul li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){ .reveal{ opacity:1; transform:none; transition:none } }

/* ---------- Staggered child reveal ---------- */
/* Children of a revealed .stagger container assemble in sequence */
.reveal .stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible .stagger > * { opacity: 1; transform: none; }
.reveal.visible .stagger > *:nth-child(1) { transition-delay: 0.05s; }
.reveal.visible .stagger > *:nth-child(2) { transition-delay: 0.10s; }
.reveal.visible .stagger > *:nth-child(3) { transition-delay: 0.15s; }
.reveal.visible .stagger > *:nth-child(4) { transition-delay: 0.20s; }
.reveal.visible .stagger > *:nth-child(5) { transition-delay: 0.25s; }
.reveal.visible .stagger > *:nth-child(6) { transition-delay: 0.30s; }
.reveal.visible .stagger > *:nth-child(7) { transition-delay: 0.35s; }
.reveal.visible .stagger > *:nth-child(8) { transition-delay: 0.40s; }
.reveal.visible .stagger > *:nth-child(9) { transition-delay: 0.45s; }

/* Two-column splits enter from opposite sides instead of rising */
.reveal .contrast.stagger > *:nth-child(1),
.reveal .tp-split.stagger > *:nth-child(1) { transform: translateX(-14px); }
.reveal .contrast.stagger > *:nth-child(2),
.reveal .tp-split.stagger > *:nth-child(2) { transform: translateX(14px); }
.reveal.visible .contrast.stagger > *,
.reveal.visible .tp-split.stagger > * { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal .stagger > * { opacity: 1; transform: none; transition: none; }
}

/* ---------- Routing intelligence diagram ---------- */
.routing {
  position: relative;
  z-index: 1;
  padding: 96px 0 104px;
  background: var(--band);
  border-top: 1px solid var(--border-ghost);
  border-bottom: 1px solid var(--border-ghost);
}

/* Eyebrow kicker - the page's single section label */
.eyebrow {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/*
  Diagram: r-in -> [connector] -> r-hub -> [connector] -> r-engines (column of 3)
  Desktop: horizontal flex row with gap serving as the connector space.
  A thin accent line drawn via r-hub::before and r-engines::before
  bridges the gap between nodes.
*/
.router-diagram {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 40px 0 36px;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-ghost);
  border-radius: var(--r-card);
  padding: 28px 24px;
}

/* Node cards: source and hub */
.r-in,
.r-hub {
  flex: none;
  border-radius: var(--r-card);
  padding: 20px 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  position: relative;
}

.r-in {
  background: var(--surface);
  border: 1px solid var(--border-ghost);
  color: var(--fg);
}

.r-hub {
  background: var(--accent-soft);
  border: 1px solid rgba(34, 211, 238, 0.28);
  color: var(--accent);
}

/* Horizontal connector line: r-in -> r-hub (drawn on r-hub left side) */
.r-hub::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 50%;
  width: 32px;
  height: 2px;
  background: linear-gradient(to right, rgba(34, 211, 238, 0.25), var(--accent-mid));
  transform: translateY(-50%);
}

/* Fan-out: three engine cards stacked vertically */
.r-engines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  position: relative;
}

/* Vertical backbone line connecting the three engine rows */
.r-engines::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 50%;
  width: 32px;
  height: 2px;
  background: linear-gradient(to right, var(--accent-mid), rgba(34, 211, 238, 0.25));
  transform: translateY(-50%);
}

/* Engine cards - accented left border signals "active output path" */
.r-engine {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--border-ghost);
  border-left: 3px solid var(--accent-deep);
  position: relative;
  transition: border-color 0.2s ease;
}
.r-engine:hover { border-color: rgba(34, 211, 238, 0.3); }

/* Subtle pulsing accent dot on the left edge of each engine card */
.r-engine::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 7px 2px rgba(34, 211, 238, 0.5);
  transform: translateY(-50%);
  animation: r-pulse 3.6s ease-in-out infinite;
}

.r-engine:nth-child(2)::before { animation-delay: 1.2s; }
.r-engine:nth-child(3)::before { animation-delay: 2.4s; }

@keyframes r-pulse {
  0%, 100% { opacity: 0.25; transform: translateY(-50%) scale(0.75); }
  50%       { opacity: 1;    transform: translateY(-50%) scale(1); }
}

.r-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--fg);
}

.r-when {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Punchline below the diagram */
.routing-punch {
  margin: 0;
  max-width: 64ch;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 760px) {
  .contrast { grid-template-columns: 1fr; }
  .tp-split { grid-template-columns: 1fr; }
  .prod-split { grid-template-columns: 1fr; }

  /* Stack diagram vertically on mobile */
  .router-diagram {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  /* Hide horizontal pseudo-connectors on mobile */
  .r-hub::before,
  .r-engines::before {
    display: none;
  }

  .r-in,
  .r-hub {
    text-align: left;
  }

  /* Left-border accent on r-hub mirrors engine cards on mobile */
  .r-hub {
    border-left: 3px solid var(--accent-mid);
  }

  /* Pipeline: reduce padding on mobile, smaller pills */
  .pipeline { padding: 48px 0 56px; }
  .pipeline .stages li { padding: 8px 16px; font-size: 0.8125rem; }
}

/* Reduced motion: disable r-pulse; keep dot visible but static */
@media (prefers-reduced-motion: reduce) {
  .r-engine::before { animation: none; opacity: 0.5; }
}

/* ---------- Pipeline strip (the page's one kinetic marquee) ---------- */
.pipeline {
  position: relative;
  z-index: 1;
  padding: 56px 0 64px;
}

/* Mask edges so the scroll fades in/out gracefully */
.stages-viewport {
  position: relative;
  overflow: hidden;
  display: flex;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

/* The two tracks side-by-side, each occupying exactly one copy of all 7 stages */
.pipeline .stages {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  animation: marquee 28s linear infinite;
}

/* Pause on hover (motion users only) */
.stages-viewport:hover .stages {
  animation-play-state: paused;
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Individual stage pill */
.pipeline .stages li {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-ghost);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
  transition: border-color 0.2s ease, background 0.2s ease;
}

/* Accent the pill on hover (paused state) */
.stages-viewport:hover .stages li {
  border-color: rgba(34, 211, 238, 0.25);
}

/* Chevron connector between each stage, drawn via ::before pseudo-element */
.pipeline .stages li + li::before {
  content: "\203A";
  display: inline-flex;
  align-items: center;
  margin-right: 14px;
  font-size: 1.25rem;
  font-family: var(--font-sans);
  color: var(--accent-mid);
  opacity: 0.7;
  flex-shrink: 0;
  line-height: 1;
}

/* Pipeline: reduced motion - stop marquee, show all stages wrapped */
@media (prefers-reduced-motion: reduce) {
  .stages-viewport {
    overflow: visible;
    display: block;
    -webkit-mask-image: none;
            mask-image: none;
  }
  .pipeline .stages {
    animation: none;
    flex-wrap: wrap;
    gap: 10px 0;
    padding-bottom: 4px;
  }
  /* Show only the first track; hide the aria-hidden clone */
  .pipeline .stages[aria-hidden="true"] {
    display: none;
  }
}

/* ---------- Templates and Profiles split ---------- */
.templates {
  position: relative;
  z-index: 1;
  padding: 72px 0 80px;
  background: var(--band);
  border-top: 1px solid var(--border-ghost);
  border-bottom: 1px solid var(--border-ghost);
}

.section-sub {
  margin: 0 0 40px;
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.6;
}

.tp-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.tp-half {
  background: var(--surface);
  border: 1px solid var(--border-ghost);
  border-radius: var(--r-card);
  padding: 32px 28px;
}

.tp-half h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0 0 12px;
}

.tp-half p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 24px;
}

/* Chip tags for Templates half */
.tp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tp-chips span {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--surface-high);
  border: 1px solid var(--border-ghost);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg);
}

/* Step flow for Profiles half */
.tp-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tp-flow span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
  background: var(--surface-high);
  border: 1px solid var(--border-ghost);
  border-radius: var(--r-ctl);
  padding: 6px 14px;
}

/* Chevron connectors between flow steps - not a chip, no border */
.tp-flow .tp-arrow {
  background: none;
  border: none;
  padding: 0 2px;
  color: var(--accent-mid);
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 0;
}

/* ---------- Production: code-forward split ---------- */
.production {
  position: relative;
  z-index: 1;
  padding: 96px 0 104px;
  background: var(--band);
  border-top: 1px solid var(--border-ghost);
  border-bottom: 1px solid var(--border-ghost);
}

.prod-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.prod-copy .section-h {
  margin-bottom: 32px;
}

.prod-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.prod-list li {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--fg);
  padding-left: 22px;
  position: relative;
}

.prod-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Code card: used in production section and reusable elsewhere */

.code-head .tag {
  margin-left: auto;
  color: var(--accent);
  font-weight: 600;
}

.code-card pre {
  margin: 0;
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--fg);
  overflow-x: auto;
}

pre .c { color: var(--muted); }

/* ---------- Formats chip strip ---------- */
.formats {
  position: relative;
  z-index: 1;
  padding: 56px 0 64px;
}

.format-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.format-chips span {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border-ghost);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg);
  transition: border-color 0.2s ease;
}
.format-chips span:hover { border-color: rgba(34, 211, 238, 0.3); }

/* ---------- Final CTA band ---------- */
.final-cta {
  position: relative;
  z-index: 1;
  padding: 88px 0 96px;
  background: var(--surface-low);
  border-top: 1px solid var(--border-ghost);
  border-bottom: 1px solid var(--border-ghost);
  text-align: center;
}

.final-cta .shell {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.final-cta .section-h {
  margin-bottom: 32px;
}

.final-cta .signup {
  margin-top: 0;
  width: 100%;
  max-width: 480px;
  text-align: left;
}

.final-cta .form-success {
  max-width: 480px;
  width: 100%;
  text-align: left;
}

/* ---------- Powered by ---------- */
.powered { position: relative; z-index: 1; padding: 4px 0 46px; }
.powered .shell { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.powered .pre {
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.logos { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.logos img { height: 22px; width: auto; opacity: 0.6; transition: opacity 0.2s ease; }
.logos img:hover { opacity: 1; }

/* ---------- Footer ---------- */
footer { position: relative; z-index: 1; padding: 22px 0 32px; }
footer .shell {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted);
}
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--muted); text-decoration: none; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--fg); }

/* ---------- Entrance motion ---------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.rise { opacity: 0; animation: fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.d1 { animation-delay: 0.05s; } .d2 { animation-delay: 0.13s; }
.d3 { animation-delay: 0.21s; } .d4 { animation-delay: 0.29s; } .d5 { animation-delay: 0.37s; }

/* ---------- Cycle states (hero format cycling) ---------- */
.cycle-state { display: none; }
.cycle-state.is-active { display: block; animation: fade-up 0.5s cubic-bezier(0.16,1,0.3,1) both; }

/* ---------- Reduced motion: show the finished transformation, no loops ---------- */
@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; }
  .scan, .flow, .badge .dot { animation: none; }
  .scan { display: none; }
  .out-body pre { animation: none; clip-path: none; }
  .btn:active { transform: none; }
  /* pin cycle to state 1 only; controller does not run under reduced motion */
  .cycle-state { display: block; }
  .engine[data-cycle] .cycle-state:not(:first-child) { display: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  main { padding: 24px 0 52px; }
  .engine { max-width: 420px; }
}
@media (max-width: 480px) {
  .field { flex-direction: column; }
  .btn { width: 100%; }
  .nav-link { display: none; }
}

/* ---------- Use cases ---------- */
.use-cases {
  position: relative;
  z-index: 1;
  padding: 72px 0 80px;
}
.uc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.uc {
  background: var(--surface-low);
  border-radius: var(--r-card);
  padding: 22px 24px;
  transition: transform 0.15s ease, background 0.2s ease;
}
.uc:hover {
  transform: translateY(-2px);
  background: var(--surface);
}
.uc-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fg);
}
.uc-title::before {
  content: "";
  flex: none;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.uc-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
@media (max-width: 900px) {
  .uc-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .uc-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .uc:hover { transform: none; }
}

/* ---------- Mobile collapse for 2-col splits ----------
   Placed at end of file so it wins by source order: the base .tp-split and
   .prod-split rules are defined later in the file than the earlier 760px
   media query, which would otherwise override the collapse. */
@media (max-width: 760px) {
  .tp-split { grid-template-columns: 1fr; }
  .prod-split { grid-template-columns: 1fr; }
}
