/* =====================================================================
   Evelyn Dunlap Foundation – Mobile‑first enhancements
   Add this file AFTER the main <style> block or bundle it via <link> so
   that these rules override previous declarations.
   ===================================================================== */

/* ---------- 1. Safer full‑viewport hero on iOS & Android ---------- */
.hero {
  /* 100svh fixes Safari tool‑bar jump, falls back to 100vh elsewhere */
  min-height: 100svh;
  min-height: 100dvh;
}

@supports (height: 100lvh) {
  .hero {
    /* Let hero bleed under iOS browser UI */
    min-height: 100lvh;
  }
}

/* ---------- 2. Mobile hero fallback (keep video, add background color) */
@media (max-width: 768px) {
  .hero { background: var(--dark-bg); }

  /* Stronger tint for better mobile text contrast */
  .hero-tint {
    opacity: 0.95;
  }

  .hero-light-scatter {
    opacity: 0.45;
    filter: blur(48px);
  }

  .hero-overlay {
    opacity: 1;
    background:
      radial-gradient(circle at 20% 20%, rgba(52, 84, 209, 0.2), transparent 55%),
      radial-gradient(circle at 80% 75%, rgba(229, 169, 188, 0.14), transparent 60%),
      linear-gradient(180deg,
        rgba(10, 12, 21, 0.95) 0%,
        rgba(10, 12, 21, 0.85) 55%,
        rgba(10, 12, 21, 0.98) 100%);
  }

  /* The static overlay provides contrast without filtering every video frame. */
  .hero-video {
    filter: none;
    opacity: 0.78;
  }
}

/* ---------- 3. Header & navigation scale‑down --------------------- */
@media (max-width: 768px) {
  header { padding: 0.7rem 0; }
  .header-logo-img { height: 78px; }
  header.scrolled .header-logo-img { height: 60px; }
  .nav-list { gap: 1.1rem; }
  header.scrolled { padding: 0.55rem 0; }
}

/* ---------- 4. Typography – readable sizes & tighter line‑height ---- */
@media (max-width: 576px) {
  h1, .hero-title { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  p  { font-size: 1rem; line-height: 1.6; }

  .hero-title {
    max-width: 16ch;
    letter-spacing: -0.015em;
    line-height: 1.12;
  }

  .section-title {
    max-width: 20ch;
    letter-spacing: -0.01em;
  }
}

/* ---------- 4b. Quote spacing on mobile ------------------------- */
@media (max-width: 768px) {
  .section.quote-section {
    padding: clamp(1.5rem, 4vh, 2.5rem) 0;
  }

  .elegance-quote {
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    padding: 2.5rem 1.4rem 2rem;
    line-height: 1.55;
  }
}

/* ---------- 5. Grid collapses for narrow viewports ------------------ */
@media (max-width: 768px) {
  .donation-methods,
  .partners-grid,
  .team-grid,
  .testimonials-grid,
  .grid,
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr !important; }

  .impact-stats { grid-template-columns: 1fr; }
}

/* ---------- 6. Touch‑friendly hit‑areas ---------------------------- */
button,
.btn,
.mobile-nav-link { min-height: 48px; }

/* ---------- 7. Disable heavy parallax on mobile -------------------- */
@media (max-width: 768px) {
  .decorative-element {
    transform: none !important;
    filter: blur(24px);
    opacity: 0.055;
    animation: none !important;
  }
}

/* ---------- 8. Respect user motion & accessibility preferences ------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero { background: var(--dark-bg); }
}

/* ---------- 9. Safe‑area padding for iPhone Notch ------------------ */
body {
  padding-top: env(safe-area-inset-top); /* constant() fallback removed per spec */
}

/* ---------- 10. Subtle glow opacity tweak on OLED dark‑mode -------- */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
  .decorative-element { opacity: 0.08; }
}

