/* Upshift Sales, Version A. Tokens and rules from ../DESIGN.md. Components use tokens only. */

@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-italic-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- 1. Tokens ---------- */
:root {
  --bg:      #E2D3BE;
  --surface: #EFE6D9;
  --ink:     #1E1F22;
  --muted:   #5A5249;
  --accent:  #E8742A;
  --accent-ink: #B4561C;
  --detail:  #B9A588;
  --focus:   #1E1F22;
  --on-accent: #1E1F22;           /* carbon text on orange, every chapter */

  --font-display: "Archivo", "Arial Black", "Helvetica Neue", sans-serif;
  --font-text: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --text: clamp(1rem, 0.92rem + 0.4vw, 1.125rem);
  --lede: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  --h1: clamp(2.5rem, 1.4rem + 5vw, 4.5rem);
  --h2: clamp(2rem, 1.2rem + 3vw, 3.25rem);
  --h3: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);

  --gutter: clamp(16px, 5vw, 64px);
  --col-gap: clamp(16px, 2vw, 32px);
  --pad: clamp(64px, 8vw, 128px);
  --slant: clamp(24px, 5vw, 80px);  /* the "upshift" lean on carbon chapter seams */
  --nav-h: 64px;

  --r-control: 8px;
  --r-card: 16px;
  --r-media: 24px;
  --r-pill: 9999px;

  --shadow-2: 0 1px 2px rgba(30, 31, 34, .06), 0 12px 32px rgba(30, 31, 34, .08);
  --render-hi: #FBE4CA;           /* the 3D renders' own backdrop: light top-left... */
  --render-lo: #997E68;           /* ...to warm shadow. Only for still panels (DESIGN.md §4). */
  --rise: clamp(24px, 3vw, 48px); /* how much each How-it-works card climbs */
  --rail: 14px;                   /* connector line offset from the cards it joins */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94); /* power2.out */
}
.chapter-dark {
  --bg:      #1E1F22;
  --surface: #28292D;
  --ink:     #EFE6D9;
  --muted:   #B3AA9C;
  --accent:  #E8742A;
  --accent-ink: #E8742A;
  --detail:  #3A3B40;
  --focus:   #EFE6D9;
}
@media (min-width: 1024px) {
  :root { --nav-h: 72px; }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--text);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { display: block; overflow-x: clip; }
