/* ============================================================
   KEEPSIKA INVITATIONS — "Aurora" template
   Palette: ivory paper, engraved ink, champagne gold,
   sampaguita sage, deep forest, blush whisper
   ============================================================ */

:root {
  --ivory: #F7F1E5;  /* exact match to the hero cake video's paper tone (top-corner sample) */
  --ink: #33302A;
  --ink-soft: #5C564C;
  --gold: #B78A4C;
  --gold-soft: #CFB183;
  --sage: #77805F;
  --forest: #3A4132;
  --blush: #EFE3D8;
  --paper-edge: rgba(51, 48, 42, 0.12);

  --font-display: "Marcellus", serif;
  --font-script: "Great Vibes", cursive;
  --font-body: "EB Garamond", serif;

  --measure: 42rem;
  --space-section: clamp(4.5rem, 10vw, 7.5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

a { color: var(--gold); }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Shared type ---------- */

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.section__heading {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 2.5rem;
}

/* ============================================================
   ENVELOPE INTRO — cinematic video of the embossed flap opening
   ============================================================ */

/* Fullscreen overlay hosting the envelope-opening video. */
.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #efe4ce;  /* champagne linen — matches the video's backdrop */
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  transition: opacity 0.9s ease, visibility 0.9s;
}
.intro.is-playing { cursor: default; }
.intro.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

/* Slight zoom past fill to hide any AI watermark near the frame edges.
   --intro-zoom tunes the crop — raise if a watermark still peeks on very
   wide screens, lower to see more of the frame.

   The poster is also painted as a CSS background because iOS Safari won't
   decode a video's first frame until playback starts — without this
   fallback the intro would flash the champagne backdrop before the tap. */
.intro__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #efe4ce url("../assets/envelope-poster.webp") center / cover no-repeat;
  pointer-events: none;
  transform: scale(var(--intro-zoom, 1.06));
  transform-origin: center center;
}
.intro { --intro-zoom: 1.06; }

/* Tap-to-open prompt shown before the video begins. Sits low over the
   paused first frame (closed embossed envelope). Ink/gold — this backdrop
   is bright ivory, not black, so contrast is inverted from Nocturne. */
.intro__prompt {
  position: absolute;
  left: 50%;
  bottom: 10%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-align: center;
  padding: 0 1.5rem;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.intro.is-playing .intro__prompt { opacity: 0; pointer-events: none; }

.intro__prompt-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    0 0 0 6px rgba(183, 138, 76, 0.16),
    0 0 24px 4px rgba(183, 138, 76, 0.35);
  animation: introPromptPulse 1.8s ease-in-out infinite;
}
@keyframes introPromptPulse {
  0%, 100% { transform: scale(1);   opacity: 0.85; }
  50%      { transform: scale(1.3); opacity: 1;    }
}

.intro__prompt-text {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 252, 240, 0.96);
  text-shadow:
    0 1px 2px rgba(51, 48, 42, 0.55),
    0 2px 14px rgba(51, 48, 42, 0.45);
}

/* Skip pill — fades in a beat after the video starts so it doesn't
   compete with the opening moment. Inverted styling for the light
   backdrop: dark pill with gold border/text. */
.intro__skip {
  position: absolute;
  bottom: 1.4rem;
  right: 1.4rem;
  z-index: 10;
  background: rgba(51, 48, 42, 0.72);
  color: rgba(255, 251, 235, 0.92);
  border: 1px solid rgba(183, 138, 76, 0.45);
  padding: 0.55rem 1rem 0.55rem 1.1rem;
  border-radius: 999px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.6s ease, transform 0.6s ease, background 0.2s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.intro.is-ready .intro__skip { opacity: 0.85; transform: translateY(0); }
.intro__skip:hover  { opacity: 1; background: rgba(51, 48, 42, 0.88); }
.intro__skip:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  opacity: 1;
}
@media (max-width: 480px) {
  .intro__skip {
    bottom: 1rem; right: 1rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.55rem;
  }
}

/* Reduced motion — skip is fine (names still cross-fade quietly), just
   drop the pulsing prompt dot animation. */
@media (prefers-reduced-motion: reduce) {
  .intro__prompt-dot { animation: none; }
}


