/* ============================================================
   mileo · editorial system
   paper cream + forest ink, Fraunces / Hanken Grotesk / Spline Sans Mono
   ============================================================ */

:root {
  --paper: #F4F0E6;
  --paper-2: #ECE7D8;
  --ink: #1A2E22;
  --ink-soft: #44594B;
  --ink-faint: rgba(26, 46, 34, 0.72);       /* text tone · 4.8:1 on paper (AA) */
  --ink-faint-line: rgba(26, 46, 34, 0.55);  /* decorative strokes only */
  --line: rgba(26, 46, 34, 0.16);
  --line-soft: rgba(26, 46, 34, 0.09);
  --cream: #F4F0E6;
  --cream-faint: rgba(244, 240, 230, 0.62);
  --cream-line: rgba(244, 240, 230, 0.22);

  --f-serif: "Fraunces", Georgia, serif;
  --f-sans: "Hanken Grotesk", "Helvetica Neue", sans-serif;
  --f-mono: "Spline Sans Mono", "SF Mono", monospace;

  --container: min(1240px, 100% - clamp(40px, 8vw, 128px));
  --sect: clamp(96px, 13vw, 176px);
  --sect-tight: clamp(64px, 8vw, 112px);
}

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

html { scroll-behavior: auto; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--ink); color: var(--cream); }

.container { width: var(--container); margin-inline: auto; }

/* nothing should ever be able to push the page wider than the screen */
img { max-width: 100%; }

a { color: inherit; }

/* ---------- custom cursor ---------- */

.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}
/* the visible dot lives on a pseudo-element so the class-driven scale/ring
   never fights the GSAP transform on the wrapper. difference-blend keeps it
   visible on paper AND on the inverted ink sections (contact, footer). */
.cursor::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--cream);
  mix-blend-mode: difference;
  transform: scale(0.222);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s;
}
.cursor.is-hover::before {
  transform: scale(1);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--cream);
}
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
}

/* ---------- skip link ---------- */

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 2px;
  transform: translateY(-250%);
}
.skip-link:focus-visible {
  transform: none;
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

/* ---------- type primitives ---------- */

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: clamp(20px, 3vw, 32px);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: currentColor;
  vertical-align: middle;
  margin-right: 12px;
  opacity: 0.7;
}

