/* ============================================================
   AmountGuard — design system
   Palette: US flag — navy #0A3161 · red #B31942 · white
   (redesign 2026-08-25; logo being updated to match)
   ============================================================ */

:root {
  /* colour tokens */
  --paper: #FBFCFE;
  --paper-2: #F3F6FA;
  --surface-cool: #ECF1F7;
  --card: #FFFFFF;
  --ink: #0F2440;
  --ink-2: #3B5372;
  --ink-3: #5E6F87;
  --brand: #B31942;
  --brand-deep: #0A3161;
  --brand-dark: #071F3D;
  --brand-wash: #E9EFF7;
  --red: #B31942;
  --red-wash: #F9E9EE;
  --blue: #1D6FE0;
  --line: #E2E7EE;
  --line-2: #CDD6E1;

  /* type */
  --font-display: "Schibsted Grotesk", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;

  /* layout */
  --container: 1200px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --header-h: 76px;

  /* sequence progress variables (driven by js/sequence.js) */
  --seq-p: 0;
  --s1: 0; --s2: 0; --s3: 0; --s4: 0;
  --s5: 0; --s6: 0; --s7: 0; --s8: 0;
  --conv-p: 0;
}

/* ---------- reset / base ---------- */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.155rem;            /* ≈18.5px desktop body */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

/* grid/flex children must be allowed to shrink below min-content */
.hero-grid > *, .two-col > *, .conv-grid > *, .seq-inner > *,
.cap-item > *, .step > *, .footer-grid > *, .aud-grid > *,
.form-grid > *, .check-grid > *, .seqm-item > * { min-width: 0; }

/* wide evidence tables scroll inside their card, never the page */
.seqm-visual { overflow-x: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.7rem, 6.2vw, 5.2rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 3.1rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.65rem); }

p { margin: 0 0 1.1em; max-width: 62ch; }

a { color: inherit; }

.num, .tnum {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

::selection { background: var(--brand-wash); color: var(--ink); }

/* visible focus */
:focus-visible {
  outline: 2px solid var(--brand-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -3.5rem;
  z-index: 300;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1.1rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: top 160ms ease;
}
.skip-link:focus { top: 1rem; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.eyebrow {
  display: inline-block;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 1.1rem;
}

.lede {
  font-size: clamp(1.2rem, 1.6vw, 1.36rem);
  color: var(--ink-2);
  line-height: 1.6;
}

.section {
  padding-block: clamp(4.5rem, 9vw, 8.5rem);
}
.section--tight { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section--cool { background: var(--surface-cool); }
.section--paper2 { background: var(--paper-2); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.2rem, 4vw, 3.6rem); }

.demo-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  background: var(--card);
}
.demo-tag::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1;
  padding: 1rem 1.7rem;
  border-radius: 6px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease, transform 200ms ease;
  min-height: 48px;
}

.btn--primary {
  background: var(--ink);
  color: #fff;
}
.btn--primary:hover { background: #164A80; }
.btn--primary:active { transform: translateY(1px); }

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn--secondary:hover { border-color: var(--ink); }

.btn--brand {
  background: transparent;
  color: var(--brand-deep);
  border-color: var(--brand-deep);
}
.btn--brand:hover { background: var(--brand-wash); }

.btn .arrow { transition: transform 200ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 260ms ease, box-shadow 260ms ease;
}
.site-header.is-solid {
  background: rgba(251, 252, 254, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex-shrink: 0;
  padding-block: 0.4rem;
}
.brand img { height: 44px; width: auto; }
.brand .brand-shield { height: 52px; width: auto; }
/* the wordmark PNG carries ~13px of transparent padding, so its box is
   taller than the letters — this height renders the text at ~24px */
.brand .brand-word { height: 30px; width: auto; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand-name .g { color: var(--brand); }

.main-nav { display: flex; align-items: center; gap: 0.4rem; }
.main-nav a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.55rem 0.85rem;
  border-radius: 5px;
  transition: color 180ms ease, background 180ms ease;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--ink); background: var(--paper-2); }
.main-nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--brand);
  border-radius: 5px 5px 0 0;
}

.header-cta { flex-shrink: 0; }
.header-cta .btn { padding: 0.72rem 1.25rem; font-size: 0.95rem; min-height: 42px; }

.menu-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--line-2);
  border-radius: 6px;
  width: 46px; height: 46px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
}
.menu-toggle svg { width: 22px; height: 22px; }

/* mobile menu sheet */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: var(--paper);
  display: none;
  flex-direction: column;
  padding: 1.2rem var(--pad) 2.5rem;
  overflow-y: auto;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.2rem;
}
.mobile-menu nav { display: flex; flex-direction: column; gap: 0.2rem; }
.mobile-menu nav a {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  padding: 0.75rem 0.2rem;
  border-bottom: 1px solid var(--line);
}
.mobile-menu nav a[aria-current="page"] { color: var(--brand-deep); }
.mobile-menu .btn { margin-top: 2rem; }
.mobile-menu .menu-category {
  margin-top: auto;
  padding-top: 2.5rem;
  color: var(--ink-3);
  font-size: 0.95rem;
}

