/* ==========================================================================
   Feeducate Sports Org — design system
   8px grid · type scale 12/14/16/20/24/32/48/64 · 2 families
   ========================================================================== */

:root {
  /* Neutrals (warm paper → ink) */
  --paper: #f7f5ef;
  --paper-2: #efece3;
  --card: #ffffff;
  --line: #e2ddd0;
  --muted: #5d6660;
  --text: #16201b;
  --ink: #0a130f;
  --ink-2: #111d17;
  --ink-3: #1a2a22;
  --ink-line: rgba(255, 255, 255, 0.1);
  --ink-muted: #a9b8b0;

  /* Brand: pitch green (from logo) */
  --brand-300: #6ee7a0;
  --brand-400: #34d17a;
  --brand-500: #1faa5c;
  --brand-600: #15803d;   /* AA on white with white text */
  --brand-700: #116432;

  /* Heart red (logo wordmark) — reserved for giving actions */
  --heart-400: #ff6b5e;
  --heart-500: #e5372c;
  --heart-600: #c62a20;   /* AA with white text */

  --gold: #f4b740;        /* decorative accent only, never text on light */

  --success: #15803d;
  --error: #c62a20;

  /* Type */
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-32: 2rem;
  --fs-48: clamp(2.25rem, 1.4rem + 3.4vw, 3rem);
  --fs-64: clamp(2.75rem, 1.6rem + 4.8vw, 4rem);
  --fs-hero: clamp(3.25rem, 1.2rem + 9vw, 7.5rem);

  /* Spacing (8px grid) */
  --s-4: 4px; --s-8: 8px; --s-12: 12px; --s-16: 16px; --s-24: 24px;
  --s-32: 32px; --s-48: 48px; --s-64: 64px; --s-96: 96px; --s-128: 128px;
  --section: clamp(64px, 8vw + 32px, 128px);
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1200px;

  /* Radius & shadow */
  --r-8: 8px; --r-12: 12px; --r-16: 16px; --r-24: 24px; --r-32: 32px; --r-pill: 999px;
  --sh-sm: 0 1px 2px rgba(10, 19, 15, 0.06), 0 1px 1px rgba(10, 19, 15, 0.04);
  --sh-md: 0 8px 24px -8px rgba(10, 19, 15, 0.18), 0 2px 6px rgba(10, 19, 15, 0.06);
  --sh-lg: 0 32px 64px -24px rgba(10, 19, 15, 0.35), 0 8px 16px -8px rgba(10, 19, 15, 0.12);

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms;
  --t: 220ms;

  --header-h: 72px;
  color-scheme: light;
}