.h2 {
  font-family: var(--f-serif);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  font-weight: 580;
  font-size: clamp(2.1rem, 4.6vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 21ch;
  margin-bottom: clamp(24px, 3.5vw, 40px);
}

.it {
  font-family: var(--f-serif);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 0;
  font-weight: 480;
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 58ch;
  text-wrap: pretty;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.body-lg {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--ink-soft);
  max-width: 56ch;
  text-wrap: pretty;
}

.num {
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 15px 30px;
  border-radius: 2px;
  border: 1px solid var(--ink);
  white-space: nowrap;
  transition: background 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-magnetic] { will-change: transform; }
.btn span { display: inline-block; }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { background: transparent; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-cream { background: var(--cream); color: var(--ink); border-color: var(--cream); cursor: pointer; }
.btn-cream:hover { background: transparent; color: var(--cream); }
.btn-nav { padding: 11px 22px; font-size: 14px; }

.text-link {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: border-color 0.3s;
}
.text-link:hover { border-color: var(--ink); }
.text-link .arrow-clip {
  display: inline-block;
  overflow: clip;
  line-height: 1;
  vertical-align: -0.06em;
}
.text-link .arrow { display: inline-block; }
@media (hover: hover) and (pointer: fine) {
  .text-link:hover .arrow { animation: arrow-fly 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
}
@keyframes arrow-fly {
  0%   { transform: translate(0, 0); opacity: 1; }
  45%  { transform: translate(0.7em, -0.7em); opacity: 0; }
  50%  { transform: translate(-0.7em, 0.7em); opacity: 0; }
  100% { transform: translate(0, 0); opacity: 1; }
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s;
}
.nav.is-scrolled { border-bottom-color: var(--line-soft); }

.nav-inner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  height: 76px;
}

.wordmark {
  font-family: var(--f-serif);
  font-variation-settings: "opsz" 60, "SOFT" 0, "WONK" 0;
  font-weight: 640;
  font-size: 26px;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-right: auto;
  line-height: 1;
}

.nav-links { display: flex; gap: clamp(18px, 3vw, 36px); }
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  padding-block: 8px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- nav wayfinder (built by motion.js) ---------- */

.nav-progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.nav-progress-dot {
  position: absolute;
  left: 0; top: 50%;
  width: 5px; height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--ink);
}
.nav-section-lbl {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}
.nav-progress, .nav-section-lbl { transition: opacity 0.3s; }
body:not(.motion-ok) .nav-progress,
body:not(.motion-ok) .nav-section-lbl { opacity: 0 !important; }
@media (max-width: 1023px) {
  .nav-section-lbl { display: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(76px + clamp(48px, 7vw, 96px)) 0 clamp(56px, 8vw, 112px);
  overflow: clip;
}

#hero-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-inner { position: relative; }

.hero-eyebrow { margin-bottom: clamp(28px, 4vw, 44px); }

.hero-h1 {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(2.7rem, 7vw, 6.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: clamp(28px, 4vw, 44px);
  max-width: 16ch;
}

.h1-line { display: block; overflow: clip; }
.h1-inner {
  display: inline-block;
  font-variation-settings: "opsz" var(--h1-opsz, 144), "SOFT" var(--h1-soft, 0), "WONK" 0;
}
.h1-inner.it {
  font-style: italic;
  font-weight: 500;
}

.u-draw { position: relative; white-space: nowrap; }
.u-draw::after {
  content: "";
  position: absolute;
  left: 0.02em; right: 0.02em;
  bottom: 0.02em;
  height: 0.045em;
  background: var(--ink);
  transform: scaleX(var(--u, 1));
  transform-origin: left;
}

.hero-lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 52ch;
  text-wrap: pretty;
  margin-bottom: clamp(32px, 4.5vw, 52px);
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: clamp(56px, 8vw, 104px); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: clamp(32px, 6vw, 96px);
  border-top: 1px solid var(--line);
  padding-top: clamp(24px, 3vw, 36px);
  max-width: 880px;
}

.stat { display: grid; gap: 6px; }
.stat-big {
  font-family: var(--f-serif);
  font-variation-settings: "opsz" 96, "SOFT" 0, "WONK" 0;
  font-weight: 580;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
}
.stat-small {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.hero-qualifier {
  margin-top: clamp(24px, 3.5vw, 40px);
  max-width: 60ch;
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  line-height: 1.6;
  color: var(--ink-faint);
  text-wrap: pretty;
}

/* ---------- sections ---------- */

.section {
  position: relative;
  padding-block: var(--sect);
  border-top: 1px solid var(--line-soft);
}

/* ---------- problem ---------- */

.problem-close {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: clamp(28px, 4vw, 44px);
}
.gap-diagram { justify-self: stretch; max-width: 480px; width: 100%; }
#gap-svg { width: 100%; height: auto; color: var(--ink); overflow: visible; display: block; }
.gd-node rect { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.gd-filled rect { fill: var(--ink); }
.gd-node text { text-anchor: middle; }
.gd-title { font-family: var(--f-mono); font-size: 15px; font-weight: 500; fill: var(--ink); }
.gd-sub { font-family: var(--f-mono); font-size: 11px; fill: var(--ink-faint); }
.gd-filled .gd-title { fill: var(--cream); }
.gd-filled .gd-sub { fill: var(--cream-faint); }
.gd-ghost rect { stroke-dasharray: 4 4; stroke: var(--ink-faint-line); }
.gd-ghost .gd-title, .gd-ghost .gd-sub { fill: var(--ink-faint); }
.gd-track { stroke: var(--ink); stroke-width: 1.25; }
.gd-edge { stroke: var(--ink-faint-line); stroke-width: 1; stroke-dasharray: 2 3; }
.gd-fall { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
#gd-dot { fill: var(--ink); }
.gd-gaplabel {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  fill: var(--ink-faint);
  text-anchor: middle;
}
.gap-cap {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin-top: 16px;
  max-width: 42ch;
  text-wrap: pretty;
}

.problem-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  margin-bottom: clamp(40px, 5vw, 68px);
}

.pullquote {
  font-family: var(--f-serif);
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 3rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  max-width: 26ch;
  text-wrap: balance;
}

/* ---------- process ---------- */

.process { padding-top: var(--sect-tight); }

.process-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.process-orbit { position: sticky; top: 108px; }

#orbit-svg { width: 100%; height: auto; color: var(--ink); overflow: visible; }
.orbit-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.orbit-ring-inner { stroke: var(--line-soft); stroke-dasharray: 2 6; }
.orbit-node circle {
  fill: var(--paper-2);
  stroke: var(--line);
  stroke-width: 1;
  transition: fill 0.5s cubic-bezier(0.22,1,0.36,1), stroke 0.5s;
}
.orbit-node-num {
  font-family: var(--f-mono);
  font-size: 11px;
  fill: var(--ink-faint);
  text-anchor: middle;
  transition: fill 0.5s;
}
.orbit-node.is-active circle { fill: var(--ink); stroke: var(--ink); }
.orbit-node.is-active .orbit-node-num { fill: var(--cream); }
#orbit-dot { fill: var(--ink); }
#orbit-num {
  font-family: var(--f-serif);
  font-variation-settings: "opsz" 96, "SOFT" 0, "WONK" 0;
  font-weight: 580;
  font-size: 34px;
  fill: var(--ink);
  text-anchor: middle;
}
#orbit-lbl {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: var(--ink-faint);
  text-anchor: middle;
}

.phases { list-style: none; border-top: 1px solid var(--line); }

.phase {
  display: grid;
  grid-template-columns: 72px 1fr 1.25fr;
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
  padding-block: clamp(28px, 3.5vw, 44px);
  border-bottom: 1px solid var(--line);
}

.phase-title {
  font-family: var(--f-serif);
  font-variation-settings: "opsz" 72, "SOFT" 0, "WONK" 0;
  font-weight: 580;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.phase-body { color: var(--ink-soft); max-width: 52ch; text-wrap: pretty; }

/* ---------- capabilities ---------- */

.capabilities .lede { margin-bottom: clamp(24px, 3vw, 40px); }

.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 3vw, 48px);
}

.cap { border-top: 1px solid var(--ink); padding-top: 20px; }
.cap .num { display: block; margin-bottom: clamp(14px, 2vw, 28px); }
.cap-title {
  font-family: var(--f-serif);
  font-variation-settings: "opsz" 48, "SOFT" 0, "WONK" 0;
  font-weight: 580;
  font-size: 1.25rem;
  margin-bottom: 18px;
}
.cap-list { list-style: none; }
.cap-list li {
  padding-block: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
  color: var(--ink-soft);
}
@media (hover: hover) and (pointer: fine) {
  .cap .num { transition: color 0.3s; }
  .cap:hover .num { color: var(--ink); }
  .cap-list li { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
  .cap:hover .cap-list li { transform: translateX(5px); }
  .cap:hover .cap-list li:nth-child(2) { transition-delay: 0.05s; }
  .cap:hover .cap-list li:nth-child(3) { transition-delay: 0.10s; }
  .cap:hover .cap-list li:nth-child(4) { transition-delay: 0.15s; }
}

/* ---------- systems ---------- */

.systems .lede { margin-bottom: clamp(24px, 3vw, 40px); }

.sys-items {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(28px, 4vw, 44px);
}

.sys-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: clamp(20px, 3vw, 48px);
  padding-block: clamp(28px, 3.5vw, 44px);
  border-bottom: 1px solid var(--line);
}

.sys-title {
  font-family: var(--f-serif);
  font-variation-settings: "opsz" 72, "SOFT" 0, "WONK" 0;
  font-weight: 580;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  text-wrap: balance;
}

.sys-sub { color: var(--ink-soft); max-width: 56ch; margin-bottom: 20px; }

.sys-list { list-style: none; max-width: 620px; }
.sys-list li {
  position: relative;
  padding: 10px 0 10px 26px;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
  color: var(--ink-soft);
}
.sys-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  font-family: var(--f-mono);
  font-size: 12px;
  top: 13px;
  color: var(--ink-faint);
}

