/* PonsPayroll — foundation: tokens, base, header, hero, sections, footer.
   Data components (rounds, lookup, pagination) live in spa.css. */

:root {
  color-scheme: dark;
  --bg: #0c0a07;
  --surface: rgba(23, 18, 12, .88);
  --surface-strong: rgba(20, 15, 9, .94);
  --panel: rgba(255, 244, 214, .035);
  --panel-hover: rgba(255, 244, 214, .07);
  --ink: #fbf5e6;
  --muted: #cfc3ab;
  --soft: #9c8f78;
  --gold: #f2c86d;
  --gold-deep: #d99a2e;
  --gold-pale: #fff1c2;
  --line: rgba(242, 200, 109, .16);
  --line-strong: rgba(242, 200, 109, .3);
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
  --radius: 20px;
  --radius-sm: 12px;
  --max: 1180px;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ---------- Base ---------- */

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(60rem 38rem at 88% -8%, rgba(217, 154, 46, .22), transparent 62%),
    radial-gradient(48rem 34rem at -12% 34%, rgba(122, 77, 23, .18), transparent 62%),
    radial-gradient(56rem 40rem at 62% 112%, rgba(194, 154, 75, .1), transparent 62%),
    linear-gradient(180deg, #14100a 0%, #0c0a07 55%, #0a0806 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255, 241, 194, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 241, 194, .12) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(#000, transparent 70%);
  -webkit-mask-image: linear-gradient(#000, transparent 70%);
}

a { color: inherit; }
button, input { font: inherit; }
img, svg { display: block; max-width: 100%; }
svg { fill: none; }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Contains the hero canvas bleed without creating a scroll container (sticky header keeps working). */
.page { overflow-x: clip; }

.shell {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
}

main { padding-bottom: 6.5rem; }

/* ---------- Type ---------- */

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 1.4rem;
  font-size: clamp(2.7rem, 5.2vw, 4.35rem);
  font-weight: 760;
  letter-spacing: -.04em;
  line-height: 1.02;
  text-wrap: balance;
}

h2 {
  margin-bottom: .6rem;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 720;
  letter-spacing: -.028em;
  line-height: 1.08;
  text-wrap: balance;
}

h3 {
  margin-bottom: .35rem;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -.01em;
}

.eyebrow, .label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--gold);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow { margin-bottom: 1.1rem; }

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.lede {
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

.muted { color: var(--soft); }

.mono {
  font-family: var(--mono);
  font-size: .82em;
  letter-spacing: 0;
}

.gradient-text {
  display: inline-block;
  padding-right: .06em;
  color: transparent;
  background: linear-gradient(92deg, #fff6d6 0%, #f3cd72 45%, #c98a2a 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0 1.3rem;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  color: #211508;
  background: linear-gradient(135deg, #fff5cf, #e6b44a);
  border: 1px solid rgba(255, 234, 163, .9);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(217, 152, 45, .22), inset 0 1px rgba(255, 255, 255, .6);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.005em;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(217, 152, 45, .3), inset 0 1px rgba(255, 255, 255, .6);
}

.button:not(.secondary) { position: relative; overflow: hidden; isolation: isolate; }

.button:not(.secondary)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .6) 50%, transparent 65%);
  transform: translateX(-130%);
  transition: transform .7s ease;
}

.button:not(.secondary):hover::after { transform: translateX(130%); }

.button.secondary {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--line-strong);
  box-shadow: none;
}

.button.secondary:hover { background: var(--panel-hover); }

.button svg { width: 1em; height: 1em; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12, 10, 7, .74);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.site-header.scrolled {
  background: rgba(12, 10, 7, .9);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}

.header-inner {
  display: grid;
  min-height: 72px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  justify-self: start;
  text-decoration: none;
}

.brand-mark { width: 36px; height: 36px; }

.wordmark {
  font-size: 1.1rem;
  font-weight: 720;
  letter-spacing: -.02em;
}

