@import url("fonts.css");

/* ------------------------------------------------------------------
   Tokens. One accent (cobalt), one neutral family, light and dark.
   Radius rule: containers 18px, interactive 10px, nothing else.
   ------------------------------------------------------------------ */
:root {
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --surface-2: #ECEEF2;
  --ink: #0E1116;
  --muted: #4F5663;
  --line: #DEE1E7;
  --accent: #2D4EDD;
  --accent-ink: #FFFFFF;
  --accent-soft: #E6EBFD;
  --line-strong: #B9BFCA;
  --bad: #B91C1C;
  --ok: #15803D;
  --shadow: 0 1px 2px rgb(20 30 70 / .05), 0 18px 48px -18px rgb(30 50 120 / .22);

  --r-box: 18px;
  --r-ctl: 10px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --nav-h: 68px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C0E12;
    --surface: #14171D;
    --surface-2: #1A1E26;
    --ink: #ECEEF2;
    --muted: #A2A9B6;
    --line: #242933;
    --accent: #7B93FF;
    --accent-ink: #0B0E18;
    --accent-soft: #1A2140;
    --line-strong: #3A4150;
    --bad: #F87171;
    --ok: #4ADE80;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 22px 56px -20px rgb(0 0 0 / .7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: var(--r-ctl); z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.ic { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }
.ic-lg { width: 28px; height: 28px; color: var(--accent); }

/* ------------------------------------------------------------------ Nav */
#top-sentinel { position: absolute; top: 0; height: 12px; width: 1px; }
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 200ms ease, border-color 200ms ease, backdrop-filter 200ms ease;
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.nav-row { 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; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px;
  background: var(--ink); color: var(--bg);
  border-radius: var(--r-ctl);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em;
}
.nav-links { display: flex; gap: 28px; margin-left: auto; margin-right: 8px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 0.95rem; transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { color: var(--ink); } }

/* -------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px;
  border-radius: var(--r-ctl);
  font: inherit; font-weight: 600; font-size: 1rem; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 0.95rem; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 1.0625rem; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn .ic { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
  .btn-primary:hover .ic { transform: translateX(3px); }
  .btn-ghost:hover { border-color: var(--ink); }
}

/* ----------------------------------------------------------------- Hero */
.hero { padding: clamp(28px, 5vw, 56px) 0 clamp(48px, 7vw, 88px); overflow-x: clip; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  min-height: min(600px, calc(100dvh - var(--nav-h) - 24px));
}
h1 {
  font-size: clamp(2.4rem, 3.95vw, 3.7rem);
  line-height: 1.04;
  letter-spacing: -0.042em;
  font-weight: 600;
  text-wrap: balance;
  max-width: 14.5em;
}
.lede { margin-top: 24px; font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 34em; line-height: 1.55; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero-visual { display: grid; margin-right: calc(var(--gutter) * -1); }
.shot {
  grid-area: 1 / 1; width: 78%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 500ms var(--ease-out);
  will-change: transform;
}
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.shot-bar {
  height: 32px; display: flex; align-items: center; padding: 0 14px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.72rem; color: var(--muted);
}
.shot-a { z-index: 1; }
.shot-b { z-index: 2; margin: 27% 0 0 13%; }
.shot-c { z-index: 3; margin: 54% 0 0 22%; }

/* ---------------------------------------------------------------- Proof */
.proof { border-block: 1px solid var(--line); background: var(--surface); }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding-block: 0; }
.proof-grid > div { padding: 40px 32px 40px 0; }
.proof-grid > div + div { padding-left: 32px; border-left: 1px solid var(--line); }
.proof-big { font-size: clamp(2.6rem, 5vw, 3.75rem); line-height: 1; font-weight: 600; letter-spacing: -0.045em; color: var(--accent); }
.proof-text { margin-top: 14px; color: var(--muted); max-width: 22em; font-size: 1rem; }
.proof-text strong { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------- Sections */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-title { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.08; letter-spacing: -0.035em; font-weight: 600; text-wrap: balance; max-width: 18em; }
.section-sub { margin-top: 16px; color: var(--muted); max-width: 38em; font-size: 1.125rem; }
.eyebrow {
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
}

/* ---------------------------------------------------------------- Bento */
.bento {
  margin-top: 56px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas:
    "idea idea idea idea chat chat chat chat chat chat chat chat"
    "idea idea idea idea pay pay pay pay data data data data";
}
.cell {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 20px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-box);
}
.cell h3 { font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; }
.cell p { color: var(--muted); font-size: 1rem; }
.cell-text { display: grid; gap: 12px; align-content: start; }
.cell-img {
  margin-top: auto;
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left;
  border: 1px solid var(--line); border-radius: 12px;
}
.cell-idea { grid-area: idea; background: var(--accent); border-color: transparent; justify-content: space-between; min-height: 420px; }
.cell-idea h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.08; letter-spacing: -0.035em; color: var(--accent-ink); max-width: 9em; }
.cell-idea p { color: color-mix(in srgb, var(--accent-ink) 82%, transparent); font-size: 1.1rem; max-width: 24em; }
.cell-idea .ic-lg { color: var(--accent-ink); width: 40px; height: 40px; }
.cell-chat { grid-area: chat; }
.cell-pay { grid-area: pay; }
.cell-data { grid-area: data; background: var(--surface-2); }
.cell-chat { flex-direction: row; align-items: stretch; gap: 28px; }
.cell-chat .cell-text { flex: 0 0 42%; }
.cell-chat .cell-img { flex: 1 1 0; min-width: 0; width: auto; margin: 0; align-self: stretch; aspect-ratio: auto; object-fit: cover; object-position: left top; }

