/* ============================================================
   Rohama & Henny Wedding Website
   Design tokens lifted exactly from the Cordially demo audit.
   ============================================================ */

/* ----------  DESIGN TOKENS  ----------
   Coastal resort palette: warm sand, sun-bleached ivory, deep ocean,
   sunset coral accent, soft golden hour highlight. */
:root {
  --template-background: #f5ecd8;        /* warm sand */
  --template-surface: #fbf4e3;           /* sun-bleached ivory */
  --template-surface-accent: #e8d5ad;    /* deeper sand */
  --template-card: #ffffff;
  --template-card-muted: #f3e8cf;
  --template-text: #1f3142;              /* deep ocean navy */
  --template-muted: #566b7d;             /* sea mist (darkened for AA contrast) */
  --template-accent: #c4694a;            /* sunset coral terracotta */
  --template-accent-deep: #ad5230;       /* darker coral for AA button-text contrast */
  --template-accent-soft: #e9b486;       /* golden hour */
  --template-border: rgba(31, 49, 66, 0.14);
  --template-hero-overlay: rgba(13, 28, 42, 0.28);
  --template-footer-overlay: rgba(13, 28, 42, 0.55);
  --template-button-text: #fdf6e6;

  --template-page-background-default: #f5ecd8;
  --template-page-background-hero: #fbf4e3;
  --template-page-background-logistics: #ecdbb6;
  --template-page-background: #fbf4e3;
}

/* ----------  TYPOGRAPHY CLASSES  ----------
   Match the Cordially template-font-* utility classes. */
.template-font-display,
.template-font-heading {
  font-family: "Instrument Serif", "Iowan Old Style", "Palatino Linotype",
    "Book Antiqua", Georgia, serif;
  font-weight: 400;
}
.template-font-body {
  font-family: "Instrument Sans", "Inter", "Helvetica Neue", Arial,
    system-ui, sans-serif;
}

/* ----------  BASE  ---------- */
html {
  scroll-behavior: smooth;
}
body {
  color: var(--template-text);
  background-color: var(--template-page-background);
  transition: background-color 0.5s ease;
  font-family: "Instrument Sans", "Inter", system-ui, sans-serif;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Tailwind play CDN warning suppressor (cosmetic only). */
.tcdn-warning { display: none !important; }

/* ----------  HERO SCROLL CHEVRON (gentle bounce)  ---------- */
@keyframes hero-bounce {
  0%, 100% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}
.animate-bounce {
  animation: hero-bounce 1s infinite;
}

/* ----------  HERO COLLAGE (rounded photo cards in gutters)  ----------
   Cordially-style placement: plain rounded image cards positioned strictly
   in the LEFT and RIGHT gutters next to the shrunken central hero.
   NO overlap with the hero, NO drop shadow (was creating crop-line artifacts). */
.hero-poly {
  position: absolute;
  overflow: hidden;
  border-radius: 18px;
  opacity: 0;
  z-index: 10;
  transform: translate3d(0, 0, 0) rotate(0deg) scale(0.7);
  will-change: transform, opacity;
  /* Pointer events re-enabled so the B&W -> color hover transition works.
     The PARENT #hero-collage stays pointer-events:none so it doesn't block
     hero text/buttons; only the cards themselves capture hover. */
  pointer-events: auto;
  background: transparent;
}
.hero-poly img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Two stacked images: the colored original sits underneath, the
   hand-edited B&W sits on top at full opacity. On hover the B&W fades
   out, revealing the color version. */
.hero-poly .photo-color { z-index: 1; }
.hero-poly .photo-bw {
  z-index: 2;
  opacity: 1;
  transition: opacity 0.6s ease;
}
.hero-poly:hover .photo-bw { opacity: 0; }

/* Hero shrinks to ~62% width on scroll, leaving ~19vw gutters each side.
   Cards sized 15-18vw wide so they sit cleanly inside the gutter.
   TL/TR start at ~16vh so they sit clearly below the nav (which is
   at top: 18px + 52px height ≈ 9vh). */
.hero-poly[data-pos="tl"] {
  top: 16vh; left: 1.5vw;
  width: 17vw; height: 13vw;        /* landscape, upper-left gutter */
  --rot: -1.5deg;
}
.hero-poly[data-pos="bl"] {
  top: 58vh; left: 2vw;
  width: 16vw; height: 12vw;        /* landscape, lower-left gutter */
  --rot: 1deg;
}
.hero-poly[data-pos="tr"] {
  top: 16vh; right: 1.5vw;
  width: 15vw; height: 19vw;        /* portrait, upper-right gutter */
  --rot: 1.5deg;
}
.hero-poly[data-pos="br"] {
  top: 52vh; right: 2vw;
  width: 17vw; height: 23vw;        /* tall portrait, lower-right gutter */
  --rot: -1deg;
}

@media (max-width: 767px) {
  .hero-poly { display: none; }
}

#hero-card {
  will-change: transform, border-radius;
  transform-origin: 50% 50%;
}

