:root {
  --bg: #0e1410;
  --bg-gradient: radial-gradient(circle at 20% 20%, rgba(99,117,84,0.18), transparent 40%),
                 radial-gradient(circle at 80% 10%, rgba(73,88,68,0.18), transparent 35%),
                 radial-gradient(circle at 50% 70%, rgba(34,44,35,0.35), transparent 55%),
                 #0b100c;
  --card: #121a14;
  --card-soft: #151f18;
  --muted: #c8d4c0;
  --muted-dim: #92a08b;
  --accent: #637554;
  --accent-strong: #7f9268;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 20px 60px rgba(0,0,0,0.45), 0 2px 10px rgba(0,0,0,0.25);
  --radius: 16px;
  --radius-lg: 20px;
  scroll-padding-top: 72px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg-gradient);
  min-height: 100%;
}

a {
  color: #637554;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

body {
  margin: 0;
  font-family: 'Chakra Petch', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: transparent;
  color: #f5f7f4;
  line-height: 1.6;
  letter-spacing: 0.01em;
  min-height: 100vh;
  scroll-behavior: smooth;
}

html, body {
  overscroll-behavior-y: none;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 120px;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 16, 12, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: 1180px;
  margin: 0 auto;
  gap: 24px;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

.lockup {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lockup .primary {
  font-size: clamp(0.9rem, 2.3vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.lockup .secondary {
  font-size: clamp(0.65rem, 1.5vw, 0.8rem);
  letter-spacing: 0.18em;
  color: var(--muted-dim);
  opacity: 0.8;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.pill-weather{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  white-space: nowrap;
  font-size: clamp(12px, 2.6vw, 14px);
  letter-spacing: 0.02em;
}

.pill-weather .wx-text{
  display: inline-block;
  white-space: nowrap;
}

.btn {
  border: none;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-size: 14px;
  color: #0d120e;
  background: linear-gradient(135deg, #9bb383, #637554);
  box-shadow: 0 10px 30px rgba(99,117,84,0.35);
}

.btn[data-scroll="donate"],
.nav-donate-btn {
  background: linear-gradient(135deg, #f9f871, #ffe27a);
  color: #141414;
  box-shadow: 0 12px 32px rgba(255, 226, 122, 0.35);
}

.btn[data-scroll="donate"]:hover,
.nav-donate-btn:hover {
  box-shadow: 0 14px 36px rgba(255, 226, 122, 0.45);
}

.btn:hover { transform: translateY(-1px) scale(1.01); }
.btn:active { transform: translateY(0); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e6e9e5;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  padding: clamp(12px, 5vw, 24px) 0;
  align-items: center;
  margin-top: 8px;
}

.label {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.label .dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(99,117,84,0.8);
}

h1 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.2;
  margin: 10px 0 16px;
  font-weight: 700;
}

.hero-label {
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-dim);
}

.hero-title {
  font-size: clamp(2.7rem, 4vw + 1.5rem, 3.8rem);
  line-height: 1.05;
  margin: 20px 0;
}

.accent-highlight { color: var(--accent); }

p { color: var(--muted); margin: 0 0 16px; }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.meta-pill {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.03em;
}

.hero-actions { display: flex; align-items: center; gap: 14px; margin: 12px 0; flex-wrap: wrap; }

.footnote { font-size: 12px; color: var(--muted-dim); max-width: 520px; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99,117,84,0.08), transparent 45%);
  pointer-events: none;
}

.dashboard-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.chip { font-size: 12px; padding: 8px 12px; border-radius: 10px; background: rgba(99,117,84,0.14); color: var(--accent-strong); width: fit-content; border: 1px solid var(--border); }

.tile-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: stretch; }

.hero-card-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.tile-text { background: rgba(255,255,255,0.02); border: 1px dashed var(--border); border-radius: var(--radius); padding: 14px; color: var(--muted); }

.tile-text strong { color: #f6f8f5; }
.tile-text .accent-highlight { font-weight: 700; }

.placeholders { display: grid; grid-template-columns: 1fr; gap: 12px; }

.placeholder {
  border: 1px dashed rgba(255,255,255,0.2);
  background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(99,117,84,0.06));
  border-radius: var(--radius);
  position: relative;
  min-height: 120px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-dim);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.placeholder::before, .placeholder::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(255,255,255,0.15);
  width: 70%;
  height: 70%;
  border-radius: 14px;
}

.placeholder::before { transform: rotate(8deg); }
.placeholder::after { transform: rotate(-8deg); }

.placeholder .lines {
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(99,117,84,0.25);
  border-radius: 12px;
}

.placeholder .corner {
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(99,117,84,0.6);
}

.corner.tl { top: 12px; left: 12px; border-right: none; border-bottom: none; }
.corner.tr { top: 12px; right: 12px; border-left: none; border-bottom: none; }
.corner.bl { bottom: 12px; left: 12px; border-right: none; border-top: none; }
.corner.br { bottom: 12px; right: 12px; border-left: none; border-top: none; }

.image-placeholder {
  border: 1px dashed rgba(255,255,255,0.18);
  background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(99,117,84,0.06));
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  min-height: 120px;
  margin: 0;
}

.image-placeholder img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.hero-card-gallery {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.hero-card-gallery .image-placeholder { min-height: 140px; }

.hero-card-panel {
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  min-height: 0;
}

.hero-card-panel .hero-photo {
  height: 100%;
  margin: 0;
}

.hero-card-panel img,
.hero-card-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 12px;
  display: block;
}

@media (min-width: 720px) {
  .hero-card-panel:first-child img {
    /* Shift image left so the subject is centered in the visible framing */
    object-position: -100px center;
  }
}

@media (max-width: 719px) {
  .hero-card-panel:first-child img {
    object-position: center center;
  }
}

.hero-photo { aspect-ratio: 4 / 3; }

.gallery-strip .image-placeholder { min-height: 140px; }

.gallery-strip img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.gallery-photo { aspect-ratio: 4 / 3; }

@media (max-width: 599px) {
  /* shared */
  .carousel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }
  .carousel::-webkit-scrollbar { display: none; }

  .carousel .carousel__slide {
    scroll-snap-align: center;
  }

  /* dot nav */
  .carousel-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    padding-top: 10px;
  }
  .carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 1px solid rgba(99, 117, 84, 0.55);
    background: rgba(255,255,255,0.10);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
  }
  .carousel-dot.is-active {
    background: rgba(99, 117, 84, 0.9);
    transform: scale(1.15);
  }

  /* Make the carousel containers behave as a flex track (no overlap) */
  .hero-card-body.carousel,
  .trip-visuals .gallery-strip.carousel {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px;
    padding: 0 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    align-items: stretch;
  }

  .hero-card-body.carousel,
  .trip-visuals .gallery-strip.carousel {
    /* Existing flex + scroll styles stay as-is */

    /* Soft edge fade so slides blend out near edges */
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      #000 8%,
      #000 92%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      #000 8%,
      #000 92%,
      transparent 100%
    );

    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
  }

  /* Each slide has a hard width so it can't stack or collapse */
  .hero-card-body.carousel .carousel__slide,
  .trip-visuals .gallery-strip.carousel .carousel__slide {
    flex: 0 0 min(88%, 420px);
    min-width: min(88%, 420px);
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  /* HERO slide sizing */
  .hero-card-body.carousel .carousel__slide {
    height: 260px;
    border-radius: 18px;
    overflow: hidden;
  }

  /* TRIP slide sizing */
  .trip-visuals .gallery-strip.carousel .carousel__slide {
    height: 220px;
    border-radius: 18px;
    overflow: hidden;
  }

  /* Ensure images fill slides correctly */
  .hero-card-body.carousel img,
  .trip-visuals .gallery-strip.carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* Center trip visuals framing on mobile */
  .trip-visuals .gallery-strip.carousel img {
    object-position: 50% 50%;
  }

  /* IMPORTANT: hero has a wrapper around the two right images.
     Keep this so the figures become slide siblings and can scroll naturally. */
  .hero-card-gallery {
    display: contents;
  }

  /* Prevent aspect-ratio rules from fighting the fixed mobile heights */
  .hero-photo,
  .gallery-photo {
    aspect-ratio: auto;
  }

  /* fallback layout for any non-carousel galleries */
  .gallery-strip:not(.carousel) {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .gallery-strip:not(.carousel) .gallery-photo {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .gallery-strip:not(.carousel) .gallery-photo img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
  }
}

section { margin: 36px 0 0; }

.section-header { margin-bottom: 20px; }
.section-header h2 { margin: 6px 0 8px; font-size: clamp(24px, 3vw, 30px); }
.section-header p { max-width: 780px; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

.mini-label { letter-spacing: 0.16em; text-transform: uppercase; font-size: 11px; color: var(--muted-dim); margin-bottom: 8px; }

.card h3 { margin: 8px 0 8px; font-size: 20px; }

.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); font-size: 12px; color: var(--muted); }

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.impact-grid .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.impact-grid .card:first-of-type {
  justify-content: flex-start;
  gap: 24px;
}