@media (max-width: 1080px) {
  .main-nav, .header-cta { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  background: #0A3161;
  color: #E9EAEB;
  padding-block: clamp(3.2rem, 6vw, 4.8rem) 2rem;
  margin-top: 0;
}
.site-footer::before {
  /* flag stripe across the top */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--brand) 0 33.4%,
    #FFFFFF 33.4% 66.7%,
    #5E93D8 66.7% 100%
  );
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-bottom-right {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
}
.footer-top-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #C9CDD1;
  font-size: 0.92rem;
  text-decoration: none;
}
.footer-top-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-logo { display: flex; align-items: center; gap: 0.65rem; }
.footer-logo img { height: 42px; width: 42px; }
.brand-name--dark { color: #fff; font-size: 1.35rem; }
.brand-name--dark .g { color: var(--brand); }
.footer-tagline {
  margin: 0.9rem 0 0.6rem;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.footer-brand p { color: #B9BEC3; font-size: 1rem; margin: 0; max-width: 34ch; }
.footer-col h4 {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col a { color: #D4D7DA; text-decoration: none; font-size: 1rem; }
.footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.92rem;
  color: #A7ADB3;
}
.footer-bottom a { color: #C9CDD1; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom-right { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

/* ---------- intro overlay ---------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.4rem;
}
.intro-line {
  width: 0;
  height: 2px;
  background: var(--brand);
  animation: introLine 520ms cubic-bezier(0.6, 0, 0.2, 1) forwards;
}
/* Reaches full opacity by ~620ms and is then held (see the dismiss timer in
   main.js) so the wordmark and tagline are actually readable. */
.intro-logo {
  opacity: 0;
  animation: introLogo 360ms ease 260ms forwards;
}
.intro-logo img {
  height: clamp(150px, 24vh, 215px);
  width: auto;
  max-width: 82vw;
  object-fit: contain;
}
.intro.is-done { animation: introOut 420ms ease forwards; }

@keyframes introLine { to { width: min(320px, 60vw); } }
@keyframes introLogo { to { opacity: 1; } }
@keyframes introOut { to { opacity: 0; visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
}

/* ---------- hero ---------- */

.hero {
  /* the hero owns the whole first screen — no second section peeking in */
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 1.5rem);
  padding-bottom: clamp(4.5rem, 8vh, 7rem);
  position: relative;
  overflow: clip;
}
.hero > .container { width: 100%; }
.hero-grid {
  display: grid;
  /* the left column is wide enough to keep the headline at three lines */
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 { margin-bottom: 0.45em; }
.hero .lede { margin-bottom: 2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2.4rem; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 2.2rem;
}
.hero-meta p { margin: 0; }
.hero-tagline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-deep);
}
.hero-tagline span { color: var(--brand); }

.hero-category {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink-2);
}
.hero-category::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--brand);
}

/* hero verification object */
.hero-object {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
}
.ho-stack {
  position: relative;
  width: min(400px, 88%);
  transform-style: preserve-3d;
  transition: transform 600ms cubic-bezier(0.2, 0.6, 0.2, 1);
}
.ho-page {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(24, 29, 34, 0.09);
  padding: 1.5rem 1.6rem;
}
.ho-page--behind {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.ho-page--b1 { transform: translate(16px, -14px) rotate(1.4deg); opacity: 0.75; }
.ho-page--b2 { transform: translate(32px, -28px) rotate(2.8deg); opacity: 0.45; }
.ho-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.ho-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--paper-2);
  font-size: 0.98rem;
}
.ho-row .k { color: var(--ink-2); }
.ho-row .v { font-weight: 600; }
.ho-row--flag .v { color: var(--red); }
.ho-row--ok .v { color: var(--brand-deep); }
.ho-verify {
  margin-top: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.ho-verify .amount {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
}
.ho-seal {
  border: 2px solid var(--brand-deep);
  color: var(--brand-deep);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 0.45rem 0.7rem;
  transform: rotate(-4deg);
  white-space: nowrap;
}
.ho-scanline {
  position: absolute;
  left: -6%;
  right: -6%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand) 22%, var(--brand) 78%, transparent);
  top: 30%;
  opacity: 0.9;
  animation: scan 5.2s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes scan {
  from { top: 22%; }
  to { top: 74%; }
}
@media (prefers-reduced-motion: reduce) {
  .ho-scanline { animation: none; top: 40%; }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-object { min-height: 0; margin-top: 1rem; }
}

/* ---------- evidence convergence (problem section) ---------- */

.convergence { position: relative; }
.conv-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.conv-sources {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-left: 1.6rem;
}
.conv-spine {
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line-2);
  overflow: hidden;
  border-radius: 2px;
}
.conv-spine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand);
  transform-origin: top;
  transform: scaleY(var(--conv-p));
}
.evidence-chip {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.95rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  box-shadow: 0 6px 18px rgba(24,29,34,0.05);
  /* scattered → aligned, driven by --conv-p */
  transform:
    translateX(calc((1 - var(--conv-p)) * var(--scatter-x, 40px)))
    translateY(calc((1 - var(--conv-p)) * var(--scatter-y, 0px)))
    rotate(calc((1 - var(--conv-p)) * var(--scatter-r, 2deg)));
  opacity: calc(0.45 + var(--conv-p) * 0.55);
}
.evidence-chip .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--brand-deep);
  flex-shrink: 0;
  background: color-mix(in srgb, var(--brand-deep) calc(var(--conv-p) * 100%), transparent);
}
.evidence-chip .t { font-weight: 600; font-size: 1.02rem; }
.evidence-chip .d { color: var(--ink-3); font-size: 0.9rem; }