main:focus { outline: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; }
ul, ol { margin: 0; padding: 0; }
[role="list"] { list-style: none; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 8px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus-visible { transform: none; }

.shell {
  width: 100%;
  max-width: calc(1200px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 3. Type ---------- */
.eyebrow {
  font-family: var(--font-text);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}

/* Display: Archivo 900 italic, 118% wide. Lines are set by hand (br.bd desktop, br.bm phone/tablet)
   and the size is fitted to the container so no line wraps: --fd / --fm = widest line in em. */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-stretch: 118%;
  letter-spacing: -0.03em;
  line-height: 0.95;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
}
.fitbox { container-type: inline-size; }
h2.display { font-size: var(--h2); font-size: min(var(--h2), calc(100cqi / var(--fm))); }
.hero__claim { font-size: var(--h1); font-size: min(var(--h1), calc(100cqi / var(--fm))); }

@media (max-width: 1023.98px) { br.bd { display: none; } }
@media (min-width: 1024px) {
  br.bm { display: none; }
  h2.display { font-size: min(var(--h2), calc(100cqi / var(--fd))); }
  .hero__claim { font-size: min(var(--h1), calc(100cqi / var(--fd))); }
}

/* ---------- 4. Controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 28px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-text);
  font-size: var(--lede);
  font-weight: 500;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out), border-color .3s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn--primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, white);
  border-color: color-mix(in srgb, var(--accent) 86%, white);
}
.btn--primary:active {
  background: color-mix(in srgb, var(--accent) 92%, var(--on-accent));
  border-color: color-mix(in srgb, var(--accent) 92%, var(--on-accent));
}
.btn[aria-disabled="true"], .btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Nav CTA: outlined while another orange button is on screen, filled when none is (main.js). */
.btn--nav {
  min-height: 44px;
  padding: 8px 20px;
  font-size: 0.9375rem;
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn--nav:hover { background: var(--ink); color: var(--bg); }
.btn--nav:active { background: var(--muted); border-color: var(--muted); color: var(--bg); }
.btn--nav.is-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--nav.is-primary:hover { background: color-mix(in srgb, var(--accent) 86%, white); border-color: color-mix(in srgb, var(--accent) 86%, white); }

.link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color .3s var(--ease-out);
}
.link:hover { text-decoration-color: currentColor; }
.link:active { color: var(--muted); }

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--lg { width: 32px; height: 32px; stroke-width: 1.5; }

/* Visible placeholders: anything still waiting on Dayton. */
.ph {
  border: 1px dashed var(--muted);
  border-radius: var(--r-card);
  padding: 16px 20px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.ph::before {
  content: "Placeholder";
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ph-inline {
  padding: 0 3px;
  border-bottom: 1px dashed currentColor;
  border-radius: 3px;
  background: color-mix(in srgb, currentColor 10%, transparent);
}
[data-placeholder] { text-decoration-style: dashed; }

/* ---------- 5. Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease-out);
}
.nav.is-scrolled { border-bottom-color: var(--detail); }
.nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--nav-h);
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: var(--r-control);
}
.nav__logo img { width: 158px; height: 28px; }
.nav__links { display: none; }
@media (min-width: 768px) {
  .nav__links { display: flex; align-items: center; gap: 28px; }
}

/* ---------- 6. Sections ---------- */
.section { position: relative; padding-block: var(--pad); }
.section-head { margin-bottom: clamp(32px, 4vw, 64px); }
.section-cta { margin-top: 48px; }

/* 1. Hero */
.hero { padding-block: clamp(24px, 4vw, 56px) clamp(48px, 6vw, 96px); }
.hero__grid { display: grid; gap: 24px; }
.hero__claim { display: block; padding-right: 0.08em; }
.hero__kicker {
  display: block;
  margin-top: clamp(12px, 1.6vw, 24px);
  font-size: var(--lede);
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}
.hero__sub {
  max-width: 46ch;
  font-size: var(--lede);
  line-height: 1.5;
  color: var(--muted);
}
/* Who it's for: one small muted line between the sub and the button. */
.hero__audience {
  max-width: 46ch;
  margin-top: 16px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--muted);
}
.hero__action { margin-top: 24px; display: grid; justify-items: start; gap: 12px; }
.hero__note { max-width: 46ch; font-size: 0.9375rem; line-height: 1.45; color: var(--muted); }
.hero__media { margin: 16px 0 0; }
.render {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1600 / 905;
  border: 1px solid var(--detail);
  border-radius: var(--r-media);
  background: var(--bg);
  box-shadow: var(--shadow-2);
}
.render img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 74% 82% at 50% 46%, black 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 74% 82% at 50% 46%, black 50%, transparent 100%);
}
@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    row-gap: clamp(32px, 3.5vw, 48px);
  }
  .hero__head { grid-column: 1 / -1; }
  .hero__copy { grid-column: 1 / span 5; align-self: start; padding-top: 4px; }
  .hero__media { grid-column: 6 / -1; margin: 0; }
}

/* 2. What changes: count-up stats row */
.changes { padding-block: 0 var(--pad); }
.stats {
  display: grid;
  margin-top: 8px;
  border-top: 1px solid var(--detail);
}
.stat {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--detail);
}
.stat__num {
  font-size: clamp(3rem, 2rem + 2.4vw, 4.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat__text { max-width: 34ch; }
.stat__icon { color: var(--ink); }
.ph--block { margin-top: 24px; }
@media (min-width: 768px) and (max-width: 1023.98px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 32px 32px 32px 0; }
  .stat:nth-child(even) { padding-left: 32px; border-left: 1px solid var(--detail); }
}
@media (min-width: 1024px) {
  .stats { grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); }
  .stat { padding: 32px 24px 32px 0; }
  .stat + .stat { padding-left: 24px; border-left: 1px solid var(--detail); }
}

/* Carbon chapters: backdrop rises in with a top edge that leans up to the right. */
.chapter {
  position: relative;
  isolation: isolate;
  color: var(--ink);
  padding-block: calc(var(--pad) + var(--slant)) var(--pad);
}
.chapter__bg {
  --x: 0px;
  --tilt: var(--slant);
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg);
  clip-path: polygon(var(--x) var(--tilt), calc(100% - var(--x)) 0, calc(100% - var(--x)) 100%, var(--x) 100%);
}

