/* ============================================================
   KEEPSIKA INVITATIONS — "Nocturne" template
   Warm-dark editorial. High-contrast Bodoni Moda display type
   over a deep-black canvas — luxury after dark.

   NOTE ON TOKENS: this template inherits Aurora's semantic
   palette names so shared markup keeps working, but the VALUES
   are inverted for a dark theme. Read them as roles rather than
   literal colors — --ivory is now the deep-black canvas, --ink
   is the warm off-white text, --gold is a subtle warm brass.
   ============================================================ */

:root {
  --ivory: #0f0d0b;                                /* MAIN BG — warm deep black */
  --ink: #ecebe6;                                  /* MAIN TEXT — warm off-white */
  --ink-soft: #a8a49b;                             /* secondary text — warm mid-gray */
  --gold: #b4a488;                                 /* accent — subtle warm brass */
  --gold-soft: #7a705f;                            /* deeper bronze — muted accents */
  --sage: #1e1b16;                                 /* slightly lifted band bg */
  --forest: #050403;                               /* deepest black — for dramatic bands */
  --blush: #17150f;                                /* warm charcoal panel */
  --paper-edge: rgba(236, 235, 230, 0.16);         /* translucent warm-white divider */

  --font-display: "Bodoni Moda", "Playfair 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;
  font-optical-sizing: auto;
}

.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.9rem, 4.6vw, 2.6rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 2.5rem;
  font-weight: 400;
  font-optical-sizing: auto;
}

/* ============================================================
   ENVELOPE INTRO — four damask flaps unfold from a gold wax seal
   ============================================================ */

/* Fullscreen overlay hosting the envelope-opening video. */
.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000;
  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; }

/* Zoom slightly beyond fill to crop the AI watermark in the bottom-right
   corner. --intro-zoom tunes the crop — raise it if the watermark still
   peeks in on very wide screens, lower it to see more of the frame.

   The poster image is painted as a CSS background too, not just via the
   video's poster attribute. iOS Safari won't decode a video's first
   frame until playback starts, so without this fallback the intro would
   flash black before the tap-to-play. Belt + suspenders. */
.intro__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #000 url("../assets/envelope-poster.webp") center / cover no-repeat;
  pointer-events: none;
  transform: scale(var(--intro-zoom, 1.14));
  transform-origin: center center;
}
.intro { --intro-zoom: 1.14; }

/* Tap-to-open prompt shown before the video begins. Sits centered
   over the paused first frame (closed envelope with wax seal). */
.intro__prompt {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  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: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.14),
    0 0 24px 4px rgba(255, 255, 255, 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.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

/* Couple names stacked over the video, with an editorial eyebrow above
   and the wedding date below. Hidden until JS flips .is-revealed on
   the intro (timed to the flap-open moment). */
.intro__names {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-align: center;
  padding: 0 1.5rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
  max-width: min(92vw, 640px);
}
.intro.is-revealed .intro__names { opacity: 1; }

.intro__eyebrow {
  font-family: var(--font-display);
  font-size: clamp(0.6rem, 1.4vw, 0.72rem);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  margin-bottom: 0.5rem;
  transform: translateY(10px);
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.intro.is-revealed .intro__eyebrow { transform: translateY(0); }

.intro__name {
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0.005em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.7);
  transform: translateY(14px);
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.intro.is-revealed .intro__name { transform: translateY(0); }
.intro__name--groom { transition-delay: 0s; }
.intro__name--bride { transition-delay: 0.35s; }

.intro__amp {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2rem, 6vw, 3rem);
  color: rgba(255, 255, 255, 0.82);
  line-height: 0.9;
  font-style: normal;
  margin: 0.1rem 0;
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.18s;
  transform: translateY(14px);
}
.intro.is-revealed .intro__amp { transform: translateY(0); }

.intro__date {
  font-family: var(--font-display);
  font-size: clamp(0.62rem, 1.4vw, 0.75rem);
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  transform: translateY(14px);
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.5s;
}
.intro.is-revealed .intro__date { transform: translateY(0); }

/* Skip pill — fades in a beat after the video starts so it doesn't
   compete with the opening moment. */
.intro__skip {
  position: absolute;
  bottom: 1.4rem;
  right: 1.4rem;
  z-index: 10;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  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.75; transform: translateY(0); }
.intro__skip:hover  { opacity: 1; background: rgba(0, 0, 0, 0.7); }
.intro__skip:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
  opacity: 1;
}
@media (max-width: 480px) {
  .intro__skip {
    bottom: 1rem; right: 1rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.55rem;
  }
}



