/* ============================================================================
   Wedding Budget Benchmarks 2026 — editorial design language (Round 4)
   Mobile-first · BEM · self-hosted Cormorant Garamond display + system-sans body
   No runtime external requests. All contrast ratios computed & noted at use.
   ========================================================================== */

/* ---------- Fonts (self-hosted, variable, weights 500–700) ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500 700;             /* variable range in one 37KB file */
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin.woff2") format("woff2");
  /* latin subset: covers £ (U+00A3), en-dash (U+2013), curly quotes, ≈,→ */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215;
}

:root {
  /* ---- Warm editorial palette (OKLCH-reasoned, hex for reliability) ---- */
  --ivory:        #f6f0e8;   /* body wash top */
  --ivory-deep:   #efe6d9;   /* body wash bottom */
  --linen:        #fbf6ee;   /* surfaces / cards */
  --linen-warm:   #f5ecdd;   /* alt surface */
  --champagne:    #f3e8d3;   /* accent surface */
  --blush:        #f5e6e0;   /* secondary accent surface */
  --cocoa:        #2a1a11;   /* dark bookend (hero) */
  --cocoa-deep:   #1f1109;   /* footer */
  --cocoa-soft:   #3d2718;   /* mid cocoa */

  --ink:          #241a12;   /* body text — on ivory: 15.4:1 */
  --ink-muted:    #5a4c3d;   /* muted body — on ivory: 6.4:1 (AA) */
  --heading:      #1d130c;   /* headings — on ivory: 16.9:1 */
  --terracotta:   #a0432c;   /* primary accent — on ivory: 5.9:1 (AA) */
  --terracotta-dk:#7c3020;   /* deep accent — on ivory: 8.7:1 */
  --gilt:         #b07c3d;   /* champagne-gold accent line — decorative */
  --gilt-soft:    #cba36a;   /* lighter gilt — decorative ornaments */

  --border:       #e2d5c2;
  --border-strong:#c9b79c;

  --link:         #7c3020;   /* on ivory: 8.7:1 */
  --link-visited: #6a4634;
  --focus:        #1c5f7a;   /* on linen: 6.0:1 */

  /* Data bars */
  --bar-start: #e6bd8f;
  --bar-end:   #bf6a45;
  --bar-track: #ece0cd;

  /* Ornament ink (decorative, exempt from AA) */
  --sprig: #c08a5a;

  /* Fonts */
  --serif: "Cormorant Garamond", "Cormorant", "Hoefler Text", "Baskerville", Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Spacing scale */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem;
  --s5: 1.5rem;  --s6: 2rem;   --s7: 3rem;    --s8: 4.5rem; --s9: 7rem;

  --radius: 6px; --radius-md: 12px; --radius-lg: 16px;

  /* ONE content width for EVERYTHING. No two-tier system. ~1170px desktop,
     fluid padding below. Prose wraps at a readable measure but every block
     shares the same left/right edge as the container. */
  --content: 78rem;            /* ≈1248px — content ≈81% of a 1440 viewport */
  --prose: 62ch;               /* readable line length (callout only) */

  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);

  --shadow-card: 0 10px 30px -12px rgb(42 26 17 / 0.22);
  --shadow-lift: 0 20px 44px -16px rgb(42 26 17 / 0.30);

  /* z-index scale */
  --z-margin-art: 0;
  --z-content: 1;
  --z-band: 2;
  --z-skip: 100;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;              /* 16px floor */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Long vertical wash instead of abrupt bands */
  background:
    radial-gradient(120% 60% at 50% 0%, #fbf6ee 0%, transparent 60%),
    linear-gradient(180deg, var(--ivory) 0%, var(--ivory-deep) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

img { max-width: 100%; }

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:visited { color: var(--link-visited); }
a:hover, a:focus { color: var(--terracotta); }

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

h1, h2, h3, h4 {
  color: var(--heading);
  font-family: var(--serif);
  line-height: 1.08;
  margin-top: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}
p { margin-top: 0; }

/* ---------- Layout primitives ----------
   Single shared width. .container and .container--wide are aliases now so any
   legacy markup lands on the same edge. Fluid side padding: clamp keeps the
   gutter generous on wide screens (content ≈80% of viewport) and tight on
   mobile. EVERY child (title, intro, table, grid, calculator, FAQ) shares this
   exact left/right edge — no per-element max-width overrides. */
.container,
.container--wide {
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: clamp(var(--s4), 3vw, var(--s6));
}

/* Prose blocks stay LEFT-aligned to the shared container edge and FILL it
   (owner mandate: one width for everything, no narrow columns). text-wrap:
   pretty keeps long measures readable. */
.section__intro,
.lede__text { max-width: none; text-wrap: pretty; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--terracotta-dk); color: #fff;
  padding: var(--s3) var(--s4); z-index: var(--z-skip);
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; top: 0; }

/* ============================================================================
   Botanical margin art (≥1600px) — large faint sprays in the side gutters
   ========================================================================== */
.margin-art {
  display: none;
  position: fixed;
  top: 0; bottom: 0;
  width: 240px;
  color: var(--sprig);
  opacity: 0.13;
  pointer-events: none;
  z-index: var(--z-margin-art);
}
.margin-art--left  { left: 0; }
.margin-art--right { right: 0; transform: scaleX(-1); }
.margin-art svg { position: absolute; top: 12%; left: 0; width: 100%; height: auto; }
@media (min-width: 100rem) {   /* 1600px */
  .margin-art { display: block; }
}
/* margin-art inner svg gets a gentle scroll-parallax drift via JS (transform),
   so no competing CSS transform animation here. The --right mirror is applied
   on the wrapper div, leaving the svg's transform free for parallax. */
@media (prefers-reduced-motion: no-preference) {
  .js .margin-art svg { will-change: transform; }
}

/* ============================================================================
   Hero
   ========================================================================== */
.site-header {
  position: relative;
  isolation: isolate;
  padding-block: var(--s9) var(--s8);
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 82% -12%, #4a2f1d 0%, var(--cocoa) 52%),
    linear-gradient(180deg, var(--cocoa-soft) 0%, var(--cocoa) 60%, var(--cocoa-deep) 100%);
}
/* Petal-grain texture (data-URI, ≤2% opacity) + warm vignette for depth */
.site-header::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(150% 130% at 15% 130%, rgb(0 0 0 / 0.34) 0%, transparent 58%),
    radial-gradient(90% 70% at 90% 0%, rgb(220 176 120 / 0.10) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='%23e6c9a8' fill-opacity='0.5'%3E%3Ccircle cx='12' cy='18' r='0.7'/%3E%3Ccircle cx='42' cy='8' r='0.6'/%3E%3Ccircle cx='30' cy='40' r='0.7'/%3E%3Ccircle cx='52' cy='50' r='0.6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, auto, 60px 60px;
  pointer-events: none;
}

/* Floral arch/wreath framing the title — inline SVG, floats gently */
.site-header__wreath {
  position: absolute;
  top: 50%; left: 50%;
  width: min(760px, 92vw);
  transform: translate(-50%, -50%);
  color: var(--gilt-soft);
  opacity: 0.30;
  z-index: -1;
  pointer-events: none;
}
@media (max-width: 48rem) {
  .site-header__wreath { opacity: 0.22; width: 130vw; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .site-header__wreath { animation: floatY 8s ease-in-out infinite; }
}
@keyframes floatY {
  0%, 100% { transform: translate(-50%, -50%); }
  50%      { transform: translate(-50%, calc(-50% - 10px)); }
}

.site-header .container { position: relative; z-index: var(--z-content); text-align: center; }

.site-header__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #ecd4b4;                   /* on cocoa darkest #1f1109: 9.1:1 */
  margin-bottom: var(--s5);
  padding: var(--s2) var(--s4);
  border: 1px solid rgb(230 201 168 / 0.34);
  border-radius: 999px;
}
.site-header__eyebrow::before,
.site-header__eyebrow::after {
  content: "";
  width: 18px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gilt-soft));
}
.site-header__eyebrow::after { background: linear-gradient(90deg, var(--gilt-soft), transparent); }