/* ---------- 11. Touch feedback for iPhone-class devices ---------- */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .payment-button,
  .mobile-toggle,
  .nav-link,
  .mobile-nav-link {
    -webkit-tap-highlight-color: transparent;
  }

  .btn:active,
  .payment-button:active,
  .rsvp-button:active,
  .application-btn:active {
    transform: scale(0.98);
  }

  .card:active,
  .glass-card:active,
  .partner-card:active,
  .event-card:active,
  .donation-method:active {
    transform: translateY(-3px);
  }

  .team-member:active .member-img-container {
    border-color: var(--soft-pink);
    box-shadow: 0 12px 28px rgba(229, 169, 188, 0.35);
  }
}

/* ---------- 12. iOS safe-area adjustments ---------- */
@supports (-webkit-touch-callout: none) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    -webkit-font-smoothing: antialiased;
  }

  .hero-scroll {
    bottom: calc(2rem + env(safe-area-inset-bottom));
  }

  .back-to-top {
    bottom: calc(1.5rem + env(safe-area-inset-bottom));
    right: calc(1.2rem + env(safe-area-inset-right));
  }

  .hero-video {
    filter: none !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    object-position: center 35%;
  }

  .soiree-media,
  .soiree-video {
    filter: none;
    transform: none;
    -webkit-transform: none;
    backface-visibility: hidden;
    width: 100%;
    height: 100%;
    object-position: center;
  }

  .hero-aurora {
    opacity: 0.22;
    filter: blur(28px) saturate(1.08);
  }

  .hero-mesh {
    display: none;
  }

  .hero-orbs {
    opacity: 0.12;
    filter: blur(20px) saturate(1.02);
  }

  .hero-title::before {
    opacity: 0.22;
    filter: blur(24px);
  }

  .donation-card {
    text-align: left;
    padding: 1.5rem;
    gap: 1.2rem;
  }

  .donation-impact--hero {
    padding: 1.5rem;
    gap: 1.25rem;
  }

  .donation-impact--hero .impact-stats {
    grid-template-columns: 1fr;
  }

  .donation-impact--hero .impact-stat {
    padding: 1rem 1.1rem;
  }

  .donation-widget {
    padding: 1.5rem;
    gap: 1.4rem;
  }

  .donation-widget-subtitle {
    font-size: 0.95rem;
  }

  .donation-flow {
    gap: 1.5rem;
  }

  .donation-tabs {
    padding: 1rem;
  }

  .donation-tablist {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .donation-tab {
    flex-direction: column;
    font-size: 0.72rem;
    gap: 0.35rem;
    padding: 0.6rem 0.45rem;
  }

  .donation-panel-note {
    font-size: 0.82rem;
  }

  .donation-details {
    padding: 0.85rem 1rem;
  }

  .donation-card-title {
    font-size: 1.3rem;
  }

  .donation-card-tag {
    letter-spacing: 1.6px;
    font-size: 0.7rem;
  }

  .donation-card-description {
    font-size: 0.98rem;
  }

  .donation-info-item dd {
    font-size: 0.98rem;
  }

  .donation-note {
    font-size: 0.85rem;
  }

  .donation-card-footnote {
    font-size: 0.82rem;
  }

  .donation-action {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 0.75rem;
  }

  .donation-accepted img {
    max-width: 170px;
  }

  .donation-paypal-form {
    max-width: 100%;
  }

  .donation-support-grid .donation-card {
    padding: 1.4rem;
  }

  .donation-steps li {
    padding-left: 1.85rem;
  }

  .hero-overlay {
    opacity: 0.88;
  }

  /* iOS-specific donation banner fixes */
  .donation-banner {
    /* Force hardware acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    /* Ensure banner color renders consistently on iOS */
    background-color: #3454d1;
    background-image: linear-gradient(135deg,
      rgba(52, 84, 209, 0.98) 0%,
      rgba(78, 107, 230, 0.98) 50%,
      rgba(90, 126, 240, 0.98) 100%);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;

    -webkit-font-smoothing: antialiased;

    /* Safe area handled via content padding */
    top: 0;
  }

  .donation-banner-content {
    /* Add safe area padding for notched devices */
    padding-top: calc(0.85rem + env(safe-area-inset-top, 0));
    padding-left: max(1rem, env(safe-area-inset-left, 1rem));
    padding-right: max(1rem, env(safe-area-inset-right, 1rem));
  }

  .section {
    scroll-margin-top: calc(7rem + 52px + env(safe-area-inset-top, 0));
  }

  body.banner-collapsed .section {
    scroll-margin-top: calc(7rem + env(safe-area-inset-top, 0));
  }

  #applicationForm {
    scroll-margin-top: calc(7rem + 52px + env(safe-area-inset-top, 0));
  }

  body.banner-collapsed #applicationForm {
    scroll-margin-top: calc(7rem + env(safe-area-inset-top, 0));
  }

  /* Adjust header for iOS safe area when banner is visible */
  header {
    top: calc(52px + env(safe-area-inset-top, 0));
  }

  /* When banner is hidden */
  .donation-banner.hidden ~ header,
  .donation-banner.scroll-hidden ~ header {
    top: env(safe-area-inset-top, 0);
  }

  body.banner-collapsed header {
    top: env(safe-area-inset-top, 0);
  }

  .donation-banner-content {
    /* Better text rendering on iOS */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .donation-banner-text {
    /* Prevent text from being too small on iOS */
    -webkit-text-size-adjust: 100%;
  }

  .donation-banner-btn {
    /* Better tap target for iOS */
    -webkit-tap-highlight-color: transparent;
    /* Force hardware acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  .donation-banner-close {
    /* Better tap target for iOS */
    -webkit-tap-highlight-color: transparent;
    /* Force GPU rendering */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  .donation-banner::before {
    -webkit-transform: translateX(-100%);
  }

  .btn:not(.btn-alt):not(.btn-gold) {
    background-color: #3454d1;
    background-image: linear-gradient(135deg,
      rgba(52, 84, 209, 0.98) 0%,
      rgba(78, 107, 230, 0.98) 50%,
      rgba(90, 126, 240, 0.98) 100%);
  }
}

/* ---------- 14. Mobile Donation Banner Optimization ---------- */
@media (max-width: 768px) {
  /* Simplified layout for mobile */
  .donation-banner {
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.2),
      0 1px 4px rgba(0, 0, 0, 0.1);
  }

  /* Better contrast for mobile */
  .donation-banner-message {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }

  /* Ensure icon is visible */
  .donation-banner-icon {
    filter: drop-shadow(0 1px 4px rgba(255, 107, 157, 0.6));
  }

  /* Better button visibility */
  .donation-banner-btn {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.2),
      0 1px 3px rgba(0, 0, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .donation-banner-content {
    padding: 0.7rem 0.6rem;
  }

  .donation-banner-text {
    gap: 0.35rem;
  }

  .donation-banner-icon {
    font-size: 1.1rem;
  }

  .paypal-logo {
    height: 16px;
  }

  .donation-banner-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.65rem;
    letter-spacing: 0.3px;
  }

  .donation-banner-close {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
  }

  .donation-banner-close svg {
    width: 14px;
    height: 14px;
  }
}

