/* ==========================================================================
   Early Rivers AI — site styles
   Palette: paper / mist / ink + one accent (river). Type: Inter Tight + Inter.
   ========================================================================== */

:root {
  --paper: #ffffff;
  --mist: #f5f5f7;
  --ink: #0a0a0b;
  --graphite: #1d1d1f;
  --mute: #6e6e73;
  --line: #d9d9de;
  --river: #1238ff;
  --river-soft: #93a5ff;

  --bg: var(--paper);
  --fg: var(--ink);
  --sub: var(--mute);
  --rule: var(--line);

  --display: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1360px;
  --pad: clamp(88px, 11vw, 168px);
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--river); outline-offset: 3px; border-radius: 4px; }
.sec--dark :focus-visible, .sec--river :focus-visible, .foot :focus-visible { outline-color: #fff; }

::selection { background: var(--river); color: #fff; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Type ---------- */

.display-xl, .display-l, .display-m, .title { font-family: var(--display); text-wrap: balance; }
.display-xl { font-size: clamp(2.5rem, 9.4vw, 9rem); line-height: 0.93; letter-spacing: -0.055em; font-weight: 700; }
.display-l { font-size: clamp(2.3rem, 6vw, 5.5rem); line-height: 0.98; letter-spacing: -0.048em; font-weight: 700; }
.display-m { font-size: clamp(1.85rem, 3.6vw, 3.25rem); line-height: 1.04; letter-spacing: -0.038em; font-weight: 600; }
.title { font-size: clamp(1.3rem, 1.8vw, 1.6rem); line-height: 1.15; letter-spacing: -0.025em; font-weight: 600; }
.lead { font-size: clamp(1.15rem, 1.55vw, 1.4rem); line-height: 1.42; letter-spacing: -0.012em; text-wrap: pretty; }
.sub { color: var(--sub); }
.label {
  font: 500 0.72rem/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sub);
}
.measure { max-width: 34em; }
p { text-wrap: pretty; }

/* ---------- Sections ---------- */

.sec { background: var(--bg); color: var(--fg); padding-block: var(--pad); position: relative; }
.sec--mist { --bg: var(--mist); }
.sec--dark { --bg: var(--ink); --fg: #f5f5f7; --sub: #a1a1a6; --rule: rgba(255, 255, 255, 0.16); }
.sec--river { --bg: var(--river); --fg: #fff; --sub: rgba(255, 255, 255, 0.8); --rule: rgba(255, 255, 255, 0.3); }
.sec--flush-top { padding-top: 0; }
.sec--ruled::before {
  content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter);
  height: 1px; background: var(--rule);
}

.sec__head { display: grid; gap: 20px; margin-bottom: clamp(40px, 6vw, 88px); }
.sec__head--split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; gap: 40px; }
@media (max-width: 860px) { .sec__head--split { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Buttons & links ---------- */

.arr {
  display: inline-block; width: 1em; height: 1em; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.4s var(--ease);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--fg); color: var(--bg);
  font: 500 1rem/1 var(--body); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
  transition: transform 0.4s var(--ease), background-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.btn:hover .arr { transform: translateX(4px); }
.btn:active { transform: scale(0.97); }
.btn--ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 30%, transparent); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--fg); }
.btn--river { background: var(--river); color: #fff; }
.btn--sm { height: 40px; padding: 0 18px; font-size: 0.9rem; }

.link {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 3px; transition: background-size 0.4s var(--ease);
}
.link:hover { background-size: 0 1px; background-position: 100% 100%; }
.link:hover .arr { transform: translateX(4px); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Nav ---------- */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent; transition: border-color 0.3s, background-color 0.3s, color 0.3s;
  view-transition-name: nav;
}
.nav.is-stuck { border-bottom-color: rgba(0, 0, 0, 0.08); }
.nav--dark:not(.nav--open) { --fg: #f5f5f7; --bg: var(--ink); background: rgba(10, 10, 11, 0.72); color: #f5f5f7; }
.nav--dark:not(.nav--open).is-stuck { border-bottom-color: rgba(255, 255, 255, 0.1); }
.nav--dark:not(.nav--open) .nav__links a { color: #d2d2d7; }
.nav--dark:not(.nav--open) .nav__links a:hover { background: rgba(255, 255, 255, 0.1); }
.nav--dark:not(.nav--open) .nav__links a[aria-current="page"] { color: #fff; }
.nav--dark:not(.nav--open) .brand__mark rect { fill: #f5f5f7; }
.nav--dark:not(.nav--open) .brand__mark path { stroke: #0a0a0b; }
.nav--dark:not(.nav--open) .brand__word sup { color: #a1a1a6; }
.nav--dark:not(.nav--open) .nav__toggle span { background: #f5f5f7; }
.brand__mark rect, .brand__mark path { transition: fill 0.3s, stroke 0.3s; }
.nav__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand__mark { width: 26px; height: 26px; }
.brand__word { font: 700 1.12rem/1 var(--display); letter-spacing: -0.035em; }
.brand__word sup { font: 500 0.55rem/1 var(--mono); letter-spacing: 0.06em; margin-left: 4px; vertical-align: top; position: relative; top: 1px; color: var(--mute); }

.nav__links { display: flex; gap: 6px; }
.nav__links a {
  padding: 8px 14px; border-radius: 999px; font-size: 0.9rem; letter-spacing: -0.005em;
  text-decoration: none; color: var(--graphite); transition: background-color 0.25s, color 0.25s;
}
.nav__links a:hover { background: rgba(0, 0, 0, 0.06); }
.nav__links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav__cta { display: flex; align-items: center; gap: 10px; }

.nav__toggle {
  display: none; width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent;
  cursor: pointer; position: relative;
}
.nav__toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform 0.4s var(--ease), top 0.4s var(--ease); }
.nav__toggle span:first-child { top: 16px; }
.nav__toggle span:last-child { top: 23px; }
.nav--open .nav__toggle span:first-child { top: 19.5px; transform: rotate(45deg); }
.nav--open .nav__toggle span:last-child { top: 19.5px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: var(--nav-h) 0 0 0; height: calc(100dvh - var(--nav-h)); background: var(--paper);
  padding: 32px var(--gutter) 40px; display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.35s, transform 0.45s var(--ease), visibility 0s 0.45s;
}
.nav--open { background: var(--paper); }
.nav--open .menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.menu__links a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--line);
  font: 600 clamp(1.9rem, 8vw, 2.6rem)/1 var(--display); letter-spacing: -0.04em; text-decoration: none;
}
.menu__links .arr { font-size: 0.6em; color: var(--mute); }
.menu .btn { width: 100%; }

@media (max-width: 940px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
}
@media (min-width: 941px) { .menu { display: none; } }
@media (max-width: 480px) { .nav__cta .btn { display: none; } }

/* ---------- Motion primitives ---------- */

.line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.line > span { display: inline-block; }
.js .line > span { transform: translateY(108%); transition: transform 1.15s var(--ease); }
.js .line:nth-child(2) > span { transition-delay: 0.09s; }
.js .line:nth-child(3) > span { transition-delay: 0.18s; }
.js.is-loaded .line > span { transform: none; }

.js [data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js .hero [data-load] { opacity: 0; transform: translateY(20px); transition: opacity 0.9s var(--ease) var(--d, 0.35s), transform 0.9s var(--ease) var(--d, 0.35s); }
.js.is-loaded .hero [data-load] { opacity: 1; transform: none; }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.22s ease both vt-out; }
::view-transition-new(root) { animation: 0.45s var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Hero ---------- */

.hero { padding: calc(var(--nav-h) + clamp(48px, 8vw, 104px)) 0 clamp(56px, 7vw, 96px); }
.hero__label { margin-bottom: clamp(20px, 2.4vw, 32px); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero__label i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.hero h1 .line:nth-child(2) { color: #86868b; }
.hero__grid {
  margin-top: clamp(40px, 5.5vw, 80px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: clamp(32px, 6vw, 96px); align-items: end;
}
.hero__copy { max-width: 33em; display: grid; gap: 28px; }
.hero__note { font-size: 0.9rem; color: var(--mute); }
.hero__note a { color: var(--ink); }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; align-items: start; } }

/* ---------- Call panel ---------- */

.call {
  background: var(--ink); color: #f5f5f7; border-radius: 28px; padding: 22px;
  box-shadow: 0 40px 80px -40px rgba(10, 10, 11, 0.45);
  display: grid; gap: 18px; width: 100%;
}
.call__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.call__live { display: inline-flex; align-items: center; gap: 8px; font: 500 0.7rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #d2d2d7; }
.call__live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34c759; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.call__time { font: 500 0.8rem/1 var(--mono); color: #a1a1a6; }
.call__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.call__who { font: 600 1.15rem/1.2 var(--display); letter-spacing: -0.02em; }
.call__state { font-size: 0.8rem; color: #a1a1a6; }

.wave { display: flex; align-items: center; gap: 3px; height: 44px; }
.wave i { flex: 1; min-width: 2px; height: 100%; border-radius: 2px; background: #f5f5f7; transform: scaleY(0.2); animation: wave var(--t, 1s) ease-in-out var(--dl, 0s) infinite alternate; opacity: 0.9; }
@keyframes wave { to { transform: scaleY(var(--h, 0.8)); } }

.call__log {
  height: 264px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
  -webkit-mask-image: linear-gradient(transparent, #000 22%); mask-image: linear-gradient(transparent, #000 22%);
}
.msg { display: grid; gap: 3px; font-size: 0.94rem; line-height: 1.4; opacity: 0; transform: translateY(8px); transition: opacity 0.4s, transform 0.5s var(--ease); }
.msg.is-in { opacity: 1; transform: none; }
.msg b { font: 500 0.66rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #86868b; }
.msg--agent b { color: var(--river-soft); }
.msg--caller span { color: #c7c7cc; }

.call__done {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 16px; background: #1d1d1f; font-size: 0.86rem;
  opacity: 0.35; transition: opacity 0.5s, background-color 0.5s;
}
.call__done.is-on { opacity: 1; background: var(--river); }
.call__done span:first-child { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.call__done time { font: 500 0.74rem/1 var(--mono); opacity: 0.8; }
.tick {
  display: inline-block; width: 1em; height: 1em; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.caption { font: 400 0.72rem/1.4 var(--mono); letter-spacing: 0.03em; color: var(--sub); margin-top: 12px; }

/* ---------- Marquee ---------- */

.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 20px; }
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; flex: none; }
.marquee__group span {
  display: inline-flex; align-items: center; gap: 28px; padding-left: 28px; white-space: nowrap;
  font: 600 clamp(1.05rem, 1.7vw, 1.4rem)/1 var(--display); letter-spacing: -0.025em;
}
.marquee__group span::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--river); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Statement (scroll-lit words) ---------- */

.statement { padding-block: clamp(120px, 18vw, 260px); }
.statement p.display-l { max-width: 15em; }
.statement .w { opacity: 0.16; transition: opacity 0.25s linear; }
.statement__foot { margin-top: clamp(40px, 5vw, 72px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30em); gap: 32px; align-items: end; }
.statement__foot > .lead { grid-column: 2; color: var(--sub); }
@media (max-width: 860px) { .statement__foot { grid-template-columns: 1fr; } .statement__foot > .lead { grid-column: 1; } }

/* ---------- Service rows ---------- */

.rows { border-bottom: 1px solid var(--rule); margin-inline: -20px; }
.row {
  position: relative; isolation: isolate; display: grid;
  grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1fr) 40px; gap: 24px; align-items: center;
  padding: clamp(28px, 3.4vw, 48px) 20px; border-top: 1px solid var(--rule);
  text-decoration: none; color: inherit; transition: color 0.45s var(--ease);
}
.row::before {
  content: ""; position: absolute; inset: -1px 0 0 0; z-index: -1; background: var(--ink);
  transform: scaleY(0); transform-origin: bottom; transition: transform 0.55s var(--ease);
}
.row:hover, .row:focus-visible { color: #fff; }
.row:hover::before, .row:focus-visible::before { transform: scaleY(1); }
.row__n { font: 500 0.78rem/1 var(--mono); color: var(--sub); }
.row__t { font: 600 clamp(1.6rem, 3.3vw, 3rem)/1.02 var(--display); letter-spacing: -0.04em; transition: transform 0.55s var(--ease); }
.row:hover .row__t { transform: translateX(10px); }
.row__d { color: var(--sub); font-size: 1rem; transition: color 0.45s; }
.row:hover .row__d { color: #c7c7cc; }
.row .arr { font-size: 1.5rem; justify-self: end; }
.row:hover .arr { transform: translateX(6px); }
@media (max-width: 860px) {
  .row { grid-template-columns: 36px minmax(0, 1fr) 28px; row-gap: 12px; align-items: start; }
  .row__d { grid-column: 2 / -1; grid-row: 2; }
  .row .arr { grid-column: 3; grid-row: 1; font-size: 1.2rem; margin-top: 6px; }
}

/* ---------- Story (pinned stage) ---------- */

.story__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: clamp(32px, 7vw, 120px); }
.step { min-height: 74vh; display: flex; flex-direction: column; justify-content: center; gap: 16px; opacity: 0.28; transition: opacity 0.6s; }
.step.is-active { opacity: 1; }
.step__time { font: 500 0.8rem/1 var(--mono); letter-spacing: 0.06em; color: var(--river); }
.step p { color: var(--sub); max-width: 30em; }

.stage {
  position: sticky; top: calc(var(--nav-h) + 24px); height: min(calc(100vh - var(--nav-h) - 48px), 680px);
  border-radius: 36px; background: var(--ink); color: #f5f5f7; overflow: hidden;
  transition: background-color 0.9s var(--ease), color 0.9s var(--ease);
}
.stage[data-step="4"] { background: #e8e8ed; color: var(--ink); }
.stage__bar { position: absolute; inset: 0 0 auto 0; display: flex; justify-content: space-between; align-items: center; padding: 22px 26px; z-index: 2; }
.stage__clock { font: 600 1.5rem/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stage__day { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; }
.stage__dots { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.stage__dots i { width: 6px; height: 6px; border-radius: 3px; background: currentColor; opacity: 0.25; transition: width 0.5s var(--ease), opacity 0.5s; }
.stage__dots i.is-on { width: 22px; opacity: 1; }

.screen {
  position: absolute; inset: 64px 0 44px 0; display: grid; place-items: center; align-content: center; gap: 12px; padding: 12px 26px;
  opacity: 0; transform: translateY(24px) scale(0.97); transition: opacity 0.5s, transform 0.8s var(--ease); pointer-events: none;
}
.screen.is-on { opacity: 1; transform: none; }
.screen > * { width: min(100%, 430px); }
.screen .call { background: var(--graphite); box-shadow: none; }
.screen .call__log { height: auto; -webkit-mask-image: none; mask-image: none; }
.screen .msg { opacity: 1; transform: none; }

.ui { background: #fff; color: var(--ink); border-radius: 22px; padding: 20px 22px; box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.35); }
.ui__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid #ececf0; }
.ui__head b { font: 600 0.98rem/1.2 var(--display); letter-spacing: -0.02em; }
.ui__tag { font: 500 0.64rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 8px; border-radius: 6px; background: var(--mist); color: var(--mute); white-space: nowrap; }
.ui__tag--river { background: var(--river); color: #fff; }
.ui dl { display: grid; }
.ui dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid #f2f2f5; font-size: 0.9rem; }
.ui dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.ui dt { font: 500 0.68rem/1.6 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.ui dd { text-align: right; font-weight: 500; }
.ui p { font-size: 0.88rem; line-height: 1.45; color: #424245; }
.ui__btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 9px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.82rem; font-weight: 500; }

.screen.is-on .ui dl > div { animation: field 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 0.11s + 0.15s); }
@keyframes field { from { opacity: 0; transform: translateY(8px); } }

.step__inline { display: none; }
@media (max-width: 900px) {
  .story__grid { grid-template-columns: 1fr; }
  .story__stagecol { display: none; }
  .step { min-height: 0; opacity: 1; padding-block: 28px; border-top: 1px solid var(--rule); }
  .step__inline { display: grid; gap: 12px; margin-top: 12px; padding: 20px; border-radius: 24px; background: var(--ink); }
  .step__inline--day { background: #e8e8ed; }
  .step__inline .screen { position: static; opacity: 1; transform: none; padding: 0; display: grid; }
  .step__inline .screen > * { width: 100%; }
  .step__inline .ui dl > div { animation: none; }
}

/* ---------- Process ---------- */

.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 40px); counter-reset: p; }
.process li { padding-top: 24px; border-top: 1px solid var(--fg); display: grid; gap: 14px; align-content: start; }
.process li::before { counter-increment: p; content: "0" counter(p); font: 500 0.78rem/1 var(--mono); color: var(--sub); margin-bottom: clamp(24px, 4vw, 64px); }
.process p { color: var(--sub); font-size: 1rem; }
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; } }
@media (max-width: 520px) { .process { grid-template-columns: 1fr; } .process li::before { margin-bottom: 8px; } }

/* ---------- Two ways to start ---------- */

.starts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.start {
  --bg: var(--paper); background: var(--bg); color: var(--fg);
  border-radius: 36px; padding: clamp(28px, 3.6vw, 52px); display: grid; gap: 28px; align-content: space-between; min-height: 520px;
  transition: transform 0.6s var(--ease);
}
.start:hover { transform: translateY(-6px); }
.start--river { --bg: var(--river); --fg: #fff; --sub: rgba(255, 255, 255, 0.82); --rule: rgba(255, 255, 255, 0.3); }
.start--river .btn { --fg: #fff; --bg: var(--river); }
.start__top { display: grid; gap: 18px; }
.start__meta { display: flex; justify-content: space-between; gap: 12px; }
.start__meta .label { color: var(--sub); }
.start ul { display: grid; border-top: 1px solid var(--rule); }
.start li { padding: 13px 0; border-bottom: 1px solid var(--rule); display: flex; gap: 12px; align-items: baseline; font-size: 0.98rem; }
.start li .tick { position: relative; top: 2px; }
@media (max-width: 860px) { .starts { grid-template-columns: 1fr; } .start { min-height: 0; } }

/* ---------- Founders ---------- */

.founders { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.founders__copy { display: grid; gap: 24px; position: sticky; top: 110px; }
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.person { display: grid; gap: 16px; }
.person:nth-child(2) { margin-top: clamp(32px, 6vw, 96px); }
.portrait {
  aspect-ratio: 4 / 5; border-radius: 28px; background: var(--mist); position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 22px;
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait span { font: 700 clamp(3.4rem, 8vw, 7rem)/0.8 var(--display); letter-spacing: -0.07em; color: #d2d2d7; }
.person h3 { font: 600 1.25rem/1.2 var(--display); letter-spacing: -0.025em; }
.person p { font-size: 0.95rem; color: var(--sub); }
.person .label { margin-top: -8px; }
@media (max-width: 860px) { .founders { grid-template-columns: 1fr; } .founders__copy { position: static; } }

/* ---------- FAQ ---------- */

.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__list { border-top: 1px solid var(--fg); }
.faq details { border-bottom: 1px solid var(--rule); interpolate-size: allow-keywords; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0; font: 600 clamp(1.15rem, 1.7vw, 1.45rem)/1.2 var(--display); letter-spacing: -0.025em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  transition: transform 0.45s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size 0.5s var(--ease), content-visibility 0.5s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
.faq details p { padding: 0 48px 28px 0; color: var(--sub); max-width: 38em; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }

/* ---------- Closing CTA + footer ---------- */

.closing { padding-block: clamp(104px, 14vw, 220px) clamp(72px, 9vw, 128px); }
.closing h2 { max-width: 11em; }
.closing__row { margin-top: clamp(36px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: 28px 56px; align-items: center; justify-content: space-between; }
.closing__row p { max-width: 26em; color: var(--sub); }

.foot { background: var(--ink); color: #f5f5f7; --fg: #f5f5f7; --sub: #a1a1a6; --rule: rgba(255, 255, 255, 0.16); padding-bottom: 36px; }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px 32px; padding-block: 56px; border-top: 1px solid var(--rule); }
.foot__brand { display: grid; gap: 18px; align-content: start; max-width: 22em; }
.foot__brand p { color: var(--sub); font-size: 0.95rem; }
.foot h4 { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--sub); margin-bottom: 18px; }
.foot li + li { margin-top: 10px; }
.foot li a { text-decoration: none; font-size: 0.95rem; opacity: 0.9; transition: opacity 0.2s; }
.foot li a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 0.82rem; color: var(--sub); }
.foot__base a { color: inherit; }
@media (max-width: 860px) { .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot__brand { grid-column: 1 / -1; } }

/* ---------- Inner page head ---------- */

.head { padding: calc(var(--nav-h) + clamp(56px, 9vw, 128px)) 0 clamp(56px, 7vw, 104px); }
.head .label { margin-bottom: clamp(20px, 2.4vw, 32px); }
.head h1 { max-width: 13em; }
.head__lead { margin-top: clamp(28px, 3.5vw, 48px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 34em); gap: 32px; align-items: end; }
.head__lead > :first-child { grid-column: 2; display: grid; gap: 28px; }
.head__index { grid-column: 1; grid-row: 1; display: grid; gap: 8px; align-self: end; }
.head__index a { text-decoration: none; font-size: 0.95rem; color: var(--mute); display: flex; gap: 14px; transition: color 0.2s; }
.head__index a:hover { color: var(--ink); }
.head__index a span { font: 500 0.72rem/1.9 var(--mono); }
@media (max-width: 860px) { .head__lead { grid-template-columns: 1fr; } .head__lead > :first-child, .head__index { grid-column: 1; grid-row: auto; } }

/* ---------- Split blocks (services / detail pages) ---------- */

.split { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 104px); align-items: start; }
.split__aside { position: sticky; top: 110px; display: grid; gap: 22px; }
.split__aside .num { font: 500 0.78rem/1 var(--mono); color: var(--sub); }
.split__main { display: grid; gap: clamp(36px, 4.5vw, 64px); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split__aside { position: static; } }

.tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--mist); position: relative; }
.sec--mist .tabs { background: #e8e8ed; }
.tabs button { position: relative; z-index: 1; border: 0; background: transparent; padding: 11px 20px; border-radius: 999px; font-size: 0.92rem; font-weight: 500; cursor: pointer; color: var(--mute); transition: color 0.3s; }
.tabs button[aria-selected="true"] { color: #fff; }
.tabs__pill { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--ink); transition: transform 0.5s var(--ease), width 0.5s var(--ease); }
.panel { display: grid; gap: 24px; }
.panel[hidden] { display: none; }
.panel:not([hidden]) { animation: panel 0.6s var(--ease); }
@keyframes panel { from { opacity: 0; transform: translateY(12px); } }

.list { border-top: 1px solid var(--rule); }
.list li { display: flex; gap: 14px; align-items: baseline; padding: 15px 0; border-bottom: 1px solid var(--rule); }
.list .tick { position: relative; top: 2px; color: var(--river); }
.sec--dark .list .tick, .sec--river .list .tick { color: inherit; }
.list--x li::before { content: ""; flex: none; width: 10px; height: 1.5px; background: currentColor; position: relative; top: -5px; opacity: 0.6; }

.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.duo > div { display: grid; gap: 12px; align-content: start; padding-top: 20px; border-top: 1px solid var(--fg); }
.duo p { color: var(--sub); font-size: 1rem; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.trio > div { display: grid; gap: 12px; align-content: start; padding-top: 20px; border-top: 1px solid var(--fg); }
.trio p { color: var(--sub); font-size: 1rem; }
@media (max-width: 700px) { .duo, .trio { grid-template-columns: 1fr; } }

/* Flow diagram */
.flow { --fp: clamp(24px, 3vw, 40px); position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: var(--fp); border-radius: 32px; background: var(--paper); }
.flow__line { position: absolute; left: calc(var(--fp) + 18px); right: calc(var(--fp) + (100% - 2 * var(--fp) - 36px) / 4 - 18px); top: calc(var(--fp) + 18px); height: 1.5px; background: var(--line); overflow: hidden; }
.flow__line::after { content: ""; position: absolute; inset: 0; width: 28%; background: linear-gradient(90deg, transparent, var(--river)); animation: flow 3.6s cubic-bezier(0.5, 0, 0.5, 1) infinite; }
@keyframes flow { from { transform: translateX(-100%); } to { transform: translateX(360%); } }
.flow__node { position: relative; display: grid; gap: 14px; align-content: start; padding-right: 12px; }
.flow__dot { width: 37px; height: 37px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 500 0.72rem/1 var(--mono); animation: node 3.6s infinite; animation-delay: calc(var(--i) * 0.75s); }
@keyframes node { 0%, 22%, 100% { background: var(--ink); transform: none; } 8% { background: var(--river); transform: scale(1.12); } }
.flow__node b { font: 600 1.05rem/1.2 var(--display); letter-spacing: -0.02em; }
.flow__node small { font-size: 0.86rem; color: var(--mute); line-height: 1.4; }
@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr; gap: 22px; }
  .flow__line { left: calc(var(--fp) + 18px); right: auto; top: var(--fp); bottom: calc(var(--fp) + 24px); width: 1.5px; height: auto; }
  .flow__line::after { width: 100%; height: 28%; background: linear-gradient(180deg, transparent, var(--river)); animation-name: flow-y; }
  .flow__node { grid-template-columns: 37px 1fr; column-gap: 16px; row-gap: 2px; }
  .flow__dot { grid-row: span 2; }
}
@keyframes flow-y { from { transform: translateY(-100%); } to { transform: translateY(360%); } }

/* Notes → summary */
.convert { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); gap: 12px; align-items: center; padding: clamp(20px, 3vw, 36px); border-radius: 32px; background: var(--mist); }
.convert .arr { font-size: 1.5rem; justify-self: center; color: var(--river); }
.note { background: #fffbe6; border-radius: 6px 20px 20px 20px; padding: 20px 22px; font: 400 0.86rem/1.7 var(--mono); color: #424245; box-shadow: 0 16px 32px -24px rgba(0, 0, 0, 0.3); transform: rotate(-1.2deg); }
.note b { display: block; font: 500 0.64rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); margin-bottom: 10px; }
@media (max-width: 700px) { .convert { grid-template-columns: 1fr; } .convert .arr { transform: rotate(90deg); } }

/* Big question list */
.questions { counter-reset: q; border-top: 1px solid var(--rule); }
.questions li { counter-increment: q; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: clamp(22px, 3vw, 40px) 0; border-bottom: 1px solid var(--rule); font: 600 clamp(1.4rem, 3vw, 2.6rem)/1.08 var(--display); letter-spacing: -0.038em; }
.questions li::before { content: "0" counter(q); font: 500 0.78rem/2.6 var(--mono); letter-spacing: 0; color: var(--sub); }
@media (max-width: 600px) { .questions li { grid-template-columns: 36px minmax(0, 1fr); } }

/* Steps (how we work page) */
.phase { display: grid; grid-template-columns: minmax(0, 0.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 64px); padding-block: clamp(36px, 5vw, 72px); border-top: 1px solid var(--rule); align-items: start; }
.phase:last-child { border-bottom: 1px solid var(--rule); }
.phase__n { font: 700 clamp(3rem, 7vw, 6.5rem)/0.8 var(--display); letter-spacing: -0.06em; color: #d2d2d7; transition: color 0.8s; }
.phase.is-in .phase__n { color: var(--ink); }
.phase__body { display: grid; gap: 16px; }
.phase__body p { color: var(--sub); }
@media (max-width: 860px) { .phase { grid-template-columns: 1fr; gap: 20px; } }

.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 64px); border-top: 1px solid var(--rule); }
.checks li { display: flex; gap: 14px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.checks li i { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--sub); display: grid; place-items: center; color: transparent; font-size: 0.8rem; transition: background-color 0.4s, border-color 0.4s, color 0.4s; transition-delay: calc(var(--d, 0s) + 0.35s); }
.checks li.is-in i { background: var(--fg); border-color: var(--fg); color: var(--bg); }
@media (max-width: 700px) { .checks { grid-template-columns: 1fr; } }

/* Compare table */
.compare { display: grid; grid-template-columns: minmax(0, 0.6fr) repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--fg); }
.compare > div { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--rule); }
.compare .compare__h { font: 600 1.2rem/1.2 var(--display); letter-spacing: -0.025em; padding-block: 22px; }
.compare .compare__k { font: 500 0.7rem/1.9 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--sub); }
@media (max-width: 700px) {
  .compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare .compare__k { grid-column: 1 / -1; border-bottom: 0; padding-bottom: 0; }
  .compare .compare__k:empty { display: none; }
}

/* Calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; }
.calc__in, .calc__out { border-radius: 36px; padding: clamp(24px, 3.4vw, 48px); }
.calc__in { background: var(--paper); display: grid; gap: 26px; }
.calc__out { background: var(--ink); color: #f5f5f7; display: grid; gap: 20px; align-content: space-between; }
.field { display: grid; gap: 10px; }
.field__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.field label { font-weight: 500; font-size: 0.98rem; }
.field__num { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 10px; background: var(--mist); font: 500 0.95rem/1 var(--mono); }
.field__num input { width: 4.2ch; border: 0; background: transparent; text-align: right; font: inherit; padding: 4px 0; -moz-appearance: textfield; appearance: textfield; }
.field__num input::-webkit-outer-spin-button, .field__num input::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--ink) var(--p, 50%), var(--line) var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 3px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9.5px; border-radius: 50%; background: #fff; border: 1.5px solid var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); transition: transform 0.2s; }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 1.5px solid var(--ink); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
.calc__sum { font: 700 clamp(3rem, 7vw, 6rem)/0.9 var(--display); letter-spacing: -0.055em; font-variant-numeric: tabular-nums; }
.calc__sum small { display: block; font: 400 1rem/1.4 var(--body); letter-spacing: 0; color: #a1a1a6; margin-top: 14px; }
.calc__math { font: 400 0.76rem/1.7 var(--mono); color: #a1a1a6; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }

/* Form */
.book { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 104px); align-items: start; }
.book__aside { display: grid; gap: 28px; position: sticky; top: 110px; }
@media (max-width: 900px) { .book { grid-template-columns: 1fr; } .book__aside { position: static; } }
.form { display: grid; gap: 22px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }
.form label, .form legend { display: block; font-weight: 500; font-size: 0.92rem; margin-bottom: 8px; padding: 0; }
.form label small { color: var(--mute); font-weight: 400; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form textarea {
  width: 100%; border: 1px solid transparent; border-radius: 16px; background: var(--mist); padding: 16px 18px; font-size: 1rem;
  transition: border-color 0.2s, background-color 0.2s;
}
.form textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.form input:hover, .form textarea:hover { background: #ededf0; }
.form input:focus, .form textarea:focus { outline: 0; background: #fff; border-color: var(--ink); }
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 600px) { .choice { grid-template-columns: 1fr; } }
.choice label { position: relative; margin: 0; cursor: pointer; display: grid; gap: 8px; padding: 20px 22px; border-radius: 22px; background: var(--mist); border: 1.5px solid transparent; transition: border-color 0.25s, background-color 0.25s, color 0.25s; }
.choice input { position: absolute; opacity: 0; }
.choice b { font: 600 1.15rem/1.2 var(--display); letter-spacing: -0.025em; }
.choice span { font-size: 0.88rem; font-weight: 400; color: var(--mute); transition: color 0.25s; }
.choice em { font: 500 0.66rem/1 var(--mono); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); transition: color 0.25s; }
.choice label:has(input:checked) { background: var(--ink); color: #fff; }
.choice label:has(input:checked) span, .choice label:has(input:checked) em { color: #c7c7cc; }
.choice label:has(input:focus-visible) { border-color: var(--river); }
.form__foot { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.form__foot small { color: var(--mute); max-width: 26em; font-size: 0.82rem; }
.form__msg { padding: 18px 20px; border-radius: 16px; background: var(--mist); font-size: 0.95rem; }
.form__msg[hidden] { display: none; }

/* Pills / small print */
.fine { font-size: 0.86rem; color: var(--sub); }
.stack { display: grid; gap: 20px; }
.stack--lg { gap: clamp(28px, 3.4vw, 48px); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; transition-delay: 0s !important; }
  .js [data-reveal], .js .line > span, .js .hero [data-load] { opacity: 1; transform: none; }
  .statement .w { opacity: 1 !important; }
  .marquee__track { animation: none; }
  .wave i { transform: scaleY(var(--h, 0.6)); }
  @view-transition { navigation: none; }
}

/* Skip link */
.sr:focus { position: fixed; top: 12px; left: 12px; z-index: 100; width: auto; height: auto; clip-path: none; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; }

/* Book page: each option shows its own panel with a button to the booking calendar */
.form__fields { display: grid; gap: 22px; }
.form__slot { display: none; gap: 20px; justify-items: start; padding: clamp(24px, 3.4vw, 44px); border-radius: 28px; background: var(--mist); }
.form:has(input[value="discovery"]:checked) .form__slot--discovery,
.form:has(input[value="diagnostic"]:checked) .form__slot--diagnostic { display: grid; animation: panel 0.6s var(--ease); }