/* -------- Reset -------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--brand-400); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--brand-400); color: var(--ink); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -64px; z-index: 200; background: var(--card); color: var(--text); padding: 12px 16px; border-radius: var(--r-8); box-shadow: var(--sh-md); transition: top var(--t) var(--ease); }
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; }
.section--ink { background: var(--ink); color: #fff; }
.section--paper2 { background: var(--paper-2); }

/* -------- Typography helpers -------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-8);
  font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand-600);
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; border-radius: 2px; }
.section--ink .eyebrow, .hero .eyebrow { color: var(--brand-300); }
.h2 { font-size: var(--fs-48); margin-top: var(--s-16); max-width: 18ch; }
.h3 { font-size: var(--fs-24); }
.lead { font-size: var(--fs-20); line-height: 1.5; color: var(--muted); max-width: 60ch; }
.section--ink .lead { color: var(--ink-muted); }
.section-head { display: grid; gap: var(--s-16); margin-bottom: var(--s-48); }
.section-head--split { align-items: end; }
@media (min-width: 900px) { .section-head--split { grid-template-columns: 1.2fr 1fr; gap: var(--s-48); } }
.text-heart { color: var(--heart-500); }
.text-brand { color: var(--brand-400); }

/* -------- Buttons -------- */
.btn {
  --bg: var(--brand-600); --fg: #fff; --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-8);
  min-height: 48px; padding: 12px 24px;
  border-radius: var(--r-pill); border: 2px solid var(--bd);
  background: var(--bg); color: var(--fg);
  font-weight: 600; font-size: var(--fs-16); text-decoration: none; line-height: 1;
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: transform var(--t) var(--ease-out), background-color var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
  will-change: transform;
}
.btn:hover { transform: scale(1.02); box-shadow: var(--sh-md); }
.btn:active { transform: scale(0.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--heart { --bg: var(--heart-600); }
.btn--heart:hover { --bg: var(--heart-500); box-shadow: 0 12px 32px -12px rgba(229, 55, 44, 0.7); }
.btn--brand:hover { --bg: var(--brand-700); }
.btn--ghost { --bg: transparent; --fg: var(--text); --bd: var(--line); }
.btn--ghost:hover { --bd: var(--text); box-shadow: none; }
.btn--ghost-light { --bg: rgba(255,255,255,0.06); --fg: #fff; --bd: rgba(255,255,255,0.22); backdrop-filter: blur(8px); }
.btn--ghost-light:hover { --bd: rgba(255,255,255,0.6); --bg: rgba(255,255,255,0.12); box-shadow: none; }
.btn--lg { min-height: 56px; padding: 16px 32px; font-size: var(--fs-16); }
.btn--block { width: 100%; }
.btn .heartbeat { animation: heartbeat 1.6s var(--ease) infinite; transform-origin: center; }
@keyframes heartbeat { 0%, 60%, 100% { transform: scale(1); } 20% { transform: scale(1.18); } 40% { transform: scale(0.95); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px;
  border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--card);
  cursor: pointer; transition: transform var(--t) var(--ease-out), background-color var(--t), border-color var(--t);
}
.icon-btn:hover { transform: scale(1.05); border-color: var(--text); }
.icon-btn:active { transform: scale(0.95); }
.icon-btn:disabled { opacity: 0.35; cursor: default; transform: none; }
.icon-btn svg { width: 20px; height: 20px; }
.section--ink .icon-btn { background: transparent; border-color: var(--ink-line); color: #fff; }
.section--ink .icon-btn:hover { border-color: #fff; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform 400ms var(--ease-out);
}
.site-header.is-scrolled { background: rgba(10, 19, 15, 0.72); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); box-shadow: 0 1px 0 var(--ink-line); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header--light:not(.is-scrolled) { background: transparent; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s-16); width: 100%; }
.brand { display: inline-flex; align-items: center; gap: var(--s-12); text-decoration: none; color: #fff; }
.brand__chip { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-12); background: #fff; padding: 4px; box-shadow: var(--sh-sm); flex: none; }
.brand__chip img { width: 100%; height: 100%; object-fit: contain; }
.brand__text { display: grid; line-height: 1.1; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-16); letter-spacing: -0.01em; }
.brand__tag { font-size: var(--fs-12); color: var(--brand-300); letter-spacing: 0.08em; }

.nav__links { display: none; gap: var(--s-4); }
.nav__links a {
  position: relative; padding: 8px 16px; border-radius: var(--r-pill);
  color: rgba(255,255,255,0.8); text-decoration: none; font-size: var(--fs-14); font-weight: 500;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: #fff; background: rgba(255,255,255,0.08); }
.nav__actions { display: flex; align-items: center; gap: var(--s-8); }
.nav__donate { min-height: 44px; padding: 10px 20px; font-size: var(--fs-14); }
.nav__toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-pill); border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.06); color: #fff; cursor: pointer; }
.nav__toggle span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform var(--t) var(--ease); }
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; border-radius: 2px; transition: transform var(--t) var(--ease), top var(--t) var(--ease); }
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
@media (min-width: 960px) {
  .nav__links { display: flex; }
  .nav__toggle { display: none; }
}
@media (max-width: 420px) { .brand__text { display: none; } }

