/* ============================================================
   ResearchReach — styles
   Art direction: editorial correspondence. Serif-led, hairline
   rules, stationery surfaces, one signature artifact (the letter).
   Tokens are fixed by the brand brief — do not add accent colors.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --navy: #013066;
  --navy-deep: #021F45;
  --teal: #02919E;
  --teal-bright: #00B4BD;
  --ink: #10243E;
  --bg: #F6FAFC;
  --paper: #FFFFFF;
  --line: #DCE6EE;

  /* type scale — perfect fourth (1.333), 17px base */
  --t-xs: 0.8125rem;   /* 13 */
  --t-0: 1.0625rem;    /* 17 */
  --t-1: 1.4375rem;    /* 23 */
  --t-2: 1.9375rem;    /* 31 */
  --t-3: 2.5625rem;    /* 41 */
  --t-4: 3.4375rem;    /* 55 */
  --t-5: 4.5625rem;    /* 73 */

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --wrap: 1140px;
  --radius: 4px;
  --shadow-paper: 0 1px 2px rgba(2, 31, 69, 0.06), 0 12px 32px rgba(2, 31, 69, 0.10);
  --shadow-lift: 0 2px 6px rgba(2, 31, 69, 0.08), 0 24px 48px rgba(2, 31, 69, 0.14);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.06 0 0 0 0 0.14 0 0 0 0 0.24 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-latin-opsz-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-latin-opsz-italic.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-opsz-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--t-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  font-optical-sizing: auto;
}

img { max-width: 100%; height: auto; }

/* covers anchor jumps AND focus-driven scrolls under the sticky header */
html { scroll-padding-top: 96px; }

h1, h2, h3, dt, dd, p, ul, ol, dl, figure { margin: 0; }

a { color: var(--navy); }

::selection { background: var(--navy); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -64px; left: 16px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--navy);
  color: var(--bg);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: var(--t-xs);
  font-weight: 600;
  transition: top 160ms ease;
}
.skip-link:focus-visible { top: 12px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

/* ---------- shared type ---------- */
.eyebrow {
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.25rem;
}
/* small + teal fails AA on light bg as *text*, but eyebrows sit at the
   start of sections beside navy headings; keep AA: darken via navy. */
.eyebrow { color: var(--navy); }
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: var(--teal);
  vertical-align: middle;
  margin-right: 0.75rem;
}
.eyebrow-dark { color: var(--teal-bright); }
.eyebrow-dark::before { background: var(--teal-bright); }

.display {
  font-family: var(--font-display);
  font-size: clamp(2.625rem, 6.4vw, var(--t-5));
  font-weight: 560;
  font-variation-settings: "opsz" 144;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--navy);
}

.h-display {
  font-family: var(--font-display);
  font-size: clamp(1.9375rem, 3.6vw, var(--t-3));
  font-weight: 540;
  font-variation-settings: "opsz" 90;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--navy);
  text-wrap: balance;
}

.voice {
  font-style: italic;
  font-weight: 480;
  color: var(--teal);
}
.voice-bright {
  font-style: italic;
  font-weight: 480;
  color: var(--teal-bright);
}

.lead {
  font-size: var(--t-1);
  line-height: 1.55;
  font-weight: 380;
  max-width: 34ch;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-height: 48px;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}
.btn-primary {
  background: var(--navy);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--navy-deep);
  box-shadow: 0 6px 18px rgba(2, 31, 69, 0.22);
  transform: translateY(-1px);
}
.btn-ghost {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-ghost:hover { background: rgba(1, 48, 102, 0.06); }
.btn-secondary {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--paper);
}
.btn-secondary:hover { background: rgba(1, 48, 102, 0.06); }
.btn-on-dark {
  background: var(--teal-bright);
  color: var(--navy-deep);
}
.btn-on-dark:hover {
  background: var(--bg);
  color: var(--navy);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}
