/* ============================================================
   Blue Door Software
   Warm paper for people · dark instrument panels for the machine
   ============================================================ */

:root {
  /* Paper surface */
  --paper: #f5f1e6;
  --paper-2: #efe9da;
  --ink: #0b0d10;
  --muted: #59626c;
  --faint: #666d74; /* AA 4.66:1 on paper — these labels carry real content */
  --line: rgba(11, 13, 16, 0.13);
  --line-2: rgba(11, 13, 16, 0.26);

  /* Instrument surface (matches the product cockpit) */
  --panel: #0a0a0e;
  --panel-2: #101017;
  --d-ink: #e9e7e0;
  --d-muted: #8b909a;
  --d-faint: #777b84; /* AA 4.67:1 on the panel */
  --d-line: rgba(233, 231, 224, 0.17);
  --d-line-2: rgba(233, 231, 224, 0.075);

  /* Signal — glow variants on dark only, ink variants on paper */
  --cyan: #22d3ee;
  --cyan-ink: #0a6f83;
  --amber: #fb923c;
  --amber-ink: #9c5308;
  --ok: #34d399;

  /* Geist + Geist Mono are a designed pair from the same family (Vercel's
     Next.js face), so the body and the cockpit labels share skeletons.
     "Cascadia Mono" / "JetBrains Mono" are kept as fallbacks — they are the
     Agent Brain cockpit's own stack. */
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", "Cascadia Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --pad: clamp(1.15rem, 4vw, 3.5rem);
  --shadow: 0 32px 70px -22px rgba(11, 13, 16, 0.42), 0 4px 16px rgba(11, 13, 16, 0.06);

  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ol, dl, dd, figure { margin: 0; }
ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: rgba(34, 211, 238, 0.26); }

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

.wrap {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
}
.skip:focus { left: 0; }

/* ── Micro-label: the cockpit's voice, used sparingly ────── */
.label {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--faint);
}
.label span { opacity: 0.45; padding-inline: 0.25em; }
.label-accent { color: var(--cyan-ink); }

/* ── Typography ──────────────────────────────────────────── */
h1 {
  font-family: var(--display);
  font-weight: 400;
  /* Sized against the container, not the viewport, so the longest line fills
     the column at every width. vw can't do this: past ~1400px the viewport
     keeps growing while .wrap is capped, so the headline would overflow.
     First declaration is the fallback where cqw is unsupported.
     NOTE: the cqw value is tuned to the specific headline text — it is sized
     so the longest line fills without breaking. If you change the h1 copy,
     re-measure both lines unwrapped and retune, or a longer line will silently
     wrap to a third line. */
  font-size: clamp(2.85rem, 7.4vw, 6rem);
  font-size: clamp(2.85rem, 11.8cqw, 7.9rem);
  line-height: 1.0;
  letter-spacing: -0.018em;
  margin-block: 1.4rem 0;
}
h1 em {
  font-style: italic;
  color: var(--cyan-ink);
}

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.6vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin-block: 0.9rem 0;
}

h3 {
  font-family: var(--sans);
  font-size: 1.09rem;
  font-weight: 600;
  letter-spacing: -0.011em;
  line-height: 1.35;
}

.lede {
  max-width: 48rem;
  margin-top: 1.45rem;
  font-family: var(--sans);
  font-size: clamp(1.02rem, 1.18vw, 1.16rem);
  font-weight: 400;
  line-height: 1.58;
  letter-spacing: -0.005em;
  color: #33404a;
}

.sub {
  max-width: 52ch;
  margin-top: 1.15rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.68;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding-inline: 1.45rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(0.2, 0.7, 0.3, 1),
    background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 12px 26px -10px rgba(11, 13, 16, 0.55);
}
.btn-primary:hover { box-shadow: 0 18px 34px -12px rgba(11, 13, 16, 0.6); }

.btn-ghost {
  border-color: var(--line-2);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(11, 13, 16, 0.035); }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
  padding-inline: var(--pad);
  border-bottom: 1px solid var(--line);
  background: rgba(245, 241, 230, 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  text-decoration: none;
}

.brand-logo-link {
  min-height: 44px;
  padding: 0;
}

.brand-logo-link img {
  display: block;
  width: clamp(8.4rem, 9vw, 9.4rem);
  height: auto;
}

