/* Regmap — marketing site, v2.
   Conviction: "cartographer's ledger" — the regulatory atlas. Sibling of the
   verdict-site evidence camera: same skeleton (mono ledger labels, hairline
   rules, stop-motion steps() frames, three-depth parallax, dark pledge band),
   but brighter ground and emerald/amber authority in place of cobalt/orange
   attack. Emerald = covered & cited; amber = the gap. Motion ticks in discrete
   frames; never a glide. All decorative motion double-guarded:
   @supports + prefers-reduced-motion. */

:root {
  --ground: #f7f8fb;
  --ground-soft: #e8ecf3;
  --paper: #ffffff;
  --ink: #05070f;
  --ink-soft: #23283c;
  --ink-mute: #4a5066;
  --hair: #b9c1d1;
  --emerald: #0a9a66;
  --emerald-deep: #067a50;
  --amber: #f5a300;
  --gap: #e23b57;
  --vault: #05070f;
  --vault-hair: rgba(255, 255, 255, 0.14);
  --on-vault: rgba(255, 255, 255, 0.8);
  --dim-vault: rgba(255, 255, 255, 0.45);

  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --pad: clamp(1.25rem, 4.5vw, 5rem);
  --rule: 1px solid var(--hair);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.06; letter-spacing: -0.02em; margin: 0; }
h1, .h2 { text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.98; }
p { margin: 0 0 1.1em; }
a { color: inherit; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 76rem; margin: 0 auto; padding-inline: var(--pad); }
.mono-label {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--emerald-deep); font-weight: 500;
  display: inline-block; margin-bottom: 1.4rem; transform-origin: left bottom;
}
.mono-label::before { content: "COMPLIANCE // "; color: var(--ink); }

/* ---- scroll progress ---- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40;
  background: linear-gradient(90deg, var(--emerald), var(--amber));
  transform-origin: left; transform: scaleX(0);
}

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--vault) 94%, transparent);
  backdrop-filter: saturate(130%) blur(8px);
  border-bottom: 1px solid var(--vault-hair);
  color: #fff;
}
.nav .navlinks a { color: rgba(255, 255, 255, 0.75); }
.nav .navlinks a:hover { color: #38cd96; }
.nav .navlinks a.req { color: #fff; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: 0.9rem; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.3rem; text-decoration: none; letter-spacing: -0.01em; }
.brand .dot { color: var(--amber); }
.navlinks { display: flex; gap: clamp(0.9rem, 2.5vw, 2rem); align-items: center; }
.navlinks a {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em;
  text-decoration: none; color: var(--ink-soft); transition: color 0.2s ease;
}
.navlinks a:hover { color: var(--emerald-deep); }
.navlinks a.req { color: #fff; background: var(--emerald-deep); padding: 0.55rem 1rem; transition: background 0.2s ease; }
.navlinks a.req:hover { background: var(--ink); color: #fff; }

section, header.hero { padding-block: clamp(3.5rem, 8vw, 7.5rem); }
.rule-top, .section-rule { border-top: var(--rule); }

/* ---- hero ---- */
.hero { padding-top: clamp(3rem, 7vw, 6rem); position: relative; overflow: hidden; }
.hero h1 { font-size: clamp(2.6rem, 6.8vw, 5.2rem); max-width: 16ch; margin-bottom: 1.6rem; }
.hero h1 .flip { color: var(--emerald-deep); }
.hero .lede, .lede { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--ink-soft); max-width: 40rem; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.2rem; margin-top: 2.4rem; align-items: center; }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background:
    linear-gradient(var(--hair) 1px, transparent 1px) 0 0 / 100% 56px,
    linear-gradient(90deg, var(--hair) 1px, transparent 1px) 0 0 / 56px 100%;
  opacity: 0.5;
  mask-image: radial-gradient(120% 90% at 70% 0%, #000 30%, transparent 75%);
}
.hero-art {
  position: absolute; right: calc(var(--pad) * 0.6); top: 50%;
  width: clamp(16rem, 30vw, 27rem); transform: translateY(-50%);
  pointer-events: none; z-index: -1;
}

/* decorative floating ledger layers — absolute, never in text flow */
.float-tag {
  position: absolute; pointer-events: none; user-select: none; z-index: 0;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: #fff; background: var(--ink);
  padding: 0.3rem 0.7rem; box-shadow: 4px 4px 0 rgba(16, 21, 40, 0.14);
}
.float-tag.tag-amber { background: var(--amber); color: var(--ink); }
.float-tag.tag-emerald { background: var(--emerald-deep); }
.float-stamp {
  position: absolute; pointer-events: none; user-select: none; z-index: 0;
  width: clamp(5.5rem, 10vw, 8.5rem); opacity: 0.6;
}