.btn-nav {
  min-height: 44px;
  padding: 0.5rem 1.25rem;
  background: var(--navy);
  color: var(--bg);
}
.btn-nav:hover { background: var(--navy-deep); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 200ms ease;
}
.site-header.scrolled { box-shadow: 0 4px 18px rgba(2, 31, 69, 0.07); }

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { width: 170px; height: auto; }

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 0.7rem 0.8rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--teal), var(--teal));
  background-repeat: no-repeat;
  background-size: 0 1.5px;
  background-position: 0.8rem calc(100% - 0.45rem);
  transition: background-size 220ms ease;
}
.nav-links a:hover {
  background-size: calc(100% - 1.6rem) 1.5px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: clip;
  padding-block: clamp(56px, 9vh, 110px) clamp(72px, 10vh, 128px);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.hero-copy .display { margin-bottom: 1.75rem; }
.hero-copy .lead { margin-bottom: 2.25rem; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-bottom: 2.5rem;
}
.hero-guarantee {
  position: relative;
  padding-top: 1.25rem;
  font-size: 0.9375rem;
  max-width: 44ch;
  color: var(--ink);
}
.hero-guarantee::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 5.5rem;
  height: 1px;
  background: var(--teal);
}
.hero-guarantee em {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--navy);
}

.hero-constellation {
  position: absolute;
  top: -30px;
  right: -60px;
  width: clamp(280px, 38vw, 520px);
  color: var(--teal);
  opacity: 0.22;
  z-index: 0;
  pointer-events: none;
}
.hero-constellation circle { fill: currentColor; }
.hero-constellation .node-bright { fill: var(--teal-bright); }

/* --- the letter (signature artifact) --- */
.hero-letter { position: relative; }
.letter-stack {
  position: relative;
  max-width: 460px;
  margin-inline: auto;
}

.envelope {
  position: absolute;
  inset: auto -14px -34px -14px;
  height: 180px;
  background: rgba(1, 48, 102, 0.08);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transform: rotate(0.8deg);
}
.envelope::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 49.6%, rgba(1, 48, 102, 0.10) 50%) left/52% 100% no-repeat,
    linear-gradient(245deg, transparent 49.6%, rgba(1, 48, 102, 0.10) 50%) right/52% 100% no-repeat;
}

.letter {
  position: relative;
  background: var(--paper);
  background-image: var(--grain);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-paper);
  padding: clamp(22px, 3vw, 34px);
  padding-bottom: clamp(56px, 5vw, 68px);
  transform: rotate(-1.4deg);
}

.letter-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.postmark {
  color: rgba(1, 48, 102, 0.42);
  fill: currentColor;
  transform: rotate(-9deg);
  margin: -6px 0 0 -4px;
  flex: none;
}
.postmark text { fill: currentColor; font-family: var(--font-body); font-weight: 600; }

.postage {
  flex: none;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  outline: 1px dashed rgba(1, 48, 102, 0.35);
  outline-offset: 3px;
  margin: 4px 6px 0 0;
  text-align: center;
}
.postage span {
  font-size: 0.5rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  color: var(--navy);
  line-height: 1.5;
}

.letter-to {
  font-size: 0.8125rem;
  line-height: 2;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.1rem;
  margin-bottom: 1.2rem;
}

.letter-body {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 11;
  font-weight: 420;
  font-size: 0.96rem;
  line-height: 1.8;
  color: var(--ink);
}
.letter-body p + p { margin-top: 0.9rem; }
.letter-sig { font-size: 0.85rem; }
.letter-sig strong { font-weight: 620; color: var(--navy); }

/* typing: hidden only when JS+motion will animate */
.js-anim .typed { visibility: hidden; }
.js-anim .typed.typing, .js-anim .typed.done { visibility: visible; }
.typed .caret {
  display: inline-block;
  width: 1px;
  height: 1em;
  background: var(--teal);
  vertical-align: -0.15em;
  animation: caret-blink 0.85s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.redact {
  display: inline-block;
  height: 0.78em;
  vertical-align: baseline;
  transform: translateY(0.06em);
  background: var(--ink);
  border-radius: 1px;
  opacity: 0.92;
}
.w-9 { width: 9ch; } .w-10 { width: 10ch; } .w-12 { width: 12ch; } .w-14 { width: 14ch; }

.stamp {
  position: absolute;
  top: 132px;
  right: 16px;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 10px 18px 9px;
  border: 2.5px solid var(--teal);
  border-radius: 6px;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.6);
  transform: rotate(-8deg);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='120'%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0.9 0.35 0'/%3E%3C/filter%3E%3Crect width='200' height='120' filter='url(%23r)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='120'%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0.9 0.35 0'/%3E%3C/filter%3E%3Crect width='200' height='120' filter='url(%23r)'/%3E%3C/svg%3E");
}
.stamp-main {
  /* >=19px bold qualifies as large text: 3.79:1 teal passes AA at 3:1 */
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.stamp-sub {
  font-size: 0.625rem;
  font-weight: 650;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
}
.js-anim .stamp { opacity: 0; }
.stamp.stamped { animation: stamp-land 460ms cubic-bezier(0.18, 1.25, 0.4, 1) forwards; }
@keyframes stamp-land {
  0% { opacity: 0; transform: rotate(-8deg) scale(1.7); }
  62% { opacity: 1; transform: rotate(-8deg) scale(0.94); }
  80% { transform: rotate(-8.6deg) scale(1.03); }
  100% { opacity: 1; transform: rotate(-8deg) scale(1); }
}

.reply-slip {
  position: absolute;
  right: -10px;
  bottom: -44px;
  max-width: 270px;
  padding: 14px 18px;
  background: var(--paper);
  background-image: var(--grain);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  transform: rotate(1.6deg);
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "opsz" 11;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink);
}
.reply-from {
  margin-top: 6px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}