.nav {
  display: flex;
  gap: clamp(1rem, 2.2vw, 2rem);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #3b444e;
}
.nav a { position: relative; padding-block: 0.35rem; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.nav-cta { justify-self: end; min-height: 42px; font-size: 0.88rem; }
.cta-short { display: none; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}

/* Soft doorway of light — one quiet gesture, no canvas */
.hero-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 62% at 50% -8%, rgba(34, 211, 238, 0.13), transparent 62%),
    radial-gradient(70% 44% at 88% 8%, rgba(251, 146, 60, 0.09), transparent 66%),
    linear-gradient(rgba(11, 13, 16, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 13, 16, 0.032) 1px, transparent 1px);
  background-size: auto, auto, 62px 62px, 62px 62px;
  -webkit-mask-image: radial-gradient(115% 78% at 50% 0%, #000 32%, transparent 82%);
  mask-image: radial-gradient(115% 78% at 50% 0%, #000 32%, transparent 82%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  container-type: inline-size; /* gives the h1 above a cqw basis */
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.3rem;
}

/* ── The console: the product, quoted honestly ───────────── */
.console {
  position: relative;
  margin-top: clamp(3rem, 6vw, 5rem);
  border: 1px solid rgba(11, 13, 16, 0.5);
  border-radius: 14px;
  /* Lit from the top-left with a faint instrument grid, so the panel reads
     as a machined object rather than a flat rectangle. */
  background:
    radial-gradient(130% 105% at 10% -10%, rgba(34, 211, 238, 0.075), transparent 60%),
    linear-gradient(rgba(233, 231, 224, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 231, 224, 0.02) 1px, transparent 1px),
    var(--panel);
  background-size: auto, 34px 34px, 34px 34px, auto;
  color: var(--d-ink);
  /* Glass top edge, deep drop, and a cyan bloom so it lifts off the paper */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 42px 90px -34px rgba(11, 13, 16, 0.62),
    0 10px 30px -18px rgba(11, 13, 16, 0.4),
    0 0 70px -26px rgba(34, 211, 238, 0.28);
  overflow: hidden;
}

.console-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.05rem;
  border-bottom: 1px solid var(--d-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
}

.console-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: var(--cyan);
  color: #04222a;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.console-id {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.16rem;
  font-family: var(--mono);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}
.console-id strong {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  color: var(--d-ink);
  overflow: hidden;
  text-overflow: ellipsis;
}
.console-id > span {
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--d-faint);
  overflow: hidden;
  text-overflow: ellipsis;
}
.console-id i { font-style: normal; opacity: 0.45; padding-inline: 0.15em; }

/* ── Control row ─────────────────────────────────────────── */
.console-controls {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1.05rem;
  border-bottom: 1px solid var(--d-line-2);
  font-family: var(--mono);
}

.modes { display: inline-flex; border: 1px solid var(--d-line); border-radius: 5px; overflow: hidden; }
.modes i {
  font-style: normal;
  padding: 0.28rem 0.55rem;
  border-right: 1px solid var(--d-line-2);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--d-faint);
}
.modes i:last-child { border-right: 0; }
.modes i.on { background: var(--cyan); color: #04222a; }

.readout { display: inline-flex; align-items: baseline; gap: 0.4rem; }
.readout b {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--d-ink);
  font-variant-numeric: tabular-nums;
}
.readout i {
  font-style: normal;
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--d-faint);
}

.spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; margin-left: auto; }
.spark i { width: 3px; background: var(--d-line); border-radius: 1px; }
.spark i:nth-child(3n) { background: rgba(34, 211, 238, 0.5); }
.spark i:nth-child(1) { height: 40%; } .spark i:nth-child(2) { height: 65%; }
.spark i:nth-child(3) { height: 30%; } .spark i:nth-child(4) { height: 85%; }
.spark i:nth-child(5) { height: 55%; } .spark i:nth-child(6) { height: 100%; }
.spark i:nth-child(7) { height: 45%; } .spark i:nth-child(8) { height: 70%; }
.spark i:nth-child(9) { height: 35%; } .spark i:nth-child(10) { height: 60%; }
.spark i:nth-child(11) { height: 80%; } .spark i:nth-child(12) { height: 50%; }

/* ── Lifecycle strip ─────────────────────────────────────── */
.lifecycle {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 1.05rem;
  border-bottom: 1px solid var(--d-line-2);
  overflow-x: auto;
  scrollbar-width: none;
}
.lifecycle::-webkit-scrollbar { display: none; }
.lifecycle .label { flex: none; color: var(--d-faint); font-size: 0.55rem; }
.lifecycle ol { display: flex; align-items: center; gap: 0.75rem; }
.lifecycle li {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  font-family: var(--mono);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--d-faint);
  white-space: nowrap;
}
/* the cockpit's "── ■ STAGE" rhythm: rule, then mark, then label.
   Order matters — the text is an anonymous flex item at order 0, so both
   pseudo-elements have to sort ahead of it. */