/* ----------------------------------------------------------------- Work */
.work { background: var(--surface); border-block: 1px solid var(--line); }
.stack { margin-top: 56px; display: grid; gap: 28px; }
.project {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: clamp(24px, 3.5vw, 44px);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-box);
}
.project-flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.project-flip .project-copy { order: 2; }
.project-flip .project-shot { order: 1; }
.project h3 { font-size: clamp(1.7rem, 2.6vw, 2.25rem); letter-spacing: -0.035em; line-height: 1.1; font-weight: 600; }
.project-lead { margin-top: 14px; font-size: 1.125rem; color: var(--ink); }
.project-built { margin-top: 14px; color: var(--muted); }
.project-built strong { color: var(--ink); font-weight: 600; }
.chips { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.78rem;
  padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface);
}
.project-links { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; text-decoration: none; color: var(--accent);
  padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: border-color 160ms ease;
}
.link .ic { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .link:hover { border-color: var(--accent); }
  .link:hover .ic { transform: translate(2px, -2px); }
}
.project-shot {
  display: block; overflow: hidden; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-box); box-shadow: var(--shadow);
  transition: transform 300ms var(--ease-out);
}
.project-shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
@media (hover: hover) and (pointer: fine) { .project-shot:hover { transform: translateY(-4px); } }

/* Cards pin as they arrive, then recede under the next one. Pure CSS. */
@media (min-width: 1000px) {
  .stack { gap: 0; }
  .project { position: sticky; top: calc(var(--nav-h) + 20px); margin-bottom: 40px; transform-origin: 50% 0; }
  .project:nth-child(2) { top: calc(var(--nav-h) + 36px); }
  .project:nth-child(3) { top: calc(var(--nav-h) + 52px); }
  .project:nth-child(4) { top: calc(var(--nav-h) + 68px); margin-bottom: 0; }
}
@supports (animation-timeline: view()) {
  @media (min-width: 1000px) and (prefers-reduced-motion: no-preference) {
    .project:not(:last-child) {
      animation: recede linear both;
      animation-timeline: view();
      animation-range: exit-crossing 0% exit-crossing 100%;
    }
    @keyframes recede { to { transform: scale(0.965); opacity: .72; } }
  }
}

/* -------------------------------------------------------------- Process */
.process-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
.process-head { align-self: start; position: sticky; top: calc(var(--nav-h) + 32px); }
.note {
  margin-top: 28px; padding: 18px 20px; font-size: 0.98rem; color: var(--muted);
  background: var(--accent-soft); border-radius: var(--r-box);
}
.steps { display: grid; gap: 0; }
.steps li { padding: 28px 0 32px; }
.steps li + li { border-top: 1px solid var(--line); }
.steps h3 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); letter-spacing: -0.035em; line-height: 1.1; font-weight: 600; }
.steps p { margin-top: 10px; color: var(--muted); max-width: 32em; font-size: 1.1rem; }