.js-anim .reply-slip { opacity: 0; transform: rotate(1.6deg) translateY(14px); }
.reply-slip.shown {
  opacity: 1;
  transform: rotate(1.6deg) translateY(0);
  transition: opacity 480ms ease, transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.letter-caption {
  margin-top: 64px;
  max-width: 460px;
  margin-inline: auto;
  text-align: right;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: rgba(16, 36, 62, 0.78);
}

/* ---------- stat ledger ---------- */
.ledger {
  border-block: 1px solid var(--line);
  background: var(--paper);
}
.ledger-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.ledger-item {
  padding: 2.25rem 2rem 2rem;
  border-left: 1px solid var(--line);
}
.ledger-item:first-child { border-left: 0; padding-left: 0; }
.ledger-item dd {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 80;
  font-size: var(--t-3);
  font-weight: 480;
  line-height: 1;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.ledger-item dt {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink);
}
.ledger-note {
  display: block;
  font-style: italic;
  font-family: var(--font-display);
  color: var(--navy);
}
/* dd above dt visually */
.ledger-item { display: flex; flex-direction: column; }
.ledger-item dd { order: -1; }

/* ---------- problem ---------- */
.problem { padding-block: clamp(80px, 12vh, 140px); }
.problem-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 96px);
}
.problem-statement { position: sticky; top: 120px; align-self: start; }
.problem-points { margin-top: 3.5rem; }
.point {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0 2.25rem;
}
.point:last-child { border-bottom: 1px solid var(--line); }
.point h3 { margin-bottom: 0.6rem; }
.point-label {
  font-size: 0.75rem;
  font-weight: 680;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--navy);
}
.point p { max-width: 54ch; }

/* ---------- engine ---------- */
.engine {
  position: relative;
  overflow: clip;
  background: var(--navy-deep);
  color: var(--bg);
  padding-block: clamp(88px, 13vh, 150px);
}
.engine-constellation {
  position: absolute;
  right: -40px;
  top: 0;
  height: 100%;
  width: auto;
  color: var(--teal);
  opacity: 0.5;
  pointer-events: none;
}
.engine-constellation circle { fill: currentColor; }
.engine-constellation .node-bright { fill: var(--teal-bright); }

.engine .wrap { position: relative; z-index: 1; }
.engine-head { max-width: 56ch; margin-bottom: 4rem; }
.engine-head .h-display { color: var(--bg); }
.engine-lede {
  margin-top: 1.25rem;
  color: rgba(246, 250, 252, 0.78);
  max-width: 52ch;
}

.routing-slip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid rgba(246, 250, 252, 0.18);
}
.routing-slip li {
  padding: 1.75rem 1.5rem 0.5rem 0;
  border-left: 1px solid rgba(246, 250, 252, 0.14);
  padding-left: 1.5rem;
}
.routing-slip li:first-child { border-left: 0; padding-left: 0; }
.step-no {
  display: block;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 60;
  font-size: var(--t-2);
  font-weight: 380;
  color: var(--teal-bright);
  line-height: 1;
  margin-bottom: 1.1rem;
}
.routing-slip h3 {
  font-family: var(--font-display);
  font-size: var(--t-1);
  font-weight: 520;
  font-variation-settings: "opsz" 40;
  color: var(--bg);
  margin-bottom: 0.5rem;
}
.routing-slip p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(246, 250, 252, 0.75);
}

.engine-lock {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(246, 250, 252, 0.18);
  font-size: var(--t-xs);
  color: rgba(246, 250, 252, 0.72);
  max-width: 64ch;
}
.engine-lock svg { flex: none; transform: translateY(1.5px); color: var(--teal-bright); }