/* ----------  STORY POLAROID CARD VISUALS  ----------
   These rules cannot live cleanly in Tailwind utility-only CSS because
   they use computed transforms. */
.polaroid {
  background: #fbf4e3;
  border: 1px solid rgba(31, 49, 66, 0.12);
  border-radius: 0.45rem;
  padding: 4.5%;
  /* Taller bottom border so the caption sits clearly BELOW the photo even
     if a longer caption wraps to two lines (e.g. "second date: Georgetown
     D.C."). Previously 18%, which let a 2-line caption creep up over the
     image. */
  padding-bottom: 21%;
  box-shadow: 0 14px 42px rgba(13, 28, 42, 0.28);
  transition: box-shadow 0.3s ease;
}
.polaroid:hover {
  box-shadow: 0 20px 40px rgba(13, 28, 42, 0.28);
}
.polaroid-inner {
  border-radius: 0.2rem;
  background: rgba(0, 0, 0, 0.05);
  overflow: hidden;
  height: 100%;
  width: 100%;
  position: relative;
}
.polaroid-caption {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  max-width: 92%;
  text-align: center;
  line-height: 1.15;
  color: rgba(31, 49, 66, 0.72);
  /* Smaller so the longest caption ("second date: Georgetown D.C.") fits
     on a single line within the polaroid's white border. */
  font-size: clamp(0.65rem, 1.2vw, 0.8rem);
  font-style: italic;
}
.story-card-lift {
  transition: transform 0.3s ease-out;
}
@media (min-width: 768px) {
  .story-card-lift:hover {
    transform: translateY(-16px) scale(1.03);
  }
}