/* ------------------------------------------------------------ Technical */
.tech { background: var(--surface); border-block: 1px solid var(--line); }
.tech-grid { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.tech-stack { padding: 28px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-box); }
.tech-stack dl { display: grid; gap: 20px; }
.tech-stack dt { font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tech-stack dd { margin-top: 4px; font-size: 1.05rem; font-weight: 500; }
.principles { display: grid; gap: 28px; }
.principles li { display: grid; grid-template-columns: 28px 1fr; gap: 18px; }
.principles h3 { font-size: 1.15rem; letter-spacing: -0.015em; line-height: 1.3; font-weight: 600; }
.principles p { margin-top: 6px; color: var(--muted); }

/* ------------------------------------------------------------------ CTA */
.cta { padding: clamp(80px, 11vw, 144px) 0; }
.cta-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 40px; align-items: end; }
.cta-title { font-size: clamp(2.2rem, 5vw, 4.25rem); line-height: 1.03; letter-spacing: -0.042em; font-weight: 600; text-wrap: balance; max-width: 13em; }
.cta-actions { display: grid; gap: 16px; justify-items: start; }
.cta-mail { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }

/* --------------------------------------------------------------- Footer */
.footer { border-top: 1px solid var(--line); padding: 56px 0 28px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: 40px; }
.footer-note { margin-top: 12px; color: var(--muted); }
.footer h3 { font-size: 0.8rem; font-family: "Geist Mono", ui-monospace, monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
.footer li + li { margin-top: 8px; }
.footer li a { text-decoration: none; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .footer li a:hover { color: var(--accent); } }
.footer-base { margin-top: 48px; color: var(--muted); font-size: 0.9rem; }

/* --------------------------------------------------------------- Motion */
/* Hero entrance: one staggered pass, fades up with a short blur that hides the handoff. */
@media (prefers-reduced-motion: no-preference) {
  .reveal-hero {
    animation: rise 700ms var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 90ms + 60ms);
  }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: blur(0); } }

  /* Scroll reveals: transitions (interruptible), toggled once by IntersectionObserver. */
  .js .reveal { opacity: 0; transform: translateY(12px); filter: blur(3px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out), filter 600ms var(--ease-out); transition-delay: var(--d, 0ms); }
  .js .reveal.in { opacity: 1; transform: none; filter: none; }
}


/* Stagger delays as attributes, so the page needs no inline styles (strict CSP). */
.reveal-hero[data-i="0"] { --i: 0; }
.reveal-hero[data-i="1"] { --i: 1; }
.reveal-hero[data-i="2"] { --i: 2; }
.reveal[data-d="60"] { --d: 60ms; }
.reveal[data-d="70"] { --d: 70ms; }
.reveal[data-d="100"] { --d: 100ms; }
.reveal[data-d="120"] { --d: 120ms; }
.reveal[data-d="140"] { --d: 140ms; }
.reveal[data-d="180"] { --d: 180ms; }

