/* GSO 2026 — Global Stylesheet */
:root {
  --forest-50: #f0fdf4;
  --forest-100: #dcfce7;
  --forest-200: #bbf7d0;
  --forest-300: #86efac;
  --forest-400: #4ade80;
  --forest-500: #2D6A4F;
  --forest-600: #1B4332;
  --forest-700: #143326;
  --earth-50: #fefaf5;
  --earth-100: #fdf3e6;
  --earth-200: #f5deb3;
  --earth-300: #D4A373;
  --earth-400: #c48b5c;
  --sand-50: #FEFAE0;
  --sand-100: #fdf6cc;
  --sand-200: #F5E6B8;
  --sand-300: #E9C46A;
  --cream: #F8F4E8;
  --olive: #283618;
  --white: #ffffff;
  --font-display: 'Lora', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 17px; }

body {
  font-family: var(--font-body);
  color: var(--olive);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }
@media (min-width: 1024px) { .container { padding: 0 48px; } }

/* Typography */
.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 9999px; font-weight: 600;
  font-size: 1rem; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  border: 2px solid transparent; text-align: center;
}
.btn-primary { background: var(--sand-300); color: var(--forest-600); }
.btn-primary:hover { background: var(--sand-200); }
.btn-outline { border-color: rgba(255,255,255,0.3); color: white; background: transparent; }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-outline-dark { border-color: var(--earth-300); color: var(--olive); background: transparent; }
.btn-outline-dark:hover { background: var(--earth-50); }
.btn-sm { padding: 10px 20px; font-size: 0.9375rem; }

/* Section spacing */
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
@media (max-width: 768px) { .section { padding: 64px 0; } .section-sm { padding: 48px 0; } }