/* ---------- utilities ---------- */

.visually-hidden {
  position: absolute;
  left: 0; top: 0;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

/* pause the sync panel's ambient loops while it is scrolled out of view */
.rt-paused .rt-dot,
.rt-paused .rt-node-active::before,
.rt-paused .rt-node::after,
.rt-paused .rt-packet { animation-play-state: paused; }

/* ---------- real-time sync panel ---------- */

.rt-panel {
  --rt-cycle: 6.6s;     /* one full loop of the relay */
  --rt-step: 0.16;      /* fraction of the loop a packet spends crossing one link */
  position: relative;   /* contains the absolutely-positioned screen-reader caption */
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--cream-line);
  border-radius: 3px;   /* matches the .ph cards in this section */
  margin-bottom: clamp(28px, 3vw, 40px);
  overflow: clip;
}
.rt-panel ::selection { background: var(--cream); color: var(--ink); }

/* top bar */
.rt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(18px, 2vw, 24px);
  border-bottom: 1px solid var(--cream-line);
}
.rt-scenario {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--cream);
}
.rt-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cream-faint);
  border: 1px solid var(--cream-line);
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(244, 240, 230, 0.06);
}
.rt-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cream);
  animation: dot-breathe 2.4s ease-in-out infinite;
}
@keyframes dot-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* node flow */
.rt-flow { padding: clamp(24px, 3vw, 44px) clamp(16px, 2.4vw, 36px) clamp(20px, 2.6vw, 36px); }