/* 3. See it respond: iMessage-style thread. Rep replies get a typing indicator first (motion move 7). */
.respond__grid { display: grid; gap: 32px; }
.respond__aside { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.respond__aside .still { align-self: stretch; }
.respond__note { max-width: 36ch; color: var(--muted); }
@media (min-width: 1024px) {
  .respond__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .respond__aside { grid-column: 1 / span 4; grid-row: 1; }
  .respond__aside .still { margin-bottom: auto; }
  .thread { grid-column: 6 / -1; grid-row: 1; }
}

.thread {
  margin: 0;
  padding: clamp(16px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--detail);
  border-radius: var(--r-media);
}
.thread__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--detail);
}
.thread__who { display: flex; align-items: center; gap: 12px; }
.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--detail);
  background: var(--bg);
  font-weight: 500;
}
.thread__name { font-weight: 500; line-height: 1.2; }
.thread__meta { font-size: 0.875rem; color: var(--muted); line-height: 1.3; }
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--detail);
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 480px) { .stamp { white-space: nowrap; } }
.stamp__dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }

.thread__msgs { display: grid; gap: 16px; padding: 24px 0 4px; }
.msg { display: flex; }
.msg--rep { justify-content: flex-end; }
/* Old left-hand time stamps: the copy agent is removing them. Kept readable for screen readers until then. */
.msg__t {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.msg__body { display: grid; gap: 6px; max-width: min(30rem, 86%); }
.msg--rep .msg__body { justify-items: end; }
.msg__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-inline: 12px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.tag {
  padding: 1px 7px;
  border: 1px solid var(--muted);
  border-radius: var(--r-pill);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.msg__stack { position: relative; display: grid; justify-items: inherit; }
.bubble {
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.msg--lead .bubble {
  background: var(--bg);
  border: 1px solid var(--detail);
  border-bottom-left-radius: 6px;
}
.msg--rep .bubble {
  background: var(--ink);
  color: var(--bg);
  border-bottom-right-radius: 6px;
}
/* Typing indicator: only exists while motion is allowed; main.js shows it before each rep bubble. */
.typing { display: none; }
.motion .typing {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 15px 16px;
  border-radius: 20px 20px 6px 20px;
  background: var(--ink);
  opacity: 0;
}
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg);
  opacity: .45;
}
.typing.is-on i { animation: typing-dot .9s ease-in-out infinite; }
.typing.is-on i:nth-child(2) { animation-delay: .15s; }
.typing.is-on i:nth-child(3) { animation-delay: .3s; }
@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-3px); opacity: 1; }
}
.booked {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px auto 0;
  padding: 10px 16px;
  border: 1px solid var(--detail);
  border-radius: var(--r-pill);
  font-size: 0.9375rem;
  font-weight: 500;
  width: fit-content;
  max-width: 100%;
}

/* 4. The leak */
.leak .section-head { margin-bottom: clamp(32px, 4vw, 48px); }
.statement .k { color: var(--accent-ink); }
.leak__body { max-width: 52ch; font-size: var(--lede); color: var(--muted); }
/* One attributed statistic: a quiet source line under a hairline. */
.source-line { margin: 32px 0 0; max-width: 52ch; }
.source-line__stat { font-weight: 500; }
.source {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--detail);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted);
}
@media (min-width: 1024px) {
  .leak__body, .source-line { margin-left: calc((100% + var(--col-gap)) * 5 / 12); }
}

/* Spec-sheet keys (01 / 02 / 03), from Version 3: small numerals and a short hairline. */
.step__n, .key {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.step__n::after, .key::after {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--detail);
}

/* 5. How it works: three cards that climb like the mark's bars (tops rise, bottoms flush).
   A connector line joins them (motion move 8 draws it: --draw on each rail, --draw-v on each riser). */
.steps { display: grid; gap: 16px; }
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(24px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--detail);
  border-radius: var(--r-card);
}
.step__n { margin-bottom: auto; padding-bottom: 32px; }
.step__title { font-size: var(--h3); font-weight: 500; line-height: 1.15; }
.step p { color: var(--muted); max-width: 40ch; }
.step::before, .step::after { content: ""; position: absolute; background: var(--muted); pointer-events: none; }