.network-pill {
  margin-left: .35rem;
  padding: .25rem .55rem;
  color: #1f1405;
  background: var(--gold);
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.network-pill[hidden] { display: none; }

.site-header nav {
  display: flex;
  padding: .25rem;
  gap: .15rem;
  background: rgba(245, 207, 120, .05);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.site-header nav a {
  padding: .6rem 1rem;
  color: var(--muted);
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}

.site-header nav a:hover { color: var(--ink); background: var(--panel-hover); }

.site-header nav a[aria-current="page"] {
  color: #1f1405;
  background: linear-gradient(135deg, #fff1bd, #e2ab3d);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: .5rem;
}

.x-button, .get-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .15s ease, opacity .15s ease;
}

.x-button {
  width: 40px;
  color: var(--gold);
  background: rgba(245, 207, 120, .06);
  border: 1px solid rgba(245, 207, 120, .3);
}

.x-button span { font-size: 1rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.x-button:hover { background: rgba(245, 207, 120, .14); }

.get-button {
  padding: 0 1.05rem;
  color: #231608;
  background: linear-gradient(135deg, #fff5c9, #d99a2e);
  border: 1px solid rgba(255, 240, 175, .9);
}

.header-actions [aria-disabled="true"] {
  cursor: default;
  opacity: .5;
  pointer-events: none;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 2.5rem;
  align-items: center;
  padding: 5rem 0 2rem;
}

.hero-copy { position: relative; z-index: 2; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.9rem;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.4rem;
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--soft);
  font-size: .85rem;
}

.trust-row li {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.trust-row svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
}

.stage {
  position: relative;
  display: flex;
  min-height: 540px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  isolation: isolate;
}

.mark-wrap {
  --mark-shift: translate(0, 0);
  position: relative;
  display: grid;
  width: min(30vw, 300px);
  aspect-ratio: 1;
  place-items: center;
  isolation: isolate;
  transform: var(--mark-shift);
  animation: float 7s ease-in-out infinite;
}

.stage-glow {
  position: absolute;
  inset: -22%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(217, 154, 46, .32), rgba(217, 154, 46, .07) 55%, transparent 74%);
  filter: blur(12px);
}

.hero-mark {
  width: 96%;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .6)) drop-shadow(0 0 60px rgba(217, 155, 54, .28));
}

.mark-sheen {
  position: absolute;
  inset: 2%;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 248, 220, .8) 50%, transparent 62%);
  background-size: 300% 100%;
  background-position: 130% 0;
  -webkit-mask: url("/assets/coin.png") center / contain no-repeat;
  mask: url("/assets/coin.png") center / contain no-repeat;
  animation: sheen 7s ease-in-out infinite;
}

/* The canvas bleeds past the stage so glow and rings fade out before any edge. */
.stage-3d {
  --bleed-x: 140px;
  --bleed-y: 160px;
  position: absolute;
  top: calc(-1 * var(--bleed-y));
  left: calc(-1 * var(--bleed-x));
  z-index: 1;
  width: calc(100% + 2 * var(--bleed-x)) !important;
  height: calc(100% + 2 * var(--bleed-y)) !important;
  pointer-events: none;
}

.stage.has-3d .mark-wrap { visibility: hidden; animation: none; }
.stage.has-3d .stage-dust { display: none; }