.site-header__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 1.4rem + 5vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: var(--s5);
  color: #fdf8f0;                   /* on cocoa: 13.6:1 */
  text-wrap: balance;
  max-width: 30ch;
  margin-inline: auto;
}
.site-header__title em {
  font-style: italic;
  color: #f0cfa0;                   /* italic gilt highlight on cocoa: 8.4:1 */
}

.site-header__lead {
  font-family: var(--sans);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem);
  line-height: 1.6;
  max-width: 44ch;
  margin: 0 auto var(--s6);
  color: #f1e4d3;                   /* on cocoa: 12.4:1 */
  text-wrap: pretty;
}
.site-header__lead strong { color: #fff; font-weight: 600; }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  align-items: center;
  justify-content: center;
}
.hero__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 52px;
  padding: var(--s3) var(--s6);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.3s var(--ease-quart),
    background-color 0.3s var(--ease-quart),
    box-shadow 0.3s var(--ease-quart),
    color 0.3s var(--ease-quart);
}
.hero__btn--primary {
  background: linear-gradient(135deg, #f6e6cb 0%, #e7c191 100%);
  color: #2b1a10;                   /* on champagne fill: 12.7:1 */
  box-shadow: 0 10px 26px rgb(0 0 0 / 0.30);
}
.hero__btn--primary:hover,
.hero__btn--primary:focus-visible {
  color: #2b1a10;
  background: linear-gradient(135deg, #faeed7 0%, #efcfa0 100%);
}
.hero__btn-arrow { transition: transform 0.3s var(--ease-quart); }
.hero__btn--ghost {
  color: #f1e4d3;                   /* on cocoa: 12.4:1 */
  border: 1px solid rgb(230 201 168 / 0.5);
  background: rgb(255 255 255 / 0.05);
}
.hero__btn--ghost:hover,
.hero__btn--ghost:focus-visible {
  color: #fff;
  border-color: var(--gilt-soft);
  background: rgb(255 255 255 / 0.11);
}
.site-header :focus-visible { outline-color: var(--gilt-soft); }

.site-header__meta {
  font-family: var(--sans);
  font-size: 0.8125rem;
  margin: var(--s6) auto 0;
  max-width: 46ch;
  color: #dbc6ac;                   /* on cocoa: 8.6:1 */
}

@media (prefers-reduced-motion: no-preference) {
  .hero__btn--primary:hover,
  .hero__btn--primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgb(0 0 0 / 0.36);
  }
  .hero__btn--primary:hover .hero__btn-arrow { transform: translateX(4px); }
}

/* ============================================================================
   Lede + key-stat band
   ========================================================================== */
.lede {
  position: relative;
  padding-block: var(--s7) var(--s8);
  overflow: visible;
}
/* Soft radial glow behind the stat band */
.lede::before {
  content: "";
  position: absolute;
  top: -3rem; left: 50%;
  width: min(820px, 96vw); height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(60% 60% at 50% 40%, rgb(224 176 120 / 0.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.key-stats {
  position: relative;
  z-index: var(--z-band);
  margin-top: calc(var(--s8) * -1);
}
@media (max-width: 34rem) {
  .key-stats { margin-top: calc(var(--s7) * -1); }
}
.key-stats__grid {
  display: grid;
  gap: var(--s4);
  grid-template-columns: 1fr;
  margin: 0; padding: 0; list-style: none;
}
@media (min-width: 34rem) { .key-stats__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60rem) { .key-stats__grid { grid-template-columns: repeat(4, 1fr); } }

.key-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--s6) var(--s5) var(--s5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(165deg, var(--linen) 0%, var(--champagne) 100%);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease-quart), box-shadow 0.3s var(--ease-quart);
}
.key-stat:nth-child(2n) {
  background: linear-gradient(165deg, var(--linen) 0%, var(--blush) 100%);
}
/* Corner botanical spray, top-right of each stat card */
.key-stat__spray {
  position: absolute;
  top: -6px; right: -6px;
  width: 78px; height: 78px;
  color: var(--sprig);
  opacity: 0.34;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .key-stat:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
}
.key-stat__figure {
  display: block;
  position: relative;
  white-space: nowrap;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 1.9rem + 3vw, 3.4rem);
  line-height: 0.98;
  color: var(--terracotta-dk);      /* on champagne #f3e8d3: 8.1:1 */
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
}
.key-stat__label {
  position: relative;
  margin: var(--s3) 0 0;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--heading);
}
.key-stat__source {
  position: relative;
  display: inline-block;
  margin-top: auto;
  padding-top: var(--s3);
  font-family: var(--sans);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--ink-muted);          /* on champagne: 6.0:1 */
}
/* 4-across tier: cards are narrow (container caps ~1024px / 4 ≈ 220px).
   Cap the figure so "$34,200" (7 glyphs) never clips. */