/* ---------- proof ---------- */
.proof { padding-block: clamp(80px, 12vh, 140px); }
.proof-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.proof-head p { max-width: 40ch; }
.proof-head .h-display { margin-bottom: 1.25rem; }
.proof-caption {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: var(--t-xs);
  color: var(--ink);
  max-width: 44ch;
}

.benchmark { display: grid; gap: 1.4rem; }
.bench-row {
  display: grid;
  grid-template-columns: 9.5rem 1fr 5.5rem;
  align-items: center;
  gap: 1rem;
}
.bench-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}
.bench-track {
  height: 2.4rem;
  border-left: 1px solid var(--navy);
  background:
    linear-gradient(to right, rgba(220, 230, 238, 0.5) 1px, transparent 1px) 0 0 / 25% 100%;
}
.bench-bar {
  height: 100%;
  width: 0;
  background: rgba(1, 48, 102, 0.14);
  border-right: 2px solid rgba(1, 48, 102, 0.4);
  transition: width 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}
.bench-row:nth-child(2) .bench-bar { transition-delay: 120ms; }
.bench-row:nth-child(3) .bench-bar { transition-delay: 240ms; }
.bench-row:nth-child(4) .bench-bar { transition-delay: 380ms; }
.bench-us .bench-label { font-weight: 700; color: var(--navy); }
.bench-us .bench-bar {
  background: var(--teal);
  border-right: 2px solid var(--navy);
}
.bench-value {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 40;
  font-size: var(--t-1);
  font-weight: 480;
  color: var(--ink);
  line-height: 1.1;
}
.bench-us .bench-value { color: var(--navy); font-weight: 600; }
.bench-value em {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.625rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy); /* teal fails AA at this size on light bg */
}
/* grown state set by JS */
.benchmark.grown .bench-bar { width: var(--w); }