/* ============================================================
   PAGE LAYOUT
   ============================================================ */

.page { overflow-x: hidden; }

.section {
  padding: var(--space-section) 1.5rem;
  max-width: var(--measure);
  margin: 0 auto;
}

/* Scroll reveals — parent fades + rises with a spring-like curve.
   Direct children of tracked containers stagger in on top of the parent
   reveal for a cascading, "settling into place" feel. */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 700ms cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Draw a hairline gold underline beneath section headings as they enter. */
.reveal .section__heading {
  position: relative;
}
.reveal .section__heading::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.9rem;
  height: 1px;
  width: 3rem;
  background: var(--gold);
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 700ms cubic-bezier(0.23, 1, 0.32, 1) 250ms;
}
.reveal.is-visible .section__heading::after {
  transform: translateX(-50%) scaleX(1);
}

/* --- Child stagger ---
   Any direct child of these containers hides itself, then animates in with
   a nth-child based delay once the parent .reveal turns visible.           */
.countdown__grid > *,
.timeline__list > *,
.gallery > *,
.entourage__roles > *,
.entourage__secondary > *,
.dresscode__swatches > *,
.faq__list > * {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.is-visible .countdown__grid > *,
.reveal.is-visible .timeline__list > *,
.reveal.is-visible .gallery > *,
.reveal.is-visible .entourage__roles > *,
.reveal.is-visible .entourage__secondary > *,
.reveal.is-visible .dresscode__swatches > *,
.reveal.is-visible .faq__list > * {
  animation: revealChild 620ms cubic-bezier(0.23, 1, 0.32, 1) both;
}

/* Per-child delay — the first child kicks in with the parent, later ones
   cascade at 70ms intervals. Covers up to 10 items per container. */
.reveal.is-visible .countdown__grid > *:nth-child(2),
.reveal.is-visible .timeline__list > *:nth-child(2),
.reveal.is-visible .gallery > *:nth-child(2),
.reveal.is-visible .entourage__roles > *:nth-child(2),
.reveal.is-visible .entourage__secondary > *:nth-child(2),
.reveal.is-visible .dresscode__swatches > *:nth-child(2),
.reveal.is-visible .faq__list > *:nth-child(2) { animation-delay:  70ms; }
.reveal.is-visible .countdown__grid > *:nth-child(3),
.reveal.is-visible .timeline__list > *:nth-child(3),
.reveal.is-visible .gallery > *:nth-child(3),
.reveal.is-visible .entourage__roles > *:nth-child(3),
.reveal.is-visible .entourage__secondary > *:nth-child(3),
.reveal.is-visible .dresscode__swatches > *:nth-child(3),
.reveal.is-visible .faq__list > *:nth-child(3) { animation-delay: 140ms; }
.reveal.is-visible .countdown__grid > *:nth-child(4),
.reveal.is-visible .timeline__list > *:nth-child(4),
.reveal.is-visible .gallery > *:nth-child(4),
.reveal.is-visible .entourage__roles > *:nth-child(4),
.reveal.is-visible .entourage__secondary > *:nth-child(4),
.reveal.is-visible .dresscode__swatches > *:nth-child(4),
.reveal.is-visible .faq__list > *:nth-child(4) { animation-delay: 210ms; }
.reveal.is-visible .timeline__list > *:nth-child(5),
.reveal.is-visible .entourage__roles > *:nth-child(5),
.reveal.is-visible .entourage__secondary > *:nth-child(5),
.reveal.is-visible .dresscode__swatches > *:nth-child(5),
.reveal.is-visible .faq__list > *:nth-child(5) { animation-delay: 280ms; }
.reveal.is-visible .timeline__list > *:nth-child(6),
.reveal.is-visible .entourage__roles > *:nth-child(6),
.reveal.is-visible .dresscode__swatches > *:nth-child(6),
.reveal.is-visible .faq__list > *:nth-child(6) { animation-delay: 350ms; }
.reveal.is-visible .entourage__roles > *:nth-child(7),
.reveal.is-visible .faq__list > *:nth-child(7) { animation-delay: 420ms; }
.reveal.is-visible .entourage__roles > *:nth-child(8),
.reveal.is-visible .faq__list > *:nth-child(8) { animation-delay: 490ms; }

@keyframes revealChild {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* Countdown seconds — brief scale bump each time JS updates the text. */
.countdown__num.is-ticking {
  animation: countdownTick 320ms cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes countdownTick {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.14); }
  100% { transform: scale(1); }
}

/* Dividers */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  max-width: 22rem;
  margin: 0 auto;
  color: var(--sage);
}

.divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-soft));
}

.divider__line:last-child {
  background: linear-gradient(to left, transparent, var(--gold-soft));
}

/* ============================================================
   HERO
   ============================================================ */

/* Hero as a phone-first editorial layout: compact text block at the top,
   animated cake illustration filling the middle, small CTA pill anchored
   at the bottom. Three bands via flex + space-between so the illustration
   auto-fills whatever vertical room is left after the text + CTA. */
.hero {
  min-height: 100vh;        /* fallback for older browsers */
  min-height: 100dvh;       /* dynamic viewport — accounts for mobile URL bars */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  position: relative;
  max-width: none;
  padding: clamp(4rem, 12vh, 7rem) 1rem clamp(1.5rem, 4vh, 2.4rem);
  gap: clamp(0.5rem, 1.5vh, 1rem);
  overflow: hidden;                          /* clip the zoomed video */
}

/* ---- Top text stack: eyebrow · names · date, tight vertical rhythm.
   margin-bottom: 0 keeps it hugging the illustration underneath. ---- */
.hero__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.25rem, 0.9vh, 0.55rem);
  max-width: 30rem;
  margin-bottom: 0;
}

.hero__eyebrow {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.62rem, 1.6vw, 0.72rem);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.6;
}

.hero__names {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35em;
  margin: 0;
  line-height: 1.1;
}

.hero__name {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: 0.005em;
}

.hero__amp {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 5.4vw, 2.2rem);
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1;
}

.hero__date {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.6rem, 1.6vw, 0.72rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---- Middle band: the looping cake illustration.
   flex:1 lets it consume remaining vertical space. Bounded by max-height
   so it can't push the CTA off screen on short viewports. Square-cropped
   with object-fit so it stays composed regardless of aspect ratio.
   `mix-blend-mode: multiply` bakes the illustration's paper background
   into the hero's ivory so there's no visible box around the video. */
.hero__illustration {
  display: block;
  flex: 1 1 auto;
  min-height: 0;                   /* allows flex-child to shrink below content size */
  width: 100%;
  max-width: min(96vw, 620px);
  max-height: min(76vh, 720px);
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: contain;
  border: 0;
  background: transparent;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  transform: scale(1.22);          /* zoom into the cake+couple, crops the empty margins around the illustration */
  transform-origin: center 45%;    /* bias slightly upward so couple stays in frame */
  margin-top: clamp(-1.5rem, -4vh, -0.75rem);  /* pull up under the text */
}
@media (max-width: 480px) {
  .hero__illustration {
    transform: scale(1.28);
    max-height: min(72vh, 640px);
  }
}
/* Push the CTA to the bottom regardless of remaining space */
.hero__cta { margin-top: auto; }

/* ---- Bottom CTA: small pill that anchors to #rsvp, uppercase eyebrow-style.
   Border-only when resting, softly filled on hover, thumb-friendly tap area. */
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(0.6rem, 1.6vw, 0.72rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
}
.hero__cta:hover,
.hero__cta:focus-visible {
  background: var(--gold);
  color: #FFFDF6;
  box-shadow: 0 8px 22px -14px rgba(183, 138, 76, 0.7);
  outline: none;
}
.hero__cta:active { transform: scale(0.97); }
.hero__cta-text { display: inline-block; }

/* Legacy scroll-arrow — hidden but kept in DOM so any deep links continue
   to resolve. Delete when confident it's no longer referenced. */
.hero__scroll[hidden] { display: none; }

/* ============================================================
   SITEWIDE CONFETTI — subtle petals + tiny gold flecks drifting
   down over the whole invitation. Fixed layer, pointer-events off,
   sits above section backgrounds but below interactive UI (music
   toggle at z:40, modals at z:1000). Particles are spawned by JS
   and self-remove; density is intentionally low so the motion reads
   as ambient romance rather than a party effect.
   ============================================================ */
.confetti {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.confetti__piece {
  position: absolute;
  top: -6vh;
  will-change: transform, opacity;
  animation: confettiDrift linear forwards;
  opacity: 0;
}

/* Two flavors: soft champagne petal (rounded ellipse) and tiny gold fleck
   (small circle). Mixed to give visual variety without overwhelming. */
.confetti__piece--petal {
  border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
  background:
    radial-gradient(ellipse at 32% 32%, rgba(255, 251, 235, 0.85) 0%, rgba(207, 177, 131, 0.55) 55%, rgba(140, 100, 55, 0.28) 100%);
  filter: blur(0.4px);
}

.confetti__piece--fleck {
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(255, 245, 210, 0.9) 0%, rgba(183, 138, 76, 0.55) 70%, transparent 100%);
  box-shadow: 0 0 4px rgba(183, 138, 76, 0.25);
}

@keyframes confettiDrift {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg);                                       opacity: 0; }
  8%   { opacity: var(--confetti-peak, 0.5); }
  92%  { opacity: var(--confetti-peak, 0.5); }
  100% { transform: translate3d(var(--confetti-x, 40px), 108vh, 0) rotate(var(--confetti-r, 240deg)); opacity: 0; }
}