.lifecycle li::before {
  content: "";
  order: -2;
  width: 14px;
  height: 1px;
  background: var(--d-line);
}
.lifecycle li::after {
  content: "";
  order: -1;
  width: 6px;
  height: 6px;
  border: 1px solid currentColor;
  border-radius: 1px;
}
.lifecycle li.done { color: var(--ok); }
.lifecycle li.done::after {
  background: var(--ok);
  border-color: var(--ok);
  box-shadow: 0 0 7px rgba(52, 211, 153, 0.55);
}
.lifecycle li.now { color: var(--cyan); }
.lifecycle li.now::after {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.8);
  animation: markPulse 2s ease-in-out infinite;
}
@keyframes markPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(34, 211, 238, 0.5); }
  50% { box-shadow: 0 0 14px rgba(34, 211, 238, 0.95); }
}

.pulse {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 1px; /* square status marks, as the cockpit uses */
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.pulse {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 1px; /* square status marks, as the cockpit uses */
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding-inline: 0.6rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.chip-ok { color: var(--ok); }
.chip-warn { color: var(--amber); }

.lanes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.lane {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  min-height: 168px;
  padding: 1.05rem 0.85rem;
  border-right: 1px solid var(--d-line-2);
}
.lane:last-child { border-right: 0; }

/* Each lane carries its own colour via --lane, as the cockpit encodes
   its six agents. Used only on the number, dot and meter head — enough
   to read as a keyed system without turning into confetti. */
.lane-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.lane-dot {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--lane, var(--cyan));
  opacity: 0.85;
}
.lane-n {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--lane, var(--cyan));
}

.lane-stats {
  display: flex;
  align-items: baseline;
  gap: 0.28rem;
  margin-top: 0.15rem;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--d-ink);
  font-variant-numeric: tabular-nums;
}
.lane-stats b {
  font-weight: 500;
  font-size: 0.52rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--d-faint);
}
.lane-stats .hot { color: var(--amber); }

.lane-model {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--d-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lane-model i {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
}
.lane-audit .lane-model i { background: var(--amber); }
/* Mono, uppercase — reads as "01 LEAD FINDER" does in the cockpit itself */
.lane strong {
  font-family: var(--mono);
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lane em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.57rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--d-faint);
}

/* Each lane wears its colour as a fading rule along its top edge — reads as
   a keyed system across the six, without six solid stripes of confetti. */
.lane::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--lane, var(--cyan)), transparent 80%);
  opacity: 0.55;
}

.meter {
  display: flex;
  gap: 3px;
  margin-top: auto;
  padding-top: 0.85rem;
}
.meter i {
  height: 3px;
  flex: 1;
  border-radius: 2px;
  background: rgba(233, 231, 224, 0.13);
}
/* Collapsed only when JS is present to expand them again — without this
   guard a JS failure would leave every meter permanently invisible. */
.js .meter i {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.meter i:first-child {
  background: var(--lane, var(--cyan));
  opacity: 0.9;
  box-shadow: 0 0 10px -1px var(--lane, var(--cyan));
}
/* Meters fill when the console scrolls in, lane by lane — the panel boots */
.console.in .meter i { transform: scaleX(1); }
.console.in .lane:nth-child(1) .meter i { transition-delay: 0.30s; }
.console.in .lane:nth-child(2) .meter i { transition-delay: 0.39s; }
.console.in .lane:nth-child(3) .meter i { transition-delay: 0.48s; }
.console.in .lane:nth-child(4) .meter i { transition-delay: 0.57s; }
.console.in .lane:nth-child(5) .meter i { transition-delay: 0.66s; }
.console.in .lane:nth-child(6) .meter i { transition-delay: 0.75s; }

/* Vertical dividers, as the cockpit sets HARD GATE and SEND between cards.
   The hard gate is the whole value proposition, so it gets the warning hue. */
.lane-gate,
.lane-send {
  padding-left: 1.7rem;
  border-left: 1px dashed var(--gate, rgba(233, 231, 224, 0.3));
}
.lane-gate::before,
.lane-send::before {
  content: attr(data-gate);
  position: absolute;
  left: 0.4rem;
  top: 1.05rem;
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 0.53rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--gate, var(--d-faint));
}
.lane-gate { --gate: rgba(251, 146, 60, 0.75); }
.lane-gate::before { color: var(--amber); }
.lane-send { --gate: rgba(233, 231, 224, 0.28); }