.rt-chain { display: flex; align-items: stretch; }

.rt-node {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: clamp(14px, 1.5vw, 20px) clamp(12px, 1.3vw, 18px);
  border: 1px solid var(--cream-line);
  border-radius: 3px;
  background: rgba(244, 240, 230, 0.045);
}
.rt-node-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cream-faint);
}
.rt-node-name {
  font-family: var(--f-serif);
  font-variation-settings: "opsz" 48, "SOFT" 0, "WONK" 0;
  font-weight: 580;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--cream);
}

/* the active sync engine: inverted, cream fill / forest text, gently lit */
.rt-node-active {
  background: var(--cream);
  border-color: var(--cream);
}
.rt-node-active::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  box-shadow: 0 0 30px -4px rgba(244, 240, 230, 0.6);
  pointer-events: none;
  animation: rt-engine 4.2s ease-in-out infinite;
}
.rt-node-active .rt-node-label { color: var(--ink-soft); }
.rt-node-active .rt-node-name { color: var(--ink); }
@keyframes rt-engine {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* a node glows briefly as a packet lands on it */
.rt-node::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 1px solid var(--cream);
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  animation: rt-ring var(--rt-cycle) linear infinite;
}
@keyframes rt-ring {
  0% { opacity: 0; transform: scale(0.99); }
  3% { opacity: 0.55; transform: scale(1); }
  14% { opacity: 0; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.1); }
}
.rt-node[data-step="1"]::after { animation-delay: 0s; }
.rt-node[data-step="2"]::after { animation-delay: calc(var(--rt-cycle) * var(--rt-step) * 1); }
.rt-node[data-step="3"]::after { animation-delay: calc(var(--rt-cycle) * var(--rt-step) * 2); }
.rt-node[data-step="4"]::after { animation-delay: calc(var(--rt-cycle) * var(--rt-step) * 3); }
.rt-node[data-step="5"]::after { animation-delay: calc(var(--rt-cycle) * var(--rt-step) * 4); }

/* connectors */
.rt-link {
  position: relative;
  flex: 0 0 clamp(34px, 5vw, 78px);
  align-self: stretch;
  min-height: 64px;
  container-type: size;
}
.rt-link::before {
  content: "";
  position: absolute;
  left: -2px; right: -2px;
  top: 50%;
  height: 1px;
  background: var(--cream-line);
  transform: translateY(-50%);
}
.rt-link-label {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -16px);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--cream-faint);
  white-space: nowrap;
}

/* travelling packets */
.rt-packet {
  position: absolute;
  top: 50%; left: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 0 8px 1px rgba(244, 240, 230, 0.55);
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: rt-run var(--rt-cycle) linear infinite;
}
@keyframes rt-run {
  0% { transform: translate(-50%, -50%) translateX(0); opacity: 0; }
  2% { opacity: 1; }
  14% { opacity: 1; }
  16% { transform: translate(-50%, -50%) translateX(100cqw); opacity: 0; }
  100% { transform: translate(-50%, -50%) translateX(100cqw); opacity: 0; }
}
.rt-link[data-link="1"] .rt-packet { animation-delay: 0s; }
.rt-link[data-link="2"] .rt-packet { animation-delay: calc(var(--rt-cycle) * var(--rt-step) * 1); }
.rt-link[data-link="3"] .rt-packet { animation-delay: calc(var(--rt-cycle) * var(--rt-step) * 2); }
.rt-link[data-link="4"] .rt-packet { animation-delay: calc(var(--rt-cycle) * var(--rt-step) * 3); }

/* feeder inputs angling into the flow */
.rt-feeders {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: clamp(14px, 2vw, 26px);
}
.rt-feed {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
}
.rt-feed-eng { grid-column: 2; }
.rt-feed-crm { grid-column: 5; }
.rt-chip {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--cream);
  border: 1px solid var(--cream-line);
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(244, 240, 230, 0.06);
  white-space: nowrap;
}
.rt-feedline {
  position: relative;
  width: 1px;
  height: clamp(28px, 4vw, 48px);
  background: var(--cream-line);
  transform-origin: bottom center;
  container-type: size;
}
.rt-feed-eng .rt-feedline { transform: rotate(18deg); }
.rt-feed-crm .rt-feedline { transform: rotate(-12deg); }
.rt-feedline .rt-packet {
  top: auto; bottom: 0; left: 50%;
  animation-name: rt-feed-run;
}
.rt-feed-eng .rt-feedline .rt-packet { animation-delay: calc(var(--rt-cycle) * 0.30); }
.rt-feed-crm .rt-feedline .rt-packet { animation-delay: calc(var(--rt-cycle) * 0.55); }
@keyframes rt-feed-run {
  0% { transform: translate(-50%, -50%) translateY(0); opacity: 0; }
  8% { opacity: 1; }
  24% { opacity: 1; }
  28% { transform: translate(-50%, -50%) translateY(-100cqh); opacity: 0; }
  100% { transform: translate(-50%, -50%) translateY(-100cqh); opacity: 0; }
}