/* Reduced-motion — no confetti at all. Overrides "ambient" with silence. */
@media (prefers-reduced-motion: reduce) {
  .confetti { display: none; }
}

/* ============================================================
   COUNTDOWN
   ============================================================ */

.countdown { text-align: center; }

.countdown__grid {
  display: flex;
  justify-content: center;
  gap: clamp(1.2rem, 5vw, 2.8rem);
  margin-top: 2.2rem;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 3.2rem;
}

.countdown__num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============================================================
   STORY & GALLERY
   ============================================================ */

.story__text { text-align: center; }

.story__text p + p { margin-top: 1.2rem; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin-top: 3rem;
}

.gallery__frame {
  aspect-ratio: 3 / 4;
  border: 1px solid var(--gold-soft);
  padding: 0.45rem;
  background: #FFFEFA;
  box-shadow: 0 8px 22px rgba(51, 48, 42, 0.07);
  transition:
    transform 500ms cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 500ms cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery__frame:nth-child(2) { transform: translateY(1.2rem); }

@media (hover: hover) and (pointer: fine) {
  .gallery__frame:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(51, 48, 42, 0.14);
  }
  .gallery__frame:nth-child(2):hover { transform: translateY(calc(1.2rem - 6px)); }
}

.gallery__img,
.gallery__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(165deg, var(--blush), #E4D6C6);
  color: var(--sage);
}

/* ============================================================
   VENUES
   ============================================================ */

.venues__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.2rem;
}

.venue {
  border: 1px solid var(--gold-soft);
  background: #FFFEFA;
  padding: 2.4rem 1.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.venue__label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.venue__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.venue__time { font-style: italic; color: var(--ink-soft); }

.venue__address { color: var(--ink-soft); font-size: 1rem; }

.venue .btn { margin-top: auto; }

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.6rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  transition:
    background 260ms ease,
    color 260ms ease,
    transform 160ms cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 260ms ease;
  margin-top: 0.8rem;
}

.btn:hover { background: var(--gold); color: #FFFDF6; }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(183, 138, 76, 0.28); }

.btn--solid {
  background: var(--gold);
  color: #FFFDF6;
}

.btn--solid:hover { background: #9E7538; border-color: #9E7538; }

/* ============================================================
   TIMELINE
   ============================================================ */

.timeline__list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 24rem;
  position: relative;
}

.timeline__list::before {
  content: "";
  position: absolute;
  left: 1.25rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold-soft) 12%, var(--gold-soft) 88%, transparent);
}

.timeline__item {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  position: relative;
  padding: 1.1rem 0;
}

.timeline__icon {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  background: var(--ivory);
  color: var(--sage);
  position: relative;
  z-index: 1;
}

.timeline__time {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  min-width: 4.6rem;
}

.timeline__title { font-size: 1.1rem; }