.lane-audit em { color: var(--amber); }

.flow {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1.05rem;
  border-top: 1px solid var(--d-line-2);
  border-bottom: 1px solid var(--d-line-2);
}
.flow .label { color: var(--d-faint); font-size: 0.57rem; flex: none; }

.flow-track {
  position: relative;
  flex: 1;
  height: 1px;
  background: var(--d-line);
  overflow: hidden;
}
.flow-track i {
  position: absolute;
  inset-block: -1px;
  width: 34%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: flow 3.6s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}
@keyframes flow {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(330%); }
}

.console-foot {
  padding: 0.95rem 1.05rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.01em;
  line-height: 1.65;
  color: var(--d-muted);
}

/* ── Statement ───────────────────────────────────────────── */
.statement {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  background: var(--ink);
  color: var(--d-ink);
  /* The second statement abuts the dark "How we work" section. Without a
     boundary the two merge into one long dark stretch; against paper the
     same hairline is effectively invisible, so one rule covers both. */
  border-bottom: 1px solid var(--d-line-2);
}
.statement p {
  /* No cap: `ch` resolves against the 67px display face, so 22ch was only
     ~680px of a 1068px column — five lines with half the width empty.
     Letting .wrap govern keeps it flush with the console and cards above. */
  max-width: none;
  font-family: var(--display);
  font-size: clamp(2rem, 5.2vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.018em;
}
.statement em { font-style: italic; color: var(--cyan); }

/* ── Sections ────────────────────────────────────────────── */
.section { padding-block: clamp(4.5rem, 9vw, 8rem); }

.section-dark {
  background: var(--ink);
  color: var(--d-ink);
}
.section-dark .label { color: var(--d-faint); }
.section-dark .label-accent { color: var(--cyan); }
.section-dark .sub { color: var(--d-muted); }

.head {
  /* rem, not ch: `ch` here resolved against inherited 17px Inter, not the
     59px h2 it has to hold, which squeezed headings to ~472px. */
  max-width: 41rem;
  margin-inline: auto;
  margin-bottom: clamp(2.8rem, 5vw, 4.5rem);
  text-align: center;
}
.head .sub { margin-inline: auto; }
.head-left { margin-inline: 0; text-align: left; }
.head-left .sub { margin-inline: 0; }

/* ── Cards ───────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
  overflow: hidden;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 245px;
  padding: 1.6rem 1.45rem;
  background: var(--paper);
  transition: background 260ms ease;
}
.card:hover { background: #fbf8f0; }
.card .label { color: var(--cyan-ink); }
.card h3 { margin-top: auto; padding-top: 2.2rem; }
.card p {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.945rem;
  line-height: 1.62;
}

/* ── Steps ───────────────────────────────────────────────── */
.steps { border-top: 1px solid var(--d-line-2); }
.steps li {
  display: grid;
  grid-template-columns: 5rem minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: baseline;
  padding-block: 1.65rem;
  border-bottom: 1px solid var(--d-line-2);
}
.steps .label { color: var(--amber); }
.steps h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.1vw, 1.75rem);
  letter-spacing: -0.012em;
  line-height: 1.15;
}
.steps p {
  color: var(--d-muted);
  font-size: 0.965rem;
  line-height: 1.62;
}

/* ── Why / proof ─────────────────────────────────────────── */
.why {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.sticky { position: sticky; top: 108px; margin-bottom: 0; }

.proof { display: grid; }
.proof > div {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  padding-block: 1.35rem;
  border-top: 1px solid var(--line);
}
.proof > div:last-child { border-bottom: 1px solid var(--line); }
.proof dt { font-weight: 600; letter-spacing: -0.011em; }
.proof dd {
  color: var(--muted);
  font-size: 0.955rem;
  line-height: 1.62;
}

/* ── Contact ─────────────────────────────────────────────── */
.contact-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  margin-top: 2rem;
}
.contact-links a {
  position: relative;
  padding-bottom: 3px;
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  color: var(--cyan);
  border-bottom: 1px solid rgba(34, 211, 238, 0.42);
  transition: border-color 200ms ease;
}
.contact-links a:hover { border-bottom-color: var(--cyan); }