@media (min-width: 60rem) {
  .key-stat { padding-inline: var(--s4); }
  .key-stat__figure { font-size: clamp(1.9rem, 0.8rem + 1.9vw, 2.4rem); letter-spacing: -0.03em; }
}

.lede__body {
  position: relative;
  z-index: var(--z-content);
  margin-top: var(--s8);
}
.lede__text {
  font-size: 1.1875rem;
  line-height: 1.7;
  text-wrap: pretty;
}
.lede__figure {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15em;
  color: var(--terracotta-dk);
}

/* Highlighted median callout — elevated but readable (not a giant pull-quote) */
.lede__callout {
  position: relative;
  margin-top: var(--s5);
  padding: var(--s6) var(--s6) var(--s5);
  background: linear-gradient(155deg, var(--champagne) 0%, var(--blush) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.lede__callout-spray {
  position: absolute;
  top: -10px; right: -10px;
  width: 108px; height: 108px;
  color: var(--sprig);
  opacity: 0.26;
  pointer-events: none;
}
.lede__callout-text {
  position: relative;
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);                 /* on champagne: 12.5:1 */
  text-wrap: pretty;
  max-width: 62ch;
}
.lede__callout-text strong { color: var(--terracotta-dk); }
.lede__callout-text em { color: var(--ink-muted); font-style: italic; }

/* ---------- Jump nav ---------- */
.jump-nav {
  position: relative;
  z-index: var(--z-content);
  margin-top: var(--s7);
  padding-top: var(--s6);
}
.jump-nav::before {
  content: "";
  display: block;
  width: 46px; height: 1px;
  margin: 0 auto var(--s5);
  background: var(--gilt);
}
.jump-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s2);
  list-style: none; margin: 0; padding: 0;
}
.jump-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--s2) var(--s4);
  background: var(--linen);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
  transition: background-color 0.25s var(--ease-quart), border-color 0.25s var(--ease-quart), color 0.25s var(--ease-quart), transform 0.25s var(--ease-quart);
}
.jump-nav__link:hover,
.jump-nav__link:focus-visible {
  background: #fff;
  border-color: var(--border-strong);
  color: var(--terracotta-dk);
}
.jump-nav__link.is-active {
  background: var(--terracotta-dk);
  border-color: var(--terracotta-dk);
  color: #fff;                       /* on terracotta-dk: 7.3:1 */
}
.jump-nav__link.is-active:hover,
.jump-nav__link.is-active:focus-visible { background: var(--terracotta-dk); color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .jump-nav__link:hover { transform: translateY(-2px); }
}