/* caption */
.rt-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 20px;
  padding: 15px clamp(18px, 2vw, 24px) 18px;
  border-top: 1px solid var(--cream-line);
}
.rt-caption {
  flex: 1 1 320px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--cream-faint);
  max-width: 74ch;
}
.rt-credit {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-faint);
  white-space: nowrap;
}

/* mobile: chain stacks, connectors rotate to vertical */
@media (max-width: 820px) {
  .rt-chain { flex-direction: column; align-items: stretch; }
  .rt-node { width: 100%; }
  .rt-link {
    width: 100%;
    flex-basis: auto;
    min-height: clamp(40px, 9vw, 56px);
  }
  .rt-link::before {
    left: 50%; right: auto;
    top: -2px; bottom: -2px;
    width: 1px; height: auto;
    transform: translateX(-50%);
  }
  .rt-link-label {
    left: 50%; top: 50%;
    transform: translate(14px, -50%);
  }
  .rt-packet {
    left: 50%; top: 0;
    animation-name: rt-run-v;
  }
  .rt-feedline .rt-packet { left: 50%; top: auto; bottom: 0; animation-name: rt-feed-run; }
  .rt-feeders {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    margin-top: 4px;
  }
  .rt-feed-eng, .rt-feed-crm { grid-column: 1; }
  .rt-feed-eng .rt-feedline,
  .rt-feed-crm .rt-feedline { transform: none; }
}
@keyframes rt-run-v {
  0% { transform: translate(-50%, -50%) translateY(0); opacity: 0; }
  2% { opacity: 1; }
  14% { opacity: 1; }
  16% { transform: translate(-50%, -50%) translateY(100cqh); opacity: 0; }
  100% { transform: translate(-50%, -50%) translateY(100cqh); opacity: 0; }
}

/* ---------- placeholders ---------- */

.ph {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 3px;
  background:
    repeating-linear-gradient(-45deg,
      transparent 0 9px,
      rgba(26, 46, 34, 0.045) 9px 10px),
    var(--paper-2);
  display: grid;
  place-items: center;
  overflow: clip;
}

.ph-label {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  text-align: center;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  max-width: 86%;
}

.ph-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 24px);
  margin-bottom: clamp(40px, 5vw, 64px);
}
.ph.has-img {
  background: var(--ink);
  border-color: var(--line);
}
.ph.has-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.ph-wide { aspect-ratio: 16 / 10; }
.ph-tall { aspect-ratio: 4 / 4.6; }
.ph-case { aspect-ratio: 21 / 10; margin-bottom: 26px; }

.principles {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 78ch;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  text-wrap: pretty;
}
.principles-label {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-right: 8px;
}

/* ---------- proof shots (real screenshots) ---------- */

.proof {
  display: grid;
  gap: clamp(30px, 4vw, 56px);
  margin-bottom: clamp(40px, 5vw, 64px);
  justify-items: center;
}

.shot { margin: 0; width: 100%; }
/* detailed collages sit a touch narrower so their fine text stays crisp */
.shot-feature { max-width: 1040px; }

.shot-frame {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-2);
  overflow: clip;
  font: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
  cursor: zoom-in;
  box-shadow: 0 1px 0 rgba(26, 46, 34, 0.04);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}
