/* ===========================================================================
 *  styles.css  —  HHE donation app (index.php + thank-you.php).
 * ===========================================================================
 *
 *  Goals: clean, accessible, mobile-first, lightly branded (HHE), and
 *  dependency-free (no CSS framework, no web fonts pulled from a CDN).
 *
 *  Structure of this file:
 *    1. Design tokens (CSS custom properties)
 *    2. Base / reset-ish defaults
 *    3. Layout: page, brand header, card, section headers, footer
 *    4. Form fields, labels, hints, errors
 *    5. Components: fund picker (trigger + dialog), gift box (frequency
 *       toggle + amount grid), disclosure, gift line, buttons, spinner
 *    6. Thank-you page bits (summary list, tax line, success check)
 *    7. Accessibility helpers + reduced-motion
 * ------------------------------------------------------------------------- */

/* ── 1. Design tokens ───────────────────────────────────────────────────── */
:root {
  /* HHE brand palette: royal purple (from the lotus logo) + gold accent. */
  --brand:        #61368e;   /* HHE purple — primary accent (logo body) */
  --brand-dark:   #4e2a73;   /* hover/active (darker purple) */
  --brand-tint:   #f1ebf7;   /* light purple wash for selected chips, etc. */
  --accent:       #cb8640;   /* HHE gold — secondary accent */
  --accent-dark:  #a86f2f;
  --gold-soft:    #faf3e8;   /* pale gold wash (notes, assurance strip) */
  --gold-ink:     #7a5a23;   /* readable text on the pale gold wash */
  --ink:          #241a35;   /* near-black with a purple cast */
  --ink-soft:     #5d5470;   /* secondary text */
  --line:         #e3ddee;   /* input borders (cool neutral) */
  --line-soft:    #ece7f4;   /* hairlines, section rules */
  --bg:           #f6f4fa;   /* page background (soft lavender-white) */
  --card-bg:      #ffffff;
  --danger:       #b00020;   /* error text */
  --ok:           #1f7a3d;   /* success check */

  --radius-lg:    20px;      /* card */
  --radius:       14px;      /* panels: fund card, dialog, gift box, button */
  --radius-sm:    10px;      /* inputs */
  --shadow:       0 1px 2px rgba(38, 22, 64, 0.05), 0 12px 40px rgba(38, 22, 64, 0.10);
  --shadow-pop:   0 4px 10px rgba(38, 22, 64, 0.08), 0 18px 50px rgba(38, 22, 64, 0.18);
  --focus:        0 0 0 3px rgba(97, 54, 142, 0.22);

  --maxw:         640px;     /* form column width */
  --gap:          18px;
}

/* ── 2. Base ────────────────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

/* The hidden attribute must win even over class display rules (the fund
   trigger and gift line are display:flex/block by class but toggled via
   [hidden] from app.js). */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 420px at 50% -120px, rgba(97, 54, 142, 0.10), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
               Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1 { margin: 0 0 0.25em; font-size: 1.85rem; line-height: 1.18;
     letter-spacing: -0.01em;
     font-family: Georgia, "Times New Roman", Times, serif; }

a.link {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a.link:hover { color: var(--brand-dark); }

/* ── 3. Layout ──────────────────────────────────────────────────────────── */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 16px 52px;
}