/* ----------  FAQ ACCORDION ANSWER PANEL  ---------- */
.faq-answer {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.faq-item[data-open="true"] .faq-answer {
  opacity: 1;
}
.faq-item[data-open="true"] .faq-chevron {
  transform: rotate(180deg);
}
.faq-chevron {
  transition: transform 0.3s ease;
}
.faq-border {
  border-color: rgba(31, 49, 66, 0.2);   /* fallback for browsers without color-mix */
  border-color: color-mix(in srgb, var(--template-text) 20%, transparent);
}
.faq-icon-bg {
  background-color: rgba(31, 49, 66, 0.1);   /* fallback for browsers without color-mix */
  background-color: color-mix(in srgb, var(--template-text) 10%, transparent);
}

/* ----------  WORD REVEAL (story-intro + vision)  ---------- */
.vision-word {
  opacity: 0.58;
  transition: opacity 0.3s ease-out;
}
.vision-word.is-revealed {
  opacity: 1;
}

/* ----------  REVEAL ON SCROLL  ---------- */
.reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 1s ease-out, transform 1s ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----------  GLASS PILL NAV  ----------
   Default (over hero): full-width transparent pill.
   Scrolled state: narrower compact pill centered, solid cream background,
   inline links visible. */
.nav-pill {
  background-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: rgb(93, 83, 76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: 100% !important;
  height: 52px !important;
  transition: max-width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.35s ease,
              background-color 0.35s ease,
              box-shadow 0.35s ease;
}
nav.scrolled .nav-pill {
  max-width: 760px !important;
  height: 48px !important;
  background-color: rgba(255, 250, 240, 0.96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
}
nav.scrolled .nav-inline-link {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Inline nav links: fade in once scrolled */
.nav-inline-link {
  color: var(--template-text);
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition: opacity 0.4s ease 0.05s, transform 0.4s ease 0.05s, color 0.2s ease;
}
.nav-inline-link:hover {
  color: var(--template-accent);
}

/* Hamburger lines animate to an X */
.nav-toggle .bar {
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[data-open="true"] .bar:first-child {
  transform: translateY(4px) rotate(45deg);
}
.nav-toggle[data-open="true"] .bar:last-child {
  transform: translateY(-5px) rotate(-45deg);
}

.nav-menu {
  pointer-events: none;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-menu[data-open="true"] {
  pointer-events: auto;
  transform: scale(1);
  opacity: 1;
}

/* ----------  STORY STACK CARD POSITIONING  ----------
   Cards start off-stage below and rise into place. */
.story-card {
  position: absolute;
  inset-inline: 0;
  top: 280px;
  z-index: 1;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
  transform: translate3d(0, 110vh, 0) rotate(0deg);
  opacity: 0;
  backface-visibility: hidden;
  will-change: transform, opacity;
}
@media (min-width: 768px) {
  .story-card {
    flex-direction: row;
    padding: 0 2rem;
  }
}
@media (max-width: 767px) {
  /* The chapter caption blocks contain the FULL story copy (not the
     placeholder), which on mobile wraps to 8-10 lines for chapter 2.
     We push the polaroid down to clear that block. The caption text is
     also dialed down a notch below so chapter 2 actually fits without
     pushing the polaroid off the bottom of small screens. */
  .story-card {
    top: 46vh;
  }
  /* Smaller mobile chapter caption text so the longest chapter (2)
     fits in the space above the polaroid. */
  .story-caption-group .template-font-heading {
    font-size: clamp(1.1rem, 4.5vw, 1.35rem) !important;
    margin-bottom: 0.375rem !important;
  }
  .story-caption-group p:not(.template-font-heading) {
    font-size: clamp(0.8rem, 3.2vw, 0.92rem) !important;
    line-height: 1.34 !important;
  }
}

.story-caption-group {
  position: absolute;
  inset-inline: 0;
  z-index: 25;
  pointer-events: none;
  top: 316px;
  opacity: 0;
  transition: opacity 0.4s ease-out;
}
.story-caption-group.is-active {
  opacity: 1;
}
@media (max-width: 767px) {
  /* 26vh sits the chapter heading clearly below the (now smaller) title
     and well clear of the nav, so "chapter one" + subtext are always
     visible above the polaroid rather than crowded up under the header. */
  .story-caption-group {
    top: 26vh;
  }
}

/* ----------  PILL BUTTONS  ---------- */
.btn-pill-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #000;
  color: #fff;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.btn-pill-dark:hover {
  opacity: 0.85;
}

.btn-pill-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--template-accent-deep);
  color: var(--template-button-text);
  padding: 1rem 3rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.3s ease;
}
.btn-pill-accent:hover {
  transform: scale(1.05);
}
@media (min-width: 768px) {
  .btn-pill-accent { font-size: 0.875rem; }
}

/* ----------  FOCUS RINGS  ---------- */
*:focus-visible {
  outline: 2px solid var(--template-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ----------  PERFORMANCE HINTS  ----------
   Tell the browser these sections can be skipped from rendering until they
   approach the viewport. Massive scroll smoothness win on mobile, especially
   for the heavy story polaroid stack section. */
#details,
#vision,
#faq,
#footer {
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}

/* ----------  REDUCED MOTION  ----------
   Don't strip every animation: just kill the loud ones (bouncing
   chevron, particles) and keep gentle opacity reveals so the page
   doesn't feel dead. */
@media (prefers-reduced-motion: reduce) {
  .animate-bounce { animation: none; }
  /* Word fade-ins still fade, just faster */
  .vision-word { transition-duration: 0.001ms; }
  /* Reveal-on-scroll still happens, just shorter */
  .reveal { transition-duration: 0.4s; }
}

/* ----------  UTILITIES NOT CLEANLY EXPRESSED BY TAILWIND CDN  ---------- */
.uppercase-tracked {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
}
.uppercase-tracked-wide {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.4em;
}

/* ============================================================
   DETAIL MODAL (popup overlay for the 6 detail cards)
   Full-screen overlay that slides up + fades in, scrolls internally,
   with a top bar holding a small label on the left and an X on the
   right. Backdrop is the same cream as the body so the focus is on
   the content, with a quick blur of whatever's behind.
   ============================================================ */
.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--template-background);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
  transition: opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}
.detail-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.detail-modal-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: var(--template-background);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.detail-modal.is-scrolled .detail-modal-topbar {
  border-bottom-color: rgba(31, 49, 66, 0.10);
  box-shadow: 0 4px 18px rgba(13, 28, 42, 0.04);
}
.detail-modal-label {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--template-text);
  letter-spacing: -0.01em;
}
.detail-modal-close {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(31, 49, 66, 0.06);
  color: var(--template-text);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.detail-modal-close:hover {
  background: rgba(31, 49, 66, 0.12);
}
.detail-modal-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#detail-modal-body {
  animation: modalBodyFade 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.05s both;
}
@keyframes modalBodyFade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Modal content elements */
.modal-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--template-card-muted);
  background-size: cover;
  background-position: center;
  border-radius: 18px;
  margin: 22px 0 36px;
}
.modal-title {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  line-height: 1;
  color: var(--template-text);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.modal-intro {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--template-muted);
  margin-bottom: 32px;
  max-width: 56ch;
}
.modal-block {
  margin: 28px 0;
}
.modal-h3 {
  font-family: "Instrument Serif", serif;
  font-weight: 700;
  font-style: normal;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  color: var(--template-text);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.modal-block p,
.modal-list li,
.modal-list-num li {
  color: var(--template-text);
  line-height: 1.6;
  font-size: 1rem;
}
@media (min-width: 768px) {
  .modal-block p,
  .modal-list li,
  .modal-list-num li {
    font-size: 1.05rem;
  }
}
.modal-list {
  list-style: none;
  padding: 0;
  margin-top: 8px;
}
.modal-list li {
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: 6px;
}
.modal-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--template-accent);
}
.modal-list-num {
  list-style: none;
  counter-reset: stepcount;
  padding: 0;
  margin-top: 8px;
}
.modal-list-num li {
  counter-increment: stepcount;
  padding-left: 2rem;
  position: relative;
  margin-bottom: 12px;
}
.modal-list-num li::before {
  content: counter(stepcount) ".";
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--template-accent);
}
.modal-fine {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--template-muted);
}
.modal-contact-card {
  margin-top: 14px;
  padding: 20px 22px;
  background: var(--template-card);
  border: 1px solid var(--template-border);
  border-radius: 16px;
}
.modal-contact-card p {
  margin: 0 0 6px;
}
.modal-contact-card p:last-child { margin-bottom: 0; }