.stage-dust {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.receipt {
  position: relative;
  z-index: 2;
  width: min(340px, 100%);
  padding: 1.1rem 1.2rem 1.15rem;
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 243, 189, .08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.receipt > .label { margin-bottom: .5rem; }

.receipt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .92rem;
}

.receipt-row strong {
  color: var(--ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.receipt small {
  display: block;
  margin-top: .6rem;
  color: var(--soft);
  font-size: .74rem;
  line-height: 1.45;
}

@keyframes float {
  0%, 100% { transform: var(--mark-shift); }
  50% { transform: var(--mark-shift) translateY(-14px); }
}

h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: .14em;
  margin-bottom: -.14em;
}

h1 .line > span {
  display: inline-block;
  animation: line-in 1s cubic-bezier(.2, .7, .2, 1) both;
}

h1 .line:nth-child(2) > span { animation-delay: .14s; }
.hero-copy > h1 { animation: none; }

@keyframes line-in {
  from { opacity: 0; transform: translateY(105%); }
}

@keyframes sheen {
  0%, 60% { background-position: 130% 0; }
  85%, 100% { background-position: -30% 0; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
}

.hero-copy > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-copy > :nth-child(5) { animation-delay: .32s; }
.stage { animation: rise 1s .25s cubic-bezier(.2, .7, .2, 1) both; }

/* ---------- Sections ---------- */

.section { margin-top: 6.5rem; }
.anchor-section { scroll-margin-top: 6rem; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.6rem;
}

.section-heading .eyebrow { margin-bottom: .8rem; }
.section-heading h2 { margin-bottom: 0; }

.section-heading > p {
  max-width: 26rem;
  margin: 0 0 .35rem;
  color: var(--muted);
  line-height: 1.55;
}

.section-action {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* ---------- Metrics strip ---------- */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.metric { transition: background-color .2s ease; }
.metric:hover { background: rgba(28, 22, 14, .92); }

.metric {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  gap: .3rem;
  padding: 1.4rem 1.5rem 1.3rem;
  background: var(--surface);
}

.metric strong {
  display: block;
  margin-top: auto;
  font-size: clamp(1.55rem, 2.1vw, 2rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.metric small {
  color: var(--soft);
  font-size: .82rem;
  line-height: 1.4;
}

/* ---------- How it works ---------- */

.how {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 1.5rem;
  align-items: stretch;
}

.steps {
  display: grid;
  gap: .7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1rem;
  padding: 1.15rem 1.3rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.step-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #281707;
  background: linear-gradient(135deg, #fff3bd, #d9982d);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(217, 152, 45, .26);
  transition: box-shadow .2s ease, transform .2s ease;
}

.step-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step { transition: border-color .2s ease, background-color .2s ease; }
.step:hover { background: var(--panel-hover); border-color: var(--line-strong); }
.step:hover .step-icon { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(217, 152, 45, .38); }

.step h3 { margin: .45rem 0 .25rem; }

.step p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.55;
}

.split-panel {
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1.7rem 1.7rem;
  background: linear-gradient(180deg, rgba(40, 29, 14, .92), rgba(20, 15, 9, .92));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 243, 189, .08);
}

.split-panel h3 {
  margin: .6rem 0 .3rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.025em;
}

.split-panel > p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.55;
}

.flow {
  width: 100%;
  height: auto;
  margin: 1.4rem 0 .6rem;
  overflow: visible;
  font-family: var(--font);
}

.flow-ring { fill: rgba(242, 200, 109, .08); stroke: var(--gold); stroke-width: 1.5; }
.flow-glyph { fill: var(--gold); font-size: 21px; font-weight: 800; }
.flow-trunk { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.flow-branch { fill: none; stroke-linecap: round; }
.b-rebate { stroke: #fff1bd; stroke-width: 5; }
.b-holders { stroke: #e2ab3d; stroke-width: 15; }
.b-creator { stroke: #a4722a; stroke-width: 4; }
.b-operations { stroke: #6d4d1b; stroke-width: 2.5; }

.flow-pulse {
  fill: none;
  stroke: #fffaf0;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 5 27;
  opacity: .75;
  animation: flow 2.4s linear infinite;
}

.flow-pulse.p2 { animation-delay: -.6s; }
.flow-pulse.p3 { animation-delay: -1.2s; }
.flow-pulse.p4 { animation-delay: -1.8s; }

@keyframes flow { to { stroke-dashoffset: -32; } }

.flow-label { fill: var(--muted); font-size: 12.5px; font-weight: 500; }
.flow-pct { fill: var(--ink); font-weight: 700; }

.split-bar {
  display: flex;
  height: 14px;
  gap: 3px;
  margin: 1.4rem 0 1.1rem;
}

.split-bar span {
  display: block;
  height: 100%;
  border-radius: 4px;
  min-width: 3px;
}

.split-bar span:first-child { border-radius: 999px 4px 4px 999px; }
.split-bar span:last-child { border-radius: 4px 999px 999px 4px; }

/* Static policy bar (20 / 60 / 15 / 5). Inline styles are blocked by the CSP. */
.split-bar.policy .s-rebate { flex: 20; }
.split-bar.policy .s-holders { flex: 60; }
.split-bar.policy .s-creator { flex: 15; }
.split-bar.policy .s-operations { flex: 5; }

.s-rebate { background: #fff1bd; }
.s-holders { background: linear-gradient(90deg, #f2c86d, #d99a2e); }
.s-creator { background: #a4722a; }
.s-operations { background: #634719; }

.split-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem 1rem;
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
}

.split-legend li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: .6rem;
  color: var(--muted);
  font-size: .92rem;
}

.split-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.split-legend strong {
  color: var(--ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.split-note {
  margin: auto 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: .82rem;
  line-height: 1.5;
}

/* ---------- Status pill ---------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .32rem .65rem;
  color: var(--muted);
  background: rgba(255, 244, 214, .06);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .8;
}

.status[data-status="completed"], .status[data-status="paid"] {
  color: #1f1405;
  background: linear-gradient(135deg, #fff1bd, #e2ab3d);
  border-color: transparent;
}

.status[data-status="failed"], .status[data-status="purchase_failed"] {
  color: #ffd6cf;
  background: rgba(255, 90, 60, .12);
  border-color: rgba(255, 120, 90, .35);
}

/* ---------- Notice ---------- */

.notice {
  padding: 1rem 1.2rem;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  line-height: 1.55;
}

.notice[hidden] { display: none; }

#data-error { margin-top: 2.5rem; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 2.5rem 0 3.5rem;
  color: var(--soft);
  border-top: 1px solid var(--line);
  font-size: .85rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--ink);
  text-decoration: none;
}

.footer-brand .wordmark { display: block; line-height: 1.1; }

.footer-brand small {
  display: block;
  margin-top: .2rem;
  color: var(--soft);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
}

.site-footer nav a {
  padding: .5rem .8rem;
  color: var(--muted);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.site-footer nav a:hover { color: var(--ink); background: var(--panel-hover); }

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: .5rem 1.6rem;
  margin: 0;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

/* ---------- Texture ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .055;
  background: url("/assets/grain.svg") repeat;
  background-size: 240px 240px;
  mix-blend-mode: overlay;
}

@property --ang {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.shimmer-border { position: relative; }

.shimmer-border::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 1;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--ang), transparent 0turn, transparent .55turn, rgba(255, 241, 194, .95) .7turn, transparent .85turn);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: spin-border 7s linear infinite;
}

@keyframes spin-border { to { --ang: 1turn; } }

.flow.is-drawing .flow-pulse { opacity: 0; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mark-wrap, .mark-sheen, .flow-pulse, .hero-copy > *, .stage, h1 .line > span, .shimmer-border::before { animation: none; }
  .stage-dust { display: none; }
  .button, .site-header nav a, .step, .step-icon { transition: none; }
  .button:not(.secondary)::after { display: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 3.5rem;
  }

  .stage { min-height: 0; padding: 1rem 0; }
  .stage-3d { --bleed-x: 60px; --bleed-y: 100px; }
  .mark-wrap { width: min(52vw, 280px); }
  .metrics { grid-template-columns: 1fr 1fr; }
  .how { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: .8rem; }
}

@media (max-width: 700px) {
  .header-inner {
    min-height: 0;
    padding: .65rem 0 .7rem;
    grid-template-columns: 1fr auto;
    gap: .6rem;
  }

  .brand-link { grid-column: 1; grid-row: 1; }
  .wordmark { font-size: 1rem; }
  .header-actions { grid-column: 2; grid-row: 1; }

  .site-header nav {
    display: grid;
    width: 100%;
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(3, 1fr);
  }

  .site-header nav a {
    padding: .6rem .4rem;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .shell { width: calc(100% - 1.5rem); }
  h1 { font-size: clamp(2.35rem, 11vw, 3.1rem); }
  .lede { font-size: 1rem; }
  .actions .button { flex: 1 1 auto; }
  .stage { gap: 1.25rem; padding-top: 1.5rem; }
  .mark-wrap { width: 190px; }
  .receipt { width: 100%; }
  .section { margin-top: 4.5rem; }
  .metrics { grid-template-columns: 1fr; }
  .metric { min-height: 0; }
  .split-legend { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
