/* =========================================================
   Cypress — landing page
   Design tokens, type, layout, motion
   ========================================================= */

:root {
  /* Surfaces */
  --bg: #07090c;
  --bg-2: #0b0e13;
  --panel: #0e1218;
  --panel-2: #11151c;
  --border: #1c222b;
  --border-2: #262d37;

  /* Text */
  --text: #e8ebf0;
  --text-2: #aab1bd;
  --text-3: #7a8290;
  --text-4: #4f5764;

  /* Accent (single) */
  --accent: #34d399;
  --accent-2: #6ee7b7;
  --accent-dim: rgba(52, 211, 153, 0.14);
  --accent-line: rgba(52, 211, 153, 0.32);

  /* Status */
  --amber: #fbbf24;
  --amber-dim: rgba(251, 191, 36, 0.16);
  --violet: #a78bfa;
  --violet-dim: rgba(167, 139, 250, 0.18);
  --rose: #f87171;

  /* Type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Scale */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  /* Layout */
  --container: 1240px;
  --gutter: 32px;
}

@supports (font-variation-settings: normal) {
  :root {
    --font-sans: "Inter var", "Inter", ui-sans-serif, system-ui, sans-serif;
  }
}

/* ========== Reset ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
img,
svg {
  display: block;
  max-width: 100%;
}

/* Background ambience: a soft halo around the hero. Very subtle. */
body::before {
  content: "";
  position: fixed;
  inset: -200px -200px auto auto;
  width: 900px;
  height: 900px;
  background: radial-gradient(
    circle at center,
    rgba(52, 211, 153, 0.06) 0%,
    rgba(52, 211, 153, 0) 60%
  );
  pointer-events: none;
  z-index: 0;
}

/* ========== Layout ========== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

main {
  position: relative;
  z-index: 1;
}

.section {
  padding: 140px 0;
  border-top: 1px solid var(--border);
  position: relative;
}
.section:first-of-type {
  border-top: 0;
}

/* ========== Type ========== */
.mono {
  font-family: var(--font-mono);
  font-feature-settings: "ss01", "cv01", "calt" 0;
  letter-spacing: 0.01em;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.025em;
  font-weight: 500;
  color: var(--text);
}

h3 {
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.015em;
  font-weight: 500;
}

.muted-title {
  color: var(--text-3);
  font-weight: 400;
}

.section-title {
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 500;
  margin-bottom: 24px;
}

.section-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 640px;
  margin: 0;
}

.section-head {
  margin-bottom: 72px;
  max-width: 820px;
}
.section-head-centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-head-centered .section-lede {
  margin-left: auto;
  margin-right: auto;
}

/* ========== Top nav ========== */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  background: rgba(7, 9, 12, 0.7);
  border-bottom: 1px solid rgba(28, 34, 43, 0.6);
}
.topnav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand-mark {
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.brand-name {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.topnav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.topnav-links a {
  font-size: 13px;
  color: var(--text-2);
  transition: color 0.15s ease;
}
.topnav-links a:hover {
  color: var(--text);
}
.topnav-cta {
  padding: 7px 14px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}
.topnav-cta:hover {
  border-color: var(--accent-line);
  color: var(--text) !important;
}

/* ========== Hero ========== */
.hero {
  padding: 100px 0 120px;
  position: relative;
}

.hero-title {
  font-size: clamp(48px, 7.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 500;
  max-width: 16ch;
  margin: 0 0 28px;
}

.hero-subhead {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 64ch;
  margin: 0 0 44px;
  text-wrap: pretty;
}
.hero-subhead em {
  font-style: normal;
  color: var(--text);
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 72px;
  flex-wrap: wrap;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #06120c;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.btn-ghost {
  color: var(--text);
  border-color: var(--border-2);
  background: rgba(255, 255, 255, 0.015);
}
.btn-ghost:hover {
  border-color: var(--accent-line);
  color: var(--accent-2);
}
.btn-lg {
  padding: 14px 22px;
  font-size: 15px;
}

/* ========== Live dots ========== */
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.dot-live {
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2.4s ease-in-out infinite;
}
.dot-amber {
  background: var(--amber);
}
.dot-ready {
  background: var(--accent);
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(52, 211, 153, 0);
  }
}

/* ========== Diagram frame ========== */
.diagram {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 22px 18px;
  position: relative;
  overflow: hidden;
}
.diagram::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 70% 0%,
    rgba(52, 211, 153, 0.05),
    transparent 60%
  );
  pointer-events: none;
}