@media (max-width: 900px) {
  .conv-grid { grid-template-columns: 1fr; }
  /* no scatter on narrow screens — chips align immediately */
  .evidence-chip { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .evidence-chip { transform: none; opacity: 1; }
  .conv-spine::after { transform: scaleY(1); }
}

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal--d1 { transition-delay: 90ms; }
.reveal--d2 { transition-delay: 180ms; }
.reveal--d3 { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- capabilities (editorial sequence) ---------- */

.cap-list { display: flex; flex-direction: column; }
.cap-item {
  display: grid;
  grid-template-columns: 90px minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.2rem, 3vw, 2.6rem);
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
  border-top: 1px solid var(--line);
  align-items: center;
}
.cap-item:last-child { border-bottom: 1px solid var(--line); }
.cap-num {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.cap-item h3 { margin-bottom: 0.35em; }
.cap-item p { margin: 0; color: var(--ink-2); font-size: 1.05rem; }
.cap-proof {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.8rem;
  justify-self: stretch;
}
.cap-proof .num { font-weight: 600; color: var(--ink); }
.cap-proof .flag { color: var(--red); font-weight: 600; }
.cap-proof .ok { color: var(--brand-deep); font-weight: 600; }

@media (max-width: 860px) {
  .cap-item { grid-template-columns: 56px 1fr; }
  .cap-proof { grid-column: 2; }
}

/* ---------- audience cards ---------- */

.aud-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}
.aud-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(1.2rem, 2vw, 1.6rem);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-decoration: none;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}
.aud-card h3 { font-size: clamp(1.05rem, 1.4vw, 1.2rem); flex-grow: 1; }
.aud-card:hover {
  border-color: var(--brand);
  box-shadow: 0 14px 34px rgba(24,29,34,0.08);
  transform: translateY(-3px);
}
.aud-card .aud-q {
  color: var(--ink-2);
  font-size: 1.02rem;
  margin: 0;
  flex-grow: 1;
}
.aud-card .aud-role {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--brand-deep);
}
.aud-card .aud-link {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

@media (max-width: 1080px) {
  .aud-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .aud-grid { grid-template-columns: 1fr; }
}

/* ---------- pilot steps ---------- */

.pilot-steps {
  counter-reset: pilot;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.1rem;
}
.pilot-step {
  counter-increment: pilot;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.3rem 1.2rem;
  font-size: 0.98rem;
  color: var(--ink-2);
}
.pilot-step::before {
  content: "0" counter(pilot);
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.pilot-step strong { color: var(--ink); display: block; margin-bottom: 0.3rem; }

@media (max-width: 1050px) { .pilot-steps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .pilot-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .pilot-steps { grid-template-columns: 1fr; } }

/* ---------- final CTA band ---------- */

.cta-band {
  background: #0A3161;
  color: #F2F3F4;
  text-align: center;
  padding-block: clamp(4rem, 8vw, 6.5rem);
}
.cta-band h2 { color: #fff; }
.cta-band p { margin-inline: auto; color: #C7CBCF; }
.cta-band .hero-ctas { justify-content: center; margin-top: 2rem; margin-bottom: 0; }
.cta-band .btn--primary { background: var(--brand); color: #fff; font-weight: 700; }
.cta-band .btn--primary:hover { background: #CC2450; }
.cta-band .btn--secondary { color: #F2F3F4; border-color: rgba(255,255,255,0.35); }
.cta-band .btn--secondary:hover { border-color: #fff; }

/* ============================================================
   VERIFICATION SEQUENCE — desktop pinned stage
   Everything below is a pure function of --seq-p / --s1..--s8
   set on :root by js/sequence.js  (reversible by construction)
   ============================================================ */

.seq-wrap { position: relative; }
.seq-track { height: 700vh; position: relative; }
.seq-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: clip;
  display: flex;
  align-items: center;
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 120%);
}
.seq-inner {
  width: 100%;
  max-width: 1340px;
  margin-inline: auto;
  padding-inline: var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

/* left column: rail + copy */
.seq-copy { position: relative; min-height: 340px; }
.seq-kicker {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}
.seq-caption { position: relative; min-height: 220px; }
.seq-cap {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 380ms ease, transform 380ms ease;
  pointer-events: none;
}
.seq-cap .n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--brand-deep);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.7rem;
  font-variant-numeric: tabular-nums;
}
.seq-cap h3 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); margin-bottom: 0.4em; }
.seq-cap p { color: var(--ink-2); font-size: 1.08rem; margin: 0; }
html[data-stage="1"] .seq-cap[data-cap="1"],
html[data-stage="2"] .seq-cap[data-cap="2"],
html[data-stage="3"] .seq-cap[data-cap="3"],
html[data-stage="4"] .seq-cap[data-cap="4"],
html[data-stage="5"] .seq-cap[data-cap="5"],
html[data-stage="6"] .seq-cap[data-cap="6"],
html[data-stage="7"] .seq-cap[data-cap="7"],
html[data-stage="8"] .seq-cap[data-cap="8"] {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* progress rail */
.seq-rail {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 2.2rem;
}
.rail-bar {
  position: relative;
  height: 3px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}
.rail-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand);
  transform-origin: left;
  transform: scaleX(var(--seq-p));
}
.rail-steps {
  display: flex;
  justify-content: space-between;
  gap: 0.3rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.rail-steps span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 250ms ease, background 250ms ease, border-color 250ms ease, transform 250ms ease;
}
html[data-stage="1"] .rail-steps [data-i="1"],
html[data-stage="2"] .rail-steps [data-i="2"],
html[data-stage="3"] .rail-steps [data-i="3"],
html[data-stage="4"] .rail-steps [data-i="4"],
html[data-stage="5"] .rail-steps [data-i="5"],
html[data-stage="6"] .rail-steps [data-i="6"],
html[data-stage="7"] .rail-steps [data-i="7"],
html[data-stage="8"] .rail-steps [data-i="8"] {
  color: #fff;
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  transform: scale(1.12);
}
html[data-stage="5"] .rail-steps [data-i="5"],
html[data-stage="6"] .rail-steps [data-i="6"] {
  background: var(--red);
  border-color: var(--red);
}

/* the verification record (right side) */
.seq-object {
  position: relative;
  height: min(74vh, 640px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.record {
  position: relative;
  width: min(700px, 100%);
  height: 100%;
  max-height: 620px;
}
.rec-frame {
  position: absolute;
  inset: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--ink);
  border-radius: 12px;
  box-shadow: 0 30px 70px rgba(24,29,34,0.12);
  overflow: hidden;
}
.rec-frame::before {
  /* binding hint */
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 14px;
  background: linear-gradient(90deg, rgba(24,29,34,0.08), transparent);
  pointer-events: none;
}
.rec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.rec-head .gold { color: var(--brand-deep); }
/* the real wordmark logo (no shield) sits in the record header */
.rec-logo { height: 20px; width: auto; flex-shrink: 0; }
.rec-body {
  position: absolute;
  inset: 52px 0 0 0;
  padding: 1.4rem 1.6rem 1.5rem;
}

/* file chrome: tab, binder rings, stacked page edges */
.rec-tab {
  position: absolute;
  top: -26px;
  right: 30px;
  background: var(--brand-deep);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 0.35rem 0.9rem 0.55rem;
  border-radius: 8px 8px 0 0;
}
.record { overflow: visible; }
.record::after {
  /* stacked page edges on the right — this is a thick file */
  content: "";
  position: absolute;
  right: -9px;
  top: 26px;
  bottom: 26px;
  width: 9px;
  border-radius: 0 8px 8px 0;
  background: repeating-linear-gradient(
    to right,
    #FFFFFF 0 1.5px,
    var(--line-2) 1.5px 3px
  );
  box-shadow: 2px 0 6px rgba(10,49,97,0.12);
}
.rec-frame::after {
  /* binder rings on the spine */
  content: "";
  position: absolute;
  left: -1px;
  top: 30%;
  width: 14px;
  height: 40%;
  background:
    radial-gradient(circle 5px at 7px 15%, var(--surface-cool) 60%, #7C8AA0 62%, transparent 75%) no-repeat,
    radial-gradient(circle 5px at 7px 85%, var(--surface-cool) 60%, #7C8AA0 62%, transparent 75%) no-repeat;
  pointer-events: none;
}

/* ---- OPEN BOOK ----
   The record is an open two-page book. The left half is the base sheet;
   evidence pages live on the right half, bound at the CENTRE spine.
   Each scroll step turns the top page onto the left half — the back of
   the turned sheet (a .page-back, injected by sequence.js) lands there.
   Everything is driven by --s2..--s8, fully reversible. */
.rec-body { perspective: 2100px; perspective-origin: 50% 45%; }

.rec-body::before {
  /* left page: the base sheet of the open file */
  content: "";
  position: absolute;
  left: 1.2rem;
  top: 1.2rem;
  bottom: 1.2rem;
  width: calc(50% - 1.2rem);
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 26px,
      var(--paper-2) 26px 28px
    ),
    var(--card);
  background-position: 0 3.2rem;
  border: 1px solid var(--line);
  border-right: none;
  border-radius: 8px 0 0 8px;
  box-shadow: inset -22px 0 26px -22px rgba(10,49,97,0.35);
}
.rec-body::after {
  /* centre spine crease */
  content: "";
  position: absolute;
  left: 50%;
  top: 1.2rem;
  bottom: 1.2rem;
  width: 2px;
  transform: translateX(-1px);
  background: linear-gradient(to bottom, var(--line-2), var(--line));
  z-index: 30;
}

.rec-page {
  position: absolute;
  left: 50%;
  right: 1.2rem;
  top: 1.2rem;
  bottom: 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: none;
  border-radius: 0 8px 8px 0;
  padding: 1.1rem 1.2rem;
  box-shadow: inset 18px 0 22px -20px rgba(10,49,97,0.3);
  overflow: hidden;
  transform-origin: left center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.rec-page--agreement { z-index: 8; transform: rotateY(calc(var(--s2) * -164deg)); }
.rec-page--ratecard  { z-index: 7; transform: rotateY(calc(var(--s3) * -166deg)); }
.rec-page--timesheet { z-index: 6; transform: rotateY(calc(var(--s4) * -168deg)); }
.rec-page--invoice   { z-index: 5; transform: rotateY(calc(var(--s5) * -170deg)); }
.rec-page--issue     { z-index: 4; transform: rotateY(calc(var(--s6) * -172deg)); }
.rec-page--impact    { z-index: 3; transform: rotateY(calc(var(--s7) * -174deg)); }
.rec-page--evidence  { z-index: 2; transform: rotateY(calc(var(--s8) * -176deg)); }
.rec-page--verified  { z-index: 1; }

/* the visible BACK of each turned sheet (injected by sequence.js) */
.page-back {
  position: absolute;
  left: 50%;
  right: 1.2rem;
  top: 1.2rem;
  bottom: 1.2rem;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 26px,
      var(--paper-2) 26px 28px
    ),
    #FDFDFE;
  background-position: 0 2rem;
  border: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
  transform-origin: left center;
  pointer-events: none;
  box-shadow: -6px 6px 16px rgba(10,49,97,0.12);
}
.pb-2 { z-index: 21; transform: rotateY(calc(var(--s2) * -164deg)); opacity: clamp(0, calc((var(--s2) - 0.52) * 22), 1); }
.pb-3 { z-index: 22; transform: rotateY(calc(var(--s3) * -166deg)); opacity: clamp(0, calc((var(--s3) - 0.52) * 22), 1); }
.pb-4 { z-index: 23; transform: rotateY(calc(var(--s4) * -168deg)); opacity: clamp(0, calc((var(--s4) - 0.52) * 22), 1); }
.pb-5 { z-index: 24; transform: rotateY(calc(var(--s5) * -170deg)); opacity: clamp(0, calc((var(--s5) - 0.52) * 22), 1); }
.pb-6 { z-index: 25; transform: rotateY(calc(var(--s6) * -172deg)); opacity: clamp(0, calc((var(--s6) - 0.52) * 22), 1); }
.pb-7 { z-index: 26; transform: rotateY(calc(var(--s7) * -174deg)); opacity: clamp(0, calc((var(--s7) - 0.52) * 22), 1); }
.pb-8 { z-index: 27; transform: rotateY(calc(var(--s8) * -176deg)); opacity: clamp(0, calc((var(--s8) - 0.52) * 22), 1); }
.rp-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 0.22rem 0.55rem;
  margin-bottom: 0.9rem;
}
.rp-clause {
  font-size: 1.02rem;
  color: var(--ink-2);
  line-height: 1.6;
}
.rp-clause .hl {
  background: linear-gradient(transparent 62%, var(--brand-wash) 62%);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--brand-deep);
}
.rp-meta { font-size: 0.82rem; color: var(--ink-3); margin-top: 0.9rem; }

/* rate table */
.rate-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.rate-table th, .rate-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--paper-2);
}
.rate-table th {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.rate-table td.r { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.rate-table tr.dim td { color: var(--ink-3); font-weight: 400; opacity: 0.55; }
.rate-table tr.pick td {
  background: var(--brand-wash);
  color: var(--ink);
}
.rate-table tr.pick td:first-child { border-left: 3px solid var(--brand-deep); }

/* big figures */
.big-fig {
  font-family: var(--font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 3.6vw, 3rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.fig-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* compact content for the half-width book page */
.rec-page .big-fig { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.rec-page .cmp { grid-template-columns: 1fr; gap: 0.55rem; margin-top: 0.7rem; }
.rec-page .cmp .big-fig { font-size: 1.4rem !important; }
.rec-page .rate-table th, .rec-page .rate-table td { padding: 0.36rem 0.45rem; font-size: 0.88rem; }
.rec-page .rp-clause { font-size: 0.94rem; }
.rec-page .issue-banner { font-size: 0.72rem; padding: 0.55rem 0.7rem; }
.rec-page .impact-eq .big-fig { font-size: 1.35rem !important; }
.rec-page .ev-list li { font-size: 0.84rem; padding: 0.45rem 0.1rem; }
.rec-page .ver-row { font-size: 0.88rem; padding: 0.5rem 0.1rem; }
.rec-page .ver-row .amt { font-size: 1rem; }
.rec-page .ver-row.final .amt { font-size: 1.5rem; }
.rec-page .stamp--shield img { width: 108px; }
.rec-page .stamp { font-size: 0.92rem; }
.seqm-visual .stamp--shield img { width: 84px; }

/* comparison strip (stages 4–6) */
.cmp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-top: 1rem;
}
.cmp-cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}
.cmp-cell.approved { border-color: var(--brand-deep); background: var(--brand-wash); }
.cmp-cell.flagged { border-color: var(--red); background: var(--red-wash); }
.cmp-cell .fig-label { margin-bottom: 0.2rem; }
.cmp-cell.approved .big-fig { color: var(--brand-dark); }
.cmp-cell.flagged .big-fig { color: var(--red); }

.issue-banner {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1.5px solid var(--red);
  background: var(--red-wash);
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
  border-radius: 6px;
  padding: 0.7rem 1rem;
  text-transform: uppercase;
}
.issue-banner svg { flex-shrink: 0; }

/* impact equation */
.impact-eq {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1rem;
  margin-top: 1.2rem;
}
.impact-eq .op { color: var(--ink-3); font-size: 1.5rem; }
.impact-eq .result { color: var(--red); }
.impact-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--ink-3);
}

/* evidence spine (stage 7) */
.ev-list { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.ev-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.62rem 0.2rem;
  border-bottom: 1px solid var(--paper-2);
  font-size: 0.95rem;
}
.ev-list .src { color: var(--ink-2); }
.ev-list .ref {
  font-size: 0.78rem;
  color: var(--brand-deep);
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* verified summary (stage 8) */
.ver-rows { margin-top: 0.4rem; }
.ver-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0.2rem;
  border-bottom: 1px solid var(--paper-2);
  font-size: 1rem;
}
.ver-row .amt { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.15rem; }
.ver-row.flag .amt { color: var(--red); }
.ver-row.final { border-bottom: none; padding-top: 1rem; }
.ver-row.final .amt {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--ink);
}
.stamp {
  position: absolute;
  left: calc(50% - 105px);
  bottom: 1.4rem;
  width: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  color: var(--brand-deep);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 1.05rem;
  transform: rotate(-5deg) scale(calc(0.7 + var(--s8) * 0.3));
  opacity: max(0, calc((var(--s8) - 0.45) * 1.9));
  text-transform: uppercase;
  white-space: nowrap;
}
.stamp--shield img {
  width: 118px;
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(10,49,97,0.35));
}
.stamp--shield span {
  border: 3px solid var(--brand-deep);
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 6px 16px rgba(10,49,97,0.15);
}
.stamp-hit { animation: stampHit 700ms ease; }
@keyframes stampHit {
  0% { transform: rotate(-5deg) scale(1.3); }
  55% { transform: rotate(-5deg) scale(0.94); }
  100% { transform: rotate(-5deg) scale(1); }
}
.shield-flyer {
  position: fixed;
  z-index: 600;
  width: 96px;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 8px 18px rgba(10,49,97,0.4));
}