.impact-grid blockquote {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-pills { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 8px; justify-content: center; }
.stat { background: rgba(99,117,84,0.12); border: 1px solid var(--border); color: #e6eddf; padding: 12px 14px; border-radius: 12px; min-width: 120px; }
.stat strong { font-size: 22px; display: block; color: #f7faf2; }

blockquote { margin: 0; font-size: 18px; color: #f0f3ed; }
blockquote footer { margin-top: 12px; color: var(--muted-dim); font-size: 14px; }

.trip-visuals { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.gallery .placeholder { min-height: 120px; }

.donate-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: center; background: linear-gradient(135deg, rgba(99,117,84,0.18), rgba(14,20,16,0.8)); position: relative; transition: box-shadow 0.3s ease, border-color 0.3s ease; }

.donate-card.is-highlighted {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 0 30px rgba(255, 255, 150, 0.5);
  border-color: rgba(255, 255, 180, 0.8);
  animation: donateGlow 1.6s ease-out forwards;
}

@keyframes donateGlow {
  0% {
    box-shadow:
      0 0 0 0 rgba(255, 255, 255, 0.7),
      0 0 40px rgba(255, 255, 180, 0.9);
  }
  60% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.5),
      0 0 30px rgba(255, 255, 150, 0.7);
  }
  100% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.15),
      0 0 12px rgba(255, 255, 120, 0.3);
  }
}