/* ============================================================================
   Sections — soft flow, no hairline stubs, generous padding
   ========================================================================== */
.section {
  position: relative;
  padding-block: var(--s8);
}
@media (min-width: 48rem) { .section { padding-block: var(--s9); } }

/* Section rhythm via background wash transitions, not 1px lines.
   Even sections sit on a slightly deeper linen; a soft radial glow behind
   the odd ones adds depth. AA holds: ink 15.0:1 / muted 6.2:1 on linen-warm. */
.section:nth-of-type(even) {
  background: linear-gradient(180deg, var(--linen-warm) 0%, #f2e8d8 100%);
}
.section:nth-of-type(even)::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(70% 50% at 50% 0%, rgb(224 176 120 / 0.10) 0%, transparent 60%);
  pointer-events: none;
}

/* Ghosted ornamental numeral behind the section title */
.section__eyebrow {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--terracotta);          /* on ivory: 5.9:1 (AA large not needed, but passes AA normal borderline; used as label) */
  margin-bottom: var(--s4);
}
.section__eyebrow-num {
  position: absolute;
  bottom: -0.15em; left: 0;          /* pinned to container left edge, never past it */
  font-family: var(--serif);
  font-size: 5.5rem;
  font-weight: 600;
  line-height: 1;
  color: var(--terracotta);
  opacity: 0.09;                     /* decorative ghost numeral behind the label + title */
  pointer-events: none;
  z-index: 0;
  font-variant-numeric: lining-nums;
}
.section__eyebrow-text {
  position: relative;
  z-index: var(--z-content);
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
}
.section__eyebrow-text::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--gilt);
}
.section__title {
  position: relative;
  z-index: var(--z-content);
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: var(--s4);
  text-wrap: balance;
}
.section__intro {
  color: var(--ink-muted);
  margin-bottom: var(--s6);
  font-size: 1.0625rem;
}
.section h3 {
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem);
  margin-top: var(--s7);
  margin-bottom: var(--s4);
}