/* mobile / reduced-motion linear version */
.seq-mobile { display: none; }

@media (max-width: 960px) {
  .seq-track, .seq-stage { display: none; }
  .seq-mobile { display: block; }
}
html.force-linear .seq-track,
html.force-linear .seq-stage { display: none; }
html.force-linear .seq-mobile { display: block; }

.seqm-item {
  border-top: 1px solid var(--line);
  padding-block: 2.2rem;
  display: grid;
  gap: 1.2rem;
}
.seqm-item:last-child { border-bottom: 1px solid var(--line); }
.seqm-item .n {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-deep);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}
.seqm-item h3 { margin-bottom: 0.3em; }
.seqm-item p { color: var(--ink-2); margin: 0; }
.seqm-visual {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.2rem 1.3rem;
  box-shadow: 0 8px 24px rgba(24,29,34,0.06);
}
.seqm-visual .stamp {
  position: static;
  display: inline-flex;
  margin-top: 1rem;
  transform: rotate(-4deg);
  opacity: 1;
}

/* ---------- generic page hero (inner pages) ---------- */

.page-hero {
  padding-top: calc(var(--header-h) + clamp(2.8rem, 6vw, 5rem));
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--paper) 60%, var(--paper-2));
}
.page-hero h1 { font-size: clamp(2.3rem, 4.6vw, 4rem); max-width: 20ch; }
.page-hero .lede { max-width: 56ch; }