/* ----------------------------------------------------------- Responsive */
@media (max-width: 1000px) {
  .project, .project-flip { grid-template-columns: 1fr; }
  .project-flip .project-copy, .project-flip .project-shot { order: 0; }
}
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-row { justify-content: space-between; }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-visual { margin-right: 0; max-width: 640px; }
  h1 { max-width: 16em; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "idea idea" "chat chat" "pay data"; }
  .cell-idea { min-height: 300px; }
  .process-grid, .tech-grid, .cta-grid { grid-template-columns: 1fr; }
  .process-head { position: static; }
}
@media (max-width: 720px) {
  body { font-size: 1rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .shot { width: 80%; }
  .shot-b { margin: 28% 0 0 10%; }
  .shot-c { margin: 56% 0 0 20%; }
  .proof-grid { grid-template-columns: 1fr; }
  .proof-grid > div { padding: 28px 0; }
  .proof-grid > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .bento { grid-template-columns: 1fr; grid-template-areas: "idea" "chat" "pay" "data"; }
  .cell-chat { flex-direction: column; }
  .cell-chat .cell-text { flex: none; }
  .cell-chat .cell-img { width: 100%; aspect-ratio: 16 / 10; align-self: auto; margin-top: auto; }
  .project, .project-flip { grid-template-columns: 1fr; }
  .project-flip .project-copy, .project-flip .project-shot { order: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .btn-lg { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shot, .project-shot, .btn, .btn .ic, .link .ic { transition: none; }
}

/* ---------------------------------------------------------------- /start/ */
/* Spacing scale used here: 4 8 12 16 20 24 32 40. Containers 18px radius, controls 10px. */
.page-start .nav { position: static; }
.back { color: var(--muted); text-decoration: none; font-size: .95rem; transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .back:hover { color: var(--ink); } }
.start { padding: clamp(28px, 5vw, 72px) 0 clamp(56px, 8vw, 112px); }
.start-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }

/* Left column */
.start-intro { position: sticky; top: 32px; }
.start-intro h1 { font-size: clamp(2rem, 3.6vw, 3.1rem); max-width: 11em; margin: 0; }
.start-intro .lede { margin-top: 16px; font-size: 1.1rem; max-width: 28em; }
.next-list { margin: 40px 0 0; padding: 0; list-style: none; display: grid; gap: 24px; }
.next-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start; }
.next-list b { display: block; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.next-list span:not(.tile) { display: block; color: var(--muted); font-size: .95rem; margin-top: 2px; }
.tile { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: var(--r-ctl); background: var(--accent-soft); color: var(--accent); }
.tile .ic { width: 22px; height: 22px; }
.fine { margin: 40px 0 0; display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: .92rem; max-width: 30em; }
.fine .ic { width: 20px; height: 20px; margin-top: 2px; color: var(--accent); }
.alt { margin: 16px 0 0; color: var(--muted); font-size: .95rem; }
.alt a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }

/* The card */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-box); box-shadow: var(--shadow); overflow: hidden; }
.cardtop { padding: 24px 32px 0; }
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.progress i { height: 4px; border-radius: 2px; background: var(--line); transition: background-color 240ms var(--ease-out); }
.progress i.on { background: var(--accent); }
.cardhead { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; min-height: 32px; }
.stepcount { margin: 0; color: var(--muted); font-size: .9rem; }
.backbtn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted); font: inherit; font-size: .92rem; padding: 8px 10px; margin: -8px -10px; border-radius: var(--r-ctl); cursor: pointer; transition: color 150ms ease, background-color 150ms ease; }
.backbtn[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) { .backbtn:hover { color: var(--ink); background: var(--soft, var(--bg)); } }
.cardbody { padding: 24px 32px 32px; display: flex; flex-direction: column; min-height: 572px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.step { display: none; }
.step.is-active { display: flex; flex-direction: column; flex: 1; }
@media (prefers-reduced-motion: no-preference) {
  .step.is-active { animation: stepin 220ms var(--ease-out) both; }
  @keyframes stepin { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
}
legend { padding: 0; width: 100%; float: left; }
legend + * { clear: both; }
.q { font-size: clamp(1.45rem, 2.2vw, 1.75rem); line-height: 1.2; letter-spacing: -.03em; font-weight: 600; margin: 0; outline: none; }
.qsub { margin: 8px 0 24px; color: var(--muted); font-size: .98rem; max-width: 34em; }

/* Step 1: choice rows */
.choices { display: grid; gap: 10px; }
.choice { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 24px; gap: 16px; align-items: center; min-height: 72px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); cursor: pointer; transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, transform 160ms var(--ease-out); }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ctext { display: block; min-width: 0; }
.ct { display: block; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.cs { display: block; margin-top: 2px; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.radio { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); color: var(--accent-ink); transition: background-color 160ms ease, border-color 160ms ease; }
.radio .ic { width: 13px; height: 13px; opacity: 0; transform: scale(.5); transition: opacity 140ms ease, transform 180ms var(--ease-out); }
.choice:active { transform: scale(.985); }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.choice:has(input:checked) .radio { background: var(--accent); border-color: var(--accent); }
.choice:has(input:checked) .radio .ic { opacity: 1; transform: none; }
.choice:has(input:checked) .tile { background: var(--surface); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .choice:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); } }

