/* ===========================================================================
 * giving.css — visual layer for the (not-yet-built) giving-day module.
 *
 * Loaded only by giving pages (see themes/default/giving/page.html), never the
 * global shell. Everything is scoped under `.gv-page` so it cannot leak into
 * other public pages or themes.
 *
 * The original design hardcoded a maroon/gold/cream palette via --brand-*
 * tokens. Here those tokens are *bridged* onto the per-tenant Branding tokens
 * the platform already generates (branding/theme.css), so the giving module
 * stays fully white-label: change the brand in the dashboard and this whole
 * surface re-skins with no deploy.
 * ------------------------------------------------------------------------- */

.gv-page {
  /* Bridge the design's semantic tokens onto the platform's Branding tokens. */
  --brand-primary: var(--bs-primary);
  --brand-primary-dark: var(--bs-primary-text-emphasis, var(--bs-primary));
  --brand-secondary: var(--bs-secondary, #2a2a2a);
  --brand-accent: var(--hubbub-accent, var(--bs-primary));
  --brand-surface: var(--bs-body-bg, #fff);
  --brand-ink: var(--bs-body-color, #212529);
  --brand-hero-overlay: var(--bs-primary-text-emphasis, var(--bs-primary));

  --font-display: var(--hubbub-heading-font, var(--bs-body-font-family));
  --font-body: var(--bs-body-font-family);

  --ink-soft: color-mix(in srgb, var(--brand-ink) 64%, transparent);
  --line: color-mix(in srgb, var(--brand-ink) 12%, transparent);
  --shadow: 0 24px 60px -28px color-mix(in srgb, var(--brand-secondary) 55%, transparent);
  --shadow-sm: 0 10px 30px -20px color-mix(in srgb, var(--brand-secondary) 60%, transparent);
}

/* ---- Button flourishes (colours come from public.css .btn-brand) ------ */
.gv-page .btn { --bs-btn-font-weight: 700; --bs-btn-border-radius: 999px; }
.gv-page .btn-lg { --bs-btn-border-radius: 999px; --bs-btn-padding-x: 2.1rem; }
.gv-page .btn-brand {
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--brand-primary) 70%, transparent);
  transition: transform .18s ease, box-shadow .18s ease;
}
.gv-page .btn-brand:hover,
.gv-page .btn-ghost-brand:hover,
.gv-page .btn-light:hover { transform: translateY(-2px); }

/* ---- Progress bars (re-skin Bootstrap .progress / .progress-bar) ------ */
.gv-page .progress {
  --bs-progress-height: 10px;
  --bs-progress-bg: color-mix(in srgb, var(--brand-ink) 12%, transparent);
  --bs-progress-border-radius: 999px;
  overflow: hidden;
}
.gv-page .progress-bar {
  width: 0;
  background: linear-gradient(90deg, var(--brand-primary), color-mix(in srgb, var(--brand-primary) 60%, var(--brand-accent)));
  transition: width 1.4s cubic-bezier(.2,.8,.2,1);
}
.gv-page .progress-bar.is-filled { width: var(--to, 0); }
.gv-page .progress--gold { --bs-progress-bg: color-mix(in srgb, var(--brand-accent) 16%, transparent); }
.gv-page .progress--gold .progress-bar { background: linear-gradient(90deg, var(--brand-accent), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary))); }
.gv-page .progress--hero { --bs-progress-bg: color-mix(in srgb, #fff 26%, transparent); }
.gv-page .progress--hero .progress-bar { background: linear-gradient(90deg, #fff, color-mix(in srgb, var(--brand-accent) 80%, #fff)); }

/* ---- Branded chips ---------------------------------------------------- */
.gv-page .badge.gv-chip {
  background: color-mix(in srgb, var(--brand-accent) 22%, transparent);
  color: var(--brand-primary-dark);
  font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 999px; padding: .4rem .7rem;
}
.gv-page .badge.gv-chip--done { background: color-mix(in srgb, var(--brand-primary) 18%, transparent); }

/* ---- Section utilities ------------------------------------------------ */
.gv-page .section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.gv-page .section--tint { background: color-mix(in srgb, var(--brand-secondary) 5%, var(--brand-surface)); border-block: 1px solid var(--line); }
.gv-page .text-ink-soft { color: var(--ink-soft) !important; }
.gv-page .text-brand { color: var(--brand-primary) !important; }
.gv-page .text-brand-dark { color: var(--brand-primary-dark) !important; }
.gv-page .text-secondary-brand { color: var(--brand-secondary) !important; }
.gv-page .font-display { font-family: var(--font-display) !important; }

.gv-page .gv-kicker {
  display: inline-block; text-transform: uppercase; letter-spacing: .2em;
  font-size: .74rem; font-weight: 800; color: var(--brand-primary); margin-bottom: .6rem;
}
.gv-page .gv-section-title { font-size: clamp(2rem, 4.5vw, 3rem); color: var(--brand-secondary); }

/* ---- Hero ------------------------------------------------------------- */
.gv-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; text-align: center;
  padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(3rem, 7vw, 5rem);
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--brand-hero-overlay) 78%, transparent),
      color-mix(in srgb, var(--brand-hero-overlay) 92%, transparent)),
    var(--hero-img, linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark)));
  background-size: cover; background-position: center;
}
.gv-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at 50% 0%, transparent 30%, color-mix(in srgb, var(--brand-secondary) 45%, transparent) 100%);
  mix-blend-mode: multiply;
}
.gv-hero__eyebrow {
  text-transform: uppercase; letter-spacing: .32em; font-size: .76rem; font-weight: 700; opacity: .9;
  display: inline-block; padding-bottom: .8rem; border-bottom: 1px solid color-mix(in srgb, #fff 35%, transparent);
}
.gv-hero__title { font-family: var(--font-display); font-size: clamp(2.6rem, 6.5vw, 4.8rem); font-weight: 600; max-width: 16ch; margin-inline: auto; text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.gv-figure__value { font-family: var(--font-display); font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.gv-figure--goal .gv-figure__value { color: color-mix(in srgb, var(--brand-accent) 88%, #fff); }
.gv-figure__label { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 600; opacity: .82; }

/* ---- Countdown -------------------------------------------------------- */
.gv-countdown__label { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; opacity: .92; }
.gv-cd {
  min-width: 78px; padding: .9rem .6rem .7rem;
  background: color-mix(in srgb, #fff 12%, transparent);
  border: 1px solid color-mix(in srgb, #fff 26%, transparent);
  border-radius: 12px; backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center;
}
.gv-cd span { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.gv-cd small { margin-top: .4rem; text-transform: uppercase; letter-spacing: .12em; font-size: .64rem; font-weight: 600; opacity: .8; }

/* ---- Community banner ------------------------------------------------- */
.gv-banner { background: var(--brand-secondary); color: #fff; }
.gv-banner p { font-family: var(--font-display); font-size: clamp(1.1rem, 2.4vw, 1.5rem); max-width: 64ch; margin-inline: auto; }
.gv-banner__tag { color: var(--brand-accent); font-weight: 800; letter-spacing: .08em; }

/* ---- Cards: causes / challenges / voices / features ------------------- */
.gv-card {
  --bs-card-bg: #fff;
  --bs-card-border-color: var(--line);
  --bs-card-border-radius: 18px;
  --bs-card-inner-border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.gv-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.gv-cause__media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: color-mix(in srgb, var(--brand-secondary) 12%, #fff); }
.gv-cause__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gv-card:hover .gv-cause__media img { transform: scale(1.06); }
.gv-cause__flag { position: absolute; top: .9rem; left: .9rem; background: var(--brand-accent); color: var(--brand-secondary); font-weight: 800; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; padding: .35rem .7rem; border-radius: 999px; }
.gv-cause__title { color: var(--brand-secondary); }
.gv-fig-amount { font-family: var(--font-display); font-size: 1.15rem; color: var(--brand-primary); }

.gv-challenge { border-left: 4px solid var(--brand-accent); }
.gv-challenge.is-complete { border-left-color: var(--brand-primary); }
.gv-challenge__sponsor { font-size: .82rem; font-weight: 700; color: var(--brand-primary); text-transform: uppercase; letter-spacing: .06em; }
.gv-challenge__amount { font-family: var(--font-display); font-size: 1.25rem; color: var(--brand-secondary); }
.gv-challenge__incentive { font-size: .82rem; font-style: italic; color: var(--brand-primary-dark); }

.gv-voice { position: relative; }
.gv-voice::before { content: "\201C"; position: absolute; top: -.4rem; left: 1rem; font-family: var(--font-display); font-size: 5rem; color: color-mix(in srgb, var(--brand-primary) 28%, transparent); line-height: 1; }
.gv-voice blockquote { font-family: var(--font-display); font-size: 1.18rem; line-height: 1.45; color: var(--brand-secondary); }

.gv-feature__glyph { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-secondary); color: #fff; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }

/* ---- Project CTA band ------------------------------------------------- */
.gv-cta-band { background: var(--brand-secondary); color: #fff; position: relative; overflow: hidden; }
.gv-cta-band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% -20%, color-mix(in srgb, var(--brand-primary) 55%, transparent), transparent 55%); }
.gv-cta-band > * { position: relative; }

/* ---- Scroll-reveal ---------------------------------------------------- */
.gv-page [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i, 0) * 80ms); }
.gv-page [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .gv-page [data-reveal] { opacity: 1; transform: none; transition: none; }
  .gv-page .progress-bar { transition: none; }
  .gv-page .btn-brand:hover, .gv-page .btn-ghost-brand:hover, .gv-card:hover { transform: none; }
}
