:root {
  --bg: #07162a;
  --bg-2: #0c2240;
  --card: #102a4d;
  --card-2: #143259;
  --line: #22426d;
  --text: #eaf2fb;
  --muted: #9fb4cd;
  --green: #3ddc97;
  --green-dark: #22b578;
  --gold: #ffc857;
  --radius: 16px;
  --max: 1120px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: clip; }
body {
  margin: 0;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(61, 220, 151, .14), transparent 60%),
    radial-gradient(800px 500px at -10% 20%, rgba(255, 200, 87, .08), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { color: var(--green); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.muted { color: var(--muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem max(1.25rem, calc((100% - var(--max)) / 2));
  background: rgba(7, 22, 42, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .02em; }
.site-header nav { display: flex; align-items: center; gap: 1.25rem; }
.site-header nav a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-header nav a:not(.btn):hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--green); color: #05211a;
  padding: .8rem 1.4rem; border-radius: 999px;
  font-weight: 800; text-decoration: none;
  transition: transform .15s, background .15s;
}
.btn:hover { background: #5ff0ad; transform: translateY(-1px); }
.btn-small { padding: .45rem 1rem; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { background: var(--card); }

/* Layout */
main > section { max-width: var(--max); margin: 0 auto; padding: 4rem 1.25rem; }
.section-head { margin-bottom: 2rem; }
.section-head p { margin: 0; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: center; padding-top: 5rem !important; }
.hero-inner { display: flex; gap: 1.5rem; align-items: flex-start; }
.team-avatar { width: 110px; height: 110px; border-radius: 24px; object-fit: cover; border: 3px solid var(--green); flex-shrink: 0; background: var(--card); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--gold); margin: 0 0 .75rem; }
h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 900; letter-spacing: -.02em; }
.accent { color: var(--green); }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 36em; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }

.stats-card {
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.progress-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: .9rem; }
.big { display: block; font-size: 2.6rem; font-weight: 900; line-height: 1; }
.pct { font-size: 1.4rem; font-weight: 800; color: var(--green); }
.bar { height: 16px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--green-dark), var(--green)); border-radius: 999px; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1.5rem 0 0; }
.stat-row div { background: var(--bg-2); border-radius: 12px; padding: .75rem; text-align: center; }
.stat-row dt { overflow-wrap: anywhere; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat-row dd { margin: .2rem 0 0; font-size: 1.5rem; font-weight: 800; }
.updated { font-size: .8rem; color: var(--muted); margin: 1rem 0 0; }

.alltime { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: .75rem; padding: .85rem 1rem; border-radius: 12px; background: rgba(255, 200, 87, .1); border: 1px solid rgba(255, 200, 87, .3); }
.alltime strong { font-size: 1.5rem; font-weight: 900; color: var(--gold); }

/* CAD primary, USD secondary */
.usd { font-size: .62em; font-weight: 600; color: var(--muted); white-space: nowrap; }
.big .usd { display: block; font-size: .95rem; margin-top: .35rem; }
.alltime > :last-child { text-align: right; }
.alltime .usd { display: block; font-size: .8rem; }
.usd-line { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-top: .1rem; }
.donation-feed .amt { text-align: right; }
.donation-feed .amt .usd { display: block; font-size: .75rem; }

/* Prizes */
.prizes {
  background: linear-gradient(135deg, rgba(255, 200, 87, .12), rgba(255, 200, 87, .03));
  border: 1px solid rgba(255, 200, 87, .3);
  border-radius: var(--radius);
  padding: 2rem !important;
  margin: 0 auto !important;
  width: calc(100% - 2.5rem);
}
.prizes h2 { color: var(--gold); font-size: 1.6rem; }
.prize-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .75rem; }
.prize-list li { display: flex; gap: .75rem; align-items: flex-start; background: rgba(7, 22, 42, .5); padding: .85rem 1rem; border-radius: 12px; }
.prize-list span { font-size: 1.4rem; line-height: 1.2; }