/* ============================================================
   ENTOURAGE (dark band)
   ============================================================ */

.section--dark {
  max-width: none;
  background:
    radial-gradient(ellipse at 50% 0%, #47503D 0%, var(--forest) 60%);
  color: #EFEAE0;
}

.section--dark .section__heading { color: #F5F0E6; }

.entourage__inner {
  max-width: var(--measure);
  margin: 0 auto;
}

.entourage .eyebrow { color: var(--gold-soft); }

.entourage__group-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
  text-align: center;
  margin-bottom: 1.3rem;
}

.entourage__sponsors { margin-bottom: 3rem; }

.entourage__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
  text-align: center;
}

.entourage__col-head {
  font-style: italic;
  color: var(--gold-soft);
  margin-bottom: 0.5rem;
}

.entourage__name { line-height: 1.9; }

.entourage__roles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem 2rem;
  text-align: center;
  margin-bottom: 3rem;
}

.entourage__pair {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem 2rem;
  padding: 2.4rem 0;
  border-top: 1px solid rgba(207, 177, 131, 0.3);
}
.entourage__pair + .entourage__pair { margin-top: -1.8rem; }

.entourage__role-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 0.4rem;
}

.entourage__secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(207, 177, 131, 0.3);
  padding-top: 2.4rem;
}

/* ============================================================
   DRESS CODE
   ============================================================ */

.dresscode { text-align: center; }

.dresscode__text { max-width: 34rem; margin: 0 auto; }

.dresscode__swatches {
  display: flex;
  justify-content: center;
  gap: 1.1rem;
  margin: 2.2rem 0 1.6rem;
}

.dresscode__swatch {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  border: 1px solid var(--paper-edge);
  box-shadow: inset 0 0 0 3px var(--ivory), 0 4px 12px rgba(51, 48, 42, 0.12);
}

.dresscode__note { font-style: italic; color: var(--ink-soft); }

/* ============================================================
   GIFTS
   ============================================================ */

.gifts { text-align: center; }

.gifts__text { max-width: 32rem; margin: 0 auto; font-style: italic; }

/* ============================================================
   RSVP
   ============================================================ */

.rsvp { max-width: 36rem; }

.rsvp__card {
  border: 1px solid var(--gold-soft);
  background: #FFFEFA;
  padding: clamp(2rem, 6vw, 3.2rem);
  box-shadow: 0 14px 40px rgba(51, 48, 42, 0.08);
}

.rsvp__deadline {
  text-align: center;
  margin: -1.4rem 0 2.2rem;
  color: var(--ink-soft);
}

.rsvp__form { display: flex; flex-direction: column; gap: 1.4rem; }

.field { display: flex; flex-direction: column; gap: 0.45rem; }

.field--radios { border: none; margin: 0; padding: 0; }

.field__label {
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field__optional { text-transform: none; letter-spacing: 0.05em; }

.field__input {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--paper-edge);
  padding: 0.75rem 0.9rem;
  border-radius: 2px;
  transition: border-color 0.25s ease;
  width: 100%;
}

.field__input:focus {
  outline: none;
  border-color: var(--gold);
}

.radio {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0;
}

.radio input { accent-color: var(--gold); width: 1.05rem; height: 1.05rem; }

.rsvp__submit { margin-top: 0.4rem; }

.rsvp__status { text-align: center; color: #9C3D2E; min-height: 1.4em; }

.rsvp__success { text-align: center; padding: 1.5rem 0 0.5rem; }

.rsvp__success-orn { color: var(--sage); }

.rsvp__success-title {
  font-family: var(--font-script);
  font-size: 2.4rem;
  margin: 0.6rem 0 0.4rem;
}

.rsvp__success-text { color: var(--ink-soft); }

/* ============================================================
   FAQ
   ============================================================ */

.faq { max-width: 38rem; }

.faq__item { border-bottom: 1px solid var(--gold-soft); }

.faq__item:first-child { border-top: 1px solid var(--gold-soft); }

.faq__q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  padding: 1.2rem 0.2rem;
}

.faq__q::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
  transition: transform 0.35s ease;
  flex: none;
}

.faq__item.is-open .faq__q::after { transform: rotate(45deg); }

