*, *::before, *::after { box-sizing: border-box; }

:root {
  --black: #332821;
  --grey-dark: #7d6a58;
  --grey-mid: #9c8972;
  --grey-light: #f6efe1;
  --grey-media: #e6d8c4;
  --border: #ead9c0;
  --white: #fffaf3;
  --accent: #cf7f4a;

  /* Motion: one easing, one duration, used everywhere */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.9s;
  --stagger: 110ms;
}

html, body { margin: 0; padding: 0; }
body {
  color: var(--black);
  background: linear-gradient(180deg, #fffdf8 0%, #fff6e6 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
a { text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Motion ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(var(--rise, 14px)); }
}

/* Hidden only when JS is running, so the page never depends on it to be readable */
.js [data-reveal]:not(.in) { opacity: 0; }
[data-reveal].in {
  animation: rise var(--dur) var(--ease) calc(var(--i, 0) * var(--stagger)) backwards;
}
[data-reveal="fade"] { --rise: 0px; }

/* Tab switches reuse the same motion, a little quicker and quieter */
.content-panel:not([hidden]) { --rise: 8px; animation: rise 0.55s var(--ease) backwards; }
.key-media-box:not([hidden]) { --rise: 0px; animation: rise 0.55s var(--ease) backwards; }

/* Images fade in once decoded instead of popping in */
.js .key-image { opacity: 0; transition: opacity var(--dur) var(--ease); }
.js .key-image.loaded { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Banner ---------- */
.banner {
  text-align: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to top, #fffaf3 0%, #eef2fb 55%, #d6e6f9 100%);
}
.banner p { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: 0.2px; }
.banner .banner-emoji { margin-bottom: 4px; font-size: 20px; line-height: 1; }
.banner .banner-eyebrow { margin-bottom: 2px; }

/* ---------- Hero ---------- */
.hero-media {
  position: relative;
  width: 100%;
  height: clamp(490px, calc(45vh + 240px), 690px);
  background: var(--grey-media);
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 84%;
}
/* A still of the video sits on top of it until playback actually starts. When iOS
   blocks autoplay (Low Power Mode) it draws its own play button inside the video;
   this covers it so our button is the only play control. */
.hero-video::-webkit-media-controls,
.hero-video::-webkit-media-controls-panel,
.hero-video::-webkit-media-controls-overlay-play-button,
.hero-video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}
.hero-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 84%;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
.hero-media.is-playing .hero-poster { opacity: 0; }
.hero-fade {
  position: absolute;
  inset: auto 0 0;
  height: clamp(24px, 4vh, 44px);
  background: linear-gradient(
    to bottom,
    rgba(255, 250, 243, 0) 0%,
    rgba(255, 250, 243, 0.04) 20%,
    rgba(255, 250, 243, 0.16) 40%,
    rgba(255, 250, 243, 0.4) 60%,
    rgba(255, 250, 243, 0.72) 80%,
    #fffaf3 100%
  );
  pointer-events: none;
}
.media-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.media-toggle svg { width: 18px; height: 18px; color: var(--black); }
.media-toggle .icon-play, .media-toggle.is-paused .icon-pause { display: none; }
.media-toggle.is-paused .icon-play { display: block; }

.hero-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 24px 56px;
  text-align: center;
}
.hero-headline {
  font-size: clamp(30px, 6vw, 38px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.3px;
  margin: 0 0 24px;
  color: var(--accent);
  background: linear-gradient(135deg, #f0c168 0%, #e3a874 30%, var(--accent) 65%, #b86a3c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.btn-donate {
  display: inline-block;
  border: 1px solid var(--black);
  color: var(--black);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 22px;
  border-radius: 980px;
  transition: background 0.2s ease;
}
.btn-donate:hover { background: rgba(0, 0, 0, 0.05); }
.utility-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 24px 0 0;
  font-size: 13px;
  color: var(--grey-mid);
}

/* ---------- Navigation + Content ---------- */
.nav-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 72px;
}

.key-media {
  position: relative;
  width: 100%;
  height: clamp(220px, 40vh, 380px);
  background: var(--grey-media);
  overflow: hidden;
}
@media (min-width: 768px) {
  .key-media { height: auto; aspect-ratio: 16 / 9; }
}
.key-media-box { position: absolute; inset: 0; }
.key-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-credit {
  text-align: right;
  font-size: 13px;
  color: var(--grey-mid);
  margin: 6px 0 0;
  padding: 0 16px;
}

.tab-menu {
  display: flex;
  justify-content: center;
  gap: 6px;
  background: var(--grey-light);
  border-radius: 980px;
  padding: 4px;
  width: fit-content;
  margin: 40px auto 0;
}
.tab {
  border: none;
  background: transparent;
  color: var(--grey-dark);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 980px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.tab[aria-selected="true"] { background: var(--accent); color: var(--white); }

.content-panel { padding: 36px 24px 0; text-align: center; }
.section-body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--grey-dark);
  margin: 0 auto 36px;
  max-width: 580px;
}
.lead-in { color: var(--black); font-weight: 600; }

/* ---------- Drawer ---------- */
.drawer {
  max-width: 580px;
  margin: 28px auto;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.drawer summary::-webkit-details-marker { display: none; }
.drawer-icon {
  font-size: 20px;
  font-weight: 400;
  color: var(--grey-dark);
  transition: transform 0.2s ease;
}
.drawer[open] .drawer-icon { transform: rotate(45deg); }
.als-facts {
  --rise: 8px;
  margin: 0;
  padding: 0 4px 20px 24px;
  color: var(--grey-dark);
  font-size: 15px;
  line-height: 1.6;
}
.drawer[open] .als-facts { animation: rise 0.55s var(--ease) backwards; }
.als-facts li { margin-bottom: 12px; }
.als-facts li:last-child { margin-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .content-panel { padding: 36px 44px 0; }
}
@media (max-width: 480px) {
  .tab-menu { width: calc(100% - 32px); }
  .tab { flex: 1; padding: 10px 12px; font-size: 14px; }
}