.diagram-svg {
  width: 100%;
  height: auto;
  display: block;
}
.diagram-caption {
  margin-top: 14px;
  text-align: center;
  color: var(--text-4);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.hero-figure {
  margin: 0;
}

/* ========== Hero diagram — status bar ========== */
.diagram-statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 6px 4px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--text-2);
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.stat-pill b {
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.stat-sep {
  color: var(--text-4);
}

/* ========== SVG-internal classes ========== */
/* Station headers */
.station-head .st-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  fill: var(--text-4);
  text-anchor: middle;
}
.station-head .st-name {
  font-family: var(--font-mono);
  font-size: 12px;
  fill: var(--text-2);
  text-anchor: middle;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.ready-head .st-num {
  fill: var(--accent);
}
.ready-head .st-name {
  fill: var(--accent-2);
}

/* Tickets */
.ticket-id {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--text);
}
.ticket-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--text-4);
}

/* Pills */
.pill circle {
  fill: var(--panel-2);
  stroke: var(--border-2);
  stroke-width: 1;
}
.pill path,
.pill rect {
  stroke: var(--text);
  fill: var(--text);
}
.pill.pill-ok circle {
  fill: rgba(52, 211, 153, 0.12);
  stroke: var(--accent);
}
.pill.pill-ok path {
  stroke: var(--accent);
}
.pill.pill-ready circle {
  fill: var(--accent);
  stroke: var(--accent);
}
.pill.pill-ready path {
  stroke: #06120c;
  fill: none;
}
.pill.pill-wait circle {
  fill: var(--violet-dim);
  stroke: var(--violet);
}
.pill.pill-wait rect {
  fill: var(--violet);
  stroke: none;
}
.pill.pill-run circle {
  fill: var(--amber-dim);
  stroke: var(--amber);
}
.pill.pill-run .run-ring {
  stroke: var(--amber);
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
  transform-origin: center;
  animation: spin 4s linear infinite;
}
.pill.pill-pending circle {
  fill: #0d1218;
  stroke: var(--border-2);
  stroke-dasharray: 1.6 1.8;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Annotations under stations */
.anno text {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.02em;
}
.anno rect {
  stroke-width: 1;
}
.anno.anno-human rect {
  fill: var(--violet-dim);
  stroke: rgba(167, 139, 250, 0.4);
}
.anno.anno-human text {
  fill: #c4b5fd;
}
.anno.anno-agent rect {
  fill: rgba(52, 211, 153, 0.08);
  stroke: rgba(52, 211, 153, 0.35);
}
.anno.anno-agent text {
  fill: var(--accent-2);
}

/* Legend */
.legend text {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--text-3);
}

.cp-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

/* ========== Problem section ========== */
.problem-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}

.problem-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.problem-list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}
.problem-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.li-num {
  font-size: 11px;
  color: var(--text-4);
  letter-spacing: 0.1em;
  padding-top: 4px;
}
.problem-list h3 {
  margin-bottom: 8px;
  font-size: 17px;
}
.problem-list p {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}

/* tangle diagram */
.diagram-tangle .station-card rect {
  fill: var(--panel-2);
  stroke: var(--border-2);
  stroke-width: 1;
}
.diagram-tangle .card-label {
  font-family: var(--font-mono);
  font-size: 13px;
  fill: var(--text);
}
.diagram-tangle .card-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--text-4);
}
.diagram-tangle .agent {
  fill: rgba(52, 211, 153, 0.12);
  stroke: var(--accent);
  stroke-width: 1;
}
.diagram-tangle .human {
  fill: var(--violet-dim);
  stroke: var(--violet);
  stroke-width: 1;
}
.diagram-tangle .agent-mark {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--text);
}
.diagram-tangle .qm {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  fill: var(--text-4);
  text-anchor: middle;
  opacity: 0.7;
}

/* ========== Solution section ========== */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 72px;
}