.form {
  display: grid;
  gap: 0.95rem;
  padding: 1.5rem;
  border: 1px solid var(--d-line);
  border-radius: 14px;
  background: var(--panel-2);
}
.form label {
  display: grid;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--d-muted);
}

input, textarea {
  width: 100%;
  padding: 0.8rem 0.85rem;
  border: 1px solid var(--d-line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--d-ink);
  font-family: var(--sans);
  font-size: 0.98rem;
  letter-spacing: normal;
  text-transform: none;
  transition: border-color 180ms ease;
}
textarea { resize: vertical; min-height: 96px; }
input:hover, textarea:hover { border-color: rgba(233, 231, 224, 0.32); }
input:focus-visible, textarea:focus-visible { outline-color: var(--cyan); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #f43f5e; }

.form .btn-primary {
  background: var(--cyan);
  color: #04222a;
  font-weight: 600;
  margin-top: 0.35rem;
}
.form .btn-primary:hover { box-shadow: 0 16px 32px -14px rgba(34, 211, 238, 0.75); }

.note { color: var(--d-faint); font-size: 0.83rem; line-height: 1.55; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  padding-block: 2.6rem 2rem;
  border-top: 1px solid var(--d-line-2);
  background: #06070a;
  color: var(--d-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.6rem 2rem;
  align-items: start;
}
.site-footer .brand-logo-link {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.site-footer .brand-logo-link img { width: 9rem; }
.site-footer p { margin-top: 0.65rem; font-size: 0.92rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  justify-content: flex-end;
  font-size: 0.92rem;
}
.footer-links a:hover { color: var(--d-ink); }
.reg {
  grid-column: 1 / -1;
  margin-top: 0.9rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--d-line-2);
  color: var(--d-faint);
}
.reg span { opacity: 0.5; }

/* ── Reveal on scroll (JS-gated so no-JS still shows all) ── */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.75s cubic-bezier(0.2, 0.7, 0.3, 1),
    transform 0.75s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .pulse, .flow-track i, .lifecycle li.now::after { animation: none; }
  .flow-track i { transform: translateX(110%); }
  .btn:hover { transform: none; }
  .js .meter i { transform: scaleX(1); transition: none; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1080px) {
  .lanes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lane:nth-child(3n) { border-right: 0; }
  .lane:nth-child(-n + 3) { border-bottom: 1px solid var(--d-line-2); }
  .why, .contact-shell { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .nav { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
  /* Nav collapses, but the conversion path must not. */
  .nav-cta { min-height: 38px; padding-inline: 1rem; font-size: 0.84rem; }
  .cta-full { display: none; }
  .cta-short { display: inline; }

  .lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lane { min-height: 118px; border-bottom: 1px solid var(--d-line-2); }
  .lane:nth-child(2n) { border-right: 0; }
  .lane:nth-child(3n) { border-right: 1px solid var(--d-line-2); }
  .lane:nth-last-child(-n + 2) { border-bottom: 0; }

  /* Dividers turn horizontal once the grid stacks */
  .lane-gate,
  .lane-send {
    padding-left: 0.85rem;
    padding-top: 1.6rem;
    border-left: 0;
    border-top: 1px dashed var(--gate);
  }
  .lane-gate::before,
  .lane-send::before {
    writing-mode: horizontal-tb;
    left: 0.85rem;
    top: 0.35rem;
  }
  /* accent rule would double up against the dashed divider once stacked */
  .lane-gate::after,
  .lane-send::after { display: none; }

  .flow .label:last-of-type { display: none; }

  /* Control row sheds the decorative readouts before it can crowd */
  .console-controls { flex-wrap: wrap; gap: 0.5rem; }
  .spark { display: none; }
  .readout:last-of-type { display: none; }

  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .card h3 { padding-top: 1.5rem; }

  .steps li { grid-template-columns: 1fr; gap: 0.5rem; padding-block: 1.4rem; }
  .proof > div { grid-template-columns: 1fr; gap: 0.4rem; }

  .actions { display: grid; }
  .btn { width: 100%; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .lanes { grid-template-columns: 1fr; }
  .lane { border-right: 0 !important; min-height: 0; }
  .lane:not(:last-child) { border-bottom: 1px solid var(--d-line-2) !important; }
  .chip-ok { display: none; }
  /* subtitle can't fit here, and a mid-phrase ellipsis reads as broken */
  .console-id > span { display: none; }
}