/* ---------- guarantee ---------- */
.guarantee { padding-block: 0 clamp(80px, 12vh, 140px); }
.certificate {
  position: relative;
  background: var(--paper);
  background-image: var(--grain);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-paper);
  padding: clamp(36px, 6vw, 72px);
}
.certificate::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  pointer-events: none;
}
.cert-head { max-width: 56ch; margin-bottom: 2.5rem; }
.cert-reason {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 30;
  font-size: var(--t-1);
  font-weight: 420;
  line-height: 1.5;
  color: var(--ink);
  max-width: 56ch;
  margin-bottom: 2.5rem;
}
.cert-terms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem 3rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.cert-terms dt {
  font-size: 0.75rem;
  font-weight: 680;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.cert-terms dd { font-size: 0.9375rem; line-height: 1.6; }

/* ---------- comparison ---------- */
.compare { padding-block: 0 clamp(80px, 12vh, 140px); }
.compare .h-display { max-width: 24ch; }
.compare-table {
  width: 100%;
  margin-top: 3rem;
  border-collapse: collapse;
}
.compare-table thead th {
  font-size: 0.75rem;
  font-weight: 680;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: left;
  padding: 0 1.25rem 0.875rem 0;
  border-bottom: 1px solid var(--navy);
}
.compare-table tbody th,
.compare-table tbody td {
  text-align: left;
  vertical-align: top;
  padding: 1.5rem 1.25rem 1.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.6;
  font-weight: 400;
}
.compare-table tbody th {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 30;
  font-size: var(--t-1);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.compare-table td[data-th="Price"] { white-space: nowrap; font-variant-numeric: tabular-nums; }
.compare-us { background: var(--paper); box-shadow: inset 3px 0 0 var(--teal); }
.compare-us th, .compare-us td { padding-left: 1.25rem; }
.compare-us tbody th { color: var(--navy); }
.compare-table .compare-us th { color: var(--navy); }
.compare-us td:last-child { font-weight: 650; color: var(--navy); }

/* ---------- pricing ---------- */
.pricing { padding-block: 0 clamp(80px, 12vh, 140px); }
.pricing .h-display { max-width: 26ch; }
.price-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 2rem;
  align-items: stretch;
  margin-top: 3rem;
}
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 44px);
}
.price-card header { margin-bottom: 1.5rem; }
.price-card h3 {
  font-family: var(--font-display);
  font-size: var(--t-1);
  font-weight: 540;
  font-variation-settings: "opsz" 40;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.price { display: flex; align-items: baseline; gap: 0.75rem; }
.price-amount {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 90;
  font-size: var(--t-4);
  font-weight: 500;
  line-height: 1;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.price-term {
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.price-flag {
  margin-top: 0.875rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--teal-bright);
}
.price-card ul {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  flex: 1;
}
.price-card li {
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}
.price-card li:last-child { border-bottom: 1px solid var(--line); }
.price-card .btn { width: 100%; }

.price-featured {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
  color: var(--bg);
  box-shadow: var(--shadow-lift);
}
.price-featured h3 { color: var(--bg); }
.price-featured .price-amount { color: var(--bg); }
.price-featured .price-term { color: rgba(246, 250, 252, 0.7); }
.price-featured li {
  border-color: rgba(246, 250, 252, 0.16);
  color: rgba(246, 250, 252, 0.88);
}
.price-featured li strong { color: var(--bg); font-weight: 650; }
.price-featured :focus-visible { outline-color: var(--teal-bright); }

.seal {
  position: absolute;
  top: -30px;
  right: clamp(16px, 4vw, 36px);
  color: var(--teal-bright);
  background: var(--navy-deep);
  border-radius: 50%;
  line-height: 0;
  transform: rotate(8deg);
}
.seal text { fill: currentColor; font-family: var(--font-body); font-weight: 650; }
.seal svg { display: block; }

.price-addon {
  margin-top: 2.25rem;
  font-size: 0.9375rem;
}
.price-addon strong { font-family: var(--font-display); font-size: var(--t-0); color: var(--navy); }
.intake-note {
  margin-top: 1.25rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  max-width: 64ch;
}
.intake-note strong { color: var(--navy); }

/* ---------- FAQ ---------- */
.faq { padding-block: 0 clamp(80px, 12vh, 140px); }
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.faq-head { position: sticky; top: 120px; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  list-style: none;
  cursor: pointer;
  padding: 1.4rem 0.25rem 1.4rem 0;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 30;
  font-size: var(--t-1);
  font-weight: 500;
  color: var(--navy);
  min-height: 48px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-marker {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}
.faq-marker::before, .faq-marker::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: var(--teal);
  transition: transform 240ms ease;
}
.faq-marker::before { width: 16px; height: 1.5px; }
.faq-marker::after { width: 1.5px; height: 16px; }
details[open] .faq-marker::after { transform: rotate(90deg); }
details[open] .faq-marker::before { transform: rotate(180deg); }
.faq-list details p {
  padding: 0 3rem 1.6rem 0;
  max-width: 62ch;
  font-size: 0.9375rem;
}

/* ---------- apply ---------- */
.apply {
  background: var(--navy);
  color: var(--bg);
  padding-block: clamp(80px, 12vh, 140px);
}
.apply-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.apply-head .eyebrow { color: var(--teal-bright); }
.apply-head .eyebrow::before { background: var(--teal-bright); }
.apply-head .h-display { color: var(--bg); }
.apply-head .voice { color: var(--teal-bright); }
.apply-head p { margin-top: 1.25rem; color: rgba(246, 250, 252, 0.82); max-width: 40ch; }

.apply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem 2rem;
  min-width: 0;
  background: var(--paper);
  background-image: var(--grain);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: clamp(28px, 4vw, 48px);
}
.field { display: flex; flex-direction: column; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label {
  font-size: 0.75rem;
  font-weight: 680;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.45rem;
}
.label-optional { font-weight: 500; letter-spacing: 0.08em; color: var(--ink); text-transform: none; }
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(1, 48, 102, 0.55);
  border-radius: 0;
  padding: 0.7rem 2px;
  min-height: 48px;
  transition: border-color 160ms ease;
}
.field textarea { min-height: 0; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(16, 36, 62, 0.66); }
.field input:hover, .field select:hover, .field textarea:hover { border-bottom-color: var(--navy); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-bottom: 2px solid var(--teal);
  padding-bottom: calc(0.7rem - 1px);
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}
.field [aria-invalid="true"] { border-bottom: 2px solid var(--navy); }
.field-error {
  display: none;
  margin-top: 0.45rem;
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--navy);
}
.field.invalid .field-error { display: block; }

.form-actions { gap: 0.875rem; }
.form-actions .btn { justify-self: start; min-width: 220px; }
.form-note { font-size: var(--t-xs); color: var(--ink); }

/* kept rendered even when empty so the live region announces reliably;
   while empty it cancels its own grid row-gap so it adds no space */