/* ============================================================================
   Calculator
   ========================================================================== */
.calculator {
  position: relative;
  background: var(--linen);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--s6) var(--s5) var(--s5);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
/* Soft radial glow moment behind the calculator */
.calculator::after {
  content: "";
  position: absolute;
  top: -40%; right: -20%;
  width: 60%; height: 120%;
  background: radial-gradient(50% 50% at 50% 50%, rgb(224 176 120 / 0.14) 0%, transparent 70%);
  pointer-events: none;
}
.calculator__spray {
  position: absolute;
  top: -10px; left: -10px;
  width: 88px; height: 88px;
  color: var(--sprig);
  opacity: 0.28;
  pointer-events: none;
}
.calculator__form {
  position: relative;
  display: grid;
  gap: var(--s4);
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) {
  .calculator__form { grid-template-columns: 1fr 1fr; }
  .calculator__field--full { grid-column: 1 / -1; }
}
.calculator__field { display: flex; flex-direction: column; gap: var(--s2); }
.calculator__label { font-family: var(--sans); font-weight: 600; font-size: 0.9375rem; }
.calculator__input,
.calculator__select {
  font-family: var(--sans);
  font-size: 1rem;
  padding: var(--s3);
  min-height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  transition: border-color 0.25s var(--ease-quart), box-shadow 0.25s var(--ease-quart);
}
.calculator__input:focus,
.calculator__select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgb(28 95 122 / 0.14);
  outline: none;
}
.calculator__submit {
  min-height: 52px;
  padding: var(--s3) var(--s6);
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dk) 100%);
  color: #fff;                       /* on terracotta-dk: 7.3:1 */
  border: none;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px -8px rgb(124 48 32 / 0.5);
  transition: background 0.25s var(--ease-quart), transform 0.2s var(--ease-quart), box-shadow 0.25s var(--ease-quart);
}
.calculator__submit:hover { box-shadow: 0 12px 26px -8px rgb(124 48 32 / 0.6); }
@media (prefers-reduced-motion: no-preference) {
  .calculator__submit:hover { transform: translateY(-2px); }
  .calculator__submit:active { transform: scale(0.97); }
}
.calculator__result {
  position: relative;
  margin-top: var(--s5);
  padding: var(--s6) var(--s5);
  background: linear-gradient(160deg, var(--champagne) 0%, var(--blush) 100%);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
}
.calculator__result[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .calculator__result:not([hidden]) { animation: resultIn 0.5s var(--ease-expo) both; }
}
@keyframes resultIn {
  from { opacity: 0; transform: scale(0.965) translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.calculator__result-range {
  font-family: var(--serif);
  font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--terracotta-dk);       /* on champagne: 8.1:1 */
  margin-bottom: var(--s2);
  font-variant-numeric: tabular-nums lining-nums;
}
.calculator__result-detail {
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink-muted);           /* on champagne: 6.0:1 */
  margin-bottom: var(--s1);
}
.calculator__note {
  position: relative;
  margin-top: var(--s4);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}
