:root {
  --ink: #172033;
  --muted: #667085;
  --subtle: #98a2b3;
  --paper: #ffffff;
  --wash: #f4f7fb;
  --line: #d8e0eb;
  --line-strong: #b8c4d6;
  --blue: #2454d6;
  --blue-dark: #173ea6;
  --green: #11845b;
  --coral: #ce5b4f;
  --violet: #6c4ccf;
  --amber: #d68b12;
  --shadow: 0 24px 70px rgba(23, 32, 51, 0.18);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  /* Tokens of the product itself, for the app mockups (dark theme). */
  --app-bg: #0f1117;
  --app-sunken: #121520;
  --app-surface: #1a1d27;
  --app-line: #2d3148;
  --app-line-2: #374151;
  --app-ink: #e2e8f0;
  --app-ink-strong: #f9fafb;
  --app-muted: #9ca3af;
  --app-indigo: #6366f1;
  --app-green: #34d399;
  --app-coral: #f87171;
  --app-amber: #fbbf24;
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }

.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 26px;
  height: 72px;
  justify-content: space-between;
  left: 0;
  padding: 0 clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.brand {
  align-items: center;
  display: inline-flex;
  font-size: 17px;
  font-weight: 760;
  gap: 10px;
  white-space: nowrap;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: var(--paper);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.brand-mark svg { height: 18px; width: 18px; }

.site-nav {
  align-items: center;
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 620;
}

.site-nav a:hover { color: var(--ink); }

.header-actions,
.hero-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.landing-locale {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  padding: 3px;
}

.landing-locale button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 780;
  min-height: 30px;
  padding: 0 9px;
}

.landing-locale button.active {
  background: var(--ink);
  color: var(--paper);
}

.link-action {
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
}

.primary-action,
.secondary-action {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 740;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  white-space: nowrap;
}

.primary-action {
  background: var(--blue);
  color: var(--paper);
  box-shadow: 0 12px 28px rgba(36, 84, 214, 0.22);
}

.primary-action:hover { background: var(--blue-dark); }

.secondary-action {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.large {
  min-height: 48px;
  padding: 0 22px;
}

/* Two real columns instead of text with an absolutely-placed visual on top:
   the demo is a screen with controls, so it must never overlap the headline
   and must not stretch to whatever height the copy happens to need. */
.hero {
  align-items: center;
  column-gap: clamp(28px, 3.4vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 0.94fr);
  min-height: 740px;
  overflow: hidden;
  padding: 96px clamp(20px, 5vw, 72px) 112px;
  position: relative;
}

.hero::before {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.94) 34%, rgba(255,255,255,0.62) 62%, rgba(255,255,255,0.2) 100%),
    repeating-linear-gradient(0deg, rgba(23,32,51,0.055) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(90deg, rgba(23,32,51,0.055) 0 1px, transparent 1px 72px);
  content: "";
  inset: 0;
  position: absolute;
  z-index: 1;
}

/* The demo comes first in the DOM (it is the figure the section is about),
   so the columns are ordered explicitly: copy left, screen right. */
.hero-content {
  max-width: 680px;
  order: 1;
  position: relative;
  z-index: 3;
}

.hero-badge {
  align-items: center;
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(23, 32, 51, 0.08);
  color: var(--ink);
  display: inline-flex;
  gap: 9px;
  margin-bottom: 20px;
  max-width: 100%;
  padding: 8px 13px;
}

.hero-badge svg {
  color: var(--amber);
  height: 17px;
  width: 17px;
}

.hero-badge span {
  font-size: 13px;
  font-weight: 760;
}

.eyebrow {
  color: var(--green);
  font-size: 13px;
  font-weight: 780;
  margin-bottom: 14px;
  text-transform: uppercase;
}

h1 {
  color: var(--ink);
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 820;
  line-height: 0.98;
  max-width: 760px;
}

.hero-copy {
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
  margin: 26px 0 34px;
  max-width: 610px;
}

.hero-metrics {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
  max-width: 620px;
  padding-top: 20px;
}

.hero-metrics div {
  display: grid;
  gap: 5px;
}

.hero-metrics strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

/* ── Hero demo ─────────────────────────────────────────────────────────
   A 20s looping product film in 4 chapters (connect → measure → detect →
   act). The whole choreography is one CSS timeline: every animated node
   runs the same 20s duration and encodes its beat as keyframe percentages
   (5% = 1s). Because they share `animation-delay: var(--seek)`, setting
   `--seek: -10s` on the root scrubs the entire film to chapter 3.
   Base (unanimated) styles are the *settled* frame, so the demo also
   reads correctly with JS off or with reduced motion. */

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: min(600px, 66vh);
  min-height: 452px;
  order: 2;
  position: relative;
  z-index: 2;
  --dur: 20s;
}

.sr-only {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Frame ---------------------------------------------------------------- */

.demo-frame {
  background: var(--app-bg);
  border: 1px solid var(--app-line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  flex: 1;
  min-height: 372px;
  overflow: hidden;
  position: relative;
}

.demo-screen {
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr);
  height: 100%;
}

.demo-titlebar {
  align-items: center;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-line);
  display: flex;
  gap: 10px;
  overflow: hidden;
  padding: 0 12px;
  position: relative;
}

.demo-dots {
  display: flex;
  gap: 5px;
}

.demo-dots i {
  background: var(--app-line-2);
  border-radius: 999px;
  height: 7px;
  width: 7px;
}

.demo-app {
  color: var(--app-ink-strong);
  font-size: 12px;
  font-weight: 720;
}

.demo-sync {
  align-items: center;
  background: var(--app-sunken);
  border: 1px solid var(--app-line);
  border-radius: 999px;
  display: flex;
  gap: 7px;
  margin-left: auto;
  padding: 4px 10px;
  position: relative;
}

