:root {
  --aqua-0: #f2fffe;
  --aqua-1: #d8f9f6;
  --aqua-2: #9feee7;
  --aqua-3: #47d7d0;
  --aqua-4: #0ca5a5;
  --ink: #083344;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Outfit", sans-serif;
  min-height: 100vh;
}

main {
  position: relative;
  z-index: 2;
}

body.modal-open {
  overflow: hidden;
}

.site-bg {
  background:
    radial-gradient(circle at 12% 15%, rgba(76, 220, 211, 0.3), transparent 36%),
    radial-gradient(circle at 85% 18%, rgba(159, 238, 231, 0.45), transparent 33%),
    linear-gradient(180deg, #ffffff 0%, var(--aqua-0) 100%);
}

.scrapbook-collage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.scrap {
  position: absolute;
  width: clamp(120px, 16vw, 260px);
  border-radius: 10px;
  border: 1px solid rgba(15, 118, 110, 0.15);
  box-shadow: 0 10px 30px rgba(8, 51, 68, 0.08);
  opacity: 0.12;
  filter: saturate(0.8) contrast(0.95);
  transform-origin: center;
  transform: translate3d(0, calc(var(--parallax, 0px) + var(--drift, 0px)), 0) rotate(var(--rot, 0deg)) scale(var(--scale, 1));
  will-change: transform;
}

.s1 { top: 4%; left: 2%; --rot: -9deg; --scale: 0.95; --drift: -4px; }
.s2 { top: 10%; right: 5%; --rot: 8deg; --scale: 1.05; --drift: 0px; }
.s3 { top: 27%; left: 7%; --rot: -4deg; --scale: 1.08; --drift: -3px; }
.s4 { top: 36%; right: 11%; --rot: 11deg; --scale: 0.92; --drift: 2px; }
.s5 { top: 58%; left: 3%; --rot: -12deg; --scale: 1.06; --drift: -2px; }
.s6 { top: 66%; right: 5%; --rot: 6deg; --scale: 0.98; --drift: 3px; }
.s7 { top: 21%; left: 39%; --rot: -7deg; --scale: 1.12; --drift: -4px; }
.s8 { top: 50%; left: 43%; --rot: 9deg; --scale: 1.04; --drift: 1px; }
.s9 { top: 76%; left: 34%; --rot: -5deg; --scale: 1.1; --drift: -3px; }
.s10 { top: 42%; left: 20%; --rot: -14deg; --scale: 0.88; --drift: 2px; }
.s11 { top: 63%; left: 22%; --rot: 13deg; --scale: 0.9; --drift: -2px; }
.s12 { top: 47%; right: 26%; --rot: -8deg; --scale: 0.94; --drift: 3px; }
.s13 { top: 71%; right: 24%; --rot: 7deg; --scale: 0.9; --drift: -1px; }
.s14 { top: 82%; right: 8%; --rot: -10deg; --scale: 1.02; --drift: 1px; }
.s15 { top: 88%; left: 10%; --rot: 5deg; --scale: 0.96; --drift: -2px; }

.glass-panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(12, 165, 165, 0.22);
  box-shadow: 0 15px 45px rgba(8, 51, 68, 0.08);
  backdrop-filter: blur(8px);
}

.sticky-progress {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translate(-50%, -14px);
  width: min(760px, calc(100% - 20px));
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(8, 51, 68, 0.18);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(8, 51, 68, 0.16);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.sticky-progress.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sticky-progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #0f4a62;
  font-weight: 700;
  margin-bottom: 4px;
}

.sticky-track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(8, 51, 68, 0.13);
}

