/* Campaign pages (car.givebrighter.org etc). Same brand system as the
   give page: Plus Jakarta Sans, bright blue + lantern yellow on #F6F9FD,
   rounded white cards. Light-only, like the main donor site. */
:root {
  color-scheme: light;
  --canvas: #F6F9FD;
  --canvas-alt: #EAF1FB;
  --surface: #FFFFFF;
  --surface-accent: #EAF2FF;
  --primary: #1F62D0;
  --primary-strong: #174CA6;
  --primary-fade: rgba(31, 98, 208, 0.10);
  --gold: #F5B82E;
  --gold-soft: #FAD679;
  --gold-bg: #FFF6DB;
  --gold-ink: #7A5200;
  --ink: #14233B;
  --ink-muted: #55657D;
  --ink-soft: #8C9AB0;
  --line: rgba(20, 35, 59, 0.09);
  --line-strong: rgba(20, 35, 59, 0.16);
  --success: #1E8A5F;
  --success-bg: #E7F6EE;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-outer: 24px;
  --r-inner: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
.orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orbs i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.orbs i:nth-child(1) { width: 420px; height: 420px; background: #CFE0FB; top: -140px; right: -120px; }
.orbs i:nth-child(2) { width: 360px; height: 360px; background: #FDE9B4; top: 420px; left: -180px; opacity: .45; }
.wrap {
  position: relative; z-index: 1;
  max-width: 1080px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: env(safe-area-inset-top, 0px) calc(56px + env(safe-area-inset-bottom, 0px));
}
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--primary); }
.num { font-variant-numeric: tabular-nums; }

header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px 6px; }
header.top img { height: 40px; width: auto; display: block; }
.domain {
  font-size: 13px; font-weight: 600; color: var(--primary); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px;
  white-space: nowrap;
}

.hero { text-align: center; padding-block: 28px 30px; display: grid; gap: 14px; justify-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary);
  background: var(--surface-accent); padding: 6px 12px; border-radius: 999px;
}
.hero h1 { font-size: clamp(30px, 5.4vw, 50px); line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; max-width: 18ch; }
.hl { background: linear-gradient(transparent 58%, var(--gold-soft) 58%, var(--gold-soft) 92%, transparent 92%); padding: 0 .08em; }
.hero p { color: var(--ink-muted); font-size: 17px; max-width: 54ch; }

.layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.main, .aside { display: grid; gap: 22px; min-width: 0; }
/* Progress + give come first in the DOM (top on phones); on desktop they
   move to the narrower right column and stick. */
.main { grid-column: 1; grid-row: 1; }
.aside { grid-column: 2; grid-row: 1; position: sticky; top: calc(16px + env(safe-area-inset-top, 0px)); }
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .main, .aside { grid-column: 1; grid-row: auto; }
  .aside { position: static; }
}

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-outer); padding: 22px; box-shadow: 0 1px 2px rgba(20,35,59,.04), 0 8px 24px rgba(20,35,59,.05); min-width: 0; }
.card h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.muted { color: var(--ink-muted); }
.small { font-size: 13px; }