/* ---------- flow diagram ---------- */

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.7rem;
  margin-block: 1.5rem;
}
.flow-node {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 1.05rem;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  text-align: center;
}
.flow-node--accent { border-color: var(--brand-deep); background: var(--brand-wash); }
.flow-arrow {
  align-self: center;
  color: var(--brand-deep);
  font-weight: 700;
}

/* ---------- status vocabulary ---------- */

.status-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-block: 1.2rem; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink-2);
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.status--matched::before { background: var(--brand-deep); }
.status--issue { color: var(--red); border-color: var(--red); background: var(--red-wash); }
.status--issue::before { background: var(--red); }
.status--missing::before { background: var(--ink-3); }
.status--review::before { background: var(--brand-deep); }
.status--verified { color: var(--brand-dark); border-color: var(--brand-deep); background: var(--brand-wash); }
.status--verified::before { background: var(--brand-deep); }

/* ---------- checklist / split lists ---------- */

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.check-item {
  display: flex;
  gap: 0.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.05rem 1.2rem;
  font-size: 1rem;
  color: var(--ink-2);
}
.check-item svg { flex-shrink: 0; margin-top: 0.2rem; color: var(--brand-deep); }
.check-item strong { color: var(--ink); }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* steps (how it works) */
.step-list { display: flex; flex-direction: column; }
.step {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(0, 0.8fr);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  padding-block: clamp(1.8rem, 3.4vw, 2.6rem);
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.step h3 { margin-bottom: 0.35em; }
.step p { color: var(--ink-2); margin: 0; }
.step-visual {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  font-size: 0.92rem;
  color: var(--ink-2);
  align-self: center;
}
@media (max-width: 900px) {
  .step { grid-template-columns: 60px 1fr; }
  .step-visual { grid-column: 2; }
}

/* boundaries panel */
.boundary {
  background: var(--surface-cool);
  border-left: 4px solid var(--ink);
  border-radius: 0 8px 8px 0;
  padding: 1.6rem 1.8rem;
}
.boundary h3 { margin-bottom: 0.6em; }
.boundary ul { margin: 0; padding-left: 1.2rem; color: var(--ink-2); }
.boundary li { margin-bottom: 0.5rem; }

/* ---------- forms ---------- */

.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  box-shadow: 0 18px 44px rgba(24,29,34,0.07);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 1.4rem;
}
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field--full { grid-column: 1 / -1; }
.form-field label { font-weight: 600; font-size: 0.98rem; }
.form-field .hint { font-size: 0.85rem; color: var(--ink-3); }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line-2);
  border-radius: 6px;
  padding: 0.8rem 0.95rem;
  min-height: 48px;
  transition: border-color 180ms ease;
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--brand-deep);
  outline-offset: 1px;
  border-color: var(--brand-deep);
}
.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea { border-color: var(--red); }
.field-error {
  color: var(--red);
  font-size: 0.88rem;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 0.35rem;
}
.form-field.has-error .field-error { display: flex; }
.consent-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.consent-row input {
  width: 20px; height: 20px;
  margin-top: 0.2rem;
  accent-color: var(--brand-deep);
  flex-shrink: 0;
}
.form-status {
  grid-column: 1 / -1;
  border: 1.5px dashed var(--brand-deep);
  background: var(--brand-wash);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  font-size: 0.98rem;
  color: var(--ink-2);
  display: none;
}
.form-status.is-visible { display: block; }
.form-status strong { color: var(--ink); }