/* Itinerary cards inside the welcome-events modal */
.modal-itinerary {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.modal-itinerary li {
  background: var(--template-card);
  border: 1px solid var(--template-border);
  border-radius: 18px;
  padding: 22px 24px;
}
.modal-itinerary .event-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--template-accent);
  margin-bottom: 6px;
}
.modal-itinerary .event-name {
  font-family: "Instrument Serif", serif;
  font-weight: 700;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  color: var(--template-text);
  margin-bottom: 8px;
}
.modal-itinerary .event-desc {
  color: var(--template-text);
  line-height: 1.55;
}

/* Mobile tweaks for modal */
@media (max-width: 767px) {
  .detail-modal-topbar { padding: 14px 16px; }
  .detail-modal-close { width: 40px; height: 40px; }
  .modal-hero { border-radius: 14px; margin: 12px 0 24px; }
  .modal-title { font-size: clamp(2.25rem, 9vw, 3rem); }
  .modal-intro { font-size: 1rem; margin-bottom: 22px; }
}

/* Lock the underlying page scroll when modal is open */
body.modal-open {
  overflow: hidden;
  touch-action: none;
}

/* ============================================================
   MOBILE OPTIMIZATIONS (max-width: 767px)
   Desktop rules above are untouched; these only kick in on phones.
   ============================================================ */