.progress { border: 2px solid var(--primary-fade); position: relative; overflow: hidden; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--success); letter-spacing: .04em; text-transform: uppercase; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(30,138,95,.45); } 70% { box-shadow: 0 0 0 8px rgba(30,138,95,0); } 100% { box-shadow: 0 0 0 0 rgba(30,138,95,0); } }
.raised { font-size: clamp(38px, 6vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-top: 14px; }
.of { margin-top: 6px; color: var(--ink-muted); font-size: 15px; }
.of b { color: var(--ink); }
.bar { position: relative; height: 18px; border-radius: 999px; background: var(--canvas-alt); margin-top: 18px; }
.bar.has-tick { margin-bottom: 18px; }
.bar-fill {
  position: absolute; inset: 0 auto 0 0; border-radius: 999px; min-width: 18px;
  background: linear-gradient(90deg, var(--primary) 0%, #4F8FE8 100%);
  transition: width 1s cubic-bezier(.2,.8,.2,1);
}
.bar-fill::after {
  content: ""; position: absolute; right: 3px; top: 3px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px rgba(245,184,46,.35);
}
.bar-tick { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--gold-ink); border-radius: 2px; opacity: .55; }
.bar-tick span { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: var(--gold-ink); white-space: nowrap; }
.pct-row { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.pct-row .pct { color: var(--primary); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.stat { background: var(--canvas); border-radius: var(--r-inner); padding: 12px; text-align: center; }
.stat strong { display: block; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.stat span { font-size: 12px; color: var(--ink-muted); }

.unlock {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--r-inner);
  background: var(--gold-bg); border: 1px solid var(--gold-soft); color: var(--gold-ink);
  display: grid; gap: 2px;
}
.unlock.pop { animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
.unlock strong { font-size: 16px; color: var(--ink); }
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--canvas); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; border-radius: 11px; padding: 10px; font: 700 14px var(--font); color: var(--ink-muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--primary); box-shadow: 0 1px 3px rgba(20,35,59,.12); }
.amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.amounts button {
  border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 14px; padding: 12px 4px;
  font: 800 16px var(--font); color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums;
}
.amounts button[aria-pressed="true"] { border-color: var(--primary); background: var(--surface-accent); color: var(--primary); }
.cta {
  display: block; width: 100%; margin-top: 14px; border: 0; border-radius: 16px; padding: 16px;
  background: var(--primary); color: #fff; font: 800 17px var(--font); cursor: pointer; text-align: center; text-decoration: none;
  box-shadow: 0 6px 18px rgba(31,98,208,.28);
}
.cta:hover { background: var(--primary-strong); }
.give-note { display: flex; justify-content: center; gap: 6px; align-items: center; margin-top: 10px; font-size: 12.5px; color: var(--ink-muted); }
.give-note i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); display: inline-block; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.chart-wrap { width: 100%; overflow: hidden; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; background: var(--primary); display: inline-block; }
.legend i.goal { background: none; border-top: 2px dashed var(--gold-ink); height: 0; }
.chart-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.chart-facts div { border-top: 1px solid var(--line); padding-top: 10px; min-width: 0; }
.chart-facts strong { display: block; font-size: 17px; font-weight: 800; }
.chart-facts span { font-size: 12.5px; color: var(--ink-muted); }

.story { display: grid; gap: 12px; color: var(--ink-muted); font-size: 16px; max-width: 62ch; }

.feed { display: grid; }
.gift { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.gift:first-child { border-top: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-accent); color: var(--primary); font-weight: 800; font-size: 14px; }
.gift .who { font-weight: 600; font-size: 14px; }
.gift .when { font-size: 12.5px; color: var(--ink-soft); }
.gift .amt { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.tag { font-size: 11px; font-weight: 700; color: var(--gold-ink); background: var(--gold-bg); padding: 2px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.gift.new { animation: flash 1.2s ease; }
@keyframes flash { from { background: var(--gold-bg); } to { background: transparent; } }

.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-row button, .share-row a {
  border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 12px; padding: 10px 14px;
  font: 700 14px var(--font); color: var(--ink); cursor: pointer; text-decoration: none;
}
.share-row .primary { border-color: var(--primary); color: var(--primary); }
.og-preview { margin-top: 14px; border-radius: var(--r-inner); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1200 / 630; background: var(--canvas-alt); }
.og-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600; transition: all .3s ease; z-index: 50; max-width: calc(100% - 32px); text-align: center; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; width: 100%; height: 100%; }
.error { text-align: center; padding: 40px 0; color: var(--ink-muted); }

footer { text-align: center; margin-top: 40px; font-size: 12.5px; color: var(--ink-soft); }

@media (max-width: 480px) {
  .card { padding: 18px; }
  .amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat strong { font-size: 18px; }
  header.top img { height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