@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- draft/legal note ---------- */

.draft-note {
  border: 1.5px dashed var(--line-2);
  background: var(--paper-2);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  color: var(--ink-2);
  font-size: 0.98rem;
  margin-bottom: 2.5rem;
}
.draft-note strong { color: var(--ink); }

/* ---------- legal pages (privacy / terms) ---------- */

.legal-body { max-width: 74ch; }
.legal-body h2 {
  font-size: 1.4rem;
  margin-top: 2.6em;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.legal-body h3 {
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--ink);
  margin: 1.9em 0 0.5em;
}
.legal-body p, .legal-body li { color: var(--ink-2); line-height: 1.75; }
.legal-body ul { margin: 0.9rem 0 1.4rem; padding-left: 1.2rem; }
.legal-body li { margin-bottom: 0.5rem; }
.legal-body li:last-child { margin-bottom: 0; }
.legal-body strong { color: var(--ink); }

.legal-meta { font-size: 0.92rem; color: var(--ink-3); margin: 0 0 2.2rem; }

/* plain-English summary — the part most people actually read */
.legal-summary {
  background: var(--brand-wash);
  border-left: 4px solid var(--brand-deep);
  border-radius: 0 10px 10px 0;
  padding: 1.5rem 1.7rem;
  margin-bottom: 2.4rem;
}
.legal-summary h2 {
  font-family: var(--font-display);
  font-size: 1.1rem !important;
  color: var(--brand-deep);
  margin: 0 0 0.9rem !important;
  letter-spacing: 0.01em;
}
.legal-summary ul { margin: 0; padding-left: 1.15rem; }
.legal-summary li { color: var(--ink); margin-bottom: 0.5rem; }

.legal-toc {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 1.3rem 1.6rem;
  margin-bottom: 3rem;
}
.legal-toc h2 {
  font-family: var(--font-body);
  font-size: 0.82rem !important;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-3);
  margin: 0 0 0.9rem !important;
}
.legal-toc ol { margin: 0; padding-left: 1.3rem; columns: 2; column-gap: 2.4rem; }
.legal-toc li { margin-bottom: 0.42rem; break-inside: avoid; }
.legal-toc a { color: var(--ink-2); text-decoration: none; }
.legal-toc a:hover { color: var(--brand); text-decoration: underline; }

.legal-callout {
  border-left: 3px solid var(--brand);
  background: var(--red-wash);
  border-radius: 0 8px 8px 0;
  padding: 1.1rem 1.35rem;
  margin: 1.6rem 0;
}
.legal-callout p { margin: 0; color: var(--ink); }