.shot-frame img {
  display: block;
  width: 100%;
  height: auto;
}
.shot-frame:hover,
.shot-frame:focus-visible {
  border-color: var(--ink);
  box-shadow: 0 18px 44px -26px rgba(26, 46, 34, 0.5);
  transform: translateY(-2px);
  outline: none;
}
/* zoom affordance */
.shot-frame::after {
  content: "\2922";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: 15px;
  line-height: 1;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.shot-frame:hover::after,
.shot-frame:focus-visible::after {
  opacity: 1;
  transform: scale(1);
}
/* touch devices have no hover, so keep the "tap to enlarge" cue visible */
@media (hover: none) {
  .shot-frame::after { opacity: 1; transform: scale(1); }
}
.shot-cap {
  margin-top: 12px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

/* ---------- sonar ---------- */

.sonar-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.sonar-copy { max-width: 56ch; }
.sonar-copy .body-lg { margin-bottom: 22px; }

.sonar-medallion {
  width: clamp(200px, 22vw, 300px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  overflow: clip;
  background: var(--paper-2);
}
#sonar-canvas { display: block; width: 100%; height: 100%; }

/* ---------- work ---------- */

.cases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  margin-top: clamp(40px, 5vw, 64px);
}

/* Single-card state: one case should read as deliberate, not a half-empty grid */
.cases--single {
  grid-template-columns: 1fr;
  max-width: none;
  margin-inline: 0;
}
.cases--single .case {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  column-gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.cases--single .ph-case {
  grid-column: 1;
  grid-row: 1 / span 5;
  margin-bottom: 0;
  aspect-ratio: 16 / 10;
}
.cases--single .case-meta,
.cases--single .case-title,
.cases--single .case-body,
.cases--single .chips,
.cases--single .text-link { grid-column: 2; }
.cases--single .text-link { justify-self: start; }
@media (max-width: 820px) {
  .cases--single .case { grid-template-columns: 1fr; }
  .cases--single .ph-case { grid-row: auto; margin-bottom: 26px; }
  .cases--single .case-meta,
  .cases--single .case-title,
  .cases--single .case-body,
  .cases--single .chips,
  .cases--single .text-link { grid-column: 1; }
}

.case-meta {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}

.case-title {
  font-family: var(--f-serif);
  font-variation-settings: "opsz" 72, "SOFT" 0, "WONK" 0;
  font-weight: 580;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  text-wrap: balance;
}

.case-body { color: var(--ink-soft); text-wrap: pretty; margin-bottom: 22px; }

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}
.chips li {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
}

/* ---------- pricing ---------- */

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
  margin-bottom: clamp(48px, 6vw, 72px);
}

.price { border-top: 1px solid var(--ink); padding-top: 20px; }
.price .num { display: block; margin-bottom: clamp(28px, 4vw, 56px); }
.price-title {
  font-family: var(--f-serif);
  font-variation-settings: "opsz" 48, "SOFT" 0, "WONK" 0;
  font-weight: 580;
  font-size: 1.35rem;
  margin-bottom: 12px;
}
.price-body { color: var(--ink-soft); font-size: 15px; text-wrap: pretty; }

.price-note {
  color: var(--ink-soft);
  max-width: 64ch;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  text-wrap: pretty;
}

/* ---------- testimonials (hidden) ---------- */

.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.quote p {
  font-family: var(--f-serif);
  font-size: 1.5rem;
  line-height: 1.3;
  margin-bottom: 16px;
}
.quote cite { font-family: var(--f-mono); font-size: 12px; font-style: normal; color: var(--ink-faint); }

/* ---------- why small ---------- */

.why-small { padding-block: clamp(80px, 9vw, 128px); }

.why-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.why-copy .why-body { margin-bottom: 0; }

.why-seats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 1.4vw, 16px);
  align-items: end;
}
.seat {
  height: clamp(120px, 17vw, 188px);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 3px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
}
.seat-num {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--cream-faint);
}
.seats-label {
  grid-column: 1 / -1;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 6px;
}
.why-small .kicker { margin-top: clamp(48px, 6vw, 80px); }

.kicker .kw { display: inline-block; }

.kicker {
  font-family: var(--f-serif);
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  font-weight: 580;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* ---------- faq ---------- */

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: clamp(32px, 5vw, 96px);
  align-items: start;
}

.faq-side {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5vw, 28px);
  align-self: stretch;
}

.faq-note {
  font-size: 15px;
  color: var(--ink-faint);
  max-width: 26ch;
  text-wrap: pretty;
}

.faq-doodle {
  margin-top: auto;
  width: clamp(140px, 64%, 196px);
  height: auto;
  overflow: visible;
}
.fd-stroke {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fd-q {
  transform-box: fill-box;
  transform-origin: center;
  animation: fd-float 3.4s ease-in-out infinite;
}
@keyframes fd-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-4px) rotate(5deg); }
}
.fd-arm {
  transform-box: fill-box;
  transform-origin: left bottom;   /* pivot at the shoulder, so the hand waves */
}
/* one-shot: fires when a question is hovered or focused (class set in motion.js) */
.faq-doodle.is-waving .fd-arm { animation: fd-wave 0.9s ease-in-out; }
@keyframes fd-wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-12deg); }
  45% { transform: rotate(9deg); }
  65% { transform: rotate(-10deg); }
  85% { transform: rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .fd-q, .fd-arm { animation: none; }
}