@media (max-width: 767px) {

  /* ---- Nav ---- */
  /* On mobile, the pill should be tighter all the time, and the scrolled
     state shrinks it further. Hide the inline links (they live in the
     hamburger dropdown). */
  nav.scrolled .nav-pill {
    max-width: 100% !important;  /* override desktop's 760px shrink */
    height: 46px !important;
  }
  .nav-pill {
    height: 48px !important;
  }
  nav {
    padding-top: 12px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* ---- Hero section ---- */
  /* Mobile keeps the scroll-shrink motion (no collage, but the hero curves
     into a rounded card as you scroll). The section is 175dvh tall so there
     are ~75dvh of scroll travel for the shrink; the inner container stays
     pinned (sticky) and 100dvh tall while that happens. */
  #hero-section {
    height: 175vh !important;          /* fallback for browsers without dvh */
    height: 175dvh !important;
    min-height: 175vh !important;
    min-height: 175dvh !important;
  }
  #hero-section .sticky {
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;          /* fallback for browsers without dvh */
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
  }
  #hero-card {
    height: 100vh !important;          /* fallback for browsers without dvh */
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
  }
  /* Smaller hero name on mobile to keep it within a single line */
  #hero-name {
    bottom: 22vh !important;
  }
  /* Smaller scroll hint */
  #hero-scroll-hint .uppercase-tracked-wide {
    letter-spacing: 0.3em;
    font-size: 0.65rem;
  }

  /* ---- Story intro ---- */
  /* The story-intro is now a PINNED section (height set inline; sticky inner
     holds the centered sentence). The reveal is driven by section scroll and
     finishes mid-pin, so the invitation fully displays before Our Story. We
     only override the font sizes below; no min-height/padding here so they
     don't fight the sticky layout. */
  /* The :not() guard keeps the verse-line out of the giant headline font.
     Without it the Psalm 118:24 citation inherited the same size as
     "You're cordially invited..." and dominated the section. Bumped up a
     notch so the invitation line reads bigger on mobile. */
  #story-intro p:not(.verse-line) {
    font-size: clamp(1.85rem, 8.5vw, 2.6rem) !important;
    line-height: 1.1 !important;
  }
  #story-intro p.verse-line {
    font-size: clamp(0.85rem, 3.4vw, 1rem) !important;
    line-height: 1.35 !important;
  }

  /* ---- Story section: keep the pinned polaroid stack on mobile too ----
     650vh = ~6.5 screens of scroll. Slightly slower than the 600vh
     original but not sluggish. */
  section#story {
    height: 650vh !important;
  }
  /* Cards are portrait 3:4 to match the actual portrait photos.
     We override the desktop inline pixel sizes for mobile fit. Sized
     slightly smaller than before so they comfortably fit BELOW the
     longer chapter caption (top:48vh) on smaller phones. */
  .story-card > div.relative.mx-4.shrink-0 {
    width: min(56vw, 228px) !important;
    height: min(80vw, 326px) !important;
  }
  /* Story title smaller (was 18vw) so it stops crowding/overlapping the
     "chapter one" heading and leaves room for the caption + polaroid. */
  section#story h2 {
    font-size: 15vw !important;
  }

  /* ---- Logistics ---- */
  /* The pinned date/countdown block is 200vh on desktop. On mobile that
     much empty pinned scroll made it feel like the page had ended. Cut it
     to 160vh: noticeably shorter, but still enough pinned travel for the
     "so please join us" -> date -> countdown reveal to play out. */
  #logistics-pin {
    height: 160vh !important;
  }
  #logistics-section h3 {
    font-size: clamp(2.5rem, 14vw, 4rem) !important;
  }
  #logistics-section [data-testid="logistics-kicker"],
  #logistics-section .template-font-heading[style*="leading"] {
    font-size: 2rem !important;
  }
  #countdown {
    gap: 0.25rem !important;
  }
  #countdown > div {
    width: 3.25rem !important;
  }

  /* ---- Venue ---- */
  #venue p.template-font-heading {
    font-size: clamp(1.75rem, 7vw, 2.5rem) !important;
    line-height: 1.05 !important;
  }
  #venue .aspect-\[21\/9\] {
    aspect-ratio: 4 / 3 !important;
  }

  /* ---- Details grid ---- */
  /* Cards already go 1-col via grid-cols-1, but the headings inside are
     too big on small screens. */
  #details h2 {
    font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
  }
  #details button h3 {
    font-size: 1.5rem !important;
  }
  #details button p {
    font-size: 0.95rem !important;
  }

  /* ---- Vision ---- */
  #vision p {
    font-size: clamp(2rem, 9vw, 3rem) !important;
    line-height: 1.1 !important;
  }
  #vision {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }

  /* ---- FAQ ---- */
  #faq h2 {
    font-size: clamp(2rem, 10vw, 3rem) !important;
  }
  #faq {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }

  /* ---- Footer hero ---- */
  #footer h2 {
    font-size: clamp(1.75rem, 8vw, 2.75rem) !important;
    line-height: 1.1 !important;
  }
  #footer {
    padding: 0.75rem !important;
  }
}