.form-status { grid-column: 1 / -1; }
.form-status:empty { margin-top: -1.5rem; }
.status-panel {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.status-panel h3 {
  font-family: var(--font-display);
  font-size: var(--t-2);
  font-weight: 520;
  color: var(--navy);
  margin-bottom: 0.6rem;
}
.status-panel p { max-width: 56ch; font-size: 0.9375rem; }
.status-error h3 { color: var(--ink); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding-block: 4rem 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
  gap: 3rem;
}
.footer-brand img { width: 150px; }
.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9375rem;
  max-width: 30ch;
}
.footer-nav { display: grid; gap: 0.35rem; align-content: start; }
.footer-nav a {
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.6rem 0;
}
.footer-nav a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.footer-fine p {
  font-size: var(--t-xs);
  line-height: 1.6;
  color: rgba(16, 36, 62, 0.78);
}
.footer-fine p + p { margin-top: 0.875rem; }

/* ============================================================
   Mobile — designed as its own composition, not shrunk.
   ============================================================ */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .hero-grid, .problem-grid, .proof-grid, .faq-grid, .apply-grid {
    grid-template-columns: 1fr;
  }
  .problem-statement, .faq-head { position: static; }
  .problem-points { margin-top: 0.5rem; }
  .routing-slip { grid-template-columns: repeat(2, 1fr); row-gap: 1.5rem; }
  .price-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .engine-constellation { opacity: 0.25; }
}

/* tablet only: odd cells of the 2-col routing slip drop their rule */
@media (min-width: 701px) and (max-width: 980px) {
  .routing-slip li:nth-child(odd) { border-left: 0; padding-left: 0; }
}

@media (max-width: 700px) {
  .nav-links { display: none; }
  .brand img { width: 140px; }

  /* the letter leads on mobile */
  .hero { padding-block: 40px 88px; }
  .hero-grid { gap: 56px; }
  .hero-letter { order: -1; }
  .letter { transform: rotate(-0.9deg); }
  .reply-slip { right: 4px; bottom: -38px; max-width: 240px; }
  .hero-constellation { display: none; }
  .display { font-size: clamp(2.375rem, 11vw, 2.625rem); }

  .ledger-row { grid-template-columns: 1fr 1fr; }
  .ledger-item { padding: 1.5rem 1.25rem; }
  .ledger-item:first-child { padding-left: 1.25rem; }
  .ledger-item:nth-child(odd) { border-left: 0; }
  .ledger-item:nth-child(n+3) { border-top: 1px solid var(--line); }

  .routing-slip { grid-template-columns: 1fr; border-top: 0; }
  .routing-slip li {
    border-left: 1px solid rgba(246, 250, 252, 0.2);
    padding: 0 0 1.75rem 1.5rem;
    position: relative;
  }
  .routing-slip li:first-child { border-left: 1px solid rgba(246, 250, 252, 0.2); padding-left: 1.5rem; }
  .step-no { margin-bottom: 0.4rem; }

  .bench-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "label value" "track track";
    gap: 0.4rem 1rem;
  }
  .bench-label { grid-area: label; text-align: left; }
  .bench-track { grid-area: track; }
  .bench-value { grid-area: value; }

  .cert-terms { grid-template-columns: 1fr; }

  /* comparison table becomes stacked cards */
  .compare-table thead { position: absolute; clip-path: inset(50%); height: 1px; width: 1px; overflow: hidden; }
  .compare-table, .compare-table tbody, .compare-table tr, .compare-table th, .compare-table td { display: block; }
  .compare-table tr {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem 1.25rem 0.5rem;
    margin-bottom: 1rem;
  }
  .compare-table tbody th, .compare-table tbody td {
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 0;
    white-space: normal;
  }
  .compare-table tbody tr > *:last-child { border-bottom: 0; }
  .compare-table tbody td::before {
    content: attr(data-th);
    display: block;
    font-size: 0.6875rem;
    font-weight: 680;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 0.25rem;
  }
  .compare-table td[data-th="Price"] { white-space: normal; }
  .compare-us { box-shadow: inset 0 3px 0 var(--teal); }
  .compare-us th, .compare-us td { padding-left: 0; }

  /* pricing: premium first */
  .price-featured { order: -1; }
  .price-grid { margin-top: 4rem; gap: 3.5rem; }
  .seal { top: -34px; }

  .apply-form { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ============================================================
   Reduced motion — everything still works, nothing performs.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .benchmark .bench-bar { width: var(--w); }
  .typed { visibility: visible !important; }
  .stamp { opacity: 1 !important; }
  .reply-slip { opacity: 1 !important; transform: rotate(1.6deg) !important; }
}