.mobile-menu {
  position: fixed; inset: 0; z-index: 90; background: var(--ink);
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  display: flex; flex-direction: column; gap: var(--s-32);
  visibility: hidden; opacity: 0; clip-path: circle(0% at calc(100% - 40px) 36px);
  transition: clip-path 500ms var(--ease-out), opacity 300ms var(--ease), visibility 0s linear 500ms;
}
.mobile-menu.is-open { visibility: visible; opacity: 1; clip-path: circle(150% at calc(100% - 40px) 36px); transition: clip-path 600ms var(--ease-out), opacity 200ms var(--ease), visibility 0s; }
.mobile-menu nav { display: grid; gap: var(--s-4); }
.mobile-menu nav a { color: #fff; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-32); padding: 8px 0; border-bottom: 1px solid var(--ink-line); display: flex; justify-content: space-between; align-items: center; }
.mobile-menu nav a small { font-family: var(--font-body); font-size: var(--fs-12); color: var(--ink-muted); font-weight: 500; }
.mobile-menu__foot { margin-top: auto; display: grid; gap: var(--s-16); color: var(--ink-muted); font-size: var(--fs-14); }
body.menu-open { overflow: hidden; }

/* ==========================================================================
   Hero (3D)
   ========================================================================== */
.hero {
  position: relative; min-height: 100svh; min-height: 100vh; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 80% 20%, rgba(31, 170, 92, 0.28), transparent 60%),
    radial-gradient(800px 500px at 10% 90%, rgba(229, 55, 44, 0.18), transparent 60%),
    var(--ink);
  color: #fff; display: flex; align-items: flex-end;
  padding: calc(var(--header-h) + 32px) 0 var(--s-48);
  
}
@supports (min-height: 100svh) { .hero { min-height: 100svh; } }
.hero__canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; touch-action: pan-y; }
.hero__grid {
  position: absolute; inset: auto 0 0; height: 55%; z-index: 0; pointer-events: none; opacity: 0.35;
  background-image: linear-gradient(rgba(110, 231, 160, 0.14) 1px, transparent 1px), linear-gradient(90deg, rgba(110, 231, 160, 0.14) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(600px) rotateX(60deg); transform-origin: bottom;
  mask-image: linear-gradient(to top, #000 10%, transparent 90%);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 90%);
}
.hero__inner { position: relative; display: grid; gap: var(--s-24); }
.hero__title { font-size: var(--fs-hero); font-weight: 800; letter-spacing: -0.045em; line-height: 0.92; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__title .word { display: inline-block; will-change: transform; }
.hero__title .dot { color: var(--heart-500); }
.hero__title .line:nth-child(2) .dot { color: var(--brand-400); }
.hero__title .line:nth-child(3) .dot { color: var(--gold); }
.hero__sub { font-size: var(--fs-20); color: #d4ded8; max-width: 44ch; line-height: 1.5; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--s-12); }
.hero__stats { display: flex; flex-wrap: wrap; gap: var(--s-8); margin-top: var(--s-8); }
.chip {
  display: inline-flex; align-items: center; gap: var(--s-8); padding: 8px 16px 8px 8px;
  border-radius: var(--r-pill); background: rgba(255,255,255,0.06); border: 1px solid var(--ink-line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: var(--fs-14); color: #e6eee9;
}
.chip b { display: inline-grid; place-items: center; min-width: 40px; height: 32px; padding: 0 8px; border-radius: var(--r-pill); background: var(--brand-400); color: var(--ink); font-weight: 800; font-size: var(--fs-14); }
.chip:nth-child(2) b { background: var(--gold); }
.chip:nth-child(3) b { background: var(--heart-400); }
.hero__scroll { position: absolute; right: var(--gutter); bottom: var(--s-48); display: none; align-items: center; gap: var(--s-12); color: var(--ink-muted); font-size: var(--fs-12); letter-spacing: 0.14em; text-transform: uppercase; writing-mode: vertical-rl; text-decoration: none; }
.hero__scroll::after { content: ""; width: 2px; height: 64px; background: linear-gradient(var(--brand-400), transparent); animation: scrollcue 2s var(--ease) infinite; }
@keyframes scrollcue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (min-width: 900px) {
  .hero { align-items: center; }
  .hero__inner { max-width: 760px; }
  .hero__scroll { display: inline-flex; }
}
@media (max-width: 899px) {
  /* ball gets its own stage at the top; text anchored below with a readable scrim */
  .hero { padding-top: calc(var(--header-h) + min(64vw, 300px)); }
  .hero::after { content: ""; position: absolute; inset: 35% 0 0; z-index: 1; background: linear-gradient(to bottom, transparent, rgba(10,19,15,0.85) 45%); pointer-events: none; }
}
.hero__fallback { position: absolute; right: -10%; top: 12%; width: min(70vw, 560px); aspect-ratio: 1; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle at 35% 30%, #fff, #cfd8d3 45%, #6b7a72 75%, #1a2a22); opacity: 0.9; box-shadow: 0 60px 120px -40px rgba(31,170,92,0.6); }
.hero.has-3d .hero__fallback { display: none; }

/* ==========================================================================
   Marquee
   ========================================================================== */
.marquee { background: var(--brand-400); color: var(--ink); overflow: hidden; padding-block: var(--s-16); transform: rotate(-2deg) scale(1.04); margin-block: -24px; position: relative; z-index: 2; box-shadow: var(--sh-md); }
.marquee--alt { background: var(--heart-600); color: #fff; transform: rotate(1.5deg) scale(1.04); }
.marquee__track { display: flex; width: max-content; gap: var(--s-32); animation: marquee 30s linear infinite; }
.marquee__track span { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-32); text-transform: uppercase; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: var(--s-32); white-space: nowrap; }
.marquee__track span::after { content: "✦"; font-size: var(--fs-24); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   Story / About
   ========================================================================== */
.story { display: grid; gap: var(--s-48); align-items: center; }
@media (min-width: 960px) { .story { grid-template-columns: 1fr 1fr; gap: var(--s-96); } }
.story__body { display: grid; gap: var(--s-24); }
.story__body p { color: var(--muted); max-width: 60ch; }
.quote { position: relative; padding: var(--s-24) var(--s-24) var(--s-24) var(--s-32); border-left: 4px solid var(--heart-500); background: var(--card); border-radius: 0 var(--r-16) var(--r-16) 0; box-shadow: var(--sh-sm); font-family: var(--font-display); font-size: var(--fs-20); line-height: 1.4; color: var(--text); }
.quote cite { display: block; margin-top: var(--s-12); font-family: var(--font-body); font-style: normal; font-size: var(--fs-14); color: var(--muted); }
.founder { display: flex; align-items: center; gap: var(--s-16); }
.founder__avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--brand-300); font-family: var(--font-display); font-weight: 800; font-size: var(--fs-20); }
.founder b { display: block; }
.founder span { font-size: var(--fs-14); color: var(--muted); }

.photo-stack { position: relative; aspect-ratio: 1 / 1.05; perspective: 1200px; max-width: 560px; margin-inline: auto; width: 100%; }
.photo-stack__item { position: absolute; border-radius: var(--r-24); overflow: hidden; box-shadow: var(--sh-lg); background: var(--paper-2); transform-style: preserve-3d; will-change: transform; }
.photo-stack__item img { width: 100%; height: 100%; object-fit: cover; }
.photo-stack__item:nth-child(1) { inset: 0 18% 22% 0; }
.photo-stack__item:nth-child(2) { inset: 38% 0 0 32%; border: 6px solid var(--paper); }
.photo-stack__badge { position: absolute; left: 4%; bottom: 6%; z-index: 3; background: var(--ink); color: #fff; padding: var(--s-16) var(--s-24); border-radius: var(--r-16); box-shadow: var(--sh-lg); display: grid; gap: 2px; }
.photo-stack__badge b { font-family: var(--font-display); font-size: var(--fs-32); line-height: 1; color: var(--brand-300); }
.photo-stack__badge span { font-size: var(--fs-12); color: var(--ink-muted); letter-spacing: 0.08em; text-transform: uppercase; }

/* Tilt card (3D hover) */
[data-tilt] { transform-style: preserve-3d; transition: transform 400ms var(--ease-out); }
[data-tilt] .tilt-glare { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: radial-gradient(400px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,0.22), transparent 40%); opacity: 0; transition: opacity var(--t); }
[data-tilt]:hover .tilt-glare { opacity: 1; }

/* ==========================================================================
   Problem → bridge
   ========================================================================== */
.pillars { display: grid; gap: var(--s-16); }
@media (min-width: 760px) { .pillars { grid-template-columns: repeat(3, 1fr); gap: var(--s-24); } }
.pillar {
  position: relative; overflow: hidden; border-radius: var(--r-24); padding: var(--s-32);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-sm);
  display: grid; gap: var(--s-16); align-content: start; min-height: 280px;
}
.pillar__icon { width: 56px; height: 56px; border-radius: var(--r-16); display: grid; place-items: center; }
.pillar__icon svg { width: 28px; height: 28px; }
.pillar:nth-child(1) .pillar__icon { background: #fde7e5; color: var(--heart-600); }
.pillar:nth-child(2) .pillar__icon { background: #e1f5e9; color: var(--brand-600); }
.pillar:nth-child(3) .pillar__icon { background: #fdf1d8; color: #9a6400; }
.pillar__k { font-size: var(--fs-12); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pillar h3 { font-size: var(--fs-24); }
.pillar p { color: var(--muted); }
.pillar__fix { margin-top: auto; padding-top: var(--s-16); border-top: 1px dashed var(--line); font-size: var(--fs-14); font-weight: 600; display: flex; gap: var(--s-8); align-items: flex-start; }
.pillar__fix svg { width: 20px; height: 20px; flex: none; color: var(--brand-600); margin-top: 2px; }

/* ==========================================================================
   Carousel (programs) — native scroll-snap + drag
   ========================================================================== */
.carousel { position: relative; }
.carousel__viewport {
  display: grid; grid-auto-flow: column; grid-auto-columns: 86%;
  gap: var(--s-16); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  padding: var(--s-8) var(--gutter) var(--s-32);
  margin-inline: calc(var(--gutter) * -1);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.carousel__viewport::-webkit-scrollbar { display: none; }
.carousel__viewport.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.carousel__viewport.is-dragging * { pointer-events: none; }
@media (min-width: 640px) { .carousel__viewport { grid-auto-columns: 58%; gap: var(--s-24); } }
@media (min-width: 1024px) { .carousel__viewport { grid-auto-columns: calc((100% - 2 * var(--s-24) - 2 * var(--gutter)) / 2.6); } }
.carousel__slide { scroll-snap-align: start; }
.carousel__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-24); }
.carousel__progress { width: 100%; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.section--ink .carousel__progress { background: var(--ink-line); }
.carousel__progress i { display: block; height: 100%; width: 100%; background: var(--brand-500); transform-origin: left; transform: scaleX(0.2); border-radius: inherit; }
.carousel__nav { display: flex; gap: var(--s-8); }
.carousel__count { font-variant-numeric: tabular-nums; font-size: var(--fs-14); color: var(--muted); min-width: 56px; }
.section--ink .carousel__count { color: var(--ink-muted); }

.program {
  position: relative; height: 100%; border-radius: var(--r-24); overflow: hidden;
  background: var(--ink-2); color: #fff; display: grid; grid-template-rows: 240px 1fr;
  box-shadow: var(--sh-md); isolation: isolate;
  transition: transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease);
}
.program:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.program__media { position: relative; overflow: hidden; }
.program__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 800ms var(--ease-out); }
.program:hover .program__media img { transform: scale(1.06); }
.program__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--ink-2), transparent 55%); }
.program__num { position: absolute; top: var(--s-16); left: var(--s-16); z-index: 1; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-14); padding: 6px 12px; border-radius: var(--r-pill); background: rgba(10,19,15,0.6); backdrop-filter: blur(8px); border: 1px solid var(--ink-line); }
.program__tag { position: absolute; top: var(--s-16); right: var(--s-16); z-index: 1; font-size: var(--fs-12); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 12px; border-radius: var(--r-pill); color: var(--ink); background: var(--brand-400); }
.program__tag--heart { background: var(--heart-400); }
.program__tag--gold { background: var(--gold); }
.program__body { padding: var(--s-24) var(--s-24) var(--s-32); display: grid; gap: var(--s-12); align-content: start; }
.program__body h3 { font-size: var(--fs-24); }
.program__body p { color: var(--ink-muted); font-size: var(--fs-16); }
.ticks { display: grid; gap: var(--s-8); margin-top: var(--s-4); }
.ticks li { display: flex; gap: var(--s-8); align-items: flex-start; font-size: var(--fs-14); color: #dfe8e3; }
.ticks li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--brand-400) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a130f' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* ==========================================================================
   Impact
   ========================================================================== */
.impact { overflow: hidden; }
.impact__orb { position: absolute; width: 640px; height: 640px; right: -240px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(31,170,92,0.35), transparent 65%); filter: blur(20px); pointer-events: none; }
.stats { display: grid; gap: var(--s-16); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 960px) { .stats { grid-template-columns: repeat(4, 1fr); gap: var(--s-24); } }
.stat {
  position: relative; border-radius: var(--r-24); padding: var(--s-24); min-height: 200px;
  background: linear-gradient(160deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--ink-line);
  display: grid; align-content: space-between; gap: var(--s-24); overflow: hidden;
}
.stat--feature { grid-column: span 2; background: linear-gradient(140deg, var(--brand-600), var(--brand-700)); border-color: transparent; }
@media (min-width: 960px) { .stat--feature { grid-row: span 2; grid-column: span 2; min-height: 420px; } }
.stat__num { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-64); line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stat--feature .stat__num { font-size: clamp(4rem, 2rem + 8vw, 8rem); }
.stat__label { font-size: var(--fs-16); color: var(--ink-muted); max-width: 28ch; }
.stat--feature .stat__label { color: #dcfce7; font-size: var(--fs-20); }
.stat__icon { width: 40px; height: 40px; border-radius: var(--r-12); display: grid; place-items: center; background: rgba(255,255,255,0.08); color: var(--brand-300); }
.stat__icon svg { width: 22px; height: 22px; }
.stat--feature .stat__icon { background: rgba(255,255,255,0.16); color: #fff; }
.stat__ball { position: absolute; right: -40px; bottom: -40px; width: 220px; opacity: 0.18; }

/* ==========================================================================
   Vision / Mission / Values
   ========================================================================== */
.vm { display: grid; gap: var(--s-16); }
@media (min-width: 860px) { .vm { grid-template-columns: 1fr 1fr; gap: var(--s-24); } }
.vm__card { position: relative; border-radius: var(--r-32); padding: var(--s-32); overflow: hidden; min-height: 280px; display: grid; align-content: space-between; gap: var(--s-32); }
@media (min-width: 860px) { .vm__card { padding: var(--s-48); } }
.vm__card--vision { background: var(--ink); color: #fff; }
.vm__card--mission { background: var(--heart-600); color: #fff; }
.vm__card h3 { font-size: var(--fs-14); letter-spacing: 0.14em; text-transform: uppercase; font-family: var(--font-body); font-weight: 700; opacity: 0.8; }
.vm__card p { font-family: var(--font-display); font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; }
.vm__glyph { position: absolute; right: -24px; top: -24px; width: 160px; height: 160px; opacity: 0.12; }

.values { display: grid; gap: var(--s-12); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: var(--s-24); perspective: 1000px; }
.value {
  position: relative; border-radius: var(--r-24); padding: var(--s-24); background: var(--card); border: 1px solid var(--line);
  display: grid; gap: var(--s-8); box-shadow: var(--sh-sm);
}
.value__letter { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-48); line-height: 1; color: var(--brand-600); }
.value:nth-child(2n) .value__letter { color: var(--heart-600); }
.value h4 { font-size: var(--fs-20); }
.value p { font-size: var(--fs-14); color: var(--muted); }

/* ==========================================================================
   Gallery — 3D coverflow
   ========================================================================== */
.coverflow { position: relative; height: clamp(360px, 60vw, 560px); perspective: 1400px; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.coverflow.is-dragging { cursor: grabbing; }
.coverflow__stage { position: absolute; inset: 0; transform-style: preserve-3d; }
.coverflow__item {
  position: absolute; left: 50%; top: 50%; width: clamp(220px, 44vw, 420px); aspect-ratio: 3 / 4;
  margin: 0; border-radius: var(--r-24); overflow: hidden; background: var(--ink-3);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.7);
  transform: translate(-50%, -50%); will-change: transform, opacity, filter;
}
.coverflow__item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.coverflow__item figcaption {
  position: absolute; inset: auto 0 0; padding: var(--s-48) var(--s-16) var(--s-16);
  background: linear-gradient(to top, rgba(10,19,15,0.92), transparent);
  font-size: var(--fs-14); font-weight: 600; color: #fff; opacity: 0; transform: translateY(8px);
  transition: opacity var(--t), transform var(--t) var(--ease-out);
}
.coverflow__item.is-active figcaption { opacity: 1; transform: none; }
.coverflow__controls { display: flex; align-items: center; justify-content: center; gap: var(--s-16); margin-top: var(--s-24); }
.dots { display: flex; gap: var(--s-8); flex-wrap: wrap; justify-content: center; }
.dots button { width: 10px; height: 10px; padding: 0; border-radius: var(--r-pill); border: 0; background: var(--ink-line); cursor: pointer; transition: width var(--t) var(--ease-out), background-color var(--t); position: relative; }
.dots button::before { content: ""; position: absolute; inset: -8px; } /* 26px hit target */
.dots button[aria-current="true"] { width: 32px; background: var(--brand-400); }

/* ==========================================================================
   Donate
   ========================================================================== */
.donate { display: grid; gap: var(--s-48); align-items: start; }
@media (min-width: 1024px) { .donate { grid-template-columns: 1fr 1.05fr; gap: var(--s-64); } }
.donate__why { display: grid; gap: var(--s-24); }
@media (min-width: 1024px) { .donate__why { position: sticky; top: calc(var(--header-h) + 32px); } }
.tiers { display: grid; gap: var(--s-12); }
.tier { display: grid; grid-template-columns: auto 1fr; gap: var(--s-16); align-items: center; padding: var(--s-16); border-radius: var(--r-16); background: var(--card); border: 1px solid var(--line); }
.tier__icon { width: 48px; height: 48px; border-radius: var(--r-12); display: grid; place-items: center; background: #e1f5e9; color: var(--brand-600); }
.tier:nth-child(2) .tier__icon { background: #fde7e5; color: var(--heart-600); }
.tier:nth-child(3) .tier__icon { background: #fdf1d8; color: #9a6400; }
.tier__icon svg { width: 24px; height: 24px; }
.tier b { display: block; font-size: var(--fs-16); }
.tier span { font-size: var(--fs-14); color: var(--muted); }
.trust { display: flex; flex-wrap: wrap; gap: var(--s-8) var(--s-24); font-size: var(--fs-14); color: var(--muted); }
.trust span { display: inline-flex; align-items: center; gap: var(--s-8); }
.trust svg { width: 18px; height: 18px; color: var(--brand-600); }

.give-card {
  position: relative; background: var(--card); border-radius: var(--r-32); padding: var(--s-24);
  box-shadow: var(--sh-lg); border: 1px solid var(--line);
}
@media (min-width: 640px) { .give-card { padding: var(--s-48); } }
.give-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-16); margin-bottom: var(--s-24); }
.give-card__head h3 { font-size: var(--fs-24); }
.secure-badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); font-weight: 600; color: var(--brand-700); background: #e1f5e9; padding: 6px 12px; border-radius: var(--r-pill); white-space: nowrap; }
.secure-badge svg { width: 14px; height: 14px; }

.form { display: grid; gap: var(--s-24); }
.field { display: grid; gap: var(--s-8); }
.field-row { display: grid; gap: var(--s-16); }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.label { font-size: var(--fs-14); font-weight: 600; color: var(--text); display: flex; justify-content: space-between; gap: var(--s-8); }
.label small { font-weight: 400; color: var(--muted); }
.input, .textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: var(--r-12);
  border: 1.5px solid var(--line); background: var(--paper); color: var(--text);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t);
}
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #8a928d; }
.input:hover, .textarea:hover { border-color: #c9c2b1; }
.input:focus, .textarea:focus { outline: none; border-color: var(--brand-600); background: #fff; box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.15); }
.input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 4px rgba(198, 42, 32, 0.12); }
.field__error { font-size: var(--fs-12); color: var(--error); font-weight: 600; display: flex; gap: 4px; align-items: center; min-height: 0; }
.field__error:empty { display: none; }
.field__error::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--error); color: #fff; font-size: 11px; }

.segmented { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: var(--s-8); border: 0; padding: 0; margin: 0; }
.segmented legend { margin-bottom: var(--s-8); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: grid; place-items: center; gap: 2px; text-align: center; min-height: 56px; padding: 8px 12px; border-radius: var(--r-12);
  border: 1.5px solid var(--line); background: var(--paper); font-weight: 600; font-size: var(--fs-14);
  transition: border-color var(--t), background-color var(--t), transform var(--t) var(--ease-out), color var(--t);
}
.choice span small { font-weight: 500; font-size: var(--fs-12); color: var(--muted); }
.choice:hover span { border-color: #bdb5a2; transform: translateY(-1px); }
.choice input:checked + span { border-color: var(--brand-600); background: #ecf8f0; color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--brand-600); }
.choice input:checked + span small { color: var(--brand-700); }
.choice input:focus-visible + span { outline: 3px solid var(--brand-400); outline-offset: 2px; }
.amounts { grid-template-columns: repeat(3, 1fr); }
.amount-custom { position: relative; }
.amount-custom .prefix { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); font-size: var(--fs-14); pointer-events: none; }
.amount-custom .input { padding-left: 56px; font-size: var(--fs-20); font-weight: 700; font-variant-numeric: tabular-nums; }

.check { display: flex; align-items: flex-start; gap: var(--s-12); font-size: var(--fs-14); color: var(--muted); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand-600); flex: none; }

.impact-preview { display: flex; gap: var(--s-12); align-items: center; padding: var(--s-16); border-radius: var(--r-16); background: var(--ink); color: #fff; font-size: var(--fs-14); }
.impact-preview svg { width: 24px; height: 24px; flex: none; color: var(--brand-300); }
.impact-preview b { color: var(--brand-300); }

.form-alert { padding: var(--s-12) var(--s-16); border-radius: var(--r-12); font-size: var(--fs-14); font-weight: 500; }
.form-alert:empty { display: none; }
.form-alert--error { background: #fde7e5; color: var(--heart-600); }
.form-alert--success { background: #e1f5e9; color: var(--brand-700); }
.form-note { font-size: var(--fs-12); color: var(--muted); text-align: center; }

.btn .spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,0.35); border-top-color: #fff; animation: spin 0.8s linear infinite; display: none; }
.btn.is-loading .spinner { display: block; }
.btn.is-loading .btn__icon { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.other-ways { display: grid; gap: var(--s-16); margin-top: var(--s-64); }
@media (min-width: 760px) { .other-ways { grid-template-columns: repeat(3, 1fr); gap: var(--s-24); } }
.way { border-radius: var(--r-24); padding: var(--s-24); border: 1px solid var(--line); background: var(--card); display: grid; gap: var(--s-12); align-content: start; }
.way h4 { font-size: var(--fs-20); }
.way p { font-size: var(--fs-14); color: var(--muted); }
.way a { font-weight: 600; font-size: var(--fs-14); color: var(--brand-700); text-underline-offset: 4px; }

/* ==========================================================================
   Structure
   ========================================================================== */
.org { display: grid; gap: var(--s-12); justify-items: center; text-align: center; }
.org__row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-12); }
.org__node { padding: 12px 20px; border-radius: var(--r-pill); background: var(--ink-3); border: 1px solid var(--ink-line); font-weight: 600; font-size: var(--fs-14); color: #e6eee9; }
.org__node--top { background: var(--brand-600); border-color: transparent; color: #fff; font-size: var(--fs-16); padding: 16px 28px; }
.org__node--founder { background: #fff; color: var(--ink); }
.org__line { width: 2px; height: 24px; background: linear-gradient(var(--brand-400), transparent); }

/* ==========================================================================
   Contact & footer
   ========================================================================== */
.contact { display: grid; gap: var(--s-32); }
@media (min-width: 960px) { .contact { grid-template-columns: 1fr 1.2fr; gap: var(--s-64); align-items: stretch; } }
.contact__list { display: grid; gap: var(--s-12); }
.contact__item { display: flex; gap: var(--s-16); align-items: center; padding: var(--s-16); border-radius: var(--r-16); background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: transform var(--t) var(--ease-out), border-color var(--t); }
a.contact__item:hover { transform: translateX(4px); border-color: var(--text); }
.contact__item .ic { width: 48px; height: 48px; border-radius: var(--r-12); display: grid; place-items: center; background: var(--ink); color: var(--brand-300); flex: none; }
.contact__item .ic svg { width: 22px; height: 22px; }
.contact__item small { display: block; font-size: var(--fs-12); color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.contact__item b { font-size: var(--fs-16); word-break: break-word; }
.map { border-radius: var(--r-24); overflow: hidden; min-height: 320px; border: 1px solid var(--line); background: var(--paper-2); }
.map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; filter: grayscale(0.3) contrast(1.05); }

.cta-band { position: relative; overflow: hidden; border-radius: var(--r-32); padding: var(--s-48) var(--s-24); background: var(--heart-600); color: #fff; display: grid; gap: var(--s-24); text-align: center; justify-items: center; }
@media (min-width: 760px) { .cta-band { padding: var(--s-64); } }
.cta-band h2 { font-size: var(--fs-48); max-width: 20ch; }
.cta-band p { max-width: 52ch; color: #ffe4e1; }
.cta-band .btn { --bg: #fff; --fg: var(--heart-600); }
.cta-band__ball { position: absolute; width: 200px; left: -40px; bottom: -60px; opacity: 0.15; }

.footer { background: var(--ink); color: var(--ink-muted); padding: var(--s-64) 0 var(--s-32); font-size: var(--fs-14); }
.footer__grid { display: grid; gap: var(--s-32); }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer h4 { color: #fff; font-size: var(--fs-16); margin-bottom: var(--s-16); }
.footer ul { display: grid; gap: var(--s-8); }
.footer a { text-decoration: none; transition: color var(--t-fast); }
.footer a:hover { color: #fff; }
.footer__brand p { margin-top: var(--s-16); max-width: 40ch; }
.footer__big { font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 12vw, 10rem); line-height: 0.9; letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.14); margin-top: var(--s-48); white-space: nowrap; overflow: hidden; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-16); padding-top: var(--s-24); margin-top: var(--s-24); border-top: 1px solid var(--ink-line); }
.socials { display: flex; gap: var(--s-8); margin-top: var(--s-16); }
.socials a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-pill); border: 1px solid var(--ink-line); color: #fff; transition: background-color var(--t), transform var(--t) var(--ease-out); }
.socials a:hover { background: var(--brand-600); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }

/* Sticky mobile donate bar */
.give-fab {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-12);
  padding: 8px 8px 8px 20px; border-radius: var(--r-pill);
  background: rgba(10,19,15,0.88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  color: #fff; box-shadow: var(--sh-lg); border: 1px solid var(--ink-line);
  transform: translateY(160%); transition: transform 500ms var(--ease-out);
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.give-fab.is-visible { transform: none; }
.give-fab p { font-size: var(--fs-14); line-height: 1.3; }
.give-fab p b { color: var(--brand-300); }
.give-fab .btn { min-height: 44px; padding: 10px 20px; font-size: var(--fs-14); }
@media (min-width: 960px) { .give-fab { display: none; } }

/* Reveal (initial state only when JS + Motion are active) */
.js [data-reveal] { opacity: 0; }
.js.motion-failed [data-reveal] { opacity: 1 !important; transform: none !important; }

/* Page hero (sub pages) */
.page-hero { position: relative; background: var(--ink); color: #fff; padding: calc(var(--header-h) + var(--s-64)) 0 var(--s-64); overflow: hidden; }
.page-hero h1 { font-size: var(--fs-64); max-width: 16ch; margin-top: var(--s-16); }
.page-hero p { color: var(--ink-muted); font-size: var(--fs-20); max-width: 52ch; margin-top: var(--s-16); }
.page-hero__orb { position: absolute; right: -120px; top: -120px; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, rgba(229,55,44,0.35), transparent 65%); pointer-events: none; }

/* Receipt */
.receipt { max-width: 560px; margin: calc(var(--s-64) * -1) auto 0; position: relative; z-index: 2; background: var(--card); border-radius: var(--r-32); box-shadow: var(--sh-lg); padding: var(--s-32); display: grid; gap: var(--s-24); text-align: center; }
@media (min-width: 640px) { .receipt { padding: var(--s-48); } }
.receipt__icon { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: #e1f5e9; color: var(--brand-600); }
.receipt__icon--pending { background: #fdf1d8; color: #9a6400; }
.receipt__icon--error { background: #fde7e5; color: var(--heart-600); }
.receipt__icon svg { width: 40px; height: 40px; }
.receipt dl { display: grid; grid-template-columns: auto 1fr; gap: var(--s-12) var(--s-24); text-align: left; margin: 0; padding: var(--s-24); background: var(--paper); border-radius: var(--r-16); font-size: var(--fs-14); }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 600; text-align: right; word-break: break-all; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 150; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; }
  .marquee__track { animation: none; }
}

/* Designation picker: 3+2 on phones, one row of 5 on wider cards */
.designations { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 1100px) { .designations { grid-template-columns: repeat(5, 1fr); } .designations .choice span { padding-inline: 6px; } }