/* Brand header: logo above the wordmark, centered (checkout-style focus). */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-bottom: 22px;
}
.brand__logo {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  display: block;
}
.brand__text { display: flex; flex-direction: column; align-items: center; }
.brand__name {
  font-weight: 700;
  font-size: 1.25rem;
  font-family: Georgia, "Times New Roman", Times, serif;
  color: #4b1d66;
  line-height: 1.15;
}
.brand__tag {
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* The white card that holds the form / confirmation. */
.card {
  background: var(--card-bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 34px 32px 30px;
}
.card__title { color: var(--ink); }
.card__lede  { color: var(--ink-soft); margin: 0 0 8px; }

/* Numbered section headers: 1 · Your gift / 2 · Your details / 3 · Payment.
   aria-hidden in the markup — purely visual wayfinding. */
.sect {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 18px;
}
.sect__n {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.sect__t {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.sect__rule { flex: 1; height: 1px; background: var(--line-soft); }

.page__footer {
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  text-align: center;
}
.page__footer-thanks {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 0.92rem;
  color: #4b1d66;
}

/* ── 4. Fields ──────────────────────────────────────────────────────────── */
.field { margin-bottom: var(--gap); }

label,
.field__label,
.address legend {
  display: block;
  font-weight: 600;
  margin-bottom: 7px;
  font-size: 0.94rem;
}
.optional { font-weight: 400; color: var(--ink-soft); font-size: 0.85em; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
textarea { resize: vertical; min-height: 76px; }

/* Native select arrow (inline SVG so there's no external asset). */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235d5470' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

/* Consistent, visible focus ring for keyboard + mouse users. */
input:focus,
select:focus,
textarea:focus,
button:focus-visible,
.toggle__input:focus-visible + .toggle__pill,
.chips__input:focus-visible + .chips__chip {
  outline: none;
  box-shadow: var(--focus);
  border-color: var(--brand);
}

.field__hint {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

/* Inline per-field error text. Hidden until .is-visible is toggled by app.js. */
.field__error {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 0.85rem;
  min-height: 0;
  display: none;
}
.field__error.is-visible { display: block; }

/* ── 5. Components ──────────────────────────────────────────────────────── */

/* ── Fund picker trigger: a select-style button that opens the dialog. ──
   Server-rendered [hidden]; app.js reveals it (and hides the native select)
   only after a successful init. Hidden again once a fund is chosen — the
   fund-desc card (with its "Change fund" button) takes its place. */
.fund-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  color: #9b91ad;            /* placeholder gray until a fund is chosen */
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.fund-trigger:hover { border-color: #b9a3d6; }
.fund-trigger__value {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fund-trigger__icon { width: 16px; height: 16px; flex: 0 0 auto; color: var(--ink-soft); opacity: 0.7; }
.fund-trigger__chev { width: 12px; height: 8px; flex: 0 0 auto; color: var(--ink-soft); opacity: 0.7; }

/* ── Fund picker dialog: modal on desktop, bottom sheet on phones. ──
   <dialog>.showModal() supplies focus trap / Esc / backdrop / focus restore. */
.fund-dialog {
  border: 0;
  border-radius: 16px;
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  box-shadow: var(--shadow-pop);
  color: var(--ink);
}
.fund-dialog[open] {
  display: flex;
  flex-direction: column;
  max-height: min(640px, 85vh);
}
.fund-dialog::backdrop { background: rgba(36, 20, 60, 0.45); }
.fund-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 0;
}
.fund-dialog__title {
  margin: 0;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.05rem;
  font-weight: 700;
}
.fund-dialog__close {
  background: none;
  border: 0;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 6px 9px;
  border-radius: 8px;
}
.fund-dialog__close:hover { background: var(--brand-tint); }
.fund-dialog__searchwrap { position: relative; margin: 12px 18px 0; }
.fund-dialog__searchicon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
  color: var(--ink-soft);
  opacity: 0.7;
}
/* 16px+ font (inherited) keeps iOS from zooming the dialog on focus. */
/* Two-class selector on purpose: the base `input[type="text"]` rule (0,1,1) is
   MORE specific than a lone `.fund-dialog__search` (0,1,0), so its `padding`
   shorthand would otherwise reset padding-left to 14px and the text would run
   under the magnifier icon (which sits at left:13px). This (0,2,0) wins. */
.fund-dialog__searchwrap .fund-dialog__search { padding-left: 38px; }
.fund-dialog__count { margin: 8px 20px 0; font-size: 0.76rem; color: var(--ink-soft); }
.fund-dialog__list {
  /* flex-basis MUST be auto, not 0. The dialog is a max-height (content-sized)
     flex column; Safari collapses a flex:1 (0-basis) child to ZERO height there,
     hiding the matched funds while the count still updates (the symptom on
     staging in Safari 26 — Chromium and Playwright-WebKit tolerate the 0 basis,
     which is why it slipped through). auto basis sizes the list to its content. */
  flex: 1 1 auto;
  min-height: 0; /* but still let it shrink below content to scroll (not push the
                    dialog past max-height) when many funds match. */
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px 10px 12px;
  margin-top: 4px;
}

/* Option rows + category group headers inside the dialog list. */
.fund-opt__group {
  margin: 10px 8px 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.fund-opt {
  padding: 9px 34px 9px 14px;
  border-radius: 9px;
  cursor: pointer;
  position: relative;
}
.fund-opt__name { font-weight: 600; font-size: 0.93rem; }
.fund-opt__name .fund-opt__code { font-weight: 400; color: var(--ink-soft); }
.fund-opt__meta { font-size: 0.8rem; color: var(--ink-soft); margin-top: 1px; }
.fund-opt:hover,
.fund-opt.is-active { background: var(--brand-tint); }
.fund-opt.is-active::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}
.fund-opt[aria-selected="true"]::after {
  content: "✓";
  position: absolute;
  right: 13px;
  top: 9px;
  font-weight: 700;
  color: var(--accent-dark);
}
.fund-opt__empty { padding: 18px 14px; color: var(--ink-soft); font-size: 0.9rem; }
.fund-opt__empty b { color: var(--ink); }

/* Mobile: the dialog becomes a bottom sheet. */
@media (max-width: 640px) {
  .fund-dialog {
    margin: auto 0 0;
    width: 100%;
    max-width: 100%;
    border-radius: 18px 18px 0 0;
  }
  .fund-dialog[open] { max-height: 88dvh; }
}

/* Stripe Element containers (#address-element, #payment-element). Until
   Stripe.js mounts its iframe, these divs are zero-height blanks — the form
   looks broken and then jumps when the iframe arrives. So while a container
   lacks .is-ready (added by app.js from each element's 'ready' event, and
   stripped again before a rebuild), reserve roughly the mounted height and
   show a muted loading line. The min-heights are deliberately a touch SHORT
   of the real heights: a small grow on mount is far less jarring than a
   shrink. If Stripe never mounts (missing publishable key, blocked script),
   the placeholder text simply remains — an honest description of the state. */
#address-element:not(.is-ready),
#payment-element:not(.is-ready) {
  display: flex;
  align-items: center;
  justify-content: center;
}
#address-element:not(.is-ready) { min-height: 90px; }
#payment-element:not(.is-ready) { min-height: 180px; }
#address-element:not(.is-ready)::before,
#payment-element:not(.is-ready)::before {
  content: "Loading secure payment field…";
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* Fund description panel — doubles as the selected-fund confirmation card
   when the picker is active (app.js adds a name header + "Change fund"). */
.fund-desc {
  margin-top: 10px;
  padding: 14px 16px 13px 18px;
  background: var(--brand-tint);          /* light purple wash */
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--ink-soft);
  position: relative;
}
.fund-desc::before {                      /* HHE gold accent bar */
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
}
.fund-desc__name {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}
.fund-desc__name .fund-desc__code { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }
.fund-desc__location {
  display: block;
  font-weight: 600;
  color: var(--brand);
  font-size: 0.8rem;
  margin: 2px 0 6px;
}
.fund-desc__body {
  margin: 0;
  line-height: 1.5;
  white-space: pre-line;   /* preserve paragraph breaks from the summary */
}
.fund-desc__more {
  display: inline-block;
  margin-top: 6px;
  padding: 0;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.fund-desc__links {
  margin-top: 8px;
  display: flex;
  gap: 16px;
  align-items: baseline;
}
.fund-desc__links .fund-desc__spacer { flex: 1; }
.fund-desc__link {
  display: inline-block;
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.fund-desc__change {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* Hero image on single-fund campaign pages (/iraivan, /tithing). Full-bleed to
   the card edges, rounded to match the card's top corners. */
.campaign-hero {
  display: block;
  width: calc(100% + 64px);
  margin: -34px -32px 22px;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Address sub-grouping: visually boxless — the legend reads as a field label
   and Stripe's Address Element brings its own internal field chrome. */
.address {
  border: 0;
  padding: 0;
  margin: 0 0 var(--gap);
}
.address legend { padding: 0; }

/* Custom amount input wrapper + the "$" prefix. */
.input-prefix { position: relative; }
.input-prefix__symbol {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  font-weight: 600;
  pointer-events: none;
}
.input-prefix input { padding-left: 28px; font-weight: 600; }
.field__custom-amount { margin-top: 12px; }

/* Checkbox row (anonymous). */
.field--checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: start;
}
.field--checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--brand);
}
.field--checkbox label { margin-bottom: 0; }
.field--checkbox .field__hint { grid-column: 2; }

/* ── Gift box: frequency toggle + amount grid as one visual unit. ── */
.giftbox {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 14px;
  background: #fdfcfe;
}

/* Frequency pills + amount buttons share the "hide the radio, style the
   label" technique so they stay keyboard-accessible while looking like
   buttons. */
.toggle__input,
.chips__input {
  /* Visually hidden but still focusable + reachable by label clicks. */
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* Frequency pills: a 2-segment control that fills the row. */
.toggle {
  display: flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  background: #fff;
}
.toggle__pill {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-align: center;
  padding: 9px 14px;
  margin: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
  user-select: none;
  transition: background 0.15s, color 0.15s;
}
.toggle__input:checked + .toggle__pill {
  background: linear-gradient(135deg, #6d3f9e, var(--brand-dark));
  color: #fff;
  box-shadow: 0 2px 8px rgba(78, 42, 115, 0.35);
}

/* Amount buttons: an equal-width grid (2×2 on phones via the media query). */
.chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.chips__chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 10px 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.06rem;
  background: #fff;
  user-select: none;
  text-align: center;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.chips__chip:hover { border-color: #b9a3d6; }
.chips__input:checked + .chips__chip {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(97, 54, 142, 0.32);
}

/* Monthly reassurance note (inside the gift box, shown when Monthly). */
.freq-note {
  margin: 12px 2px 0;
  padding: 9px 12px;
  background: var(--gold-soft);
  border-radius: var(--radius-sm);
  color: var(--gold-ink);
  font-size: 0.82rem;
}

/* ── Optional phone / note fields (always shown). ──
   Lead-in hint that introduces the optional pair; owns the spacing between
   the address block above and the phone field below. */
.field__hint--lead { margin-top: 18px; margin-bottom: 8px; }
.field--last { margin-bottom: 4px; }

/* ── Gift summary line: restates the gift just above the button. ── */
.gift-line {
  display: block;
  margin: 0 0 14px;
  font-size: 0.9rem;
  text-align: center;
  color: var(--ink-soft);
}
.gift-line strong { font-weight: 700; }
.gift-line .gift-line__fund { color: var(--brand-dark); font-weight: 600; }

/* Buttons. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  font: inherit;
  font-size: 1.06rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}
.btn--primary {
  background: linear-gradient(135deg, #6d3f9e, var(--brand-dark));
  color: #fff;
  box-shadow: 0 8px 24px rgba(78, 42, 115, 0.32);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(78, 42, 115, 0.40); }
.btn--primary:active { transform: translateY(0) scale(0.997); box-shadow: 0 4px 14px rgba(78, 42, 115, 0.32); }
.btn[disabled],
.btn.is-busy { opacity: 0.7; cursor: progress; }

/* Inline spinner shown while the create-session request is in flight. */
.btn__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* The reassurance strip under the button (lock + Stripe + the 100% line). */
.secure-note {
  margin: 14px 0 0;
  padding: 11px 14px;
  background: var(--gold-soft);
  border-radius: var(--radius-sm);
  text-align: center;
  color: var(--gold-ink);
  font-size: 0.82rem;
}

/* Form-wide error banner (API / network failures). */
.form-error {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #fdecee;
  border: 1px solid #f3c2c9;
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

/* ── 6. Thank-you page ──────────────────────────────────────────────────── */
.ty-check {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  background: var(--ok);
  color: #fff;
  font-size: 1.8rem;
  border-radius: 50%;
}
.card .ty-check + .card__title { text-align: center; }

/* Receipt-style summary list. */
.summary {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.summary__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.summary__row:last-child { border-bottom: none; }
.summary dt { color: var(--ink-soft); margin: 0; }
.summary dd { margin: 0; font-weight: 600; text-align: right; }
.summary__per { color: var(--ink-soft); font-weight: 400; font-size: 0.85em; }

/* 501(c)(3) tax acknowledgment paragraph. */
.tax-line {
  margin: 18px 0;
  padding: 14px;
  background: var(--brand-tint);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.manage { margin: 18px 0 4px; }
.ty-back { margin-top: 20px; text-align: center; }

/* ── 7. Accessibility helpers ───────────────────────────────────────────── */

/* Screen-reader-only text (used for the custom-amount label). */
.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Respect users who prefer reduced motion: kill the spinner animation. */
@media (prefers-reduced-motion: reduce) {
  .btn__spinner { animation: none; }
  .btn--primary:hover,
  .btn--primary:active { transform: none; }
  * { scroll-behavior: auto !important; }
}

/* ── Narrow screens ─────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .card { padding: 26px 18px 24px; border-radius: 18px; }
  .campaign-hero {
    width: calc(100% + 36px);
    margin: -26px -18px 20px;
    border-radius: 18px 18px 0 0;
  }
  h1 { font-size: 1.55rem; }
  .chips { grid-template-columns: repeat(2, 1fr); }
  .brand__tag { letter-spacing: 0.14em; }
}