/* Roster */
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.member {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; display: flex; flex-direction: column; align-items: center; text-align: center;
  transition: transform .2s, border-color .2s;
}
.member:hover { transform: translateY(-3px); border-color: var(--green); }
.member img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--line); background: var(--bg-2); }
.member h3 { margin: .9rem 0 .2rem; font-size: 1.1rem; }
.badge { position: absolute; top: 1rem; right: 1rem; background: var(--gold); color: #2b1d00; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: .2rem .55rem; border-radius: 999px; }
.member .amount { font-weight: 800; font-size: 1.2rem; margin: .5rem 0 .4rem; }
.member .amount small { color: var(--muted); font-weight: 600; font-size: .85rem; }
.member .bar { height: 8px; width: 100%; margin-bottom: 1.1rem; }
.member-actions { display: flex; gap: .5rem; width: 100%; margin-top: auto; }
.member-actions .btn { flex: 1; padding: .6rem .5rem; font-size: .9rem; text-align: center; }

/* Donation feed */
.donation-feed { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .75rem; }
.donation-feed li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.donation-feed .who { font-weight: 700; }
.donation-feed .to { display: block; font-size: .85rem; color: var(--muted); }
.donation-feed .amt { font-weight: 800; color: var(--green); white-space: nowrap; }
.donation-feed .msg { display: block; font-size: .88rem; color: var(--muted); font-style: italic; margin-top: .25rem; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--green), var(--line) 30%, var(--line)); transform: translateX(-50%); }
.tl-item { position: relative; width: 50%; padding: 0 2.5rem 1.25rem 0; }
.tl-item:nth-child(even) { margin-left: 50%; padding: 0 0 1.25rem 2.5rem; }
.tl-item::before {
  content: ""; position: absolute; top: 1.1rem; right: -10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 4px solid var(--green);
}
.tl-item:nth-child(even)::before { right: auto; left: -10px; }
.tl-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.4rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.tl-item.current .tl-card { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 15px 40px rgba(61, 220, 151, .12); }
.tl-year { font-size: 1.6rem; font-weight: 900; color: var(--green); line-height: 1; }
.tl-now { font-size: .75rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .06em; vertical-align: middle; margin-left: .3rem; }
.tl-amount { font-size: 1.35rem; font-weight: 800; }
.tl-amount .usd { margin-left: .3rem; }

/* Year-by-year chart */
.year-chart-wrap { margin: 0 0 3rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.5rem 1rem; }
.year-chart-wrap figcaption { font-weight: 700; margin-bottom: 1rem; }
.year-chart { display: flex; align-items: stretch; gap: 2px; height: 240px; padding-top: 1.4rem; border-bottom: 1px solid var(--line); }
.yc-col { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; outline: none; }
.yc-track { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 0 18%; }
.yc-bar { position: relative; width: 100%; max-width: 44px; background: var(--green-dark); border-radius: 4px 4px 0 0; transition: background .15s; }
.yc-col.now .yc-bar { background: repeating-linear-gradient(45deg, var(--green-dark) 0 6px, rgba(61, 220, 151, .45) 6px 9px); }
.yc-col:hover .yc-bar, .yc-col:focus-visible .yc-bar { background: var(--green); }
.yc-val { position: absolute; bottom: 100%; right: 0; margin-bottom: .3rem; font-size: .75rem; font-weight: 800; color: var(--text); white-space: nowrap; }
.yc-foot { position: absolute; top: 100%; left: 0; right: 0; text-align: center; padding-top: .4rem; line-height: 1.3; }
.yc-year { display: block; font-size: .75rem; color: var(--muted); }
.yc-add { display: block; font-size: .72rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.chart-sub { display: block; font-weight: 400; font-size: .85rem; margin-top: .2rem; }
.yc-tip { position: absolute; bottom: calc(100% - 1.5rem); left: 50%; transform: translateX(-50%); width: max-content; max-width: 220px; background: var(--text); color: var(--bg); font-size: .78rem; font-weight: 600; line-height: 1.4; padding: .4rem .65rem; border-radius: 8px; pointer-events: none; visibility: hidden; opacity: 0; transition: opacity .12s, visibility .12s; z-index: 2; }
.yc-tip strong { font-weight: 800; }
.yc-col.tip-left .yc-tip { left: 0; transform: none; }
.yc-col.tip-right .yc-tip { left: auto; right: 0; transform: none; }
.yc-col:hover .yc-tip, .yc-col:focus-visible .yc-tip { opacity: 1; visibility: visible; }
.chart-note { font-size: .8rem; margin: 3rem 0 0; }
@media (max-width: 700px) { .yc-add { display: none; } .chart-note { margin-top: 2rem; } }

/* Why */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 1.5rem; }
.why-grid div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.why-grid h3 { color: var(--green); font-size: 1.1rem; }
.why-grid p { margin: 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); text-align: center; padding: 2.5rem 1.25rem; font-size: .9rem; }
.site-footer p { margin: .3rem 0; }

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 3rem !important; }
  .why-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .site-header nav a:not(.btn) { display: none; }
  .hero-inner { flex-direction: column; }
  .team-avatar { width: 84px; height: 84px; }
  .timeline::before { left: 10px; }
  .tl-item, .tl-item:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 1rem 2.5rem; }
  .tl-item::before, .tl-item:nth-child(even)::before { left: 0; right: auto; }
  .donation-feed { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