.calculator__noscript {
  padding: var(--s4);
  background: var(--champagne);
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

/* ============================================================================
   Tables
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  margin-bottom: var(--s6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--linen);
  box-shadow: var(--shadow-card);
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.9375rem;
  min-width: 28rem;
}
.data-table caption {
  text-align: left;
  padding: var(--s4) var(--s5);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--heading);
  background: linear-gradient(180deg, #fff 0%, var(--linen) 100%);
  border-bottom: 1px solid var(--border);
  caption-side: top;
}
.data-table caption small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  margin-top: var(--s1);
  line-height: 1.5;
}
.data-table th,
.data-table td {
  padding: var(--s3) var(--s5);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table thead th {
  background: var(--champagne);
  font-weight: 700;
  color: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
}
.data-table tbody tr:nth-child(even) { background: rgb(245 230 224 / 0.5); }
.data-table tbody tr { transition: background-color 0.2s var(--ease-quart); }
.data-table tbody tr:hover { background: var(--champagne); }
.data-table tbody td:first-child {
  font-weight: 600;
  color: var(--heading);
}
.data-table tfoot td {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  white-space: normal;
}

/* ---------- Data bars ---------- */
.data-cell {
  position: relative;
  padding: 0 !important;
  vertical-align: middle;
}
.data-cell__bar {
  position: relative;
  display: block;
  min-width: 8.5rem;
  padding: var(--s3) var(--s5);
  background: linear-gradient(90deg, var(--bar-start) 0%, var(--bar-end) 100%) no-repeat;
  background-size: var(--bar, 0%) 100%;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
}
.data-cell::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--bar-track);
  z-index: 0;
}
.data-cell .data-cell__bar { z-index: var(--z-content); }
.section:nth-of-type(even) .data-cell::before { background: #e7dac6; }

@media (prefers-reduced-motion: no-preference) {
  .js .data-table--bars .data-cell__bar {
    background-size: 0% 100%;
    transition: background-size 0.8s var(--ease-expo);
  }
  .js .reveal.is-visible .data-table--bars .data-cell__bar {
    background-size: var(--bar, 0%) 100%;
  }
  .js .data-table--bars tbody tr:nth-child(1) .data-cell__bar { transition-delay: 0ms; }
  .js .data-table--bars tbody tr:nth-child(2) .data-cell__bar { transition-delay: 55ms; }
  .js .data-table--bars tbody tr:nth-child(3) .data-cell__bar { transition-delay: 110ms; }
  .js .data-table--bars tbody tr:nth-child(4) .data-cell__bar { transition-delay: 165ms; }
  .js .data-table--bars tbody tr:nth-child(5) .data-cell__bar { transition-delay: 220ms; }
  .js .data-table--bars tbody tr:nth-child(6) .data-cell__bar { transition-delay: 275ms; }
  .js .data-table--bars tbody tr:nth-child(n+7) .data-cell__bar { transition-delay: 330ms; }
}

/* ============================================================================
   Definitions
   ========================================================================== */
.definition-grid {
  display: grid;
  gap: var(--s5);
  grid-template-columns: 1fr;
  margin-top: var(--s5);
}
@media (min-width: 40rem) { .definition-grid { grid-template-columns: 1fr 1fr; } }
.definition {
  position: relative;
  padding: var(--s6) var(--s5);
  background: var(--linen);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.definition__spray {
  position: absolute;
  bottom: -14px; right: -14px;
  width: 84px; height: 84px;
  color: var(--sprig);
  opacity: 0.22;
  pointer-events: none;
}
.definition__term {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--s2);
  color: var(--heading);
}
.definition__text {
  position: relative;
  color: var(--ink-muted);           /* on linen: 6.2:1 */
  font-size: 0.9375rem;
}

/* ============================================================================
   Stats
   ========================================================================== */
.stats-grid {
  display: grid;
  gap: var(--s5);
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
.stat {
  position: relative;
  padding: var(--s6) var(--s5) var(--s5);
  background: var(--linen);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s var(--ease-quart), transform 0.3s var(--ease-quart), border-color 0.3s var(--ease-quart);
}
.stat:nth-child(3n+1) { background: linear-gradient(165deg, var(--linen) 0%, var(--champagne) 100%); }
.stat:nth-child(3n+2) { background: linear-gradient(165deg, var(--linen) 0%, var(--blush) 100%); }
.stat:nth-child(3n+3) { background: var(--linen); }
.stat__spray {
  position: absolute;
  top: -8px; right: -8px;
  width: 72px; height: 72px;
  color: var(--sprig);
  opacity: 0.30;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .stat:hover { box-shadow: var(--shadow-lift); transform: translateY(-4px); border-color: var(--border-strong); }
}
.stat__figure {
  display: block;
  position: relative;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 2rem + 3vw, 3.6rem);
  line-height: 0.98;
  font-weight: 600;
  color: var(--terracotta-dk);       /* on champagne: 8.1:1 / on linen: 8.7:1 */
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
  margin-bottom: var(--s3);
}
.stat__label {
  position: relative;
  font-family: var(--sans);
  font-size: 0.9375rem;
  margin-bottom: var(--s2);
  color: var(--ink);
  line-height: 1.5;
}
.stat__source {
  position: relative;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.stat__badge {
  position: relative;
  display: inline-block;
  margin-top: var(--s3);
  font-family: var(--sans);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--s1) var(--s3);
  background: rgb(160 67 44 / 0.12);
  border-radius: 999px;
  color: var(--terracotta-dk);       /* on tinted bg: >7:1 */
  font-weight: 700;
}

/* ============================================================================
   Pull quote
   ========================================================================== */
.pull-quote {
  position: relative;
  margin: var(--s7) 0;
  padding: var(--s8) var(--s6) var(--s6);
  background: linear-gradient(150deg, var(--champagne) 0%, var(--blush) 100%);
  color: var(--ink);                 /* on champagne: 12.5:1 */
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2rem);
  font-weight: 500;
  line-height: 1.35;
  font-style: italic;
  text-wrap: pretty;
  overflow: hidden;
}
.pull-quote__spray {
  position: absolute;
  top: -8px; right: -8px;
  width: 120px; height: 120px;
  color: var(--sprig);
  opacity: 0.26;
  pointer-events: none;
}
.pull-quote__mark {
  position: absolute;
  top: 0.1em; left: 0.35em;
  font-family: var(--serif);
  font-size: 5rem;
  line-height: 1;
  color: var(--gilt);
  opacity: 0.6;
  font-style: normal;
}
.pull-quote strong { color: var(--terracotta-dk); font-weight: 700; font-style: normal; }