.faq-list { border-top: 1px solid var(--line); }
.faq-item {
  display: grid;
  gap: 10px;
  padding-block: clamp(24px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
}
.faq-item dt {
  font-family: var(--f-serif);
  font-variation-settings: "opsz" 48, "SOFT" 0, "WONK" 0;
  font-weight: 580;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.faq-item dd { color: var(--ink-soft); max-width: 58ch; text-wrap: pretty; }

/* ---------- contact (inverted) ---------- */

.contact {
  position: relative;
  overflow: clip;
  background: var(--ink);
  color: var(--cream);
  border-top: none;
}

/* the ink field returns, inverted, where the page closes */
#contact-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.contact .container { position: relative; }

.contact .eyebrow { color: var(--cream-faint); }
.contact .h2 { color: var(--cream); }
.contact .lede { color: var(--cream-faint); }
.contact ::selection { background: var(--cream); color: var(--ink); }

.contact-next {
  margin-top: clamp(28px, 4vw, 44px);
  max-width: 48ch;
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  line-height: 1.65;
  color: var(--cream-faint);
  text-wrap: pretty;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 112px);
  align-items: start;
}

.lead-form { display: grid; gap: clamp(22px, 2.5vw, 30px); padding-top: 8px; }

.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-faint);
}
.field input,
.field textarea {
  font-family: var(--f-sans);
  font-size: 16px;
  color: var(--cream);
  background: rgba(244, 240, 230, 0.04);
  border: none;
  border-bottom: 1px solid rgba(244, 240, 230, 0.45); /* 3.8:1 · passes non-text contrast */
  padding: 8px 2px 12px;
  border-radius: 0;
  transition: border-color 0.3s, border-width 0.15s;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom: 2px solid var(--cream);
  padding-bottom: 11px; /* compensates the thicker underline, no layout shift */
}
.field:focus-within label { color: var(--cream); }

.lead-form .btn { justify-self: start; margin-top: 8px; }

/* honeypot, kept out of view and out of the a11y tree */
.lead-form .hp {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}
.form-status {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--cream-faint);
  max-width: 46ch;
  min-height: 1.2em;
}
.form-status.is-error { color: var(--cream); }
.form-status:empty { display: none; }
.form-consent {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--cream-faint);
  max-width: 52ch;
  margin: 0;
}
.form-consent a {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- footer ---------- */

.footer {
  background: var(--ink);
  color: var(--cream);
  border-top: 1px solid var(--cream-line);
  padding-block: clamp(56px, 7vw, 96px) clamp(32px, 4vw, 48px);
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}

.footer-made { display: grid; gap: 18px; }

.mascot-slot { display: grid; gap: 10px; justify-items: start; }
.ph-mascot {
  width: 78px; height: 104px;
  display: grid;
  place-items: center;
}
.mascot-doodle {
  width: 100%; height: 100%;
  overflow: visible;
  transform-origin: 50% 90%;
  animation: sm-bob 4.4s ease-in-out infinite;
}
.md-ink .md-stroke {
  fill: none;
  stroke: var(--cream);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.md-face { stroke-width: 2.2; }
.ph-mascot:hover .mascot-doodle { animation-duration: 1.1s; }
.ph-mascot.is-hopping .mascot-doodle { animation: none; }
.ph-mascot[role="button"] { cursor: pointer; }
.ph-mascot[role="button"]:focus-visible {
  outline: 1px solid var(--cream-line);
  outline-offset: 6px;
  border-radius: 4px;
}
@keyframes sm-bob {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-2.5px); }
}
.mascot-caption {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--cream-faint);
}

.made-line { font-size: 15px; color: var(--cream-faint); }

.footer-wordmark {
  font-family: var(--f-serif);
  font-variation-settings: "opsz" 72, "SOFT" 0, "WONK" 0;
  font-weight: 600;
  font-size: clamp(2.1rem, 4.2vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  text-align: center;
}

.footer-meta { display: grid; gap: 14px; justify-items: end; text-align: right; }
.footer-emails { display: grid; gap: 2px; }
.footer-emails a {
  font-family: var(--f-mono);
  font-size: 13px;
  text-decoration: none;
  padding-block: 6px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.footer-emails a:hover { border-bottom-color: var(--cream); }
.footer-bottom {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--cream-faint);
}
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }

/* ---------- reveal initial states (JS removes) ---------- */

body.motion-ok [data-reveal] {
  clip-path: inset(0 0 102% 0);
}
body.motion-ok [data-reveal="frame"] {
  clip-path: inset(0 102% 0 0);
}
body.motion-ok .hero [data-reveal] { clip-path: none; }

