/* ============================================================
   The Pauls Organization — styles.css
   Foundation: tokens, reset, typography, layout, nav, hero shell
   ============================================================ */

/* ---- Design tokens ---------------------------------------- */
:root {
  /* palette */
  --paper: #f4f1ea;
  --panel: #efebe2;
  --ink: #14120f;
  --ink-2: #2c2822;
  --ink-soft: #4a4640;
  --accent: #e8481f;   /* coral */
  --teal: #1f6b63;
  --muted: #8d877a;
  --muted-strong: #6f6a5f;
  --faint: #b3ac9e;
  --line: #ded8cb;
  --line-2: #e3ddd0;
  --border-soft: #c4bdad;

  /* type */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Archivo', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* scale */
  --maxw: 1200px;
  --pad-x: 32px;
  --nav-h: 64px;
}

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---- Typography ------------------------------------------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.02; letter-spacing: -0.02em; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.mono { font-family: var(--font-mono); }

/* ---- Layout ----------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.section { padding-block: 96px; scroll-margin-top: calc(var(--nav-h) + 8px); }

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 13px 20px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ---- Nav -------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.brand__mark { width: 22px; height: 22px; flex: none; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-strong);
  transition: color 0.15s ease;
}
.nav__link:hover { color: var(--ink); }

/* ---- Hero shell (canvas added in Step 2) ------------------ */
.hero { padding-block: 72px 88px; }
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero__h1 {
  font-size: clamp(40px, 5.4vw, 68px);
  margin-top: 18px;
}
.hero__sub {
  margin-top: 22px;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 18px;
}
.hero__cta {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.hero__note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.hero__canvas-slot {
  aspect-ratio: 5 / 4;
  border: 1px solid var(--ink);
  background: var(--panel);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Hero network builder (Step 2) ------------------------ */
/* .hero__canvas replaces .hero__canvas-slot once hero.js mounts. */
.hero__canvas { min-width: 0; }
.nb { display: flex; flex-direction: column; gap: 14px; }

.nb__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.nb__title { font-size: 22px; letter-spacing: -0.015em; }
.nb__cue {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.nb__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.nb__types, .nb__acts { display: flex; gap: 6px; flex-wrap: wrap; }
.nb__t, .nb__b {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 7px 10px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--muted-strong);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.nb__t:hover, .nb__b:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.nb__t.is-on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.nb__t span { margin-right: 6px; opacity: 0.5; }
.nb__b--go { border-color: var(--accent); color: var(--accent); }
.nb__b--go:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.nb__b:disabled { opacity: 0.4; cursor: default; }

.nb__plane { border: 1px solid var(--ink); background: var(--panel); line-height: 0; }
.nb__canvas { width: 100%; touch-action: none; }
.nb__canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* hero.js sets .is-pointer on the last-input-was-mouse case, so the focus
   frame stays for keyboard users and stays out of the way while dragging */
.nb.is-pointer .nb__canvas:focus,
.nb.is-pointer .nb__canvas:focus-visible { outline: none; }

/* Height is reserved for the longest Optimize banner. The hero grid is
   centre-aligned, so a flash line that grew on demand would shift the
   plane out from under the cursor mid-drag. */
.nb__flash {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.65;
  min-height: 4.95em;
  color: var(--ink-soft);
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}

.nb__cap {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted-strong);
}
.nb__cap a { color: var(--ink); border-bottom: 1px solid var(--accent); }

.nb__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
}
.nb__stat { padding: 9px 10px; border-right: 1px solid var(--line); }
.nb__stat:last-child { border-right: 0; }
.nb__k {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.nb__v {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  margin-top: 3px;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .nb__stats { grid-template-columns: repeat(2, 1fr); }
  .nb__stat:nth-child(2) { border-right: 0; }
  .nb__stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ---- Marquee band (Step 3) -------------------------------- */
.marquee {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  border-block: 1px solid var(--ink);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 46s linear infinite;
}
.marquee__group {
  display: flex;
  align-items: center;
  flex: none;
  list-style: none;
  padding: 0;
}
.marquee__item {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-block: 15px;
}
.marquee__item::after {
  content: '\25C6';
  color: var(--accent);
  font-size: 8px;
  margin-inline: 26px;
}
/* two identical groups, so -50% is exactly one group wide */
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ---- Services (Step 3) ------------------------------------ */
.services__h { font-size: clamp(32px, 4vw, 48px); margin-top: 16px; }
.services__lead {
  margin-top: 18px;
  max-width: 54ch;
  color: var(--ink-soft);
  font-size: 18px;
}
.svc {
  list-style: none;
  padding: 0;
  margin-top: 52px;
  border-top: 1px solid var(--ink);
}
.svc__item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(220px, 29%);
  gap: 28px;
  align-items: start;
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + 16px);
  transition: background 0.15s ease;
}
.svc__item:last-child { border-bottom-color: var(--ink); }
.svc__item:target { background: var(--panel); }
.svc__num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent);
  padding-top: 5px;
}
.svc__h { font-size: 24px; }
.svc__p { margin-top: 10px; max-width: 50ch; color: var(--ink-soft); }
.svc__deliv { padding-top: 4px; }
.svc__deliv-k {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.svc__deliv-v {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* ---- The math (Step 4) — the one section on a dark band ---- */
.math {
  /* band-local tokens. Scoped to .math so no other section inherits
     them: hero, services, assessment and footer stay on paper. */
  --band-ink: #f4f1ea;
  --band-rule: rgba(244, 241, 234, 0.14);
  --band-rule-strong: rgba(244, 241, 234, 0.34);
  --band-muted: rgba(244, 241, 234, 0.54);
  --band-wash: rgba(244, 241, 234, 0.05);
  background: #14120f;
  color: var(--band-ink);
}
.math__h { font-size: clamp(32px, 4vw, 48px); margin-top: 16px; max-width: 20ch; }
.math__lead {
  margin-top: 18px;
  max-width: 58ch;
  color: var(--band-muted);
  font-size: 18px;
}
.math__table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 44px;
  text-align: left;
}
.math__table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--band-muted);
  padding: 0 20px 12px;
  border-bottom: 1px solid var(--band-rule-strong);
}
.math__table thead th:first-child { width: 36%; padding-left: 0; }
.math__table thead th.math__col--pick { color: var(--accent); }
.math__table tbody th {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  color: var(--band-ink);
  padding: 20px 20px 20px 0;
  border-bottom: 1px solid var(--band-rule);
  vertical-align: top;
}
.math__cell {
  padding: 20px;
  border-bottom: 1px solid var(--band-rule);
  vertical-align: top;
}
.math__table tbody tr:last-child th,
.math__table tbody tr:last-child .math__cell { border-bottom-color: var(--band-rule-strong); }
.math__cell--pick { background: var(--band-wash); }
.math__v {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--band-ink);
}
/* the hire column is the option you are not taking */
.math__cell--hire .math__v {
  color: var(--band-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.math__row--cost .math__v { font-size: 21px; }
.math__k { display: none; }   /* card label, mobile only */
.math__foot {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.math__note {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--band-muted);
  max-width: 42ch;
}
/* the default ink button would disappear into the band */
.math .btn {
  background: var(--band-ink);
  border-color: var(--band-ink);
  color: #14120f;
}
.math .btn:hover { background: transparent; color: var(--band-ink); }

/* ---- Assessment: survey + quote (Step 5) ------------------ */
.assess__h { font-size: clamp(32px, 4vw, 48px); margin-top: 16px; }
.assess__lead {
  margin-top: 18px;
  max-width: 56ch;
  color: var(--ink-soft);
  font-size: 18px;
}

.qz {
  margin-top: 40px;
  max-width: 720px;
  border: 1px solid var(--ink);
  background: var(--panel);
  padding: 26px 28px 30px;
}
.qz:empty { display: none; }
.qz__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.qz__step {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.qz__back {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-strong);
  background: none;
  border: 0;
  padding: 4px 0;
}
.qz__back:hover { color: var(--ink); }
.qz__bar { height: 2px; background: var(--line); margin-top: 14px; }
.qz__fill { height: 2px; background: var(--accent); transition: width 0.2s ease; }
.qz__q {
  font-size: clamp(21px, 2.6vw, 27px);
  margin-top: 22px;
  max-width: 26ch;
}
.qz__q:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.qz__opts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 22px;
}
.qz__o {
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.3;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.qz__o:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.qz__o.is-on { border-color: var(--ink); }

/* ---- the number ------------------------------------------- */
.qt__rung {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 24px;
}
.qt__rung:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.qt__price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(52px, 9vw, 88px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-top: 8px;
}
.qt__per { font-size: 0.32em; letter-spacing: 0; color: var(--muted-strong); margin-left: 4px; }
.qt__note {
  margin-top: 16px;
  max-width: 52ch;
  color: var(--ink-soft);
}
.qt__edge {
  margin-top: 14px;
  max-width: 52ch;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}
.qt__k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 26px;
}
.qt__deliv {
  list-style: none;
  padding: 0;
  margin-top: 10px;
  border-top: 1px solid var(--line);
}
.qt__deliv li {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.qt__basis {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 16px;
}
.qt__actions { margin-top: 22px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- contact form ----------------------------------------- */
.cform {
  margin-top: 28px;
  max-width: 720px;
  border: 1px solid var(--line);
  padding: 26px 28px 30px;
}
/* survey.js adds .is-managed on boot and .is-open after the number,
   so the form is never a gate — and without JS it is simply always on */
.cform.is-managed { display: none; }
.cform.is-managed.is-open { display: block; }
.cform__h { font-size: 22px; }
.cform__h:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.cform__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.fld { display: block; }
.fld__k {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
  padding: 0;
}
.fld__i {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--border-soft);
  padding: 11px 12px;
}
.fld__i:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-color: var(--ink); }
.fset { border: 0; padding: 0; margin-top: 20px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { position: relative; }
.chip input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  margin: 0;
  cursor: pointer;
}
.chip span {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 13px;
  border: 1px solid var(--border-soft);
  color: var(--muted-strong);
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.chip:hover span { border-color: var(--ink); color: var(--ink); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.cform__send { margin-top: 24px; }
.cform__privacy {
  margin-top: 18px;
  max-width: 52ch;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted-strong);
}
.cform__alt {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.cform__alt a { color: var(--ink); border-bottom: 1px solid var(--accent); }

/* ---- Footer (Step 6) -------------------------------------- */
.foot {
  border-top: 1px solid var(--ink);
  padding-block: 56px 0;
  margin-top: 24px;
}
.foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.foot__line {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted-strong);
}
.foot__mail {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
}
.foot__mail:hover { color: var(--accent); }
.foot__k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot__list { list-style: none; padding: 0; margin-top: 12px; }
.foot__list li { margin-top: 8px; }
.foot__list a {
  font-size: 15px;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}
.foot__list a:hover { color: var(--ink); }
.foot__fine {
  margin-top: 48px;
  padding-block: 20px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---- Field notes (Step 6) --------------------------------- */
.fn__h1 { font-size: clamp(44px, 7vw, 96px); margin-top: 16px; }
.fn__lead {
  margin-top: 22px;
  max-width: 52ch;
  font-size: 19px;
  color: var(--ink-soft);
}
.fn__stamp {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.note {
  margin-top: 64px;
  padding-top: 34px;
  border-top: 1px solid var(--ink);
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.note__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.note__num { color: var(--accent); margin-right: 10px; }
.note__h {
  font-size: clamp(27px, 3.4vw, 40px);
  margin-top: 14px;
  max-width: 24ch;
}
.note__lead {
  margin-top: 22px;
  max-width: 62ch;
  font-size: 19px;
  line-height: 1.6;
  border-left: 2px solid var(--accent);
  padding-left: 18px;
}
.note__body { margin-top: 26px; max-width: 66ch; }
.note__body p { margin-top: 16px; color: var(--ink-soft); }
.note__rel { margin-top: 26px; }
.note__rel a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
}
.note__rel a:hover { color: var(--accent); }

/* ---- Thanks page ------------------------------------------ */
.thanks { padding-block: 120px 140px; }
.thanks__h { font-size: clamp(48px, 8vw, 92px); margin-top: 16px; }
.thanks__p {
  margin-top: 22px;
  max-width: 46ch;
  font-size: 20px;
  color: var(--ink-soft);
}
.thanks__p a { border-bottom: 1px solid var(--accent); color: var(--ink); }
.thanks__note {
  margin-top: 16px;
  max-width: 50ch;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted-strong);
}
.thanks__back { margin-top: 32px; }

/* ---- Accessibility ---------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Responsive: tablet ----------------------------------- */
@media (max-width: 900px) {
  /* Single column: no order override, so the grid follows DOM order and the
     copy block leads. The canvas falls in below the CTA. */
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 760px) {
  .svc__item { grid-template-columns: 1fr; gap: 12px; padding-block: 24px; }
  .svc__num { padding-top: 0; }
  .svc__deliv { padding-top: 6px; border-left: 2px solid var(--line); padding-left: 12px; }
}

/* ---- Responsive: mobile ----------------------------------- */
@media (max-width: 640px) {
  :root { --pad-x: 20px; }
  .section { padding-block: 56px; }
  .nav__inner { flex-wrap: wrap; gap: 14px; min-height: 0; padding-block: 12px; }
  .nav__links { gap: 18px; flex-wrap: wrap; }
  .hero { padding-block: 40px 56px; }
  .hero__h1 { font-size: clamp(34px, 9vw, 46px); }
  .marquee__item { font-size: 11px; padding-block: 13px; }
  .marquee__item::after { margin-inline: 18px; }
  .svc__h { font-size: 21px; }

  .qz, .cform { padding: 20px 18px 24px; }
  .qz__opts { grid-template-columns: 1fr; }
  .cform__grid { grid-template-columns: 1fr; }
  .chips { display: grid; grid-template-columns: 1fr; }

  .foot__grid { grid-template-columns: 1fr; gap: 32px; }
  .foot__fine { flex-direction: column; gap: 6px; }
  .note { margin-top: 46px; }
  .note__lead { font-size: 17px; padding-left: 14px; }
  .thanks { padding-block: 72px 88px; }

  /* The comparison stops being a table and becomes one labelled card per
     row. Shrinking three columns into 360px would make it unreadable. */
  .math__table,
  .math__table tbody,
  .math__table tbody tr,
  .math__table tbody th { display: block; width: 100%; }
  .math__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .math__table { margin-top: 32px; }
  .math__table tbody tr {
    border: 1px solid var(--band-rule-strong);
    padding: 16px 16px 18px;
    margin-bottom: 14px;
  }
  .math__table tbody th {
    font-size: 16px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--band-rule);
  }
  /* Same specificity as the display:block rule above, and later, so the
     value sits on the label's line rather than under it. */
  .math__table .math__cell {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 11px 0 0;
    border-bottom: 0;
    background: transparent;
  }
  .math__table tbody tr:last-child th { border-bottom-color: var(--band-rule); }
  .math__table tbody tr:last-child .math__cell { border-bottom: 0; }
  .math__k {
    display: block;
    flex: none;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--band-muted);
  }
  .math__cell--pick .math__k { color: var(--accent); }
  .math__v { text-align: right; }
  .math__row--cost .math__v { font-size: 17px; }
}

/* ---- Reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }

  /* The rule above only shortens the marquee loop — it would still cycle,
     just faster. Drop the animation outright and lay the band out static.
     Items also have to give up nowrap: with nothing scrolling, a line wider
     than the viewport would just be clipped by the band's overflow. */
  .marquee__track { animation-name: none; width: 100%; }
  .marquee__group { flex-wrap: wrap; justify-content: center; width: 100%; padding-inline: var(--pad-x); }
  .marquee__group[aria-hidden="true"] { display: none; }
  .marquee__item {
    display: block;
    white-space: normal;
    text-align: center;
    max-width: 100%;
    padding-block: 9px;
  }
  .marquee__item:last-child::after { content: none; }
}