/* Text utilities */
.text-center { text-align: center; }
.text-sm { font-size: 0.9375rem; }
.text-xs { font-size: 0.8125rem; }
.text-lg { font-size: 1.1875rem; }
.text-xl { font-size: 1.3125rem; }
.text-2xl { font-size: 1.5625rem; }
.text-3xl { font-size: 1.9375rem; }
.text-4xl { font-size: 2.375rem; }
.text-5xl { font-size: 3.125rem; }
@media (min-width: 768px) { .text-5xl { font-size: 3.875rem; } }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }
.tracking-widest { letter-spacing: 0.2em; }
.leading-relaxed { line-height: 1.75; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-16 { margin-top: 4rem; }
.pt-4 { padding-top: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

/* Grid */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }

/* Card */
.card {
  background: white; border-radius: 24px; overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid rgba(0,0,0,0.05);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -12px rgba(0,0,0,0.1); }

/* Rounded */
.rounded-full { border-radius: 9999px; }
.rounded-2xl { border-radius: 16px; }
.rounded-3xl { border-radius: 24px; }

/* Colors */
.bg-cream { background: var(--cream); }
.bg-white { background: white; }
.bg-forest-50 { background: var(--forest-50); }
.bg-forest-500 { background: var(--forest-500); }
.bg-forest-600 { background: var(--forest-600); }
.bg-earth-50 { background: var(--earth-50); }
.bg-earth-100 { background: var(--earth-100); }
.bg-sand-50 { background: var(--sand-50); }
.text-olive { color: var(--olive); }
.text-forest-500 { color: var(--forest-500); }
.text-forest-600 { color: var(--forest-600); }
.text-earth-300 { color: var(--earth-300); }
.text-sand-300 { color: var(--sand-300); }
.text-white { color: white; }

/* Aspect ratios */
.aspect-video { aspect-ratio: 16/9; }
.aspect-square { aspect-ratio: 1; }
.object-cover { object-fit: cover; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Shadow */
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }

/* Progress bar animation */
.stat-bar { animation: grow 1.5s ease-out forwards; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* TOC node hover */
.toc-node { transition: transform 0.3s ease, filter 0.3s ease; }
.toc-node:hover { transform: scale(1.05); filter: brightness(1.1); }

/* Pill nav hover */
.pill { transition: all 0.3s ease; padding: 8px 16px; border-radius: 9999px; }
.pill:hover { background: var(--forest-600); color: white; }

/* Fade in */
.fade-in { opacity: 0; transform: translateY(20px); transition: all 0.6s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Timeline */
.timeline-line { background: linear-gradient(to bottom, var(--forest-500), var(--earth-300)); }

/* ---- Shared nav / mobile menu ---- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(27,67,50,0.95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.08); height: 76px; overflow: hidden; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; max-width: 1200px; margin: 0 auto; height: 76px; box-sizing: border-box; }
@media (min-width: 768px) { .nav-inner { padding: 16px 32px; } }
@media (min-width: 1024px) { .nav-inner { padding: 16px 48px; } }
.nav-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-logo { height: 44px; width: auto; display: block; }
.nav-name { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: white; letter-spacing: 0.05em; white-space: nowrap; }
.nav-tagline { display: none; font-size: 0.7rem; color: rgba(255,255,255,0.5); letter-spacing: 0.2em; text-transform: uppercase; line-height: 1.4; white-space: nowrap; }
@media (min-width: 640px) { .nav-tagline { display: block; } }
.nav-links { display: none; align-items: center; gap: 24px; }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a { font-size: 0.8rem; font-weight: 500; color: rgba(255,255,255,0.7); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--sand-300); }
.nav-links a.active { background: rgba(233,196,106,0.25); padding: 6px 14px; border-radius: 9999px; }
.nav-donate { color: var(--sand-300); font-weight: 600; font-size: 0.875rem; }
.nav-donate.active { background: var(--sand-300); color: var(--forest-600); padding: 10px 24px; border-radius: 9999px; }
.nav-donate:hover { color: var(--sand-200); }
.nav-mobile { display: block; color: white; background: none; border: none; cursor: pointer; }
@media (min-width: 768px) { .nav-mobile { display: none; } }
@media (max-width: 767px) {
  .nav-links.open {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(27, 67, 50, 0.98);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.5);
  }
  .nav-links.open a { font-size: 1rem; }
}

/* ---- Page hero ---- */
.page-hero { padding: 160px 0 80px; background: var(--forest-600); }

/* ---- Footer ---- */
.footer { background: var(--olive); color: rgba(255,255,255,0.6); padding: 64px 0 32px; clear: both; }
.footer h4 { color: white; font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.footer a { transition: color 0.2s; }
.footer a:hover { color: var(--sand-300); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 32px; margin-top: 48px; }

/* Offset anchored sections so they clear the fixed nav */
section[id] { scroll-margin-top: 90px; }

/* Responsive helper classes for hardcoded inline grids */
.quick-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 1023px) { .quick-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .quick-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; } }

.conn-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1023px) { .conn-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .conn-grid { grid-template-columns: 1fr; } }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 48px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---- Pillar image slideshows ---- */
.slideshow { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: var(--earth-100); }
.slideshow .slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 0.6s ease;
}
.slideshow .slide.active { opacity: 1; }
.slideshow-dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 3;
}
.slideshow-dot {
  width: 8px; height: 8px; padding: 0; margin: 0; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.55); cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.slideshow-dot.active { background: var(--sand-300); transform: scale(1.25); }
.slideshow-dot:focus-visible { outline: 2px solid var(--sand-300); outline-offset: 2px; }

/* ---- Testimonial text slideshow ---- */
.slideshow-testimonial { aspect-ratio: auto; min-height: 280px; }
.slideshow-testimonial .slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: unset; display: flex; flex-direction: column; justify-content: center;
}

/* ---- Partner cards grid ---- */
.partner-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 600px) { .partner-grid { grid-template-columns: 1fr; } }

/* Respect reduced motion preference */
@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;
  }
}

/* ---- Lightbox for clickable images ---- */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
  padding: 24px;
}
.lightbox-overlay.active {
  display: flex;
}
.lightbox-overlay img {
  max-width: 95vw;
  max-height: 92vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  color: white;
  font-size: 2rem;
  font-weight: 300;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  z-index: 10000;
}
.lightbox-close:hover { color: var(--sand-300); }

/* Clickable chart images */
.chart-clickable {
  cursor: zoom-in;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.chart-clickable:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transform: scale(1.005);
}