.sticky-fill {
  height: 100%;
  width: 0%;
  transition: width 0.55s ease;
  background: linear-gradient(90deg, #13c5bd, #4de2d8 70%, #a2fff6);
}

.boss-wrap {
  position: relative;
}

.boss-bar {
  height: 44px;
  position: relative;
  border-radius: 999px;
  border: 2px solid rgba(8, 51, 68, 0.35);
  background: repeating-linear-gradient(
    90deg,
    rgba(8, 51, 68, 0.1) 0,
    rgba(8, 51, 68, 0.1) 12px,
    rgba(8, 51, 68, 0.06) 12px,
    rgba(8, 51, 68, 0.06) 24px
  );
  overflow: hidden;
}

.boss-fill {
  height: 100%;
  width: 0%;
  transition: width 0.55s ease;
  border-radius: inherit;
  background: linear-gradient(90deg, #11bfb6 0%, #0cc7b8 30%, #42ded3 72%, #9af7ef 100%);
}

.boss-inner-glow {
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.55), inset 0 0 18px rgba(12, 165, 165, 0.35);
}

.segment-layer {
  position: absolute;
  inset: 0;
}

.segment {
  position: absolute;
  top: 0;
  height: 100%;
  border-right: 1px solid rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.segment::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
}

.segment:hover::before {
  background: rgba(255, 255, 255, 0.25);
}

.donor-tooltip {
  position: absolute;
  left: 0;
  top: -104px;
  transform: translateX(-50%);
  min-width: 240px;
  background: linear-gradient(160deg, #022b3a 0%, #0b4f62 100%);
  color: #e6feff;
  padding: 10px 11px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.3;
  white-space: normal;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.22);
  z-index: 20;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.donor-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -6px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #022b3a;
}

.tooltip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tooltip-name {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.tooltip-rank {
  background: rgba(154, 247, 239, 0.24);
  border: 1px solid rgba(154, 247, 239, 0.55);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
}

.tooltip-amount {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 800;
}

.tooltip-sub {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(230, 254, 255, 0.88);
}

.tooltip-meter {
  margin-top: 7px;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.24);
}

.tooltip-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2fe1d6 0%, #9af7ef 100%);
}

.top-donor-legend {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.legend-pill {
  border: 1px solid rgba(8, 51, 68, 0.2);
  background: rgba(255, 255, 255, 0.75);
  color: #0f4a62;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.image-card {
  border: 1px solid rgba(14, 116, 144, 0.2);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(8, 51, 68, 0.16);
}

.image-card img {
  display: block;
  width: 100%;
  height: 185px;
  object-fit: cover;
  background: linear-gradient(135deg, #d0f8f5, #f6fffe);
}

.image-card figcaption {
  font-size: 12px;
  color: #155e75;
  padding: 8px 10px;
}

.impact-quote {
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid var(--aqua-4);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(12, 165, 165, 0.13), rgba(255, 255, 255, 0.4));
  color: #0b3b4d;
  font-weight: 600;
}

.cta-pulse {
  animation: ctaPulse 2.2s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(12, 165, 165, 0.15);
  }
  55% {
    box-shadow: 0 0 0 12px rgba(12, 165, 165, 0);
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 27, 37, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 70;
}

.modal-panel {
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(12, 165, 165, 0.32);
  background: #f8fffe;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
  padding: 20px;
}

.modal-close {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(8, 51, 68, 0.08);
  color: #0f4a62;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.tier-preview {
  font-size: 13px;
  color: #0f4a62;
  font-weight: 600;
  border: 1px solid rgba(12, 165, 165, 0.3);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  padding: 10px 12px;
}

#successModal .modal-panel {
  border-color: rgba(8, 145, 178, 0.4);
  background: linear-gradient(180deg, #f7fffe 0%, #eefcfb 100%);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cta-pulse {
    animation: none;
  }

  .scrap {
    transform: translate3d(0, var(--drift, 0px), 0) rotate(var(--rot, 0deg)) scale(var(--scale, 1));
  }
}

@media (max-width: 640px) {
  .scrap {
    opacity: 0.05;
    width: clamp(90px, 22vw, 160px);
  }

  .s6,
  .s7,
  .s8,
  .s9,
  .s10,
  .s11,
  .s12,
  .s13,
  .s14,
  .s15 {
    display: none;
  }

  .boss-bar {
    height: 38px;
  }

  .donor-tooltip {
    font-size: 11px;
  }
}