.solution-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.solution-card:hover {
  border-color: var(--border-2);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.card-num {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-4);
}
.card-icon {
  color: var(--accent);
}

.solution-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.solution-card p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.62;
  margin: 0;
}

/* after diagram styling */
.floor-stations rect {
  fill: var(--panel-2);
  stroke: var(--border-2);
  stroke-width: 1;
}
.fs-label {
  font-family: var(--font-mono);
  font-size: 13px;
  fill: var(--text);
}
.fs-meta {
  font-size: 10px;
  fill: var(--text-4);
}
.fs-ready {
  fill: var(--accent-2);
}
.fs-ready-meta {
  fill: var(--accent);
}
.actors .actor-agent {
  fill: rgba(52, 211, 153, 0.14);
  stroke: var(--accent);
  stroke-width: 1;
}
.actors .actor-human {
  fill: var(--violet-dim);
  stroke: var(--violet);
  stroke-width: 1;
}
.actor-mark {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--text);
}
.actor-label {
  font-size: 9px;
  fill: var(--text-3);
}
.floor-label {
  font-size: 11px;
  fill: var(--text-4);
  letter-spacing: 0.06em;
}
.evidence-nodes rect {
  fill: var(--panel-2);
  stroke: var(--border-2);
  stroke-width: 1;
}
.ev-label {
  font-size: 11px;
  fill: var(--text-2);
}
.ev-sub {
  font-size: 9px;
  fill: var(--text-4);
}

.solution-figure {
  margin: 0;
}

/* ========== How it works ========== */
.how-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
}
.how-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.how-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.how-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.how-num {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  padding-top: 3px;
}
.how-item h3 {
  font-size: 19px;
  margin-bottom: 10px;
  letter-spacing: -0.018em;
  font-weight: 500;
}
.how-item p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.62;
  margin: 0;
}

.how-figure {
  margin: 0;
}

/* architecture diagram */
.band {
  stroke-width: 1;
}
.band {
  /* defaults overridden below per band */
}
.band-data {
  fill: rgba(52, 211, 153, 0.04);
  stroke: rgba(52, 211, 153, 0.22);
}
.band-ctrl {
  fill: rgba(255, 255, 255, 0.022);
  stroke: var(--border-2);
}
.band-surfaces {
  fill: rgba(255, 255, 255, 0.014);
  stroke: var(--border);
}
.band-label {
  font-size: 14px;
  letter-spacing: 0.08em;
  fill: var(--text-3);
}
.band-label-ctrl {
  fill: var(--text-2);
}
.band-sub {
  font-size: 11px;
  fill: var(--text-4);
  letter-spacing: 0.04em;
}

.diagram-arch g[transform^="translate"] > rect {
  fill: var(--panel-2);
  stroke: var(--border-2);
  stroke-width: 1;
}
.diagram-arch .human-box {
  fill: var(--violet-dim);
  stroke: rgba(167, 139, 250, 0.4);
}
.agent-name {
  font-family: var(--font-sans);
  font-size: 15px;
  fill: var(--text);
  font-weight: 500;
}
.agent-meta {
  font-size: 11px;
  fill: var(--text-4);
}
.arrow-label {
  font-size: 13px;
  fill: var(--text-2);
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}
.arrow-label-sub {
  font-size: 10.5px;
  fill: var(--text-4);
  letter-spacing: 0.02em;
  font-family: var(--font-mono);
}

.graph-inner .gn rect {
  fill: var(--bg-2);
  stroke: var(--border-2);
}
.graph-inner .gn.gn-ready rect {
  fill: rgba(52, 211, 153, 0.14);
  stroke: var(--accent);
}
.gn-label {
  font-size: 13px;
  fill: var(--text-2);
}
.gn-sub {
  font-size: 10px;
  fill: var(--text-4);
}
.gn.gn-ready .gn-label {
  fill: var(--accent-2);
}
.gn.gn-ready .gn-sub {
  fill: var(--accent);
}

.surface-card {
  fill: var(--panel-2);
  stroke: var(--border);
}
.surf-label {
  font-size: 12px;
  fill: var(--text-2);
}
.surf-row {
  font-size: 11px;
  fill: var(--text-3);
}
.surf-row-ok {
  font-size: 12px;
  fill: var(--accent);
}
.surf-row-val {
  font-size: 12px;
  fill: var(--text);
}
.surf-msg {
  font-family: var(--font-sans);
  font-size: 12.5px;
  fill: var(--text);
}
.surf-msg-sub {
  font-size: 10.5px;
  fill: var(--text-4);
}