.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease;
}

.faq__a-inner {
  padding: 0 0.2rem 1.3rem;
  color: var(--ink-soft);
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  text-align: center;
  padding: 4.5rem 1.5rem 3.5rem;
  background: var(--blush);
}

.footer__sprig { color: var(--sage); }

.footer__mono {
  font-family: var(--font-script);
  font-size: 2.6rem;
  margin: 0.8rem 0 0.3rem;
}

.footer__date {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.footer__brand {
  margin-top: 2.6rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* ============================================================
   MUSIC TOGGLE
   ============================================================ */

.music-toggle {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 40;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(251, 248, 242, 0.92);
  color: var(--gold);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(51, 48, 42, 0.18);
  transition: transform 0.3s ease;
}

.music-toggle[hidden] { display: none; }

.music-toggle:hover { transform: scale(1.08); }

.music-toggle[aria-pressed="true"] {
  background: var(--gold);
  color: #FFFDF6;
  animation: musicSpin 6s linear infinite;
}

@keyframes musicSpin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   ASSET OVERRIDES (activated when files exist in assets/)
   ============================================================ */

/* Hero photo — full-bleed background with a soft ivory veil for legibility */
.hero.hero--photo::before,
.hero.hero--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero.hero--photo::before {
  background: var(--asset-hero) center/cover no-repeat;
  z-index: 0;
}
.hero.hero--photo::after {
  background: linear-gradient(180deg, rgba(251, 248, 242, 0.25) 0%, rgba(251, 248, 242, 0.55) 45%, rgba(251, 248, 242, 0.9) 100%);
  z-index: 0;
}
.hero.hero--photo > * { position: relative; z-index: 1; }

/* Paper/linen texture on the two paper-feeling cards */
.has-paper-texture .rsvp__card {
  background-color: #FFFEFA;
  background-image: var(--asset-paper);
  background-size: 320px;
  background-blend-mode: multiply;
}

/* Injected imagery */
.asset-img { display: block; margin: 0 auto; }
.asset-img--floral {
  width: 100%;
  height: auto;
  max-width: 220px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 640px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery__frame:nth-child(3) { display: none; }
  .countdown__grid { gap: 1rem; }
  /* Keep ninong/ninang side-by-side on mobile (was collapsing to 1 col) */
  .entourage__columns {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.2rem;
  }
  /* Role cards (bearers, entourage etc) also two-up on phones */
  .entourage__roles {
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem 1rem;
  }
  .entourage__secondary {
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
  }
  .entourage__role-title { font-size: 0.66rem; }
  .entourage__name { line-height: 1.7; font-size: 0.98rem; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .intro { transition: none; }
  .hero__scroll-line, .music-toggle[aria-pressed="true"] { animation: none; }
  /* Undo the section child stagger + heading underline animation */
  .reveal .section__heading::after { transition: none; transform: translateX(-50%) scaleX(1); }
  .reveal.is-visible .countdown__grid > *,
  .reveal.is-visible .timeline__list > *,
  .reveal.is-visible .gallery > *,
  .reveal.is-visible .entourage__roles > *,
  .reveal.is-visible .entourage__secondary > *,
  .reveal.is-visible .dresscode__swatches > *,
  .reveal.is-visible .faq__list > * { animation: none; opacity: 1; transform: none; }
  .countdown__num.is-ticking { animation: none; }
  .gallery__frame { transition: none; }
}

/* ============================================================
   STORY WIDGET (Aceternity Apple Cards Carousel, pre-bundled)
   Class names must stay in sync with story-widget/src/*.jsx
   ============================================================ */

.story-section {
  text-align: center;
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

/* Story heading — warmer, editorial italic that breaks from the
   uppercase-Marcellus rhythm of other section headings on purpose. */
.story-section__heading {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1;
  color: var(--forest);
  letter-spacing: -0.005em;
  text-transform: none;
  margin-bottom: 0.75rem;
}

.story-section__lede {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink-soft);
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  max-width: 30rem;
  margin: 0 auto 2rem;
}

#story-mount { width: 100%; }

/* --- Carousel: horizontal scroll strip of tall poster cards --- */

.acc-root { position: relative; width: 100%; }

/* Aceternity: `flex w-full overflow-x-scroll overscroll-x-auto
   scroll-smooth py-10 md:py-20 [scrollbar-width:none]` */
.acc-track {
  display: flex;
  width: 100%;
  overflow-x: scroll;
  overscroll-behavior-x: auto;
  scroll-behavior: smooth;
  padding: 2.5rem 0;
  scrollbar-width: none;
}
.acc-track::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .acc-track { padding: 5rem 0; }
}

/* Right-edge fade — Aceternity uses `absolute right-0 w-[5%] bg-gradient-to-l`
   sitting on top of the track. */
.acc-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 5%;
  z-index: 1000;
  pointer-events: none;
  background: linear-gradient(to left, var(--ivory) 0%, transparent 100%);
}

/* Aceternity: `flex flex-row justify-start gap-4 pl-4 mx-auto max-w-7xl` */
.acc-row {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 1rem;
  padding-left: 1rem;
  margin-inline: auto;
  max-width: 80rem;
}

/* Aceternity: `rounded-3xl last:pr-[5%] md:last:pr-[33%]` */
.acc-cell {
  border-radius: 1.5rem;
  flex-shrink: 0;
}
.acc-cell:last-child { padding-right: 5%; }
@media (min-width: 768px) {
  .acc-cell:last-child { padding-right: 33%; }
}

/* Aceternity: `mr-10 flex justify-end gap-2` */
.acc-controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-right: 2.5rem;
}