/* items Zaidu must confirm before publishing — delete the box when done */
.legal-fill {
  border: 1.5px dashed #E0B050;
  background: #FFFBF0;
  border-radius: 10px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 2.4rem;
}
.legal-fill h2 {
  font-family: var(--font-display);
  font-size: 1.05rem !important;
  color: #7A5500;
  margin: 0 0 0.7rem !important;
}
.legal-fill p, .legal-fill li { color: #6B4F14; }
.legal-fill ul { margin: 0.8rem 0 0; }
.legal-fill strong { color: #4D3908; }
.fill {
  background: #FFEFC4;
  border-bottom: 1.5px dotted #C08A20;
  color: #6B4F14;
  padding: 0 0.25em;
  font-weight: 600;
}

@media (max-width: 700px) {
  .legal-toc ol { columns: 1; }
}

/* ---------- magnifier cursor ---------- */

@media (pointer: fine) {
  html.mag-on body { cursor: none; }
  html.mag-on a,
  html.mag-on button,
  html.mag-on input,
  html.mag-on select,
  html.mag-on textarea,
  html.mag-on label { cursor: auto; }
  html.mag-on a { cursor: pointer; }
  html.mag-on button { cursor: pointer; }
}

.mag {
  position: fixed;
  left: 0; top: 0;
  z-index: 500;
  pointer-events: none;
  will-change: transform;
  display: none;
}
html.mag-on .mag { display: block; }
.mag.is-hidden { display: none !important; }

.mag-lens {
  /* one clean rim, clear glass — nothing over the content */
  position: relative;
  width: 58px;
  height: 58px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 3px solid var(--brand-deep);
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 5px 14px rgba(10,49,97,0.28);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.mag.is-link .mag-lens {
  border-color: var(--blue);
  box-shadow: 0 5px 14px rgba(29,111,224,0.35);
}
.mag.is-link .mag-handle { background: var(--blue); }

/* over navy sections the rim flips to white so it stays visible */
.mag.is-dark .mag-lens {
  border-color: #FFFFFF;
  box-shadow: 0 5px 16px rgba(0,0,0,0.45);
}
.mag.is-dark .mag-handle {
  background: #FFFFFF;
  box-shadow: 0 3px 7px rgba(0,0,0,0.4);
}
/* a link on a navy section keeps the blue rim but gains a white outline */
.mag.is-dark.is-link .mag-lens {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.9), 0 5px 16px rgba(0,0,0,0.45);
}
.mag.is-dark.is-link .mag-handle { background: var(--blue); }
.mag-view {
  position: absolute;
  left: 0; top: 0;
  transform-origin: 0 0;
  pointer-events: none;
}
.mag-handle {
  /* long handle off the lower-right of the rim, like a real magnifier */
  position: absolute;
  left: 46px;
  top: 45px;
  width: 8px;
  height: 40px;
  background: var(--brand-deep);
  border-radius: 0 0 4px 4px;
  transform: rotate(-45deg);
  transform-origin: top center;
  box-shadow: 0 3px 7px rgba(10,49,97,0.32);
  transition: background 180ms ease;
}

/* keep clone inert */
.mag-view * { animation-play-state: paused !important; }

/* ---------- illustrations (redesign layer) ---------- */

.illus { width: 100%; height: auto; }
.illus--framed {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(1rem, 2.5vw, 2rem);
  box-shadow: 0 14px 36px rgba(24,29,34,0.06);
}

/* scroll cue — tells the visitor there is more below the fold */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink-3);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color 200ms ease;
}
.scroll-cue:hover { color: var(--brand); }
.scroll-cue-line {
  position: relative;
  width: 2px;
  height: 46px;
  background: var(--line-2);
  border-radius: 2px;
  overflow: hidden;
}
.scroll-cue-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 16px;
  border-radius: 2px;
  background: var(--brand);
  animation: scrollCue 1.9s ease-in-out infinite;
}
@keyframes scrollCue {
  0%   { top: -18px; }
  100% { top: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue-line::after { animation: none; top: 0; height: 46px; opacity: 0.5; }
}
@media (max-height: 700px), (max-width: 760px) {
  .scroll-cue { display: none; }
}
/* short laptop screens: tighten the hero so it still fits one screen */
@media (max-height: 820px) and (min-width: 961px) {
  .hero {
    padding-top: calc(var(--header-h) + 0.5rem);
    padding-bottom: 3rem;
  }
  .scroll-cue-line { height: 34px; }
}

/* hero: illustration + floating result card */
.hero-illus { position: relative; width: 100%; }
.hero-illus .illus { display: block; }
/* the guardian's home position inside the hero art — he stands on the
   right, looking left at the invoice (matches the reading pose) */
.hero-char-slot {
  position: absolute;
  right: -4%;
  bottom: 2%;
  height: 86%;
  aspect-ratio: 532 / 900;
}
.hero-char-static {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 22px rgba(10,49,97,0.22));
}
/* on desktop the fixed flying character takes over, so the static one hides */
html.buddy-flying .hero-char-static { visibility: hidden; }
.hero-card {
  position: absolute;
  left: -10px;
  bottom: -4px;
  width: min(290px, 74%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 46px rgba(10,49,97,0.16);
  padding: 1rem 1.2rem;
  transform: rotate(-2deg);
}
.hero-card .ho-row { font-size: 0.92rem; padding: 0.42rem 0; }
.hero-card .ho-label { margin-bottom: 0.5rem; }
.hero-card .ho-verify { flex-wrap: wrap; }
@media (max-width: 640px) {
  .hero-card { position: static; width: 100%; transform: none; margin-top: 0.9rem; }
}

/* audience cards with icon badges */
.aud-card { position: relative; }
.aud-card .aud-img {
  width: 88px;
  height: 88px;
  margin-bottom: 0.3rem;
}

/* problem section: illustration above copy */
.conv-illus { margin-bottom: 1.8rem; max-width: 520px; }
.evidence-chip .d { display: none; }
@media (min-width: 901px) { .evidence-chip .d { display: block; } }

/* CTA band with illustration */
.cta-band .cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  text-align: left;
}
.cta-band .cta-grid .hero-ctas { justify-content: flex-start; }
.cta-band .cta-illus { max-width: 380px; justify-self: center; }
@media (max-width: 820px) {
  .cta-band .cta-grid { grid-template-columns: 1fr; text-align: center; }
  .cta-band .cta-grid .hero-ctas { justify-content: center; }
  .cta-band .cta-illus { max-width: 300px; }
}

/* section split with illustration */
.illus-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 860px) { .illus-split { grid-template-columns: 1fr; } }

/* ---------- guardian buddy ---------- */

/* ONE character element: it starts over the hero slot and flies, continuously
   and reversibly, to the bottom-right corner. JS sets left/top/width. */
.buddy {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 300;
  will-change: transform, width;
}
.buddy[hidden] { display: none; }
.buddy-bubble[hidden] { display: none; }
.buddy-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}
.buddy-btn:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 4px; border-radius: 10px; }
#buddy-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(10,49,97,0.24));
  transform-origin: 50% 100%;
}
/* the little life only runs once he has landed in the corner */
.buddy.landed #buddy-img { animation: buddyBreathe 3.6s ease-in-out infinite; }
.buddy.landed .buddy-btn:hover { transform: translateY(-4px); transition: transform 220ms ease; }
.buddy[data-pose="happy"].landed #buddy-img { animation: buddyCheer 900ms ease; }

/* pet choreography: each idle action pairs its artwork with motion */
.buddy.anim-yawn #buddy-img { animation: petYawn 2.4s ease-in-out; }
.buddy.anim-stretch #buddy-img { animation: petStretch 2.4s ease-in-out; }
.buddy.anim-squats #buddy-img { animation: petSquats 2.4s ease-in-out; }
.buddy.anim-hello #buddy-img { animation: petHello 1.6s ease-in-out; }