/* ============================================================
   FINAL MOBILE RESTRAINT OVERRIDES
   Keep this file aligned with the final editorial pass in styles.css.
   ============================================================ */

section header,
.section header,
.scholarship-headline,
.impact-monument-header {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  z-index: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

@media (max-width: 768px) {
  .hero-tint,
  .hero-light-scatter {
    display: none !important;
  }

  .hero-overlay {
    opacity: 0.86;
  }

  .hero-video {
    filter: none !important;
    opacity: 0.78;
    object-position: center center;
  }

  .soiree-media,
  .soiree-video,
  .soiree-img.reveal-mask > .soiree-media {
    position: absolute;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    transform: none !important;
    -webkit-transform: none !important;
    object-fit: cover;
    object-position: center center;
    filter: none !important;
    opacity: 1;
  }

  .soiree-date::before,
  .btn::after {
    display: none !important;
  }

  .btn:active,
  .payment-button:active,
  .rsvp-button:active,
  .application-btn:active {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.1) inset,
      0 8px 22px rgba(52, 84, 209, 0.18);
  }

  .card:active,
  .glass-card:active,
  .partner-card:active,
  .event-card:active,
  .donation-method:active,
  .scholarship-card:active {
    transform: none;
    filter: none;
  }
}

/* ---------- 15. Premium Smooth Scrolling ---------- */
/* Premium scroll experience for mobile */
@media (max-width: 768px) {
  html {
    scroll-behavior: smooth;
  }

  body {
    -webkit-overflow-scrolling: touch;
  }

  input,
  select,
  textarea,
  .form-control,
  .footer-newsletter-input {
    font-size: 16px;
  }

  .hero-content {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  }

  .text-gradient {
    background-size: 100% 100%;
    animation: none !important;
  }
}