.demo-sync-dot {
  background: var(--app-green);
  border-radius: 999px;
  flex: none;
  height: 6px;
  width: 6px;
}

.demo-sync b {
  color: var(--app-muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.demo-sync-a {
  left: 25px;
  opacity: 0;
  position: absolute;
}

.demo-sweep {
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.32), transparent);
  inset: 0 auto 0 0;
  opacity: 0;
  position: absolute;
  width: 38%;
}

/* Body ----------------------------------------------------------------- */

.demo-body {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 146px;
  min-height: 0;
}

.demo-nav {
  background: var(--app-sunken);
  border-right: 1px solid var(--app-line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 8px;
}

.demo-nav span {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--app-muted);
  display: flex;
  font-size: 10px;
  font-weight: 660;
  min-height: 26px;
  padding: 0 9px;
  white-space: nowrap;
}

.demo-nav .is-overview {
  background: var(--app-surface);
  border-color: var(--app-line);
  color: var(--app-ink-strong);
}

.demo-main {
  display: grid;
  gap: 11px;
  grid-template-rows: auto auto minmax(96px, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  padding: 13px;
  position: relative;
}

.demo-head {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.demo-head b {
  color: var(--app-ink-strong);
  font-size: 14px;
}

.demo-chips {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.demo-chips span {
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 6px;
  color: var(--app-muted);
  font-size: 10px;
  font-weight: 640;
  padding: 4px 8px;
  white-space: nowrap;
}

.demo-kpis {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.demo-kpi {
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  position: relative;
}

.demo-kpi small {
  color: var(--app-muted);
  font-size: 9.5px;
  font-weight: 660;
  white-space: nowrap;
}

.demo-kpi strong {
  color: var(--app-ink-strong);
  display: inline-grid;
  font-family: var(--mono);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 620;
  letter-spacing: -0.02em;
  line-height: 1;
}

.demo-kpi strong span {
  grid-area: 1 / 1;
}

.demo-tick-1,
.demo-tick-2 {
  opacity: 0;
}

.demo-kpi em {
  color: var(--app-muted);
  font-family: var(--mono);
  font-size: 9.5px;
  font-style: normal;
  white-space: nowrap;
}

.demo-kpi em b {
  color: var(--app-amber);
  font-weight: 620;
}

.demo-card {
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 8px;
  position: relative;
}

.demo-chart {
  display: grid;
  gap: 9px;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  padding: 10px 11px 11px;
}

.demo-card-head {
  align-items: center;
  display: flex;
  gap: 10px;
}

.demo-card-head span {
  color: var(--app-muted);
  font-size: 10px;
  font-weight: 680;
}

.demo-legend {
  display: flex;
  gap: 9px;
  margin-left: auto;
}

.demo-legend span {
  align-items: center;
  display: flex;
  font-size: 9px;
  gap: 4px;
}

.demo-legend i {
  background: var(--app-indigo);
  border-radius: 2px;
  height: 7px;
  width: 7px;
}

.demo-legend span + span i {
  background: var(--app-green);
}

.demo-bars {
  align-items: end;
  display: flex;
  gap: 7px;
  min-height: 0;
}

/* Each bar is a two-provider stack: Anthropic (green) sits on top of the
   OpenAI share (indigo), split at --s. */
.demo-bars i {
  --lo: var(--app-indigo);
  background: linear-gradient(
    to top,
    var(--lo) 0 calc(100% - var(--s)),
    var(--app-green) calc(100% - var(--s)) 100%
  );
  border-radius: 4px 4px 2px 2px;
  flex: 1;
  height: var(--h);
  position: relative;
  transform-origin: bottom;
}

.demo-bars .is-anomaly::after {
  background: var(--app-coral);
  border-radius: 0 0 2px 2px;
  content: "";
  inset: var(--s) 0 0;
  opacity: 0;
  position: absolute;
}

.demo-rows {
  display: grid;
  gap: 7px;
  padding: 10px 11px;
}

.demo-rows > span:not(.demo-skel) {
  align-items: baseline;
  display: flex;
  gap: 10px;
}

.demo-rows b {
  color: var(--app-ink);
  font-size: 10.5px;
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-rows em {
  color: var(--app-ink-strong);
  font-family: var(--mono);
  font-size: 10.5px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

.demo-rail {
  background: var(--app-sunken);
  border-left: 1px solid var(--app-line);
  display: grid;
  gap: 8px;
  grid-auto-rows: min-content;
  padding: 13px 11px;
}

.demo-rail > span {
  color: var(--app-muted);
  font-size: 9.5px;
  font-weight: 700;
}

.demo-conn {
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: 6px minmax(0, 1fr);
  padding: 9px 10px;
  position: relative;
}

.demo-conn-dot {
  align-self: center;
  background: var(--app-green);
  border-radius: 999px;
  height: 6px;
  width: 6px;
}

.demo-conn b {
  color: var(--app-ink-strong);
  font-size: 10.5px;
  font-weight: 680;
}

.demo-conn em {
  color: var(--app-muted);
  font-size: 9.5px;
  font-style: normal;
  grid-column: 2;
  white-space: nowrap;
}

.demo-conn-wait {
  grid-row: 2;
  opacity: 0;
  position: absolute;
  bottom: 9px;
  left: 26px;
}

/* Skeletons ------------------------------------------------------------ */

.demo-skel {
  background-color: var(--app-line);
  border-radius: 7px;
  inset: 1px;
  opacity: 0;
  position: absolute;
}

/* Anomaly callout ------------------------------------------------------ */

.demo-callout {
  align-items: center;
  background: var(--app-surface);
  border: 1px solid var(--app-line-2);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  display: flex;
  gap: 8px;
  left: 11px;
  opacity: 0;
  padding: 8px 10px;
  position: absolute;
  top: 34px;
  z-index: 3;
}

.demo-callout i {
  background: var(--app-coral);
  border-radius: 999px;
  flex: none;
  height: 7px;
  width: 7px;
}

.demo-callout small {
  color: var(--app-muted);
  display: block;
  font-size: 9px;
  font-weight: 680;
}

.demo-callout b {
  color: var(--app-ink-strong);
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Drill-down panel ----------------------------------------------------- */

.demo-drill {
  background: var(--app-surface);
  border-top: 1px solid var(--app-line-2);
  border-radius: 10px 10px 0 0;
  bottom: 0;
  box-shadow: 0 -14px 34px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 8px;
  grid-auto-rows: min-content;
  left: 0;
  padding: 11px 13px 13px;
  position: absolute;
  right: 0;
  transform: translateY(101%);
  z-index: 4;
}

.demo-drill-head {
  align-items: baseline;
  display: flex;
  gap: 8px;
}

.demo-drill-head b {
  color: var(--app-ink-strong);
  font-size: 11.5px;
}

.demo-drill-head small {
  color: var(--app-coral);
  font-family: var(--mono);
  font-size: 10px;
  margin-left: auto;
}

.demo-drill-row {
  align-items: baseline;
  background: var(--app-sunken);
  border: 1px solid var(--app-line);
  border-radius: 7px;
  display: flex;
  gap: 8px;
  opacity: 0;
  padding: 7px 9px;
}

.demo-drill-row b {
  color: var(--app-ink);
  font-size: 10px;
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-drill-row em {
  color: var(--app-ink-strong);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
  white-space: nowrap;
}

.demo-drill-cta {
  background: var(--app-indigo);
  border-radius: 7px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 720;
  justify-self: start;
  opacity: 0;
  padding: 7px 11px;
}

/* Player --------------------------------------------------------------- */

.demo-caption-track {
  min-height: 44px;
  position: relative;
}

.demo-caption {
  color: var(--ink);
  font-size: 15px;
  font-weight: 640;
  left: 0;
  line-height: 1.35;
  max-width: 48ch;
  opacity: 0;
  position: absolute;
  text-wrap: pretty;
  top: 0;
}

.demo-player {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.demo-play {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  flex: none;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.demo-play:disabled {
  cursor: default;
  opacity: 0.5;
}

.demo-play svg {
  height: 14px;
  width: 14px;
}

.demo-play .demo-icon-play,
.demo.is-paused .demo-play .demo-icon-pause {
  display: none;
}

.demo.is-paused .demo-play .demo-icon-play {
  display: inline-flex;
}

.demo-track {
  display: grid;
  flex: 1 1 240px;
  gap: 9px;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  list-style: none;
}

.demo-seek {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 6px;
  padding: 0;
  text-align: left;
}

.demo-seek:disabled {
  cursor: default;
}

.demo-seek span {
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-bar {
  background: var(--line);
  border-radius: 999px;
  height: 3px;
  overflow: hidden;
  position: relative;
}

.demo-bar i {
  background: var(--blue);
  border-radius: 999px;
  inset: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: left;
}

.demo-note {
  color: var(--muted);
  font-size: 11px;
  margin-left: auto;
}

.demo-seek:focus-visible,
.demo-play:focus-visible {
  border-radius: 8px;
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Timeline ------------------------------------------------------------- */

.demo[data-mode="motion"] .demo-frame *,
.demo[data-mode="motion"] .demo-bars .is-anomaly::after,
.demo[data-mode="motion"] .demo-screen,
.demo[data-mode="motion"] .demo-caption,
.demo[data-mode="motion"] .demo-seek,
.demo[data-mode="motion"] .demo-bar i {
  animation-delay: var(--seek, 0s);
  animation-duration: var(--dur);
  animation-fill-mode: both;
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.demo[data-mode="motion"] {
  .demo-screen { animation-name: demo-seam; }
  .demo-sweep { animation-name: demo-sweep; animation-timing-function: linear; }
  .demo-sync-a { animation-name: demo-sync-wait; }
  .demo-sync-b { animation-name: demo-sync-ok; }
  .demo-sync-dot { animation-name: demo-sync-dot; }

  .demo-conn:nth-child(2) .demo-conn-wait { animation-name: demo-conn1-wait; }
  .demo-conn:nth-child(2) .demo-conn-ok { animation-name: demo-conn1-ok; }
  .demo-conn:nth-child(3) .demo-conn-wait { animation-name: demo-conn2-wait; }
  .demo-conn:nth-child(3) .demo-conn-ok { animation-name: demo-conn2-ok; }

  .demo-skel { animation-name: demo-skel; }
  .demo-chips span { animation-name: demo-fig-a; }

  .demo-fig-a { animation-name: demo-fig-a; }
  .demo-kpi em { animation-name: demo-fig-b; }

  /* The month-to-date figure counts up in three steps; each step hands
     over to the next instead of stacking under it. */
  .demo-tick-1 { animation-name: demo-tick-1; }
  .demo-tick-2 { animation-name: demo-tick-2; }
  .demo-tick-3 { animation-name: demo-fig-c; }

  .demo-bars i {
    animation-delay: calc(var(--seek, 0s) + var(--i) * 0.055s);
    animation-name: demo-bar;
  }

  .demo-bars .is-anomaly {
    animation-name: demo-bar, demo-bar-ring;
  }

  .demo-bars .is-anomaly::after { animation-name: demo-bar-hot; }

  .demo-bars i:not(.is-anomaly) {
    animation-name: demo-bar, demo-bar-dim;
  }

  /* :not() keeps the card's own skeleton out — it has its own keyframes. */
  .demo-rows > span:not(.demo-skel) {
    animation-delay: calc(var(--seek, 0s) + var(--i) * 0.11s);
    animation-name: demo-row;
  }

  .demo-callout { animation-name: demo-callout; }
  .demo-drill { animation-name: demo-drill; }

  .demo-drill-row {
    animation-delay: calc(var(--seek, 0s) + var(--i) * 0.12s);
    animation-name: demo-drill-row;
  }

  .demo-drill-cta { animation-name: demo-cta; }

  .demo-nav .is-overview { animation-name: demo-nav-a; }
  .demo-conn:nth-child(2) .demo-conn-dot { animation-name: demo-dot1; }
  .demo-conn:nth-child(3) .demo-conn-dot { animation-name: demo-dot2; }

  .demo-caption,
  .demo-seek {
    animation-delay: calc(var(--seek, 0s) + var(--i) * 5s);
  }

  .demo-caption { animation-name: demo-caption; }
  .demo-seek { animation-name: demo-seek; }

  .demo-bar i { animation-timing-function: linear; }
  li:nth-child(1) .demo-bar i { animation-name: demo-seg-1; }
  li:nth-child(2) .demo-bar i { animation-name: demo-seg-2; }
  li:nth-child(3) .demo-bar i { animation-name: demo-seg-3; }
  li:nth-child(4) .demo-bar i { animation-name: demo-seg-4; }
}

.demo.is-paused *,
.demo.is-paused .is-anomaly::after,
.demo.is-offscreen *,
.demo.is-offscreen .is-anomaly::after {
  animation-play-state: paused;
}

/* Scrubbing: drop every animation for one frame so the new --seek is read
   as a fresh (negative) start offset in every engine. */
.demo.is-seeking *,
.demo.is-seeking .is-anomaly::after {
  animation-name: none !important;
}

@keyframes demo-seam {
  0% { opacity: 0; }
  3%, 96% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes demo-sweep {
  0% { opacity: 0; transform: translateX(-140%); }
  1% { opacity: 1; }
  8% { opacity: 1; transform: translateX(340%); }
  8.01% { opacity: 0; transform: translateX(-140%); }
  10% { opacity: 1; }
  17% { opacity: 1; transform: translateX(340%); }
  18%, 100% { opacity: 0; transform: translateX(-140%); }
}

@keyframes demo-sync-wait {
  0%, 16% { opacity: 1; }
  18%, 100% { opacity: 0; }
}

@keyframes demo-sync-ok {
  0%, 16% { opacity: 0; }
  18%, 100% { opacity: 1; }
}

@keyframes demo-sync-dot {
  0%, 16% { background: var(--app-amber); }
  18%, 100% { background: var(--app-green); }
}

@keyframes demo-conn1-wait {
  0%, 5% { opacity: 1; }
  7%, 100% { opacity: 0; }
}

@keyframes demo-conn1-ok {
  0%, 5% { opacity: 0; }
  7%, 100% { opacity: 1; }
}

@keyframes demo-conn2-wait {
  0%, 10% { opacity: 1; }
  12%, 100% { opacity: 0; }
}

@keyframes demo-conn2-ok {
  0%, 10% { opacity: 0; }
  12%, 100% { opacity: 1; }
}

@keyframes demo-dot1 {
  0%, 5% { background: var(--app-amber); }
  7%, 100% { background: var(--app-green); }
}

@keyframes demo-dot2 {
  0%, 10% { background: var(--app-amber); }
  12%, 100% { background: var(--app-green); }
}

/* Stays fully opaque while loading — a translucent skeleton would let the
   settled values bleed through it. The pulse rides on the fill instead. */
@keyframes demo-skel {
  0% { background-color: var(--app-line); opacity: 1; }
  7% { background-color: var(--app-line-2); }
  13% { background-color: var(--app-line); }
  19% { background-color: var(--app-line-2); }
  22% { background-color: var(--app-line); opacity: 1; }
  24.5%, 100% { opacity: 0; }
}

@keyframes demo-fig-a {
  0%, 22.5% { opacity: 0; }
  24%, 100% { opacity: 1; }
}

@keyframes demo-fig-b {
  0%, 26% { opacity: 0; }
  27%, 100% { opacity: 1; }
}

@keyframes demo-tick-1 {
  0%, 22.5% { opacity: 0; }
  24%, 26% { opacity: 1; }
  27%, 100% { opacity: 0; }
}

@keyframes demo-tick-2 {
  0%, 26% { opacity: 0; }
  27%, 29% { opacity: 1; }
  30%, 100% { opacity: 0; }
}

@keyframes demo-fig-c {
  0%, 29% { opacity: 0; }
  30%, 100% { opacity: 1; }
}

@keyframes demo-bar {
  0%, 25% { transform: scaleY(0); }
  33%, 100% { transform: scaleY(1); }
}

@keyframes demo-bar-hot {
  0%, 50% { opacity: 0; }
  52%, 95% { opacity: 1; }
  96%, 100% { opacity: 0; }
}

@keyframes demo-bar-ring {
  0%, 50% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
  51% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.5); }
  57% { box-shadow: 0 0 0 9px rgba(248, 113, 113, 0); }
  58% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.42); }
  64%, 100% { box-shadow: 0 0 0 9px rgba(248, 113, 113, 0); }
}

@keyframes demo-bar-dim {
  0%, 50% { opacity: 1; }
  53%, 73% { opacity: 0.32; }
  77%, 100% { opacity: 1; }
}

@keyframes demo-row {
  0%, 26% { opacity: 0; transform: translateY(5px); }
  32%, 100% { opacity: 1; transform: none; }
}

@keyframes demo-callout {
  0%, 51% { opacity: 0; transform: translateY(6px); }
  54%, 72% { opacity: 1; transform: none; }
  75%, 100% { opacity: 0; transform: translateY(6px); }
}

@keyframes demo-drill {
  0%, 74% { transform: translateY(101%); }
  79%, 93% { transform: translateY(0); }
  97%, 100% { transform: translateY(101%); }
}

@keyframes demo-drill-row {
  0%, 77% { opacity: 0; transform: translateY(6px); }
  82%, 93% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: translateY(6px); }
}

@keyframes demo-cta {
  0%, 82% { opacity: 0; box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
  86% { opacity: 1; box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.55); }
  92% { opacity: 1; box-shadow: 0 0 0 11px rgba(99, 102, 241, 0); }
  93% { opacity: 1; }
  96%, 100% { opacity: 0; box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

@keyframes demo-nav-a {
  0%, 23% {
    background: transparent;
    border-color: transparent;
    color: var(--app-muted);
  }
  26%, 74% {
    background: var(--app-surface);
    border-color: var(--app-line);
    color: var(--app-ink-strong);
  }
  77%, 100% {
    background: transparent;
    border-color: transparent;
    color: var(--app-muted);
  }
}

@keyframes demo-caption {
  0% { opacity: 0; transform: translateY(5px); }
  1.2%, 22% { opacity: 1; transform: none; }
  24.5%, 100% { opacity: 0; transform: translateY(5px); }
}

@keyframes demo-seek {
  0%, 24% { color: var(--ink); }
  25%, 100% { color: var(--muted); }
}

@keyframes demo-seg-1 {
  0% { transform: scaleX(0); }
  25%, 100% { transform: scaleX(1); }
}

@keyframes demo-seg-2 {
  0%, 25% { transform: scaleX(0); }
  50%, 100% { transform: scaleX(1); }
}

@keyframes demo-seg-3 {
  0%, 50% { transform: scaleX(0); }
  75%, 100% { transform: scaleX(1); }
}

@keyframes demo-seg-4 {
  0%, 75% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

/* Static mode: reduced motion, or JS-driven manual chapters ------------- */

.demo[data-mode="static"] .demo-caption,
.demo[data-mode="static"] .demo-seek,
.demo[data-mode="static"] .demo-bar i,
.demo[data-mode="static"] .demo-frame * {
  transition: opacity 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.demo[data-mode="static"] .demo-play {
  display: none;
}

.demo[data-mode="static"] .demo-caption[data-chapter],
.demo[data-mode="static"] .demo-seek[data-seek] {
  color: var(--muted);
}

.demo[data-chapter="0"] .demo-caption:nth-child(1),
.demo[data-chapter="1"] .demo-caption:nth-child(2),
.demo[data-chapter="2"] .demo-caption:nth-child(3),
.demo[data-chapter="3"] .demo-caption:nth-child(4) {
  opacity: 1;
}

.demo[data-mode="static"][data-chapter="0"] li:nth-child(1) .demo-seek,
.demo[data-mode="static"][data-chapter="1"] li:nth-child(2) .demo-seek,
.demo[data-mode="static"][data-chapter="2"] li:nth-child(3) .demo-seek,
.demo[data-mode="static"][data-chapter="3"] li:nth-child(4) .demo-seek {
  color: var(--ink);
}

.demo[data-mode="static"][data-chapter="0"] li:nth-child(1) .demo-bar i,
.demo[data-mode="static"][data-chapter="1"] li:nth-child(-n+2) .demo-bar i,
.demo[data-mode="static"][data-chapter="2"] li:nth-child(-n+3) .demo-bar i,
.demo[data-mode="static"][data-chapter="3"] .demo-bar i {
  transform: scaleX(1);
}

.demo[data-mode="static"][data-chapter="0"] .demo-skel { opacity: 1; }
.demo[data-mode="static"][data-chapter="0"] .demo-sync-a { opacity: 1; }
.demo[data-mode="static"][data-chapter="0"] .demo-sync-b { opacity: 0; }
.demo[data-mode="static"][data-chapter="0"] .demo-sync-dot { background: var(--app-amber); }
.demo[data-mode="static"][data-chapter="0"] .demo-conn-wait { opacity: 1; }
.demo[data-mode="static"][data-chapter="0"] .demo-conn-ok { opacity: 0; }

.demo[data-mode="static"][data-chapter="2"] .is-anomaly::after { opacity: 1; }
.demo[data-mode="static"][data-chapter="2"] .demo-bars i:not(.is-anomaly) { opacity: 0.32; }
.demo[data-mode="static"][data-chapter="2"] .demo-callout { opacity: 1; }

.demo[data-mode="static"][data-chapter="3"] .demo-drill { transform: none; }
.demo[data-mode="static"][data-chapter="3"] .demo-drill-row,
.demo[data-mode="static"][data-chapter="3"] .demo-drill-cta { opacity: 1; }

/* Belt and braces: the film is switched to static mode by JS, but if the
   script never runs the timeline must still not play. */
@media (prefers-reduced-motion: reduce) {
  .demo *,
  .demo .is-anomaly::after {
    animation: none !important;
  }
}

.provider-strip {
  align-items: center;
  background: var(--ink);
  color: rgba(255,255,255,0.78);
  display: flex;
  flex-wrap: wrap;
  gap: 18px clamp(24px, 6vw, 72px);
  justify-content: center;
  min-height: 92px;
  padding: 22px;
}

.provider-strip span {
  font-size: 14px;
  font-weight: 760;
}

.product-tour {
  background: var(--wash);
}

.mockup-carousel {
  align-items: center;
  display: grid;
  gap: clamp(28px, 5vw, 58px);
  grid-template-columns: minmax(280px, 0.62fr) minmax(420px, 1fr);
  margin: 0 auto;
  max-width: 1180px;
}

.carousel-copy {
  display: grid;
  gap: 16px;
}

.carousel-kicker {
  color: var(--blue);
  font-size: 13px;
  font-weight: 820;
  text-transform: uppercase;
}

.carousel-copy h3 {
  color: var(--ink);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.05;
}

.carousel-copy > p:not(.carousel-kicker) {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.58;
  max-width: 460px;
}

.carousel-controls {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-top: 8px;
}

.carousel-controls button {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.carousel-controls svg {
  height: 18px;
  width: 18px;
}

.carousel-dots {
  display: flex;
  gap: 7px;
}

.carousel-dots button {
  background: var(--line-strong);
  border: 0;
  border-radius: 999px;
  height: 8px;
  padding: 0;
  width: 8px;
}

.carousel-dots button.active {
  background: var(--blue);
  width: 24px;
}

.carousel-stage {
  min-height: 440px;
  position: relative;
}

.tour-mockup {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: translateX(18px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tour-mockup.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.tour-window {
  background: #0f1117;
  border: 1px solid #2d3148;
  border-radius: 8px;
  box-shadow: 0 26px 76px rgba(23, 32, 51, 0.18);
  height: 440px;
  overflow: hidden;
}

.tour-header {
  align-items: center;
  background: #1a1d27;
  border-bottom: 1px solid #2d3148;
  display: flex;
  height: 48px;
  justify-content: space-between;
  padding: 0 18px;
}

.tour-header strong {
  color: #f9fafb;
  font-size: 13px;
}

.tour-header div {
  display: flex;
  gap: 8px;
}

.tour-header span {
  background: #2d3148;
  border-radius: 999px;
  height: 10px;
  width: 54px;
}

.tour-header span:last-child {
  width: 28px;
}

.tour-app-layout {
  display: grid;
  grid-template-columns: 116px 1fr;
  height: calc(100% - 48px);
}

.tour-sidebar {
  background: #121520;
  border-right: 1px solid #2d3148;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 10px;
}

.tour-sidebar span {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #9ca3af;
  display: flex;
  font-size: 10px;
  font-weight: 680;
  height: 28px;
  overflow: hidden;
  padding: 0 10px;
  position: relative;
  white-space: nowrap;
}

.tour-sidebar span::after {
  content: none;
}

.tour-sidebar span.active {
  background: #1a1d27;
  border-color: #2d3148;
  color: #e2e8f0;
}

.tour-app-main {
  background: #0f1117;
  display: grid;
  gap: 14px;
  grid-template-rows: auto auto auto 1fr;
  padding: 18px;
}

.tour-page-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.tour-page-head div {
  display: grid;
  gap: 7px;
}

.tour-page-head b,
.tour-filter-strip span {
  border-radius: 7px;
}

.tour-page-head b {
  color: #f9fafb;
  font-size: 16px;
  line-height: 1;
}

.tour-page-head small {
  color: #9ca3af;
  font-size: 11px;
}

.tour-page-head button {
  background: #4f46e5;
  border: 0;
  border-radius: 7px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 760;
  min-height: 28px;
  padding: 0 12px;
}

.tour-filter-strip {
  display: flex;
  gap: 8px;
}

.tour-filter-strip span {
  background: #1a1d27;
  border: 1px solid #2d3148;
  color: #9ca3af;
  font-size: 10px;
  font-weight: 660;
  min-height: 28px;
  padding: 7px 9px;
  width: auto;
}

.tour-kpi-grid,
.tour-dashboard-grid,
.tour-cost-grid {
  display: grid;
  gap: 12px;
}

.tour-kpi-grid {
  grid-template-columns: repeat(3, 1fr);
}

.tour-kpi-card,
.tour-chart-card,
.tour-table-card,
.tour-list-panel,
.tour-breakdown-panel div,
.tour-log-row,
.tour-provider-grid span,
.tour-locks div {
  background: #1a1d27;
  border: 1px solid #2d3148;
  border-radius: 8px;
}

.tour-kpi-card {
  height: 68px;
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  position: relative;
}

.tour-kpi-card.blue { border-left: 4px solid #6366f1; }
.tour-kpi-card.green { border-left: 4px solid #34d399; }
.tour-kpi-card.amber { border-left: 4px solid #fbbf24; }

.tour-kpi-card small,
.tour-breakdown-panel small {
  color: #9ca3af;
  font-size: 10px;
  font-weight: 720;
}

.tour-kpi-card strong,
.tour-breakdown-panel strong {
  color: #f9fafb;
  font-size: 17px;
  line-height: 1;
}

.tour-kpi-card em,
.tour-breakdown-panel em {
  color: #6ee7b7;
  font-size: 10px;
  font-style: normal;
}

.tour-dashboard-grid,
.tour-cost-grid {
  grid-template-columns: 1.2fr 0.8fr;
  min-height: 190px;
}

.tour-chart-card {
  align-items: end;
  display: flex;
  gap: 10px;
  padding: 22px;
  position: relative;
}

.tour-chart-card label {
  color: #9ca3af;
  font-size: 10px;
  font-weight: 760;
  left: 18px;
  position: absolute;
  top: 14px;
}

.tour-chart-card span {
  background: #6366f1;
  border-radius: 7px 7px 0 0;
  flex: 1;
}

.tour-chart-card span:nth-child(2n) { background: #34d399; }
.tour-chart-card span:nth-child(3n) { background: #f87171; }

.tour-table-card,
.tour-list-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  position: relative;
}

.tour-table-card b,
.tour-list-panel b {
  color: #f9fafb;
  font-size: 12px;
}

.tour-table-card span,
.tour-list-panel span {
  align-items: center;
  background: #121520;
  border: 1px solid #2d3148;
  border-radius: 7px;
  display: flex;
  height: 32px;
  justify-content: space-between;
  padding: 0 10px;
  position: static;
  width: 100%;
}

.tour-table-card span strong,
.tour-list-panel span strong {
  color: #e2e8f0;
  font-size: 10px;
}

.tour-table-card span em,
.tour-list-panel span em {
  color: #a5b4fc;
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
}

.tour-list-panel span.blue { border-left: 4px solid #6366f1; }
.tour-list-panel span.green { border-left: 4px solid #34d399; }

.tour-breakdown-panel {
  display: grid;
  gap: 12px;
}

.tour-breakdown-panel div {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.tour-log-list {
  display: grid;
  gap: 10px;
}

.tour-log-row {
  display: grid;
  gap: 2px;
  height: 46px;
  padding: 7px 12px;
  position: relative;
}

.tour-log-row::after {
  content: none;
}

.tour-log-row strong {
  color: #f9fafb;
  font-size: 11px;
}

.tour-log-row span {
  color: #9ca3af;
  font-size: 9px;
}

.tour-log-row em {
  color: #a5b4fc;
  font-size: 9px;
  font-style: normal;
  position: absolute;
  right: 12px;
  top: 16px;
}

.tour-log-row.strong { border-left: 4px solid #6366f1; }
.tour-log-row.warning { border-left: 4px solid #fbbf24; }
.tour-log-row.success { border-left: 4px solid #34d399; }

.tour-provider-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
}

.tour-provider-grid span {
  color: #f9fafb;
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 760;
  padding: 18px 10px;
  text-align: center;
}

.tour-provider-grid span em {
  color: #9ca3af;
  font-size: 9px;
  font-style: normal;
  font-weight: 640;
}

.tour-locks {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
}

.tour-locks div {
  align-items: center;
  display: grid;
  gap: 7px;
  justify-items: center;
  min-height: 156px;
  padding: 16px 12px;
  text-align: center;
}

.tour-locks svg {
  color: #6ee7b7;
  height: 30px;
  width: 30px;
}

.tour-locks strong {
  color: #f9fafb;
  font-size: 12px;
}

.tour-locks span {
  color: #9ca3af;
  font-size: 10px;
}

.section,
.split-section {
  padding: 90px clamp(20px, 5vw, 72px);
}

.section-heading {
  margin: 0 auto 38px;
  max-width: 780px;
  text-align: center;
}

h2 {
  color: var(--ink);
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 800;
  line-height: 1.05;
}

.pain-section {
  background: var(--paper);
  padding-bottom: 74px;
}

.pain-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1160px;
}

.pain-grid article {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,247,251,0.9));
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 238px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.pain-grid article::after {
  background: var(--blue);
  content: "";
  height: 4px;
  left: 28px;
  position: absolute;
  right: 28px;
  top: 0;
}

.pain-grid article:nth-child(2)::after { background: var(--green); }
.pain-grid article:nth-child(3)::after { background: var(--coral); }

.pain-grid span {
  color: var(--subtle);
  display: block;
  font-size: 13px;
  font-weight: 820;
  margin-bottom: 44px;
}

.pain-grid h3 {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.12;
  margin-bottom: 12px;
}

.pain-grid p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.58;
}

.feature-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1160px;
}

.feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  box-shadow: 0 16px 40px rgba(23, 32, 51, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.feature:hover {
  box-shadow: 0 22px 54px rgba(23, 32, 51, 0.12);
  transform: translateY(-3px);
}

.feature svg {
  color: var(--blue);
  height: 28px;
  margin-bottom: 22px;
  width: 28px;
}

.feature:nth-child(2) svg { color: var(--green); }
.feature:nth-child(3) svg { color: var(--violet); }

.feature h3,
.cta-panel h3 {
  color: var(--ink);
  font-size: 20px;
  margin-bottom: 10px;
}

.feature p,
.split-section p,
.cta-panel p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.split-section {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(23,32,51,0.98), rgba(32,40,58,0.96));
  color: var(--paper);
  display: grid;
  gap: 46px;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
}

.split-section > div:first-child {
  max-width: 620px;
}

.split-section h2 {
  color: var(--paper);
  margin-bottom: 20px;
}

.split-section .eyebrow { color: #69d2a0; }

.split-section p { color: rgba(255,255,255,0.72); }

.proof-list {
  display: grid;
  gap: 12px;
}

.proof-list div {
  align-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  min-height: 70px;
  padding: 18px;
}

.proof-list svg {
  color: #69d2a0;
  flex: 0 0 auto;
}

.proof-list span {
  color: var(--paper);
  font-size: 15px;
  font-weight: 660;
}

.waitlist-section {
  background: var(--paper);
}

.waitlist-panel {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(244,247,251,0.96), rgba(255,255,255,0.98));
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: clamp(24px, 5vw, 54px);
  grid-template-columns: minmax(280px, 0.78fr) minmax(360px, 1fr);
  margin: 0 auto;
  max-width: 1120px;
  padding: clamp(24px, 4vw, 42px);
  box-shadow: 0 26px 80px rgba(23, 32, 51, 0.12);
}

.waitlist-badge {
  background: rgba(36,84,214,0.1);
  border: 1px solid rgba(36,84,214,0.18);
  border-radius: 999px;
  color: var(--blue-dark);
  display: inline-flex;
  font-size: 12px;
  font-weight: 820;
  margin-bottom: 18px;
  padding: 7px 11px;
  text-transform: uppercase;
}

.waitlist-copy h3 {
  color: var(--ink);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  margin-bottom: 14px;
}

.waitlist-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.waitlist-points {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.waitlist-points > span {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 15px;
  font-weight: 680;
  gap: 10px;
}

.waitlist-points svg {
  color: var(--green);
  height: 18px;
  width: 18px;
}

.waitlist-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 18px 46px rgba(23, 32, 51, 0.1);
}

.waitlist-step {
  display: none;
}

.waitlist-step.is-active {
  display: grid;
  gap: 16px;
}

.form-step-heading {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding-bottom: 16px;
}

.form-step-heading span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.form-step-heading h4,
.waitlist-done h4 {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.form-step-heading p,
.waitlist-done p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.waitlist-form label {
  display: grid;
  gap: 7px;
}

.waitlist-form label span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
}

.waitlist-form input,
.waitlist-form select,
.waitlist-form textarea {
  appearance: none;
  background: #fbfcfe;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  min-height: 44px;
  outline: none;
  padding: 10px 12px;
  width: 100%;
}

.waitlist-form textarea {
  line-height: 1.5;
  min-height: 104px;
  resize: vertical;
}

.waitlist-form input:focus,
.waitlist-form select:focus,
.waitlist-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 84, 214, 0.12);
}

.waitlist-submit {
  border: 0;
  cursor: pointer;
  margin-top: 2px;
  width: 100%;
}

.waitlist-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.waitlist-feedback {
  color: var(--muted);
  font-size: 14px;
  min-height: 20px;
}

.waitlist-feedback.success { color: var(--green); }
.waitlist-feedback.error { color: #b42318; }
.waitlist-feedback.muted { color: var(--muted); }

.waitlist-done {
  align-items: center;
  display: grid;
  gap: 12px;
  justify-items: center;
  min-height: 280px;
  padding: 28px 12px;
  text-align: center;
}

.waitlist-done svg {
  color: var(--green);
  height: 44px;
  width: 44px;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 14px;
  gap: 16px;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 72px);
}

.site-footer span:first-child {
  color: var(--ink);
  font-weight: 760;
}

/* The demo frame is a dark screen and the headline is dark ink: stack them
   as soon as the two would start to overlap, not at the tablet breakpoint. */
@media (max-width: 1180px) {
  /* Stacked: the headline leads, the demo follows the CTAs. */
  .hero {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
    padding-top: 72px;
  }

  .hero-content { order: 1; }

  .hero-visual {
    height: auto;
    min-height: 0;
    order: 2;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.9) 48%, rgba(255,255,255,0.58) 100%),
      repeating-linear-gradient(0deg, rgba(23,32,51,0.055) 0 1px, transparent 1px 64px),
      repeating-linear-gradient(90deg, rgba(23,32,51,0.055) 0 1px, transparent 1px 64px);
  }

  .hero-content { max-width: 720px; }

  .hero-visual {
    bottom: auto;
    height: auto;
    margin: 48px 0 0;
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
  }

  /* The column no longer has a fixed height to grow into, so the frame
     stops flexing and takes an explicit one. */
  .demo-frame {
    flex: none;
    height: 460px;
    min-height: 0;
  }
}

@media (max-width: 980px) {
  .site-nav { display: none; }

  .demo-frame {
    height: 420px;
  }

  .feature-grid,
  .pain-grid,
  .mockup-carousel,
  .split-section,
  .waitlist-panel {
    grid-template-columns: 1fr;
  }

  .carousel-stage {
    min-height: 390px;
  }

  .tour-window {
    height: 390px;
  }

  .pain-grid article {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .site-header {
    height: auto;
    min-height: 68px;
    padding: 14px 18px;
  }

  .header-actions .link-action { display: none; }

  .primary-action,
  .secondary-action {
    min-height: 40px;
    padding: 0 14px;
  }

  .hero {
    min-height: 0;
    padding: 52px 18px 72px;
  }

  h1 {
    font-size: 42px;
    line-height: 1.02;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .hero-actions a { width: 100%; }

  .hero-badge {
    align-items: flex-start;
    border-radius: 8px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .demo-frame {
    height: 330px;
  }

  .demo-body {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .demo-rail,
  .demo-chips,
  .demo-rows,
  .demo-kpi:nth-child(n+3) {
    display: none;
  }

  .demo-main {
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .demo-caption {
    font-size: 14px;
  }

  .mockup-carousel {
    gap: 24px;
  }

  .carousel-stage {
    min-height: 330px;
  }

  .tour-window {
    height: 330px;
  }

  .tour-app-layout {
    grid-template-columns: 48px 1fr;
  }

  .tour-sidebar {
    padding: 12px 6px;
  }

  .tour-sidebar span::after {
    left: 9px;
    right: 9px;
  }

  .tour-app-main {
    gap: 12px;
    padding: 14px;
  }

  .tour-kpi-grid,
  .tour-dashboard-grid,
  .tour-cost-grid,
  .tour-provider-grid,
  .tour-locks {
    grid-template-columns: 1fr;
  }

  .tour-kpi-card:nth-child(n+2),
  .tour-table-card,
  .tour-breakdown-panel,
  .tour-provider-grid span:nth-child(n+2),
  .tour-locks div:nth-child(n+2) {
    display: none;
  }

  .tour-locks div {
    min-height: 150px;
  }

  .section,
  .split-section {
    padding: 68px 18px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Abaixo de ~420px o header (marca + idioma + CTA) passava alguns pixels da
   viewport e fazia a página inteira rolar na horizontal. */
@media (max-width: 420px) {
  .site-header {
    gap: 10px;
    padding: 12px 14px;
  }

  .header-actions { gap: 8px; }

  .brand {
    font-size: 16px;
    gap: 8px;
  }

  .brand-mark {
    height: 30px;
    width: 30px;
  }

  .landing-locale button { padding: 0 7px; }

  .primary-action,
  .secondary-action {
    font-size: 13px;
    padding: 0 12px;
  }
}

/* Em telas muito estreitas (320px) nem o header encolhido cabe numa linha:
   marca em cima, idioma e CTA embaixo — nada escondido. */
@media (max-width: 360px) {
  .site-header {
    flex-wrap: wrap;
    justify-content: center;
  }

  .header-actions {
    justify-content: space-between;
    width: 100%;
  }
}

/* Honeypot da lista de espera: fora da tela, mas não `display:none` — alguns
   robôs pulam campos escondidos por display e caem nos que só estão deslocados. */
.waitlist-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