/* Phone: a vertical rail down the left, a node at each key. */
@media (max-width: 767.98px) {
  .steps { padding-left: 20px; }
  .step::before {
    left: calc(-1 * var(--rail) - 7px);
    top: calc(clamp(24px, 3vw, 32px) + 0.5em);
    width: 1px;
    height: calc(100% + 16px);
    transform-origin: top;
    transform: scaleY(var(--draw, 1));
  }
  .step:last-child::before { display: none; }
  .step::after {
    left: calc(-1 * var(--rail) - 10px);
    top: calc(clamp(24px, 3vw, 32px) + 0.5em - 3px);
    width: 7px;
    height: 7px;
    border-radius: 50%;
  }
}
/* Tablet and up: the line runs just above each card and steps up in the gaps. */
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); align-items: stretch; }
  .step:nth-child(1) { margin-top: calc(2 * var(--rise)); }
  .step:nth-child(2) { margin-top: var(--rise); }
  .step::before {
    top: calc(-1 * var(--rail));
    left: 0;
    right: calc(-0.5 * var(--col-gap));
    height: 1px;
    transform-origin: left;
    transform: scaleX(var(--draw, 1));
  }
  .step + .step::before { left: calc(-0.5 * var(--col-gap)); }
  .step:last-child::before { right: 0; }
  .step::after {
    top: calc(-1 * var(--rail) - var(--rise));
    right: calc(-0.5 * var(--col-gap));
    width: 1px;
    height: calc(var(--rise) + 1px);
    transform-origin: bottom;
    transform: scaleY(var(--draw-v, 1));
  }
  .step:last-child::after { display: none; }
}

.how__foot { display: grid; gap: 48px; margin-top: 48px; }
.how__foot .section-cta { margin-top: 0; }
@media (min-width: 1024px) {
  .how__foot { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
  .how__foot .section-cta { grid-column: 1 / span 5; }
  .how__foot .still { grid-column: 7 / -1; }
}

/* 6. The team: a seven-stage map, then "The team / You" expanding cards. */
.stages {
  --gap: 16px;
  display: grid;
  gap: var(--gap);
  margin-bottom: clamp(48px, 6vw, 96px);
}
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--detail);
  border-radius: var(--r-card);
  transition: transform .3s var(--ease-out), background-color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.stage__icon { width: 24px; height: 24px; margin-bottom: 12px; color: var(--ink); }
.stage__name {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.stage__job { font-size: 0.9375rem; line-height: 1.45; color: var(--muted); }
/* Move 4: lift 4px. Light chapters add the level-2 shadow; carbon chapters only lighten the surface. */
.stage:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}
.chapter-dark .stage:hover {
  box-shadow: none;
  background: color-mix(in srgb, var(--surface) 88%, var(--ink));
}
/* The connecting hairline: one segment per card (motion move 8 draws them in order via --draw). */
.stage::before, .stage::after { content: ""; position: absolute; background: var(--muted); pointer-events: none; }
.stage::after { width: 7px; height: 7px; border-radius: 50%; }

@media (max-width: 767.98px) {
  .stages { padding-left: 20px; }
  .stage::before {
    left: calc(-1 * var(--rail) - 7px);
    top: 32px;
    width: 1px;
    height: calc(100% + var(--gap));
    transform-origin: top;
    transform: scaleY(var(--draw, 1));
  }
  .stage:last-child::before { display: none; }
  .stage::after { left: calc(-1 * var(--rail) - 10px); top: 29px; }
}
@media (min-width: 768px) {
  .stages { row-gap: 40px; }
  .stage::before {
    top: calc(-1 * var(--rail));
    left: 0;
    right: calc(-1 * var(--gap));
    height: 1px;
    transform-origin: left;
    transform: scaleX(var(--draw, 1));
  }
  .stage:last-child::before { right: 0; }
  .stage::after { top: calc(-1 * var(--rail) - 3px); left: 0; }
}
/* 768: three per row, the last card ("Back again") runs the full row. */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stage:nth-child(3n)::before { right: 0; }
  .stage:last-child { grid-column: 1 / -1; }
}
/* 1024: four, then three. */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .stages { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stage:nth-child(4n)::before { right: 0; }
}
/* Desktop: all seven in one row. */
@media (min-width: 1280px) {
  .stages { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .stage { padding: 18px 16px 20px; }
}

/* "The team / You": flex:1 -> flex:3 on hover or keyboard focus (fine pointers, desktop only; equal elsewhere). */
.split { display: flex; flex-direction: column; gap: 16px; }
.split__card {
  flex: 1 1 0;
  min-width: 0;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--detail);
  border-radius: var(--r-card);
  transition: flex-grow .5s var(--ease-out), background-color .3s var(--ease-out), border-color .3s var(--ease-out);
}
.split__card--team { background: var(--surface); }
.split__title { font-size: var(--h3); font-weight: 500; line-height: 1.15; margin-bottom: 16px; }
.split__card:hover { border-color: var(--muted); }
@media (min-width: 768px) {
  .split { flex-direction: row; gap: var(--col-gap); }
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .split__card:hover, .split__card:focus-visible { flex-grow: 3; }
}
.checks li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--detail);
}
.checks .icon { margin-top: 3px; }
.checks--you li { color: var(--ink); }