.donate-card .subtext { color: var(--muted-dim); font-size: 14px; margin-bottom: 12px;}

.reveal{
  opacity: 0;
  transform: translateY(12px);
  filter: blur(6px);
  transition: opacity 1050ms ease, transform 1050ms ease, filter 1050ms ease;
  will-change: opacity, transform, filter;
}

.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* optional stagger */
.reveal[data-delay="1"]{ transition-delay: 120ms; }
.reveal[data-delay="2"]{ transition-delay: 240ms; }
.reveal[data-delay="3"]{ transition-delay: 360ms; }

@media (prefers-reduced-motion: reduce){
  .reveal{
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

/* === EIN / legal info modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.70);  /* dark overlay behind modal */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  position: relative;
  background: #111714;
  border-radius: 20px;
  padding: 28px 32px;
  max-width: min(720px, 92vw);
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
  color: #e6e9e5;
  font-size: 0.95rem;
}

.modal h2 {
  margin-top: 0;
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.modal p {
  margin: 0 0 8px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 26px;
  color: #ffffff;
  background: none;
  border: none;
  cursor: pointer;
}

.modal a.modal-link {
  display: inline-block;
  margin-top: 14px;
  color: #9bb48a;
  text-decoration: underline;
}

.modal a.modal-link:hover {
  opacity: 0.9;
}

@media (min-width: 768px) {
  .modal {
    padding: 32px 36px;
  }
}

.video-placeholder{
  margin-top: 14px;
  padding: 0;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: #0f1511;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
  position: relative;
  width: 100%;
}
.video-placeholder::after{
  content:'';
  position:absolute;
  inset:0;
  background: radial-gradient(circle at 30% 30%, rgba(249,248,113,0.14), transparent 45%),
              radial-gradient(circle at 70% 60%, rgba(99,117,84,0.22), transparent 55%);
  pointer-events:none;
  opacity: 0.15;
}
.video-placeholder-inner{
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}
.video-embed{
  width: 100%;
}
.video-placeholder,
.video-placeholder iframe {
  border-radius: 18px;
}
.video-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.14);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 12px;
}
.video-sub{
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.stripe-mount .btn{ width: fit-content; }
.stripe-mount{ display:flex; flex-direction:column; align-items:flex-start; min-height:56px; }
.placeholder-text{ color: var(--muted-dim); font-size: 14px; margin: 0; }

.legal-link {
  cursor: pointer;
  color: #637554;
}

.legal-link:hover {
  opacity: 0.85;
}

footer {
  margin-top: 48px;
  padding: 20px 0 60px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

footer .footer-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
footer .links { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .header-inner { padding: 12px 16px; }
  .header-actions { width: 100%; justify-content: flex-end; }
  .tile-body { grid-template-columns: 1fr; }
  .page { padding: 0 16px 90px; }
}

@media (max-width: 640px) {
  .lockup {
    display: none;
  }

  .pill:not(.pill-weather) {
    display: none;
  }

  .pill-weather {
    display: inline-flex;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .header-inner {
    gap: 12px;
  }
}