/* ========== Who it's for ========== */
.who-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}
.who-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 180px;
}
.who-tag {
  align-self: flex-start;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-dim);
}
.who-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
}
.who-card strong {
  color: var(--text);
  font-weight: 500;
}

/* ========== CTA ========== */
.section-cta {
  padding: 140px 0 160px;
}
.cta-block {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.cta-title {
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 22px 0 22px;
}
.cta-sub {
  font-size: 17px;
  color: var(--text-2);
  margin: 0 0 44px;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}
.cta-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  text-align: left;
}
.form-row {
  margin-bottom: 18px;
}
.form-row:last-of-type {
  margin-bottom: 0;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-label {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: lowercase;
}
.form-optional {
  color: var(--text-4);
  text-transform: none;
}
.cta-form input,
.cta-form textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  color: var(--text);
  padding: 13px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  transition: border-color 0.15s ease, background 0.15s ease;
  resize: vertical;
}
.cta-form textarea {
  min-height: 96px;
}
.cta-form input:focus,
.cta-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}
.cta-form input.is-invalid {
  border-color: var(--rose);
  background: rgba(248, 113, 113, 0.04);
}
.cta-form input::placeholder,
.cta-form textarea::placeholder {
  color: var(--text-4);
}
.form-error {
  display: block;
  font-size: 11px;
  color: var(--rose);
  margin-top: 8px;
  min-height: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.15s ease, max-height 0.15s ease, margin-top 0.15s ease;
}
.form-error.is-visible {
  opacity: 1;
  max-height: 24px;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.form-thanks {
  font-size: 12px;
  color: var(--accent);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cta-form.submitted .form-thanks {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Footer ========== */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  position: relative;
  z-index: 1;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand-footer .brand-mark {
  color: var(--text-3);
}
.footer-copy {
  font-size: 11px;
  color: var(--text-4);
  letter-spacing: 0.04em;
}

/* ========== Reveal animation for pills ========== */
/* Pills are visible by default. On first paint, JS adds .is-revealing
   to the diagram for a staggered fade-in. Without JS, pills just appear. */
.diagram-hero.is-revealing .pill {
  opacity: 0;
  animation: pillIn 0.45s ease forwards;
}
.diagram-hero.is-revealing .row[data-row="1"] .pill { animation-delay: calc(var(--i, 0) * 55ms + 100ms); }
.diagram-hero.is-revealing .row[data-row="2"] .pill { animation-delay: calc(var(--i, 0) * 55ms + 220ms); }
.diagram-hero.is-revealing .row[data-row="3"] .pill { animation-delay: calc(var(--i, 0) * 55ms + 340ms); }
.diagram-hero.is-revealing .row[data-row="4"] .pill { animation-delay: calc(var(--i, 0) * 55ms + 460ms); }

@keyframes pillIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .problem-grid,
  .how-layout {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .solution-grid {
    grid-template-columns: 1fr;
  }
  .who-grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 110px 0;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 22px;
  }
  .topnav-links a:not(.topnav-cta) {
    display: none;
  }
  .hero {
    padding: 60px 0 80px;
  }
  .hero-cta {
    margin-bottom: 48px;
  }
  .section {
    padding: 80px 0;
  }
  .section-head {
    margin-bottom: 48px;
  }
  .diagram {
    padding: 14px 12px 12px;
  }
  .diagram-statusbar {
    font-size: 11px;
    gap: 8px;
  }
  .stat-sep {
    display: none;
  }
  .problem-list li {
    grid-template-columns: 28px 1fr;
  }
  .cta-form {
    padding: 20px;
  }
  /* Dense landscape diagrams horizontally scroll on mobile. The arch diagram
     is portrait so it scales naturally — leave it. */
  .diagram-hero .diagram-svg,
  .diagram-after .diagram-svg {
    min-width: 760px;
  }
  .diagram-hero,
  .diagram-after {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .pill {
    opacity: 1;
    transform: none;
  }
}