.btn {
  display: inline-block; font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.12em; text-decoration: none; padding: 1rem 1.7rem;
  border: 2px solid var(--ink); color: var(--ink); background: transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--emerald-deep); border-color: var(--emerald-deep); color: #fff; }
.btn-primary:hover { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.textlink {
  font-family: var(--mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.1em;
  text-decoration: none; border-bottom: 2px solid var(--amber); padding-bottom: 3px; color: var(--ink-soft);
}
.textlink:hover { color: var(--emerald-deep); }

/* ---- marquee ribbons: regimes forward, citations reverse ---- */
.marquee { border-block: var(--rule); padding: 0.85rem 0; overflow: hidden; background: var(--ground-soft); }
.marquee-track { display: flex; gap: 2.6rem; width: max-content; }
.marquee-track span {
  font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-soft); white-space: nowrap;
}
.marquee-track span::before { content: "▸ "; color: var(--amber); }
.marquee.rev { background: var(--ink); border-color: var(--ink); }
.marquee.rev .marquee-track span { color: rgba(255, 255, 255, 0.72); }
.marquee.rev .marquee-track span::before { content: "◂ "; color: var(--emerald); }

/* ---- stats strip ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; position: relative; }
.stat { border-top: 3px solid var(--ink); padding-top: 1rem; }
.stat.hot { border-top-color: var(--amber); }
.stat .fig { font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: 1; transform-origin: left bottom; }
.stat.hot .fig { color: var(--emerald-deep); }
.stat .lab { color: var(--ink-mute); font-size: 0.9rem; margin-top: 0.4rem; }

/* ---- question / step cards ---- */
.h2 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); max-width: 24ch; margin-bottom: 1rem; }
.sub { color: var(--ink-mute); max-width: 42rem; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.4rem, 3.5vw, 3rem); margin-top: 2.6rem; }
.step { border: var(--rule); border-top: 3px solid var(--emerald-deep); padding: 1.4rem 1.5rem 1.6rem; background: var(--paper); }
.step .k { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; color: var(--amber); text-transform: uppercase; }
.step h3 { font-size: 1.3rem; margin: 0.7rem 0 0.5rem; }
.step p { color: var(--ink-mute); font-size: 0.95rem; margin: 0; }