/* ---------- 16. Final mobile editorial guardrails ---------- */
@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(2.45rem, 11vw, 4rem) !important;
    line-height: 1 !important;
    letter-spacing: -0.03em !important;
    text-shadow: 0 5px 14px rgba(6, 8, 16, 0.36) !important;
  }

  .hero-title::before {
    opacity: 0.06 !important;
    filter: blur(16px) !important;
  }

  .hero-subtitle {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .reveal-mask > img,
  .reveal-mask > video,
  .reveal-mask.is-revealed > img,
  .reveal-mask.is-revealed > video {
    opacity: 1 !important;
    transform: none !important;
    -webkit-transform: none !important;
    transition: none !important;
  }

  .about-editorial .about-text {
    order: 1;
  }

  .about-editorial .about-image {
    order: 2;
  }

  .impact-monument-num {
    background: linear-gradient(120deg, #e8dce2 0%, #d3a0b3 58%, #8794c4 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
  }

  .back-to-top {
    display: none !important;
  }
}

/* ============================================================
   Final mobile drawer + logo system
   Single source of truth for the launch drawer interaction.
   Opaque first, blur as a progressive enhancement, transform-only motion.
   ============================================================ */
html.drawer-open,
body.drawer-open {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

.mobile-toggle {
  display: none !important;
}

.mobile-nav {
  display: none !important;
}

@media (max-width: 992px) {
  .navbar {
    display: none !important;
  }

  .mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav {
    display: grid !important;
  }
}

.mobile-toggle {
  width: 48px !important;
  height: 48px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: rgba(8, 11, 22, 0.58) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 14px 30px rgba(0, 0, 0, 0.22) !important;
  -webkit-backdrop-filter: blur(8px) saturate(1.05) !important;
  backdrop-filter: blur(8px) saturate(1.05) !important;
  z-index: 2201 !important;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease !important;
}

.mobile-toggle span {
  position: absolute !important;
  left: 50% !important;
  display: block !important;
  width: 21px !important;
  height: 1.5px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  transform: translateX(-50%) !important;
  transform-origin: center center !important;
  transition:
    top 240ms cubic-bezier(0.22, 1, 0.36, 1),
    width 240ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 160ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.mobile-toggle span:nth-child(1) { top: 19px !important; }
.mobile-toggle span:nth-child(2) {
  top: 23px !important;
  opacity: 0 !important;
  transform: translateX(-50%) scaleX(0) !important;
}
.mobile-toggle span:nth-child(3) {
  top: 28px !important;
  width: 21px !important;
  transform: translateX(-50%) !important;
}

body.drawer-open .mobile-toggle,
html.drawer-open .mobile-toggle,
.mobile-toggle[aria-expanded="true"],
.mobile-toggle.active {
  border-color: rgba(229, 169, 188, 0.3) !important;
  background: rgba(17, 16, 27, 0.78) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 18px 40px rgba(0, 0, 0, 0.32) !important;
}

body.drawer-open .mobile-toggle span:nth-child(1),
html.drawer-open .mobile-toggle span:nth-child(1),
.mobile-toggle[aria-expanded="true"] span:nth-child(1),
.mobile-toggle.active span:nth-child(1) {
  top: 23px !important;
  width: 21px !important;
  transform: translateX(-50%) rotate(45deg) !important;
}

body.drawer-open .mobile-toggle span:nth-child(2),
html.drawer-open .mobile-toggle span:nth-child(2),
.mobile-toggle[aria-expanded="true"] span:nth-child(2),
.mobile-toggle.active span:nth-child(2) {
  opacity: 0 !important;
  transform: translateX(-50%) scaleX(0) !important;
}

body.drawer-open .mobile-toggle span:nth-child(3),
html.drawer-open .mobile-toggle span:nth-child(3),
.mobile-toggle[aria-expanded="true"] span:nth-child(3),
.mobile-toggle.active span:nth-child(3) {
  top: 23px !important;
  width: 21px !important;
  transform: translateX(-50%) rotate(-45deg) !important;
}

.mobile-nav {
  --drawer-ink: #060811;
  position: fixed !important;
  inset: 0 !important;
  z-index: 2200 !important;
  width: 100vw !important;
  max-width: none !important;
  height: 100vh !important;
  height: 100dvh !important;
  display: grid !important;
  place-items: center !important;
  padding:
    calc(5.9rem + env(safe-area-inset-top, 0px))
    clamp(1.35rem, 6vw, 2.4rem)
    calc(1.65rem + env(safe-area-inset-bottom, 0px)) !important;
  background: var(--drawer-ink) !important;
  color: var(--text-primary) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  overflow: hidden !important;
  transform: none !important;
  contain: layout paint style;
  isolation: isolate;
  transition: opacity 230ms ease !important;
}

.mobile-nav::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  background:
    radial-gradient(86% 54% at 52% -8%, rgba(78, 107, 230, 0.16), transparent 68%),
    radial-gradient(68% 48% at 50% 112%, rgba(229, 169, 188, 0.13), transparent 74%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%),
    var(--drawer-ink) !important;
  opacity: 0 !important;
  transform: scale(1.025) !important;
  transition: opacity 340ms ease, transform 580ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .mobile-nav::before {
    -webkit-backdrop-filter: blur(12px) saturate(1.08) !important;
    backdrop-filter: blur(12px) saturate(1.08) !important;
  }
}

.mobile-nav::after {
  content: '' !important;
  position: absolute !important;
  top: calc(6.2rem + env(safe-area-inset-top, 0px)) !important;
  bottom: calc(2rem + env(safe-area-inset-bottom, 0px)) !important;
  left: clamp(1.35rem, 6vw, 2.4rem) !important;
  width: 1px !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background: linear-gradient(to bottom, transparent, rgba(229, 169, 188, 0.34) 18%, rgba(255, 255, 255, 0.08) 54%, transparent) !important;
  opacity: 0 !important;
  transform: scaleY(0.72) !important;
  transform-origin: top center !important;
  transition: opacity 400ms ease, transform 600ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

body.drawer-open .mobile-nav,
html.drawer-open .mobile-nav,
.mobile-nav[aria-hidden="false"],
.mobile-nav.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body.drawer-open .mobile-nav::before,
html.drawer-open .mobile-nav::before,
.mobile-nav[aria-hidden="false"]::before,
.mobile-nav.active::before,
body.drawer-open .mobile-nav::after,
html.drawer-open .mobile-nav::after,
.mobile-nav[aria-hidden="false"]::after,
.mobile-nav.active::after {
  opacity: 1 !important;
  transform: scale(1) !important;
}

.mobile-nav-shell {
  position: relative;
  z-index: 2;
  width: min(100%, 365px);
  max-height: calc(100dvh - 8.6rem);
  display: grid;
  gap: clamp(0.8rem, 2vh, 1.15rem);
  margin: 0 auto;
  padding-left: clamp(1rem, 5vw, 1.65rem);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition: opacity 260ms ease, transform 430ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-nav-shell::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

body.drawer-open .mobile-nav-shell,
html.drawer-open .mobile-nav-shell,
.mobile-nav[aria-hidden="false"] .mobile-nav-shell,
.mobile-nav.active .mobile-nav-shell {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.mobile-nav-kicker,
.mobile-nav-footnote {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(229, 169, 188, 0.72);
}

.mobile-nav-kicker { padding-bottom: 0.55rem; }
.mobile-nav-footnote {
  color: rgba(255, 255, 255, 0.36);
  letter-spacing: 0.16em;
  padding-top: 0.35rem;
}

.mobile-nav-list {
  counter-reset: drawer-item !important;
  display: grid !important;
  gap: clamp(0.18rem, 1vh, 0.42rem) !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  text-align: left !important;
}

.mobile-nav-list li {
  counter-increment: drawer-item;
  opacity: 0 !important;
  transform: translate3d(0, 12px, 0) !important;
  transition: opacity 300ms ease, transform 460ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.mobile-nav.active .mobile-nav-list li,
.mobile-nav[aria-hidden="false"] .mobile-nav-list li,
body.drawer-open .mobile-nav-list li,
html.drawer-open .mobile-nav-list li {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) !important;
}

.mobile-nav.active .mobile-nav-list li:nth-child(1), .mobile-nav[aria-hidden="false"] .mobile-nav-list li:nth-child(1) { transition-delay: 60ms !important; }
.mobile-nav.active .mobile-nav-list li:nth-child(2), .mobile-nav[aria-hidden="false"] .mobile-nav-list li:nth-child(2) { transition-delay: 92ms !important; }
.mobile-nav.active .mobile-nav-list li:nth-child(3), .mobile-nav[aria-hidden="false"] .mobile-nav-list li:nth-child(3) { transition-delay: 124ms !important; }
.mobile-nav.active .mobile-nav-list li:nth-child(4), .mobile-nav[aria-hidden="false"] .mobile-nav-list li:nth-child(4) { transition-delay: 156ms !important; }
.mobile-nav.active .mobile-nav-list li:nth-child(5), .mobile-nav[aria-hidden="false"] .mobile-nav-list li:nth-child(5) { transition-delay: 188ms !important; }
.mobile-nav.active .mobile-nav-list li:nth-child(6), .mobile-nav[aria-hidden="false"] .mobile-nav-list li:nth-child(6) { transition-delay: 220ms !important; }
.mobile-nav.active .mobile-nav-list li:nth-child(7), .mobile-nav[aria-hidden="false"] .mobile-nav-list li:nth-child(7) { transition-delay: 252ms !important; }
.mobile-nav.active .mobile-nav-list li:nth-child(8), .mobile-nav[aria-hidden="false"] .mobile-nav-list li:nth-child(8) { transition-delay: 284ms !important; }

.mobile-nav-link {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 2.15rem minmax(0, 1fr) 1.8rem !important;
  align-items: center !important;
  width: 100% !important;
  min-height: clamp(2.35rem, 6.2vh, 3.25rem) !important;
  padding: 0 !important;
  color: rgba(246, 241, 244, 0.9) !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-size: clamp(1.78rem, 7.6vw, 2.38rem) !important;
  font-weight: 500 !important;
  line-height: 0.98 !important;
  letter-spacing: -0.026em !important;
  text-decoration: none !important;
  text-align: left !important;
  text-shadow: none !important;
  transition: color 180ms ease !important;
}

.mobile-nav-link::before {
  content: counter(drawer-item, decimal-leading-zero) !important;
  color: rgba(229, 169, 188, 0.46) !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 0.54rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.14em !important;
}

.mobile-nav-link::after {
  content: '' !important;
  width: 1.25rem !important;
  height: 1px !important;
  margin-left: auto !important;
  background: linear-gradient(90deg, rgba(229, 169, 188, 0.78), transparent) !important;
  opacity: 0 !important;
  transform: scaleX(0.45) !important;
  transform-origin: left center !important;
  transition: opacity 180ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible,
.mobile-nav-link.active {
  color: #fff !important;
  outline: none !important;
}

.mobile-nav-link:hover::after,
.mobile-nav-link:focus-visible::after,
.mobile-nav-link.active::after {
  opacity: 1 !important;
  transform: scaleX(1) !important;
}

.mobile-nav-donate {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  margin-top: 0.2rem;
  padding: 0.76rem 1.25rem 0.72rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(229, 169, 188, 0.22);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 260ms ease 300ms,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1) 300ms,
    border-color 180ms ease,
    background-color 180ms ease;
}

.mobile-nav-donate::after {
  content: '→';
  font-size: 0.9rem;
  line-height: 1;
  transform: translateY(-1px);
}

.mobile-nav.active .mobile-nav-donate,
.mobile-nav[aria-hidden="false"] .mobile-nav-donate,
body.drawer-open .mobile-nav-donate,
html.drawer-open .mobile-nav-donate {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.mobile-nav-donate:hover,
.mobile-nav-donate:focus-visible {
  border-color: rgba(229, 169, 188, 0.42);
  background: rgba(255, 255, 255, 0.075);
  outline: none;
}

body.drawer-open .logo,
html.drawer-open .logo,
body.drawer-open .scroll-progress,
html.drawer-open .scroll-progress {
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-height: 720px) {
  .mobile-nav {
    padding-top: calc(4.9rem + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mobile-nav-shell {
    gap: 0.55rem;
    max-height: calc(100dvh - 6.4rem);
  }

  .mobile-nav-link {
    min-height: 2.05rem !important;
    font-size: clamp(1.55rem, 7vw, 2rem) !important;
  }

  .mobile-nav-kicker,
  .mobile-nav-footnote { font-size: 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav,
  .mobile-nav::before,
  .mobile-nav::after,
  .mobile-nav-shell,
  .mobile-nav-list li,
  .mobile-nav-link,
  .mobile-nav-link::after,
  .mobile-nav-donate,
  .mobile-toggle,
  .mobile-toggle span {
    transition: none !important;
  }

  .mobile-nav-shell,
  .mobile-nav-list li,
  .mobile-nav-donate {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   Launch polish: header logo presence
   The logo mark has built-in visual padding, so the rendered box needs
   to be larger than a typical wordmark to read clearly on mobile.
   ============================================================ */
.logo { flex: 0 0 auto; }

.header-logo-img {
  height: 118px !important;
  width: auto !important;
}

header.scrolled .header-logo-img { height: 82px !important; }

@media (max-width: 768px) {
  header {
    padding-top: calc(0.78rem + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: 0.78rem !important;
  }

  header.scrolled {
    padding-top: calc(0.62rem + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: 0.62rem !important;
  }

  .header-logo-img { height: 98px !important; }
  header.scrolled .header-logo-img { height: 78px !important; }
}

@media (max-width: 390px) {
  .header-logo-img { height: 92px !important; }
  header.scrolled .header-logo-img { height: 72px !important; }
}

/* ============================================================
   Launch fix: hero centering
   Keep the hero text/CTA stack centered at every breakpoint. The
   original flex layout let the hero container shrink toward the right;
   grid makes the content box independent from that flex sizing quirk.
   ============================================================ */
.hero {
  display: grid !important;
  align-items: center !important;
  justify-items: center !important;
}

.hero .container.hero-container {
  grid-area: 1 / 1 !important;
  justify-self: center !important;
  margin-inline: auto !important;
}

.hero .hero-content {
  margin-inline: auto !important;
}

@media (max-width: 768px) {
  .hero {
    display: grid !important;
    align-items: center !important;
    justify-items: stretch !important;
  }

  .hero .container.hero-container {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    grid-area: 1 / 1 !important;
    justify-self: stretch !important;
    margin-inline: 0 !important;
    padding-inline: clamp(1.25rem, 5vw, 2rem) !important;
  }

  .hero .hero-content {
    width: 100% !important;
    max-width: 24rem !important;
    margin-inline: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center !important;
  }

  .hero .hero-subtitle,
  .hero .hero-title,
  .hero .hero-description,
  .hero .hero-buttons {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .hero .hero-subtitle {
    display: inline-flex !important;
    justify-content: center !important;
    width: fit-content !important;
    max-width: min(100%, 22rem) !important;
  }

  .hero .hero-title {
    display: inline-block !important;
    max-width: min(100%, 16ch) !important;
  }

  .hero .hero-description {
    max-width: min(100%, 22rem) !important;
  }

  .hero .hero-buttons {
    width: 100% !important;
    max-width: min(100%, 22rem) !important;
    justify-content: center !important;
  }
}