/* Fields */
.field { display: grid; gap: 8px; }
.field + .field { margin-top: 20px; }
.lab { display: block; font-weight: 600; font-size: .95rem; }
input[type="text"], input[type="email"], input[type="tel"], textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); padding: 14px 16px; min-height: 52px; transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }
textarea { resize: vertical; min-height: 176px; line-height: 1.55; }
::placeholder { color: color-mix(in srgb, var(--muted) 78%, transparent); opacity: 1; }
input:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
[aria-invalid="true"] { border-color: var(--bad); }
.err { color: var(--bad); font-size: .92rem; margin: 0; }
.err:empty { display: none; }
.err[data-err="kind"] { margin-top: 12px; }
.err a { color: inherit; font-weight: 600; }
.form-err { margin-top: 16px; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* Actions pinned to the bottom of the card, so the button never moves between steps */
.actions { margin-top: auto; padding-top: 28px; display: grid; gap: 16px; }
.actions .btn { width: 100%; height: 54px; font-size: 1.05rem; }
.btn[disabled] { opacity: .7; cursor: progress; }
.privacy { margin: 0; display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: .88rem; }
.privacy .ic { width: 16px; height: 16px; margin-top: 2px; flex: none; }

/* Confirmation: the page stops being a form and becomes a receipt */
.start.is-done .start-intro { display: none; }
.start.is-done .start-grid { grid-template-columns: minmax(0, 680px); justify-content: center; }
.done { padding: 40px 32px 32px; }
.okmark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: 20px; }
.okmark .ic { width: 30px; height: 30px; }
.done .q { font-size: clamp(1.7rem, 3vw, 2.1rem); }
.done-lede { margin: 12px 0 0; color: var(--muted); }
.done-lede strong { color: var(--ink); font-weight: 600; }
.summary { margin: 16px 0 0; }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .85rem; font-weight: 600; }
.extras { margin-top: 32px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-box); background: var(--bg); }
.extras h3 { margin: 0; font-size: 1.1rem; letter-spacing: -.015em; font-weight: 600; }
.extras .qsub { margin: 4px 0 20px; }
.pills { margin: 0 0 20px; display: grid; gap: 8px; }
.pills-3 { grid-template-columns: repeat(3, 1fr); }
.pills-budget { grid-template-columns: repeat(6, 1fr); }
.pills-budget label:nth-of-type(-n+3) { grid-column: span 2; }
.pills-budget label:nth-of-type(n+4) { grid-column: span 3; }
.pills legend { grid-column: 1 / -1; float: none; width: auto; font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
.pills label { position: relative; display: block; }
.pills input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pills span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 46px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); font-size: .93rem; line-height: 1.25; transition: border-color 160ms ease, background-color 160ms ease, transform 160ms var(--ease-out); }
.pills label:active span { transform: scale(.97); }
.pills label:has(input:checked) span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; box-shadow: 0 0 0 1px var(--accent); }
.pills label:has(input:focus-visible) span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .pills label:hover span { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); } }
.extras-actions { margin-top: 24px; display: flex; gap: 10px; justify-content: flex-end; }
.extras-actions .btn { height: 48px; }
.saved { display: flex; align-items: center; gap: 10px; margin: 32px 0 0; padding: 16px 20px; border-radius: var(--r-box); background: var(--accent-soft); color: var(--ink); font-weight: 600; outline: none; }
.saved .ic { width: 22px; height: 22px; color: var(--accent); }
.saved[hidden] { display: none; }
.after { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; }
.after .btn { height: 46px; padding: 0 18px; font-size: .95rem; }
.thanks { padding-block: clamp(48px, 10vw, 120px); }
.thanks h1 { margin-bottom: 14px; }
.thanks .next { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; }

@media (max-width: 900px) {
  /* On a phone the question comes straight after the headline; the reassurance sits under the form. */
  .start-grid { grid-template-columns: 1fr; gap: 24px; }
  .start-intro { display: contents; position: static; }
  .start-intro h1 { order: 1; max-width: 14em; }
  .start-intro .lede { order: 2; margin-top: 0; }
  .form-card { order: 3; }
  .start-intro .next-list { order: 4; margin-top: 16px; }
  .start-intro .fine { order: 5; margin-top: 8px; }
  .start-intro .alt { order: 6; margin-top: 0; }
  .cardbody { min-height: 0; }
  .start.is-done .start-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cardtop { padding: 20px 20px 0; }
  .cardbody { padding: 20px 20px 24px; }
  .done { padding: 28px 20px 24px; }
  .choice { grid-template-columns: 40px minmax(0, 1fr) 22px; gap: 12px; padding: 12px; }
  .tile { width: 40px; height: 40px; }
  .pills-3 { grid-template-columns: 1fr; }
  .pills-budget { grid-template-columns: 1fr 1fr; }
  .pills-budget label:nth-of-type(n) { grid-column: auto; }
  .pills-budget label:nth-of-type(5) { grid-column: 1 / -1; }
  .extras { padding: 20px 16px; }
  .extras-actions { flex-direction: column-reverse; }
  .extras-actions .btn { width: 100%; }
  .after .btn { flex: 1 1 100%; }
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