@keyframes petYawn {
  0%, 100% { rotate: 0deg; scale: 1 1; }
  30% { rotate: -3deg; scale: 1.04 1.04; translate: 0 -3px; }
  70% { rotate: -3deg; scale: 1.04 1.04; translate: 0 -3px; }
}
@keyframes petStretch {
  0%, 100% { scale: 1 1; translate: 0 0; }
  35% { scale: 0.965 1.06; translate: 0 -7px; }
  65% { scale: 0.965 1.06; translate: 0 -7px; }
}
@keyframes petSquats {
  0%, 100% { translate: 0 0; scale: 1 1; }
  16% { translate: 0 10px; scale: 1.07 0.9; }
  33% { translate: 0 0; scale: 1 1; }
  50% { translate: 0 10px; scale: 1.07 0.9; }
  66% { translate: 0 0; scale: 1 1; }
  83% { translate: 0 10px; scale: 1.07 0.9; }
}
@keyframes petHello {
  0%, 100% { rotate: 0deg; }
  25% { rotate: -4deg; }
  50% { rotate: 3deg; }
  75% { rotate: -2deg; }
}
.buddy.anim-jump #buddy-img { animation: petJump 1.5s ease-in-out; }
@keyframes petJump {
  0%, 100% { translate: 0 0; scale: 1 1; }
  10% { translate: 0 6px; scale: 1.06 0.92; }
  32% { translate: 0 -26px; scale: 0.96 1.06; }
  50% { translate: 0 0; scale: 1.05 0.94; }
  62% { translate: 0 4px; scale: 1.05 0.94; }
  80% { translate: 0 -14px; scale: 0.98 1.03; }
  92% { translate: 0 0; scale: 1.03 0.97; }
}

/* idle life: blink-substitute bounce, stretch, exercise squats
   (sprite frames from the character sheet can replace these later) */
.buddy.act-stretch #buddy-img { animation: buddyStretch 2.4s ease-in-out; }
.buddy.act-exercise #buddy-img { animation: buddySquats 2.2s ease-in-out; }
.buddy.act-tilt #buddy-img { animation: buddyTilt 1.6s ease-in-out; }

@keyframes buddyBreathe {
  0%, 100% { scale: 1 1; }
  50% { scale: 1.012 0.988; }
}
@keyframes buddyCheer {
  0% { translate: 0 0; }
  30% { translate: 0 -14px; }
  55% { translate: 0 0; }
  75% { translate: 0 -7px; }
  100% { translate: 0 0; }
}
@keyframes buddyStretch {
  0%, 100% { scale: 1 1; }
  35% { scale: 0.97 1.05; translate: 0 -4px; }
  65% { scale: 0.97 1.05; translate: 0 -4px; }
}
@keyframes buddySquats {
  0%, 100% { scale: 1 1; }
  20% { scale: 1.06 0.9; translate: 0 6px; }
  40% { scale: 1 1; }
  60% { scale: 1.06 0.9; translate: 0 6px; }
  80% { scale: 1 1; }
}
@keyframes buddyTilt {
  0%, 100% { rotate: 0deg; }
  30% { rotate: -6deg; }
  70% { rotate: 5deg; }
}
@media (prefers-reduced-motion: reduce) {
  #buddy-img { animation: none; }
  .buddy.act-stretch #buddy-img,
  .buddy.act-exercise #buddy-img,
  .buddy.act-tilt #buddy-img { animation: none; }
}

.buddy-bubble {
  position: absolute;
  right: 0;
  bottom: 100%;
  margin-bottom: 12px;
  width: min(270px, 74vw);
  background: var(--card);
  border: 1.5px solid var(--brand-deep);
  border-radius: 14px 14px 2px 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 16px 40px rgba(10,49,97,0.2);
  font-size: 0.95rem;
}
.buddy-bubble p { margin: 0 0 0.8rem; color: var(--ink-2); }
.buddy-bubble .btn { width: 100%; padding: 0.7rem 1rem; font-size: 0.92rem; min-height: 42px; }

@media (max-width: 760px) { .buddy { display: none; } }

/* ---------- misc ---------- */

.divider-gold {
  width: 52px;
  height: 3px;
  background: var(--brand);
  border: 0;
  margin: 0 0 1.4rem;
}

.inline-links { display: flex; flex-wrap: wrap; gap: 1rem 1.8rem; margin-top: 1.6rem; }
.inline-links a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--brand);
  padding-bottom: 2px;
}
.inline-links a:hover { color: var(--brand-deep); }

/* small screens: type & spacing */
@media (max-width: 640px) {
  body { font-size: 1.05rem; }
  .section { padding-block: 3.4rem; }
  .brand img { height: 38px; }
  .brand .brand-shield { height: 40px; }
  .brand .brand-word { height: 21px; }
  .brand-name { font-size: 1.08rem; }
}
@media (max-width: 380px) {
  .hero-ctas .btn { width: 100%; }
}

/* print — keep it simple */
@media print {
  .site-header, .site-footer, .mag, .intro { display: none !important; }
}

/* ---------- inner-page scroll life ---------- */

/* a red line draws itself down the step list as you scroll; each step's
   number fills in as the line reaches it (like liquid being poured) */
.step-list { position: relative; --line-p: 0; }
.step-list::before {
  content: "";
  position: absolute;
  left: 35px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--line);
  border-radius: 3px;
}
.step-list::after {
  content: "";
  position: absolute;
  left: 35px;
  top: 0;
  height: 100%;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(to bottom, var(--brand-deep), var(--brand));
  transform-origin: top;
  transform: scaleY(var(--line-p));
}
.step { position: relative; z-index: 1; }
.step-num {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--line-2);
  font-size: 1.6rem !important;
  transition: border-color 350ms ease, background 350ms ease, color 350ms ease, transform 350ms ease;
}
.step.is-done .step-num {
  border-color: var(--brand-deep);
  background: var(--brand-deep);
  color: #fff;
  transform: scale(1.06);
}
@media (max-width: 900px) {
  .step-list::before, .step-list::after { left: 24px; }
  .step-num { width: 52px; height: 52px; font-size: 1.15rem !important; }
}
@media (prefers-reduced-motion: reduce) {
  .step-list::after { transform: scaleY(1); }
  .step .step-num { transition: none; }
}

/* the platform flow chain lights up node by node when it scrolls into view */
.flow .flow-node, .flow .flow-arrow {
  opacity: 0.25;
  transform: translateY(6px);
  transition: opacity 420ms ease, transform 420ms ease, border-color 420ms ease, box-shadow 420ms ease;
}
.flow.is-lit .flow-node, .flow.is-lit .flow-arrow { opacity: 1; transform: none; }
.flow.is-lit .flow-node { border-color: var(--brand-deep); }
.flow.is-lit .flow-node--accent { box-shadow: 0 6px 18px rgba(10,49,97,0.18); }
@media (prefers-reduced-motion: reduce) {
  .flow .flow-node, .flow .flow-arrow { opacity: 1; transform: none; transition: none; }
}