/* 7. Who's behind it */
.who__grid { display: grid; gap: 32px; }
.photo-slot {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 440px;
  margin: 0;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--detail);
  border-radius: var(--r-media);
}
.photo-slot img { width: 22%; height: auto; }
.ph--slot {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  font-size: 0.8125rem;
  padding: 12px 14px;
}
.who__body p { max-width: 52ch; font-size: var(--lede); }
.pullquote {
  margin: 0 0 24px;
  padding-top: 20px;
  border-top: 1px solid var(--detail);
}
.who__body .pullquote p {
  max-width: 22ch;
  font-size: var(--h3);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}
@media (min-width: 768px) {
  .who__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .photo-slot { grid-column: 1 / span 5; max-width: none; }
  .who__body { grid-column: 7 / -1; align-self: end; }
}

/* 8. Terms made plain: 01 / 02 / 03 keys. */
.terms__list { border-top: 1px solid var(--detail); }
.terms__list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--detail);
}
.terms__list .key { padding-top: 0.45em; }
.terms__list p { max-width: 52ch; font-size: var(--lede); }
@media (max-width: 767.98px) { .terms__list .key::after { display: none; } }
@media (min-width: 1024px) {
  .terms__list li { grid-template-columns: calc((100% - 11 * var(--col-gap)) / 12 * 5 + 4 * var(--col-gap)) minmax(0, 1fr); column-gap: var(--col-gap); }
}

/* 9. FAQ: bordered question cards (they settle in once), answers open smoothly, a booking nudge closes the list. */
.faq__list { display: grid; gap: 12px; }
@media (min-width: 1024px) {
  .faq__list { margin-left: calc((100% + var(--col-gap)) * 5 / 12); }
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--detail);
  border-radius: var(--r-card);
  transition: border-color .3s var(--ease-out);
}
.faq details:hover, .faq details[open] { border-color: var(--muted); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 44px;
  padding: 16px 16px 16px 20px;
  font-size: var(--lede);
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
  border-radius: var(--r-card);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover > span:first-child { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.faq summary:active { color: var(--muted); }
.faq__icon {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--detail);
  border-radius: 50%;
  transition: transform .3s var(--ease-out), border-color .3s var(--ease-out);
}
.faq__icon::before, .faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  background: var(--ink);
  transform: translate(-50%, -50%);
}
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: opacity .3s var(--ease-out); }
.faq details[open] .faq__icon { border-color: var(--ink); transform: rotate(180deg); }
.faq details[open] .faq__icon::after { opacity: 0; }
.faq details p { max-width: 62ch; padding: 0 68px 20px 20px; color: var(--muted); }
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size .4s var(--ease-out), content-visibility .4s allow-discrete;
  }
  .faq details[open]::details-content { block-size: auto; }
}
.faq__nudge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 12px;
  padding: 20px;
  border-top: 1px solid var(--detail);
}
.faq__nudge-text { font-size: var(--lede); font-weight: 500; }
@media (max-width: 479.98px) { .faq details p { padding-right: 20px; } }