/* Aceternity: `relative z-40 flex h-10 w-10 items-center justify-center
   rounded-full bg-gray-100 disabled:opacity-50` */
.acc-nav {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 999px;
  background: rgba(183, 138, 76, 0.12);
  color: var(--ink-soft);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.acc-nav:hover { background: rgba(183, 138, 76, 0.22); color: var(--ink); }
.acc-nav:active { transform: scale(0.95); }
.acc-nav:disabled { opacity: 0.4; cursor: default; }
.acc-nav:disabled:hover { background: rgba(183, 138, 76, 0.12); }
.acc-nav svg { width: 1.5rem; height: 1.5rem; }

/* --- Card face --- */

/* Aceternity: `relative z-10 flex h-80 w-56 flex-col items-start
   justify-start overflow-hidden rounded-3xl bg-gray-100
   md:h-[40rem] md:w-96` */
.acc-card {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  height: 20rem;
  width: 14rem;
  overflow: hidden;
  border-radius: 1.5rem;
  background: rgba(183, 138, 76, 0.1);
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  box-shadow: 0 14px 30px -14px rgba(88, 68, 40, 0.35),
              0 4px 10px rgba(88, 68, 40, 0.1);
}
@media (min-width: 768px) {
  .acc-card { height: 40rem; width: 24rem; }
}

/* Aceternity: `pointer-events-none absolute inset-x-0 top-0 z-30 h-full
   bg-gradient-to-b from-black/50 via-transparent to-transparent` */
.acc-card__gradient {
  pointer-events: none;
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 30;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0) 45%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* Aceternity: `relative z-40 p-8` */
.acc-card__caption {
  position: relative;
  z-index: 40;
  padding: 2rem;
}

/* Aceternity: `text-left font-sans text-sm font-medium text-white md:text-base` */
.acc-card__category {
  margin: 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 500;
  color: #ffffff;
}
@media (min-width: 768px) {
  .acc-card__category { font-size: 0.8rem; }
}

/* Aceternity: `mt-2 max-w-xs text-left font-sans text-xl font-semibold
   [text-wrap:balance] text-white md:text-3xl` */
.acc-card__title {
  margin: 0.5rem 0 0;
  max-width: 20rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  text-wrap: balance;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: 0.02em;
}
@media (min-width: 768px) {
  .acc-card__title { font-size: 1.85rem; }
}

/* Aceternity: `absolute inset-0 z-10 object-cover` */
.acc-card__img,
.acc-card .acc-img {
  position: absolute;
  inset: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

/* Aceternity: `h-full w-full transition duration-300` + blur toggle */
.acc-img { transition: filter 0.3s ease; }
.acc-img--blur { filter: blur(10px); }

/* --- Expanded overlay (opened card) --- */

/* Aceternity: `fixed inset-0 z-50 h-screen overflow-auto` */
.acc-overlay-root {
  position: fixed;
  inset: 0;
  z-index: 50;
  height: 100vh;
  overflow: auto;
}

/* Aceternity: `fixed inset-0 h-full w-full bg-black/80 backdrop-blur-lg` */
.acc-scrim {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Aceternity: `relative z-[60] mx-auto my-10 h-fit max-w-5xl rounded-3xl
   bg-white p-4 md:p-10` */
.acc-modal {
  position: relative;
  z-index: 60;
  margin: 2.5rem auto;
  max-width: 62rem;
  height: fit-content;
  border-radius: 1.5rem;
  background: var(--ivory);
  padding: 1rem;
  font-family: var(--font-body);
}
@media (min-width: 768px) {
  .acc-modal { padding: 2.5rem; }
}

/* Aceternity: `sticky top-4 right-0 ml-auto flex h-8 w-8 items-center
   justify-center rounded-full bg-black` */
.acc-close {
  position: sticky;
  top: 1rem;
  right: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  width: 2rem;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ivory);
  cursor: pointer;
  z-index: 5;
}
.acc-close svg { width: 1.2rem; height: 1.2rem; }

/* Aceternity: `text-base font-medium text-black` */
.acc-modal__category {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

/* Aceternity: `mt-4 text-2xl font-semibold text-neutral-700 md:text-5xl` */
.acc-modal__title {
  margin: 1rem 0 0;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--forest);
  line-height: 1.05;
  letter-spacing: -0.005em;
}

/* Aceternity: `py-10` */
.acc-modal__content {
  padding: 2.5rem 0 1rem;
}

.acc-modal__hero {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  margin: 0 auto;
}

/* ============================================================
   PREVIEW MODE — subtle corner pill + selection/drag friction.
   Only visible when cfg.preview === true (unpaid demo).
   Set `preview: false` in js/config.js on paid client deliveries.
   ============================================================ */
.preview-pill {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  will-change: transform;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  background: rgba(11, 11, 11, 0.82);
  color: #fff;
  border-radius: 999px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  user-select: none;
}
.preview-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffb74a;
  box-shadow: 0 0 0 3px rgba(255, 183, 74, 0.25);
  animation: previewPulse 1.8s ease-in-out infinite;
}
@keyframes previewPulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}
@media (max-width: 480px) {
  .preview-pill { bottom: 0.6rem; left: 0.6rem; right: auto; padding: 0.4rem 0.7rem; font-size: 0.55rem; }
}