/* ============================================================
   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 — thin rule + a single dot in the middle */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  max-width: 22rem;
  margin: 0 auto;
  color: var(--ink);
}
.divider__line {
  flex: 1;
  height: 1px;
  background: var(--paper-edge);
}
.divider__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink);
  flex-shrink: 0;
}

/* ============================================================
   HERO — minimal editorial: rule / date / names / rule / eyebrow
   Pure paper background, no floral, no photo. Type-forward.
   ============================================================ */

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  max-width: none;
  background: var(--ivory);
  padding-inline: clamp(1.5rem, 6vw, 4rem);
  gap: 1.2rem;
}
.hero__mark {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  color: var(--ink-soft);
}
.hero__mark::after {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink);
  margin: 0.5rem auto 0;
}
.hero__date {
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 2vw, 0.95rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}
.hero__rule {
  width: 4.5rem;
  height: 1px;
  background: var(--ink);
  margin: 0.4rem 0;
}
.hero__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1em;
  margin: 0.4rem 0;
}
.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 14vw, 6rem);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.015em;
  font-weight: 400;
  font-optical-sizing: auto;
}
.hero__amp {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  text-transform: lowercase;
  margin: 0.1em 0;
}
.hero__eyebrow {
  max-width: 34rem;
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 2.1vw, 1.05rem);
  font-style: italic;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.5;
  color: var(--ink-soft);
  text-shadow: none;
  margin: 0.4rem 0 0;
}
.hero__hashtag {
  margin-top: 0.6rem;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.hero__scroll {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
}
.hero__scroll-line {
  display: block;
  width: 1px;
  height: 3.2rem;
  background: var(--ink);
  animation: scrollLine 2.4s ease-in-out infinite;
  transform-origin: top;
}

/* ============================================================
   NOTE — short editorial letter, replaces the photo gallery
   ============================================================ */
.note {
  text-align: center;
  max-width: var(--measure);
  margin: 0 auto;
}
.note .section__heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: 0.06em;
  text-transform: none;
  margin: 0.8rem 0 2rem;
  color: var(--ink);
}
.note__body {
  margin: 0 auto 2rem;
  padding: 0;
  border: none;
  max-width: 36rem;
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  line-height: 1.75;
  color: var(--ink);
  text-align: left;
}
.note__body p {
  margin: 0;
  text-indent: 1.5rem;
}
.note__body p + p { margin-top: 1rem; }
.note__body p::first-letter {
  font-family: var(--font-display);
  font-size: 1.5em;
  color: var(--ink);
}
.note__signoff {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 0;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(10px); opacity: 0; }
}

/* ============================================================
   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: var(--sage);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  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(--sage), var(--blush));
  color: var(--ink-soft);
}

/* ============================================================
   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: var(--sage);
  padding: 2.4rem 1.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.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) 12%, var(--gold) 88%, transparent);
  opacity: 0.55;
}

.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);
  background: var(--gold);
  color: var(--ivory);
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.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: var(--forest);
  color: var(--ink);
}
.section--dark .section__heading { color: var(--ink); }

.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: var(--sage);
  padding: clamp(2rem, 6vw, 3.2rem);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}

.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(--gold); }

.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__rule {
  display: block;
  width: 72px;
  height: 1px;
  background: var(--ink);
  margin: 0 auto;
}

.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: var(--sage);
  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(--ink);
  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(--ink);
  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; }
}

.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
   editorial-noir when framed in the catalog phone modal.
   Nocturne is dark, so the track/thumb invert Aurora + Azure.
   ============================================================ */
:root {
  scrollbar-width: thin;
  scrollbar-color: rgba(180, 164, 136, 0.18) transparent;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent;
}
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(180, 164, 136, 0.18);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
  transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 164, 136, 0.5);
  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); }
}