/* 10. Final CTA: headline and action on the left, the gear-pair still on the right. */
.final { padding-top: 0; }
.final__panel {
  display: grid;
  gap: 32px;
  padding: clamp(24px, 6vw, 80px);
  background: var(--surface);
  border: 1px solid var(--detail);
  border-radius: var(--r-media);
}
.final__main { display: grid; gap: 32px; align-content: space-between; }
.final__head .display { margin: 0; }
.final__action { display: grid; justify-items: start; gap: 24px; }
.final__sub { max-width: 40ch; font-size: var(--lede); color: var(--muted); }
@media (min-width: 1024px) {
  .final__panel { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 48px; }
  .final .still__panel { height: 100%; min-height: 320px; aspect-ratio: auto; }
}

/* 11. Footer: bold-footer treatment, the flat wordmark at full shell width (never the 3D render). */
.footer { border-top: 1px solid var(--detail); padding-block: 48px 32px; }
.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 48px;
}
.footer__name { font-weight: 500; line-height: 1.2; }
.footer__tag { font-size: 0.9375rem; color: var(--muted); }
.footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; }
.footer__links li { display: flex; align-items: center; min-height: 44px; }
.footer__wordmark { width: 100%; height: auto; margin-top: clamp(48px, 8vw, 112px); }
.footer__copy {
  margin-top: clamp(16px, 2vw, 24px);
  padding-top: 16px;
  border-top: 1px solid var(--detail);
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- 3D stills: abstract renders in a rounded panel that fades their backdrop into the chapter --bg ---------- */
.still { margin: 0; }
.still__panel {
  --still-mid: color-mix(in srgb, var(--render-hi) 35%, var(--bg));
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--detail);
  border-radius: var(--r-media);
  background: radial-gradient(ellipse 90% 90% at 34% 30%, var(--render-hi) 0%, var(--still-mid) 58%, var(--bg) 100%);
}
.chapter-dark .still__panel { --still-mid: color-mix(in srgb, var(--render-lo) 55%, var(--bg)); }
.still__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 78% 84% at 50% 48%, black 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 78% 84% at 50% 48%, black 55%, transparent 100%);
}
.ph--still { position: relative; max-width: 30ch; margin: 16px; background: var(--surface); }
@media (min-width: 1024px) { .still--portrait .still__panel { aspect-ratio: 4 / 5; } }
.still--band { margin-top: clamp(48px, 6vw, 96px); }
@media (min-width: 768px) { .still--band .still__panel { aspect-ratio: 16 / 7; } }
.still--nested .still__panel { border-radius: var(--r-card); }

/* ---------- 7. Motion start states (only when JS + motion allowed; main.js animates to final) ---------- */
.motion [data-settle] { opacity: 0; transform: translateY(16px); }
.motion .hero__media { opacity: 0; transform: translateY(24px) scale(.97); }
.motion .statement .w { opacity: .16; }
.motion .statement .k { color: var(--ink); }
.motion .thread .msg, .motion .thread .booked { opacity: 0; transform: translateY(8px); }
.motion .thread .msg--rep .bubble { opacity: 0; }
.motion .step, .motion .stage { --draw: 0; --draw-v: 0; }
.motion .faq details, .motion .faq__nudge { opacity: 0; transform: translateY(12px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .motion [data-settle], .motion .hero__media, .motion .statement .w,
  .motion .thread .msg, .motion .thread .booked, .motion .thread .msg--rep .bubble,
  .motion .faq details, .motion .faq__nudge { opacity: 1; transform: none; }
  .motion .statement .k { color: var(--accent-ink); }
  .motion .step, .motion .stage { --draw: 1; --draw-v: 1; }
  .motion .typing { display: none; }
  .stage:hover { transform: none; }
}

/* ---------- Legal pages (privacy, terms) ---------- */
.legal { padding-top: var(--pad); }
.legal__shell { max-width: calc(760px + 2 * var(--gutter)); }
.legal__shell { container-type: inline-size; }
.legal__title { margin-top: 12px; font-size: min(var(--h2), calc(100cqi / var(--fm))); }
@media (min-width: 768px) { .legal__title { font-size: min(var(--h2), calc(100cqi / var(--fd))); } }
.legal__meta { margin-top: 16px; color: var(--muted); font-size: 0.9375rem; }
.legal__body { margin-top: 40px; display: grid; gap: 16px; max-width: 68ch; }
.legal__body h2 { margin-top: 24px; font-size: var(--h3); font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); font-weight: 600; }
.legal__body ul { padding-left: 1.2em; display: grid; gap: 8px; }
.legal__body strong { font-weight: 600; }