body.motion-ok .hero-eyebrow,
body.motion-ok .hero-lede,
body.motion-ok .hero-ctas,
body.motion-ok .hero-stats,
body.motion-ok .hero-qualifier {
  opacity: 0;
}
body.motion-ok .h1-line .h1-inner {
  clip-path: inset(-0.2em 0 102% 0);
}

/* ---------- lightbox ---------- */

html.lightbox-open { overflow: hidden; }
html.lightbox-open #cursor { opacity: 0 !important; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 64px);
  background: rgba(26, 46, 34, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  cursor: zoom-out;
  transition: opacity 0.32s ease, visibility 0s linear 0.32s;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.32s ease;
}
.lightbox img {
  max-width: min(1500px, 100%);
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.7);
  cursor: zoom-out;
  transform: scale(0.97);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.lightbox.is-open img { transform: scale(1); }

.lightbox .lightbox-close {
  position: absolute;
  top: clamp(14px, 2vw, 26px);
  right: clamp(14px, 2vw, 26px);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cream-line);
  border-radius: 50%;
  background: rgba(244, 240, 230, 0.06);
  color: var(--cream);
  font-family: var(--f-mono);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s ease;
}
.lightbox .lightbox-close:hover { background: rgba(244, 240, 230, 0.16); }
.lightbox-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(14px, 2vw, 26px);
  text-align: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cream-faint);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox img { transition: opacity 0.01ms; }
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .process-grid { grid-template-columns: 200px 1fr; gap: clamp(24px, 4vw, 48px); }
  .price-grid { grid-template-columns: 1fr; }
  .price { display: grid; grid-template-columns: 72px 1fr; column-gap: 24px; }
  .price .num { margin-bottom: 0; }
  .price-title { grid-column: 2; }
  .price-body { grid-column: 2; }
  .sonar-head { grid-template-columns: 1fr; gap: clamp(28px, 4vw, 44px); }
  .sonar-medallion { justify-self: center; width: min(280px, 70vw); margin-top: 12px; }
}

@media (max-width: 820px) {
  .phase { grid-template-columns: 56px 1fr; }
  .problem-close { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; gap: clamp(20px, 4vw, 36px); }
  /* the desktop orbit is a scroll-tracked circle; on mobile it scrolls out of
     view, so reshape the same idea as a vertical progress rail running through
     the phase numbers (driven by the same tracking in orbit.js). */
  .process-orbit { display: none; }
  .phases { position: relative; --rail: 0; }
  .phases::before,
  .phases::after { content: ""; position: absolute; left: 27px; top: 0; width: 2px; }
  .phases::before { bottom: 0; background: var(--line); }
  .phases::after {
    height: calc(var(--rail) * 100%);
    background: var(--ink);
    transition: height 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .phase .num {
    position: relative;
    z-index: 1;
    justify-self: center;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink-faint);
    transition: background 0.4s, border-color 0.4s, color 0.4s;
  }
  .phase.is-done .num { border-color: var(--ink); color: var(--ink); }
  .phase.is-current .num { background: var(--ink); border-color: var(--ink); color: var(--cream); }
  .why-grid { grid-template-columns: 1fr; gap: clamp(32px, 5vw, 48px); }
  .why-seats { max-width: 440px; }
  .phase-body { grid-column: 2; }
  .problem-cols { grid-template-columns: 1fr; }
  .cases { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .ph-row { grid-template-columns: 1fr; }
  .ph-wide { aspect-ratio: 16 / 9; }
  .footer-inner { grid-template-columns: 1fr; justify-items: start; gap: 48px; }
  .footer-wordmark { text-align: left; }
  .footer-meta { justify-items: start; text-align: left; }
  /* safety net: never let a section stretch the page sideways on mobile.
     (no sticky elements are active at this width, so clipping is safe) */
  .section, .hero, .nav, .footer { overflow-x: clip; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav-inner { height: 64px; gap: 12px; }
  .wordmark { font-size: 22px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13px; }
  .btn-nav { padding: 9px 13px; font-size: 13px; }
  .hero { padding-top: calc(64px + 40px); }
  .hero-stats { grid-template-columns: 1fr; gap: 18px; }
  .stat { grid-template-columns: 110px 1fr; align-items: baseline; }
  .sys-item { grid-template-columns: 1fr; gap: 12px; }
  .btn { padding: 14px 24px; }
  .quotes { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .cap-grid { grid-template-columns: 1fr; row-gap: 32px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .rt-dot,
  .rt-node-active::before,
  .rt-node::after,
  .mascot-doodle,
  .fd-q, .fd-arm,
  .text-link .arrow { animation: none !important; }
  .rt-packet { display: none; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