/* Selection + drag friction — RSVP form inputs are exempt. */
.is-preview {
  user-select: none;
  -webkit-user-select: none;
}
.is-preview input,
.is-preview textarea,
.is-preview select {
  user-select: text;
  -webkit-user-select: text;
}
.is-preview img,
.is-preview svg {
  -webkit-user-drag: none;
  user-drag: none;
}

/* ============================================================
   SCROLLBAR — thin, brand-tinted rail so the page still feels
   like couture stationery when framed in the catalog phone modal.
   Applies to the document scroll and to any overflow container.
   ============================================================ */
:root {
  scrollbar-width: thin;
  scrollbar-color: rgba(183, 138, 76, 0.22) transparent;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent;
}
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(183, 138, 76, 0.22);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
  transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(183, 138, 76, 0.55);
  background-clip: padding-box;
  border: 2px solid transparent;
}
::-webkit-scrollbar-corner { background: transparent; }
/* Slow DVD-ish corner tour. 4-corner loop over 90s. Pure CSS, GPU-only transforms. */
@media (prefers-reduced-motion: no-preference) {
  .preview-pill { animation: previewPillDvd 90s linear infinite; }
}
@keyframes previewPillDvd {
  0%,   100% { transform: translate(0, 0); }
  25%        { transform: translate(0, calc(-100vh + 100% + 2rem)); }
  50%        { transform: translate(calc(100vw - 100% - 2rem), calc(-100vh + 100% + 2rem)); }
  75%        { transform: translate(calc(100vw - 100% - 2rem), 0); }
}