/* Extra-small screens (< 380px) */
@media (max-width: 379px) {
  #countdown > div {
    width: 3rem !important;
  }
  #countdown > span {
    font-size: 1.25rem !important;
  }
}

/* ============================================================
   OLDER-BROWSER FALLBACKS
   These keep the layout intact on devices that predate newer CSS
   features (e.g. iPhones on iOS before 15.4). Each rule declares a
   widely-supported value first and the modern value second; old
   browsers ignore the unparseable modern unit and keep the fallback,
   while current browsers use the modern value. Modern rendering is
   unchanged. ID selectors here intentionally outrank the Tailwind
   arbitrary-value classes (e.g. h-[100svh]) so the fallback applies.
   ============================================================ */
#hero-card { height: 100vh; height: 100svh; }
#hero-section > .sticky { height: 100vh; height: 100svh; }
#story > .sticky { height: 100vh; height: 100svh; }
#footer { height: 100vh; height: 100svh; }
#story-intro { min-height: 112vh; min-height: 112svh; }
#logistics-particles { height: 100vh; height: 100dvh; }

/* aspect-ratio fallback: only applied where it's NOT supported, so the
   hero/venue/detail/modal image frames keep their height instead of
   collapsing to zero. Uses the classic padding-bottom ratio trick. */
@supports not (aspect-ratio: 1 / 1) {
  .aspect-\[21\/9\] { height: 0; padding-bottom: 42.857%; }   /* 9/21 */
  .aspect-\[4\/3\]  { height: 0; padding-bottom: 75%; }        /* 3/4  */
  .modal-hero       { height: 0; padding-bottom: 56.25%; }     /* 9/16 */
}