/* ---- regime grid ---- */
.battery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--hair); border: var(--rule); margin-top: 2.6rem; }
.cell { background: var(--paper); padding: 1.3rem 1.4rem 1.5rem; position: relative; }
.cell .sig { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-mute); letter-spacing: 0.1em; transition: color 0.15s steps(2, end); }
.cell h3 { font-size: 1.06rem; margin: 0.55rem 0 0.4rem; }
.cell p { color: var(--ink-mute); font-size: 0.86rem; margin: 0; line-height: 1.5; font-family: var(--mono); }
.cell:hover .sig { color: var(--amber); }
.cell.wide { grid-column: span 2; background: var(--ink); }
.cell.wide h3, .cell.wide .sig { color: #fff; }
.cell.wide p { color: rgba(255, 255, 255, 0.6); }

/* ---- ledger vault (dark pledge band) ---- */
.pledge, .vault { background: var(--vault); color: var(--on-vault); position: relative; overflow: hidden; }
.pledge .wrap, .vault .wrap { position: relative; }
.vault-ghost {
  position: absolute; right: -0.05em; top: -0.35em; z-index: 0; pointer-events: none;
  font-family: var(--display); font-weight: 700; line-height: 1;
  font-size: clamp(14rem, 34vw, 30rem); color: rgba(56, 205, 150, 0.06);
  user-select: none;
}
.pledge .mono-label, .vault .mono-label { color: #38cd96; }
.pledge .mono-label::before, .vault .mono-label::before, .pledge .eyebrow::before { color: var(--amber); }
.pledge .h2, .vault .h2, .pledge h2, .pledge h1 { color: #fff; }
.pledge .sub, .vault .sub, .pledge p { color: var(--dim-vault); }
.pledge .textlink { color: var(--dim-vault); border-color: rgba(56, 205, 150, 0.5); }
.pledge .textlink:hover { color: #38cd96; }
.chain { font-family: var(--mono); font-size: clamp(0.62rem, 1.5vw, 0.78rem); margin-top: 2.4rem; border: 1px solid var(--vault-hair); position: relative; z-index: 1; }
.chain-row { display: flex; gap: 1rem; padding: 0.75rem 1rem; border-top: 1px solid var(--vault-hair); flex-wrap: wrap; align-items: baseline; }
.chain-row:first-child { border-top: 0; }
.chain-row .h { color: #38cd96; overflow-wrap: anywhere; }
.chain-row .s { color: var(--amber); }
.chain-row .lab2 { color: var(--dim-vault); min-width: 11ch; }
.vault-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2.6rem; position: relative; z-index: 1; }
.vault-points h3 { color: #fff; font-size: 1.1rem; margin-bottom: 0.4rem; }
.vault-points p { color: var(--dim-vault); font-size: 0.92rem; margin: 0; }

/* ---- dark-band variants (vault reused on stats + closing) ---- */
.vault .stat, .pledge .stat { border-top-color: #fff; }
.vault .stat.hot, .pledge .stat.hot { border-top-color: var(--amber); }
.vault .fig, .pledge .fig { color: #fff; }
.vault .stat.hot .fig, .pledge .stat.hot .fig { color: #38cd96; }
.vault .lab, .pledge .lab { color: var(--dim-vault); }
.vault .btn, .pledge .btn { border-color: #fff; color: #fff; }
.vault .btn:hover, .pledge .btn:hover { background: #fff; color: var(--ink); }
.vault .btn-primary, .pledge .btn-primary { background: var(--emerald-deep); border-color: var(--emerald-deep); color: #fff; }

/* ---- honesty note ---- */
.note { border: 2px solid var(--ink); border-left: 8px solid var(--amber); padding: 1.5rem 1.7rem; max-width: 56rem; background: var(--paper); }
.note p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }
.note strong { color: var(--ink); }

/* ---- closing ---- */
.closing { text-align: center; position: relative; overflow: hidden; }
.closing .h2, .closing h2 { margin-inline: auto; max-width: 22ch; font-size: clamp(1.9rem, 4.4vw, 3.1rem); }
.closing .sub, .closing .lede { margin: 0 auto 2.2rem; }
.closing .hero-actions { justify-content: center; }
.closing .wrap { position: relative; z-index: 1; }

footer { border-top: var(--rule); padding-block: 2.4rem; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; align-items: baseline; }
footer .fnote { color: var(--ink-mute); font-size: 0.8rem; max-width: 42rem; }
footer .flinks { display: flex; gap: 1.5rem; }
footer .flinks a { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; text-decoration: none; color: var(--ink-soft); }
footer .flinks a:hover { color: var(--emerald-deep); }

/* ---- long-form document pages (about) ---- */
.doc { max-width: 46rem; }
.doc h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); margin-bottom: 1.4rem; }
.doc h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin-bottom: 1.1rem; }
.doc h3 { font-size: 1.18rem; margin: 1.9rem 0 0.5rem; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.55rem; }
.eyebrow {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--emerald-deep); font-weight: 500; margin-bottom: 1.2rem;
}
.eyebrow::before { content: "COMPLIANCE // "; color: var(--ink); }
.pledge .eyebrow { color: #38cd96; }
.lead-para { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-soft); line-height: 1.6; }
.toc { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 2.2rem; border-left: 3px solid var(--amber); padding-left: 1.2rem; }
.toc a { font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; text-decoration: none; color: var(--ink-soft); }
.toc a:hover { color: var(--emerald-deep); }
.faq details { border: var(--rule); background: var(--paper); margin-bottom: 0.8rem; }
.faq summary {
  cursor: pointer; padding: 1rem 1.2rem; font-family: var(--display); font-weight: 700;
  font-size: 1.02rem; list-style: none; position: relative;
}
.faq summary::before { content: "▸ "; color: var(--amber); }
.faq details[open] summary::before { content: "▾ "; color: var(--emerald-deep); }
.faq .a { padding: 0 1.2rem 1rem; color: var(--ink-mute); font-size: 0.95rem; }
.hair { border: 0; border-top: 1px solid var(--vault-hair); margin: 1.6rem 0; }

/* ================= motion — cartographer's ledger =================
   Same stop-motion vocabulary as the verdict-site sibling. Double-guarded;
   transform/opacity only. .reveal/.stagger are CSS scroll-driven here — no
   IntersectionObserver script needed. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .fx-fade, .reveal { animation: fx-fade linear both; animation-timeline: view(); animation-range: entry 0% cover 16%; }
    .fx-stagger > *, .stagger > * { animation: fx-fade linear both; animation-timeline: view(); animation-range: entry 0% cover 18%; }
    .fx-stagger > *:nth-child(2), .stagger > *:nth-child(2) { animation-range: entry 3% cover 21%; }
    .fx-stagger > *:nth-child(3), .stagger > *:nth-child(3) { animation-range: entry 6% cover 24%; }
    .fx-stagger > *:nth-child(4), .stagger > *:nth-child(4) { animation-range: entry 9% cover 27%; }
    @keyframes fx-fade { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

    /* three-depth parallax: text shallow, decorative mid, ghost deep */
    .fx-parallax, .fx-parallax-mid, .fx-parallax-deep {
      animation: fx-parallax linear both; animation-timeline: view();
      animation-range: cover 0% cover 100%; --travel: 36px; will-change: transform;
    }
    .fx-parallax-mid { --travel: 64px; }
    .fx-parallax-deep { --travel: 100px; }
    @keyframes fx-parallax { from { transform: translateY(var(--travel)); } to { transform: translateY(calc(-1 * var(--travel))); } }

    /* stop-motion: steps() snaps children through discrete frames */
    .fx-snap > * { animation: fx-snap steps(4, end) both; animation-timeline: view(); animation-range: entry 0% cover 15%; }
    .fx-snap > *:nth-child(2) { animation-range: entry 2% cover 17%; }
    .fx-snap > *:nth-child(3) { animation-range: entry 4% cover 19%; }
    .fx-snap > *:nth-child(4) { animation-range: entry 6% cover 21%; }
    .fx-snap > *:nth-child(5) { animation-range: entry 8% cover 23%; }
    .fx-snap > *:nth-child(6) { animation-range: entry 10% cover 25%; }
    .fx-snap > *:nth-child(7) { animation-range: entry 12% cover 27%; }
    .fx-snap > *:nth-child(8) { animation-range: entry 14% cover 29%; }
    @keyframes fx-snap { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

    /* stamp: ledger labels hit the page like a chop, in 3 frames */
    .fx-stamp { animation: fx-stamp steps(3, end) both; animation-timeline: view(); animation-range: entry 0% cover 12%; }
    @keyframes fx-stamp { from { opacity: 0; transform: scale(1.6) rotate(-6deg); } to { opacity: 1; transform: none; } }

    /* wipe: headings develop like a survey line being drawn */
    .fx-wipe { animation: fx-wipe steps(6, end) both; animation-timeline: view(); animation-range: entry 0% cover 14%; }
    @keyframes fx-wipe { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }

    /* tilt: cards land flat from a slight throw, in 3 frames */
    .fx-tilt > * { animation: fx-tilt steps(3, end) both; animation-timeline: view(); animation-range: entry 0% cover 16%; }
    .fx-tilt > *:nth-child(2) { animation-range: entry 4% cover 20%; }
    .fx-tilt > *:nth-child(3) { animation-range: entry 8% cover 24%; }
    @keyframes fx-tilt { from { opacity: 0; transform: translateY(34px) rotate(-1.6deg); } to { opacity: 1; transform: none; } }

    /* stat figures punch in at scale, 4 frames */
    .fx-snap .stat .fig { animation: fx-punch steps(4, end) both; animation-timeline: view(); animation-range: entry 0% cover 20%; }
    @keyframes fx-punch { from { transform: scale(0.6); } to { transform: none; } }
  }

  @supports (animation-timeline: scroll()) {
    .progress { animation: fx-progress linear both; animation-timeline: scroll(root); }
    @keyframes fx-progress { to { transform: scaleX(1); } }
  }

  /* hero: one-shot stop-motion entrance on load */
  .fx-intro > * { animation: fx-snap-intro 0.3s steps(4, end) both; }
  .fx-intro > *:nth-child(2) { animation-delay: 0.06s; }
  .fx-intro > *:nth-child(3) { animation-delay: 0.12s; }
  .fx-intro > *:nth-child(4) { animation-delay: 0.18s; }
  @keyframes fx-snap-intro { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
  .hero-art { animation: fx-art-intro 0.45s steps(5, end) 0.12s both; }
  @keyframes fx-art-intro { from { opacity: 0; transform: translateY(-46%) rotate(2deg); } to { opacity: 1; transform: translateY(-50%) rotate(0deg); } }

  /* stop-motion ambients */
  .tick-caret { animation: tick-caret 1.1s steps(1) infinite; }
  @keyframes tick-caret { 50% { opacity: 0; } }
  .tick-pulse { animation: tick-pulse 1.3s steps(2, jump-none) infinite; }
  @keyframes tick-pulse { 50% { opacity: 0.35; } }
  .vault-ghost { animation: tick-flicker 2.2s steps(2, jump-none) infinite; }
  @keyframes tick-flicker { 50% { opacity: 0.55; } }
  .marquee-track { animation: ride 30s linear infinite; }
  @keyframes ride { to { transform: translateX(-50%); } }
  .marquee.rev .marquee-track { animation: ride-rev 34s linear infinite; }
  @keyframes ride-rev { from { transform: translateX(-50%); } to { transform: none; } }
  .cell:hover h3 { animation: fx-jitter 0.18s steps(2, end) 1; }
  @keyframes fx-jitter { 50% { transform: translateX(2px); } }
}

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .hero-art { display: none; }
}
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cols3, .vault-points { grid-template-columns: 1fr; }
  .battery { grid-template-columns: repeat(2, 1fr); }
  .float-tag, .float-stamp { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 1rem; }
  .navlinks a:nth-child(-n + 2) { display: none; }
  .battery { grid-template-columns: 1fr; }
  .cell.wide { grid-column: auto; }
  .stats { grid-template-columns: 1fr 1fr; gap: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav { backdrop-filter: none; }
  .progress { display: none; }
}

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