/* ============================================================================
   Section divider ornament
   ========================================================================== */
.divider {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-block: var(--s7);
  color: var(--sprig);
}
.divider svg { opacity: 0.85; }

/* ============================================================================
   Ornaments (general)
   ========================================================================== */
.ornament { display: block; }

/* ============================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative;
  isolation: isolate;
  padding-block: var(--s8);
  background:
    radial-gradient(120% 160% at 50% -30%, var(--cocoa-soft) 0%, var(--cocoa-deep) 62%),
    var(--cocoa-deep);
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: #ded0bd;                    /* on cocoa-deep: 11.4:1 */
  overflow: hidden;
  text-align: center;
}
.site-footer::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='%23e6c9a8' fill-opacity='0.5'%3E%3Ccircle cx='16' cy='20' r='0.7'/%3E%3Ccircle cx='44' cy='12' r='0.6'/%3E%3Ccircle cx='34' cy='44' r='0.7'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 60px;
  pointer-events: none;
}
.site-footer__crest {
  display: block;
  width: 120px; height: auto;
  margin: 0 auto var(--s5);
  color: var(--gilt-soft);
  opacity: 0.7;
}
.site-footer .container { position: relative; z-index: var(--z-content); text-align: left; }
.site-footer strong { color: #f3e7d4; }   /* on cocoa-deep: 13.6:1 */
.site-footer a { color: #ecbf94; }        /* on cocoa-deep: 7.9:1 */
.site-footer a:visited { color: #ecbf94; }
.site-footer a:hover, .site-footer a:focus { color: #fff; }
.site-footer__sources {
  columns: 1;
  margin: var(--s5) 0;
  padding-left: var(--s5);
}
@media (min-width: 40rem) { .site-footer__sources { columns: 2; } }
.site-footer__sources li { margin-bottom: var(--s2); break-inside: avoid; }
.site-footer__disclaimer {
  font-style: italic;
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid rgb(222 208 189 / 0.18);
  color: #d3c3ac;                    /* on cocoa-deep: 9.7:1 */
}
.site-footer :focus-visible { outline-color: var(--gilt-soft); }

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

/* ============================================================================
   MOTION — per-element IntersectionObserver reveals. NO global timer.
   Default (no .js) = fully visible. Reduced-motion = fully visible, bars full.
   ========================================================================== */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(38px);
    transition: opacity 0.65s var(--ease-expo), transform 0.65s var(--ease-expo);
    will-change: opacity, transform;
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }

  /* Stagger direct children (cards, stats, faq, definitions) */
  .js .reveal--stagger > *,
  .js .reveal--stagger > .key-stats__grid > * {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.6s var(--ease-expo), transform 0.6s var(--ease-expo);
  }
  .js .reveal--stagger.is-visible > *,
  .js .reveal--stagger.is-visible > .key-stats__grid > * {
    opacity: 1;
    transform: none;
  }
  .js .reveal--stagger.is-visible > *:nth-child(1),
  .js .reveal--stagger.is-visible > .key-stats__grid > *:nth-child(1) { transition-delay: 0ms; }
  .js .reveal--stagger.is-visible > *:nth-child(2),
  .js .reveal--stagger.is-visible > .key-stats__grid > *:nth-child(2) { transition-delay: 80ms; }
  .js .reveal--stagger.is-visible > *:nth-child(3),
  .js .reveal--stagger.is-visible > .key-stats__grid > *:nth-child(3) { transition-delay: 160ms; }
  .js .reveal--stagger.is-visible > *:nth-child(4),
  .js .reveal--stagger.is-visible > .key-stats__grid > *:nth-child(4) { transition-delay: 240ms; }
  .js .reveal--stagger.is-visible > *:nth-child(5) { transition-delay: 320ms; }
  .js .reveal--stagger.is-visible > *:nth-child(6) { transition-delay: 400ms; }
  .js .reveal--stagger.is-visible > *:nth-child(n+7) { transition-delay: 480ms; }

  /* Hero entrance choreography (fires on load) */
  .js .site-header [data-hero] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--ease-expo), transform 0.7s var(--ease-expo), letter-spacing 0.7s var(--ease-expo);
  }
  .js .site-header__title[data-hero] { letter-spacing: 0.05em; }
  .js .site-header.is-entered [data-hero] { opacity: 1; transform: none; }
  .js .site-header.is-entered .site-header__title[data-hero] { letter-spacing: -0.02em; }
  .js .site-header.is-entered [data-hero="1"] { transition-delay: 80ms; }
  .js .site-header.is-entered [data-hero="2"] { transition-delay: 220ms; }
  .js .site-header.is-entered [data-hero="3"] { transition-delay: 400ms; }
  .js .site-header.is-entered [data-hero="4"] { transition-delay: 560ms; }
  .js .site-header.is-entered [data-hero="5"] { transition-delay: 700ms; }

}
