@font-face {
  font-family: 'LovariaDemo';
  src: url('assets/LovariaDemo.otf') format('opentype');
  font-display: swap;
}

@font-face {
  font-family: 'Klagin';
  src: url('assets/klagin.otf') format('opentype');
  font-display: swap;
}

/* ── reset ───────────────────────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ── Elephant divider metrics ────────────────────────────────────────────
   The elephant straddles the cream / maroon junction from a zero-height
   container, so the sections either side have to reserve its room themselves.
   Both halves are derived from these tokens instead of being guessed in vh:
   a vh value shrinks with a short window while the elephant does not, which
   is how it ended up sitting on the hashtag capsule.

     rise = half the image + the 20% it is lifted by  (above the junction)
     drop = what is left                              (below it)

   Change --elephant-size and the space either side follows.
   ---------------------------------------------------------------------- */
:root {
  --elephant-size: clamp(200px, 20vw, 300px);
  --elephant-rise: calc(var(--elephant-size) * 0.7);
  --elephant-drop: calc(var(--elephant-size) * 0.3);
  --elephant-clear: clamp(16px, 2.5vw, 28px);
}

html,
body {
  background: #a8d8f0;
  /* clip (not hidden) — `hidden` creates a new scroll context that can break
     descendant position:sticky (Safari especially). `clip` visually trims
     without creating a scroll container. */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── scene ──────────────────────────────────────────────────────────────
   Fixed overlay covering the viewport.  JS reads scrollY (driven by the
   .hero-scroll-spacer below) and animates this scene as the user scrolls.
   At zoom completion the scene fades out, revealing the invite-card behind
   it (ganeshji-sticky already at viewport top — no blank intermediate
   frame). */
.scene {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  /* fallback */
  height: 100dvh;
  /* true visible viewport — fixes iOS chrome-bar bug */
  overflow: hidden;
  /* The scene owns its own sky.  Without this the sky came from html/body,
     which left the scene partly see-through — the cream band painted on the
     runway below would then bleed up through the thinning clouds during the
     zoom.  Same colour as the body, so the load fade-in is unchanged. */
  background: #a8d8f0;
  opacity: 0;
  animation: sceneIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
  z-index: 5;
  /* Smooth opacity fade when JS hides the scene at zoom completion. */
  transition: opacity 0.18s linear;
}

.scene.is-hidden {
  opacity: 0 !important;
  pointer-events: none;
}

/* ── Scroll runway ──────────────────────────────────────────────────────
   Invisible scroll-distance = animation length + settle coast:
     180vh  rise + zoom (RISE_FRAC 1.0 + ZOOM_FRAC 1.8 in script.d5c0a3f7.js)
   +  25vh  quiet coast
   = 205vh
   The invite-card that follows is kept at opacity 0 by JS until the zoom is
   nearly done, then faded in scroll-linked — so by the time the zoom
   completes the card is already fully opaque.  The trailing 25vh is a settle
   beat: the scene is hidden and nothing is animating, so ganeshji glides up
   to the viewport top rather than snapping there.
   INVARIANT: height === (ZOOM_FRAC × 100vh) + 25vh.  Keep the two in sync. */
.hero-scroll-spacer {
  width: 100%;
  height: 205vh;
  pointer-events: none;
  position: relative;
}

/* During the trailing 25vh coast the scene is hidden and this runway is what
   sits above the invite card on screen — bare, it showed as a strip of sky.
   This band paints it with the same cream as .cream-content so the handoff
   reads as one continuous card.
   It is a pseudo-element rather than a background on the spacer itself for two
   reasons: the rest of the runway must stay transparent (so the body's sky
   still shows while .scene fades in at load), and `cover` on a 30vh-tall box
   resolves to the same width-driven scale .cream-content uses — the texture
   grain therefore matches exactly across the seam, which a `100% 30vh`
   background-size would have squashed.
   30vh is a little taller than the 25vh coast so no sliver of sky can appear
   from vh-vs-innerHeight rounding; the overshoot sits behind the opaque
   .scene and is never seen. */
.hero-scroll-spacer::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30vh;
  background: #f9f3e5 url('assets/CreamBackground.webp') center / cover no-repeat;
}

@keyframes sceneIn {
  to {
    opacity: 1;
  }
}

/* ── clouds ──────────────────────────────────────────────────────────── */
.clouds {
  position: absolute;
  inset: 0;
  background: url('assets/Clouds.webp') center bottom / cover no-repeat;
  height: 120vh;
  z-index: 0;
  will-change: transform, filter, opacity;
}

/* ── hero wedding text ───────────────────────────────────────────────── */
.wedding-text {
  position: absolute;
  top: 30%;
  left: 0;
  /* Stay on one row for short names (centered with side breathing room),
     but wrap when the names don't fit — `white-space: normal` allows
     natural line-breaks at word boundaries only. */
  width: calc(100% - 8vw);
  margin: 0 4vw;
  font-family: 'LovariaDemo', cursive;
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  color: #fff;
  text-shadow:
    0 2px 14px rgba(0, 0, 0, 0.45),
    0 0 48px rgba(0, 0, 0, 0.25);
  text-align: center;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.15;
  letter-spacing: 0.01em;
  z-index: 1;
  will-change: transform, opacity;
}

/* ── temple ──────────────────────────────────────────────────────────── */
.temple-wrap {
  position: absolute;
  bottom: -40vh;
  left: 50%;
  height: 90vh;
  transform: translateX(-50%);
  will-change: transform;
  z-index: 2;
}

.temple-wrap img {
  display: block;
  height: 100%;
  transform-origin: 50% 62%;
  will-change: transform;
}

/* ── vignette ────────────────────────────────────────────────────────── */
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
      transparent 55%,
      rgba(0, 0, 0, 0.28) 100%);
  z-index: 4;
}

/* ── cream overlay ───────────────────────────────────────────────────── */
.cream-overlay {
  position: absolute;
  inset: 0;
  background: url('assets/CreamBackground.webp') center / cover no-repeat;
  opacity: 0;
  will-change: opacity;
  z-index: 5;
}

/* ── ganeshji — top of card, scrolls with content ───────────────────── */
.ganeshji-sticky {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 1.5vh 0 0.8vh;
  flex-shrink: 0;
  z-index: 2;
}

.ganeshji {
  height: 13vh;
  object-fit: contain;
  opacity: 1;
  filter: drop-shadow(0 8px 24px rgba(120, 80, 0, 0.18));
}

/* ── invitation card ───────────────────────────────────────────────────
   Flows in normal document order after the .hero-scroll-spacer.  When
   the user has scrolled past the spacer the scene fades out and the
   invite-card (with ganeshji at top) is what's on screen. */
.invite-card {
  position: relative;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  color: #5a0a0a;
  font-family: 'Georgia', 'Times New Roman', serif;
  background: transparent;
  overflow-x: hidden;
  /* clip full-bleed children — kills horizontal scroll */
  z-index: 6;
  /* Hidden until JS fades it in during the tail of the zoom animation. */
  opacity: 0;
  will-change: opacity;
}

/* ── cream content wrapper (everything above maroon) ──────────────── */
.cream-content {
  width: 100%;
  padding: 2vh 5vw 6vh;
  /* 6vh bottom = breathing room before maroon */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: url('assets/CreamBackground.webp') center / cover no-repeat;
  flex-shrink: 0;
  /* Ensures cream section is never shorter than the viewport —
     prevents mobile scroll from jumping straight to maroon. */
  min-height: 100dvh;
}

.invite-blessing {
  font-family: 'Klagin', serif;
  font-style: italic;
  font-size: clamp(0.72rem, 1.3vw, 0.95rem);
  letter-spacing: 0.14em;
  color: #8b1a1a;
}

.invite-couple-line {
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  letter-spacing: 0.04em;
  color: #6b1010;
  margin-top: 0.5vh;
}

.invite-divider {
  width: 64px;
  height: 1px;
  margin: 0.9vh auto;
  background: linear-gradient(90deg,
      transparent,
      #8b1a1a 30%,
      #8b1a1a 70%,
      transparent);
}

.invite-title {
  font-family: 'Klagin', serif;
  font-size: clamp(2.6rem, 5.8vw, 4.8rem);
  letter-spacing: 0.18em;
  color: #5a0a0a;
  margin: 1vh 0 0.8vh;
  padding-left: 0.18em;
  font-weight: normal;
}

.invite-join {
  font-family: 'Klagin', serif;
  font-size: clamp(0.88rem, 1.4vw, 1.05rem);
  letter-spacing: 0.05em;
  color: #7a1515;
  margin-bottom: 0.8vh;
  font-style: italic;
}

.invite-person {
  font-family: 'Klagin', cursive;
  font-size: clamp(2.8rem, 6.5vw, 5.2rem);
  line-height: 1.1;
  color: #5a0a0a;
  margin: 0.1vh 0;
}

.invite-amp {
  font-family: 'Klagin', cursive;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  color: #8b1a1a;
  margin: 0.1vh 0;
}

.invite-parents2 {
  margin-top: 1.2vh;
}

/* ── Reveal the Date section ─────────────────────────────────────────── */
.reveal-date-section {
  margin-top: 9vh;
  margin-bottom: 5vh;
  /* ← cream breathing room before maroon starts */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2vh;
  pointer-events: auto;
}

/* ── Reveal the Date — clickable header ─────────────────────────────── */
.reveal-date-header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.18s;
  -webkit-tap-highlight-color: transparent;
}

.reveal-date-header:hover {
  opacity: 0.75;
}

.reveal-date-header:active {
  opacity: 0.55;
}


/* label font — matches Invite style, slightly smaller */
.reveal-label {
  font-family: 'Klagin', serif;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  letter-spacing: 0.18em;
  color: #5a0a0a;
  font-weight: normal;
  line-height: 1;
  padding-left: 0.18em;
  /* same offset as .invite-title */
  white-space: nowrap;
}

/* ── Tap hint — always visible static text ───────────────────────────── */
.tap-hint {
  font-family: 'Klagin', serif;
  font-style: italic;
  font-size: clamp(0.68rem, 1.5vw, 0.84rem);
  color: #8b1a1a;
  letter-spacing: 0.22em;
  margin: 0;
  padding: 0;
}

/* ── Date circles row ────────────────────────────────────────────────── */
.date-circles {
  display: flex;
  gap: clamp(12px, 3vw, 26px);
  align-items: center;
  justify-content: center;
}

.date-circle-wrap {
  position: relative;
  width: clamp(70px, 14.85vw, 100px);
  height: clamp(70px, 14.85vw, 100px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ⑤ circles always visible */
.date-circle-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  /* always shown */
}

/* date text: hidden until toggle ON */
.date-circle-text {
  position: relative;
  z-index: 2;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(0.9rem, 2.6vw, 1.3rem);
  font-weight: bold;
  color: #f9f4e2;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

/* ── Spin-in: rotate around Z (perpendicular to screen) & text fades in */
.date-circle-wrap.spin-in .date-circle-img {
  animation: circleSpinIn 0.6s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

.date-circle-wrap.spin-in .date-circle-text {
  animation: textFadeIn 0.28s ease 0.32s both;
}

@keyframes circleSpinIn {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes textFadeIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── Spin-out: rotate back & text fades out ─────────────────────────── */
.date-circle-wrap.spin-out .date-circle-img {
  animation: circleSpinOut 0.5s cubic-bezier(0.55, 0, 0.45, 1) both;
}

.date-circle-wrap.spin-out .date-circle-text {
  animation: textFadeOut 0.18s ease both;
}

@keyframes circleSpinOut {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(-360deg);
  }
}

@keyframes textFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.85);
  }
}

/* ── scroll hint ─────────────────────────────────────────────────────── */
.scroll-hint {
  position: absolute;
  bottom: 3.5vh;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.92);
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  z-index: 3;
  opacity: 0;
  animation: hintIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) 1.6s forwards;
  transition: opacity 0.5s ease;
  text-align: center;
  pointer-events: none;
}

@keyframes hintIn {
  to {
    opacity: 1;
  }
}

.scroll-hint .line {
  display: block;
  width: 1px;
  height: 28px;
  margin: 10px auto 0;
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.85) 100%);
  animation: lineDrop 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  transform-origin: top;
}

@keyframes lineDrop {
  0% {
    transform: scaleY(0);
    opacity: 0;
  }

  40% {
    transform: scaleY(1);
    opacity: 1;
  }

  100% {
    transform: scaleY(1);
    opacity: 0;
    transform-origin: bottom;
  }
}

.scroll-hint.hidden {
  opacity: 0 !important;
}

/* ── reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  .scene,
  .scroll-hint {
    animation: none;
    opacity: 1;
  }

  .scroll-hint .line {
    animation: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Functions section
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Full-bleed maroon wrapper ──────────────────────────────────────── */
.functions-section {
  /* bleed past the card's 5vw horizontal padding */
  width: calc(100% + 10vw);
  margin-left: -5vw;
  background: url('assets/MaroonBackground.webp') center / cover no-repeat;
  padding-bottom: 8vh;
  /* push down so glasses can straddle the junction above */
  padding-top: 0;
  flex-shrink: 0;
}

/* ── Glasses image at cream / maroon junction ───────────────────────── */
.functions-glasses {
  display: flex;
  justify-content: center;
  /*
   * Negative margin-top = half the glasses height.
   * The glasses height is clamp(55px, 16vw, 95px)  (half of the width value below).
   * Adjust this value if you change .glasses-img width.
   */
  margin-top: calc(-1 * clamp(55px, 14vw, 100px));
  margin-bottom: clamp(12px, 3vw, 24px);
  position: relative;
  z-index: 10;
  /* sits above both cream and maroon layers */
}

.glasses-img {
  /* ── SIZE: change this one line to resize the glasses ────────────────
   *  The negative margin-top above is set to exactly half this value.
   *  If you change the width here, update margin-top to match.
   * ------------------------------------------------------------------ */
  width: clamp(250px, 32vw, 432px);
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.25));
}

/* ── Tile grid ──────────────────────────────────────────────────────── */
.functions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 3vw, 28px);
  max-width: 1350px;
  /* +15% from original 860px */
  margin: 0 auto;
  padding: 0 clamp(12px, 4vw, 32px);
}

@media (max-width: 640px) {
  .functions-grid {
    grid-template-columns: 1fr;
    max-width: min(92vw, 360px);
    /* +10% from original 300px */
  }

  /* ── Mobile: inner tile content — extra side inset vs star frame ───── */
  .fn-content {
    padding: 19% 16% 21%;
    gap: calc(clamp(3px, 0.84vw, 7.35px) * var(--fn-scale, 1));
  }

  /* ── Mobile: title scales with viewport; keep letter-spacing tight ─── */
  .fn-name {
    font-size: calc(clamp(0.56rem, min(4.2vw, 5.2vmin), 1.22rem) * var(--fn-scale, 1));
    letter-spacing: clamp(0.01em, 0.35vw, 0.04em);
    line-height: 1.2;
    word-break: normal;
    overflow-wrap: break-word;
    text-wrap: balance;
    padding-inline: 2%;
  }

  /* LINE 551 — date / venue / time font size for mobile */
  .fn-date,
  .fn-venue,
  .fn-time {
    font-size: calc(clamp(0.78rem, 3.4vw, 0.95rem) * var(--fn-scale, 1));
    /* was clamp(0.62rem, 1.6vw, 0.84rem) */
  }

  /* LINE 558 — map link font size for mobile */
  .fn-map {
    font-size: calc(clamp(0.74rem, 3.2vw, 0.9rem) * var(--fn-scale, 1));
    /* was clamp(0.6rem, 1.5vw, 0.8rem) */
  }

  .fn-dress,
  .fn-notes {
    font-size: calc(clamp(0.64rem, 2.8vw, 0.82rem) * var(--fn-scale, 1));
  }
}

/* ── Individual tile ────────────────────────────────────────────────── */
.function-tile {
  /* tile image fills exactly — use 100% 100% to stretch to fit cell */
  background: url('assets/FunctionTile.webp') center / 100% 100% no-repeat;
  aspect-ratio: 4 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  /* lets font-size use cqi against the actual tile width (desktop + mobile) */
  container-type: inline-size;
  container-name: fn-tile;
}

.fn-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* Wider horizontal inset — star arms cut in; long titles need more margin */
  padding: 20% 17% 22%;
  /* --fn-scale is written by the auto-fit pass in script.d5c0a3f7.js: it
     shrinks the whole block (type + gaps together) until every rendered line
     sits inside the star's cream oval, so a long function name or a long
     venue address can never ride over the painted border. Without JS the
     value stays 1 and the tile renders exactly as it always did. */
  --fn-scale: 1;
  gap: calc(clamp(3px, 0.8vw, 7px) * var(--fn-scale));
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Function name — matches Invite style; stays inside star “safe” oval */
.fn-name {
  font-family: 'Klagin', serif;
  /* Scale with tile width so 3-up desktop and 1-col mobile both behave */
  font-size: calc(clamp(0.58rem, 3.6cqi + 0.42rem, 1.28rem) * var(--fn-scale, 1));
  letter-spacing: clamp(0.01em, 0.12cqi, 0.05em);
  color: #2a5c42;
  font-weight: normal;
  margin: 0;
  line-height: 1.18;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  text-wrap: balance;
  /* A touch narrower than the body lines: the name sits at the top of the
     block, where the star's cream field has already started to narrow, so a
     long name is better wrapped than run out to the frame. */
  max-width: 88%;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding-inline: 1%;
}

/* Browsers without container query font units: fall back to vw-based cap */
@supports not (font-size: 1cqi) {
  .fn-name {
    font-size: calc(clamp(0.58rem, min(2.1vw, 2.8vmin), 1.28rem) * var(--fn-scale, 1));
    letter-spacing: clamp(0.01em, 0.08vw, 0.05em);
  }
}

/* Date / venue / time */
.fn-date,
.fn-venue,
.fn-time {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: calc(clamp(0.62rem, 3.1cqi, 0.84rem) * var(--fn-scale, 1));
  color: #3a5040;
  margin: 0;
  line-height: 1.45;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
}

/* Dress code */
.fn-dress {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: calc(clamp(0.58rem, 2.9cqi, 0.78rem) * var(--fn-scale, 1));
  color: #3a5040;
  font-style: italic;
  margin: 0;
  line-height: 1.4;
}

/* Notes */
.fn-notes {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: calc(clamp(0.56rem, 2.7cqi, 0.74rem) * var(--fn-scale, 1));
  color: #4a5a4a;
  margin: 0;
  line-height: 1.4;
  opacity: 0.85;
}

/* Map link */
.fn-map {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: calc(clamp(0.6rem, 3cqi, 0.8rem) * var(--fn-scale, 1));
  color: #2a5c42;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: calc(clamp(3px, 0.8vw, 6px) * var(--fn-scale, 1));
  display: inline-block;
}

/* ═══════════════════════════════════════════════════════════════════════
   Meet the Bride & Groom — cream section after maroon
   ═══════════════════════════════════════════════════════════════════════ */

.meet-couple-section {
  width: calc(100% + 10vw);
  /* bleed past card's 5vw padding (mirrors functions-section) */
  margin-left: -5vw;
  background: url('assets/CreamBackground.webp') center / cover no-repeat;
  padding: 6vh 5vw 8vh;
  flex-shrink: 0;
}

.meet-couple-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3vh;
}

/* ── Title ──────────────────────────────────────────────────────────── */
.meet-title {
  font-family: 'Klagin', serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: 0.18em;
  color: #5a0a0a;
  font-weight: normal;
  line-height: 1.2;
  padding-left: 0.18em;
}

/* ── Thin maroon rule ───────────────────────────────────────────────── */
.meet-divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #8b1a1a 30%, #8b1a1a 70%, transparent);
  flex-shrink: 0;
}

/* ── Story paragraph ────────────────────────────────────────────────── */
.meet-story {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(0.88rem, 1.8vw, 1.05rem);
  color: #5a1010;
  line-height: 1.85;
  letter-spacing: 0.02em;
  max-width: 600px;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════
   Couple Carousel
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Gallery wrapper (reel + dots) ──────────────────────────────────── */
.couple-gallery {
  width: 100%;
}

/* ── Carousel outer row (arrows + viewport) ─────────────────────────── */
.carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.couple-carousel {
  flex: 1;
  /* takes all space between the two buttons */
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(90, 10, 10, 0.18);
  user-select: none;
  touch-action: pan-y;
  /* height is controlled by the slides */
}

/* Manual profile — arrows, dots, swipe.  Snappy, so a tap mid-drift responds
   immediately instead of crawling.  Duration MUST match MANUAL_MS in
   script.d5c0a3f7.js. */
.carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

/* Drift profile — the auto-advance.  The near-linear head of this curve is
   what reads as a continuous marquee pan; the tail eases the photo to rest on
   the slide boundary.  Duration MUST match DRIFT_MS in script.d5c0a3f7.js. */
.carousel-track.is-drifting {
  transition-duration: 2600ms;
  transition-timing-function: cubic-bezier(0.33, 0, 0.15, 1);
}

/* Guests who ask for reduced motion get the short profile only; the JS also
   stops auto-advancing entirely, so the reel moves solely on their input. */
@media (prefers-reduced-motion: reduce) {
  .carousel-track.is-drifting {
    transition-duration: 0.45s;
    transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
  }
}

/* Desktop: 3 slides visible — each slide = 1/3 of .couple-carousel width */
.carousel-slide {
  min-width: calc(100% / 3);
  width: calc(100% / 3);
  height: 340px;
  overflow: hidden;
  flex-shrink: 0;
  padding: 0 6px;
  /* gap between images on desktop */
  box-sizing: border-box;
}

/* NOTE: no :first-child / :last-child padding overrides — the reel is cloned
   at both ends for the infinite loop, so those edges land mid-reel and would
   show as a missing gap.  Every slide keeps the same symmetric padding. */

.carousel-slide img {
  border-radius: 10px;
  /* rounds individual photos */
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* ── Prev / Next arrows — outside the image (flex siblings) ─────────── */
.carousel-btn {
  flex-shrink: 0;
  background: rgba(255, 248, 235, 0.85);
  border: 1px solid rgba(90, 10, 10, 0.18);
  color: #5a0a0a;
  font-size: 1.8rem;
  line-height: 1;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(90, 10, 10, 0.14);
  transition: background 0.18s, transform 0.15s;
  padding: 0;
}

.carousel-btn:hover {
  background: rgba(255, 248, 235, 1);
  transform: scale(1.08);
}

.carousel-btn:active {
  transform: scale(0.95);
}

/* ── Dot indicators — sit below the wrapper row ──────────────────────── */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 248, 235, 0.55);
  border: 1px solid rgba(90, 10, 10, 0.35);
  cursor: pointer;
  transition: background 0.22s, transform 0.22s;
}

.carousel-dot.active {
  background: #fff8eb;
  transform: scale(1.35);
}

/* ═══════════════════════════════════════════════════════════════════════
   Too few photos to scroll
   ───────────────────────────────────────────────────────────────────────
   The reel is built for 3 photos on desktop / 1 on mobile.  When the couple
   uploads fewer than that there is nothing to scroll to, so the arrows and
   dots are dead controls and the slides leave an empty gutter.  script.js
   tags .couple-gallery with:

     .is-static  — fewer photos than fit on screen: controls off, the photos
                   that exist share the full width instead of leaving a gap.
     .is-single  — exactly one photo: a centred framed portrait, not a reel.
   ═══════════════════════════════════════════════════════════════════════ */

.couple-gallery.is-static .carousel-btn,
.couple-gallery.is-static .carousel-dots {
  display: none;
}

/* Photos split the viewport evenly — no leftover third. */
.couple-gallery.is-static .carousel-slide {
  min-width: calc(100% / var(--visible-slides, 1));
  width: calc(100% / var(--visible-slides, 1));
}

/* ── Single photo — framed portrait ──────────────────────────────────── */
.couple-gallery.is-single .carousel-wrapper {
  justify-content: center;
  gap: 0;
}

/* Cream mat + thin maroon rule, echoing the invite card's frame. */
.couple-gallery.is-single .couple-carousel {
  flex: 0 0 auto;
  width: min(380px, 78vw);
  overflow: visible;
  padding: clamp(9px, 1.6vw, 15px);
  border-radius: 6px;
  background: #fdf6e7;
  border: 1px solid rgba(139, 26, 26, 0.30);
  box-shadow: 0 16px 44px rgba(90, 10, 10, 0.20);
  position: relative;
}

/* Inner hairline — the second line of the double frame. */
.couple-gallery.is-single .couple-carousel::after {
  content: '';
  position: absolute;
  inset: clamp(4px, 0.8vw, 7px);
  border: 1px solid rgba(139, 26, 26, 0.22);
  border-radius: 3px;
  pointer-events: none;
}

.couple-gallery.is-single .carousel-track {
  transition: none;
  transform: none !important;
}

/* The photo keeps its own proportions — nothing is cropped when it is the
   only one on the page. */
.couple-gallery.is-single .carousel-slide {
  min-width: 100%;
  width: 100%;
  height: auto;
  padding: 0;
}

.couple-gallery.is-single .carousel-slide img {
  height: auto;
  max-height: min(62vh, 560px);
  object-fit: contain;
  object-position: center;
  border-radius: 2px;
}

/* ── Mobile tweaks ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .meet-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .meet-story {
    font-size: clamp(0.88rem, 3.8vw, 1rem);
  }

  /* Mobile: left/right breathing room for all content */
  .meet-couple-inner {
    padding: 0 5vw;
    /* LINE 783: left/right padding on mobile */
  }

  /* Mobile: 1 slide visible, no side padding needed */
  .carousel-slide {
    min-width: 100%;
    width: 100%;
    height: 380px;
    padding: 0;
    /* override desktop gap padding */
  }

  .carousel-slide img {
    border-radius: 12px;
  }

  .couple-carousel {
    border-radius: 12px;
  }

  .carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 1.5rem;
  }

  .carousel-wrapper {
    gap: 8px;
  }

  .couple-gallery.is-single .couple-carousel {
    width: min(320px, 82vw);
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Instagram Section
   ═══════════════════════════════════════════════════════════════════════ */

.insta-section {
  width: calc(100% + 10vw);
  /* same full-bleed as meet-couple */
  margin-left: -5vw;
  background: url('assets/CreamBackground.webp') center / cover no-repeat;
  padding: 5vh 5vw 14vh;
  flex-shrink: 0;
}

.insta-inner {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.4vh;
}

/* ── Title ──────────────────────────────────────────────────────────── */
.insta-title {
  font-family: 'Klagin', serif;
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  letter-spacing: 0.16em;
  color: #5a0a0a;
  font-weight: normal;
  line-height: 1.2;
  padding-left: 0.16em;
}

/* ── Caption paragraph ──────────────────────────────────────────────── */
.insta-caption {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(0.86rem, 1.7vw, 1rem);
  color: #5a1010;
  line-height: 1.85;
  letter-spacing: 0.02em;
  max-width: 520px;
  font-style: italic;
  white-space: pre-line;
  /* preserves the \n line break in the fallback text */
}

/* ── Instagram icon link ─────────────────────────────────────────────── */
.insta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, filter 0.2s;
}

.insta-link:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 16px rgba(131, 58, 180, 0.45));
}

.insta-icon {
  width: clamp(48px, 12vw, 72px);
  height: clamp(48px, 12vw, 72px);
  object-fit: contain;
  display: block;
}

/* ── Hashtag capsule ─────────────────────────────────────────────────── */
.insta-hashtag-wrap {
  display: inline-flex;
}

.insta-hashtag {
  display: inline-block;
  background: #5a0a0a;
  color: #f9f4e2;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(0.9rem, 2.2vw, 1.1rem);
  letter-spacing: 0.08em;
  padding: 0.55em 1.6em;
  border-radius: 999px;
  /* full capsule shape */
  cursor: default;
  user-select: all;
  /* lets guests copy the hashtag easily */
}

/* ── Desktop tweak — prevent elephant overlap ──────────────────────────
   When there is no pre-wedding video, this section is the one the elephant
   stands on, so its bottom padding can never be shorter than the elephant's
   upper half. 22vh on a short window was not. */
@media (min-width: 641px) {
  .insta-section {
    padding-bottom: max(22vh, calc(var(--elephant-rise) + var(--elephant-clear)));
  }
}

/* ── Mobile tweaks ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .insta-section {
    /* extra breathing room before next section on small screens — never less
       than the elephant's upper half (see --elephant-rise) */
    padding-bottom: max(16vh, calc(var(--elephant-rise) + var(--elephant-clear)));
  }

  .insta-inner {
    padding: 0 5vw;
    /* same left/right breathing room as .meet-couple-inner */
  }

  .insta-title {
    font-size: clamp(1.8rem, 9vw, 2.8rem);
  }

  .insta-caption {
    font-size: clamp(0.86rem, 3.6vw, 1rem);
    padding: 0;
    /* outer .insta-inner padding handles the sides */
  }

  .insta-hashtag {
    font-size: clamp(0.88rem, 4vw, 1rem);
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Pre-wedding Video Section
   ═══════════════════════════════════════════════════════════════════════ */

.video-section {
  width: calc(100% + 10vw);
  margin-left: -5vw;
  background: url('assets/CreamBackground.webp') center / cover no-repeat;
  /* Desktop padding - change the last number to add/reduce space ABOVE the
     elephant; it can never drop below the elephant's upper half */
  padding: 5vh 5vw max(30vh, calc(var(--elephant-rise) + var(--elephant-clear)));
  flex-shrink: 0;
}

.video-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.4vh;
}

/* ── Title block ─────────────────────────────────────────────────────── */
.video-title {
  font-family: 'Klagin', serif;
  font-size: clamp(2.2rem, 5.8vw, 3.8rem);
  letter-spacing: 0.18em;
  color: #5a0a0a;
  font-weight: normal;
  line-height: 1.15;
  padding-left: 0.18em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2em;
}

.video-subtitle {
  font-family: 'Klagin', serif;
  font-size: clamp(0.82rem, 1.8vw, 1rem);
  letter-spacing: 0.22em;
  color: #8b1a1a;
  font-style: italic;
  font-weight: normal;
  text-transform: none;
}

/* ── Caption ─────────────────────────────────────────────────────────── */
.video-caption {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(0.86rem, 1.7vw, 1rem);
  color: #5a1010;
  line-height: 1.9;
  letter-spacing: 0.02em;
  font-style: italic;
  max-width: 560px;
}

/* ── Iframe embed (replaces thumbnail card in Handlebars mode) ──────── */
.video-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 44px rgba(90, 10, 10, 0.22);
}

.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Thumbnail play card ───────────────────────────────────────────── */
.video-thumb-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 44px rgba(90, 10, 10, 0.22);
  text-decoration: none;
  cursor: pointer;
}

.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.video-thumb-card:hover .video-thumb-img {
  transform: scale(1.04);
  filter: brightness(0.75);
}

/* YouTube-style play button */
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(54px, 14vw, 80px);
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0.9;
}

.video-thumb-card:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.12);
  opacity: 1;
}

/* "Watch on YouTube" label appears on hover */
.video-watch-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px;
  background: linear-gradient(to top, rgba(90, 10, 10, 0.72) 0%, transparent 100%);
  color: #fff8eb;
  font-family: 'Georgia', serif;
  font-size: clamp(0.72rem, 1.8vw, 0.88rem);
  letter-spacing: 0.12em;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.video-thumb-card:hover .video-watch-label {
  opacity: 1;
}

/* ── Mobile tweaks ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .video-inner {
    padding: 0 5vw;
  }

  .video-title {
    font-size: clamp(1.9rem, 9.5vw, 2.8rem);
  }

  .video-subtitle {
    font-size: clamp(0.78rem, 3.2vw, 0.9rem);
  }

  .video-caption {
    font-size: clamp(0.84rem, 3.6vw, 1rem);
  }

  .video-thumb-card {
    border-radius: 10px;
  }

  /* Show the watch label on mobile (no hover) */
  .video-watch-label {
    opacity: 1;
  }

  /* Mobile: Space ABOVE elephant (reduces the desktop padding) */
  .video-section {
    padding-bottom: max(18vh, calc(var(--elephant-rise) + var(--elephant-clear)));
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Elephant Divider
   ═══════════════════════════════════════════════════════════════════════ */

.elephant-divider {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 5;
  /* This forces the container to take ZERO space, so the Cream and Maroon backgrounds touch seamlessly */
  height: 0;
  min-height: 0;
  overflow: visible;
}

.elephant-img {
  width: var(--elephant-size);
  height: auto;
  object-fit: contain;
  /* Start: off-screen left and tiny — animates to center full size on scroll */
  transform: translateX(60vw) translateY(-20%) scale(0.12);
  opacity: 0;
  transition: transform 2.2s cubic-bezier(0.34, 1.1, 0.64, 1), opacity 0.62s ease;
  will-change: transform, opacity;
}

.elephant-img.elephant-visible {
  transform: translateX(0) translateY(-20%) scale(1);
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════
   Countdown Section
   ═══════════════════════════════════════════════════════════════════════ */

.countdown-section {
  width: calc(100% + 10vw);
  margin-left: -5vw;
  background: url('assets/MaroonBackground.webp') center / cover no-repeat;
  /* Desktop padding - change the first number to add/reduce space BELOW the
     elephant; it can never drop below the elephant's lower half */
  padding: max(18vh, calc(var(--elephant-drop) + var(--elephant-clear))) 5vw 12vh;
  margin-top: -2px;
  /* Prevent rounding gaps */
  flex-shrink: 0;
  text-align: center;
}

.countdown-inner {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-sub {
  font-family: 'Klagin', serif;
  /* Matching sub/title font styles from other sections contextually */
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  letter-spacing: 0.2em;
  color: #dfcd97;
  text-transform: uppercase;
}

.countdown-title {
  font-family: 'Klagin', serif;
  font-size: clamp(2rem, 6vw, 3.8rem);
  letter-spacing: 0.12em;
  color: #f9f4e2;
  font-weight: normal;
  line-height: 1.2;
}

.countdown-date {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(1.2rem, 3.5vw, 1.8rem);
  letter-spacing: 0.08em;
  color: #dfcd97;
  margin-top: 1.5vh;
  margin-bottom: 4vh;
}

.countdown-timer {
  display: flex;
  gap: clamp(10px, 3vw, 20px);
  justify-content: center;
}

.countdown-box {
  background: #f9f4e2;
  color: #5a0a0a;
  border-radius: 12px;
  width: clamp(65px, 18vw, 90px);
  padding: 15px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.countdown-val {
  font-family: 'Klagin', serif;
  font-size: clamp(1.8rem, 6vw, 2.7rem);
  line-height: 1;
}

.countdown-lbl {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(0.7rem, 2.2vw, 0.95rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 8px;
  opacity: 0.8;
}

/* ── Mobile tweaks ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .countdown-inner {
    padding: 0 5vw;
  }

  .countdown-box {
    padding: 10px 2px;
    border-radius: 10px;
    width: clamp(60px, 20vw, 80px);
  }

  .countdown-lbl {
    margin-top: 4px;
  }

  /* Mobile: Space BELOW elephant (reduces the desktop padding) */
  .countdown-section {
    padding-top: max(8vh, calc(var(--elephant-drop) + var(--elephant-clear)));
  }

  /* Mobile: Elephant size and positioning.  The lift is 25% here, so the
     rise / drop split differs from the desktop one. */
  :root {
    --elephant-size: 140px;
    --elephant-rise: calc(var(--elephant-size) * 0.75);
    --elephant-drop: calc(var(--elephant-size) * 0.25);
  }

  .elephant-img {
    transform: translateX(60vw) translateY(-25%) scale(0.12);
  }

  .elephant-img.elephant-visible {
    transform: translateX(0) translateY(-25%) scale(1);
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Things to Know Section
   ═══════════════════════════════════════════════════════════════════════ */

.things-inner {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 8vh;
  /* Spacing between countdown and things to know */
}

.things-divider {
  margin-bottom: 3vh;
  opacity: 0.6;
}

.things-title {
  font-family: 'Klagin', serif;
  font-size: clamp(2rem, 6vw, 3.8rem);
  letter-spacing: 0.05em;
  color: #f9f4e2;
  font-weight: normal;
  line-height: 1.2;
  margin-bottom: 4vh;
  text-align: center;
}

.things-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.thing-card {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  /* Frosted glass effect */
  border-radius: 16px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.thing-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #f9f4e2;
  background: rgba(255, 255, 255, 0.05);
}

.thing-icon svg {
  width: 22px;
  height: 22px;
}

.thing-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.thing-sub {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(0.7rem, 2vw, 0.85rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 248, 235, 0.85);
  /* Slightly muted off-white */
}

.thing-val {
  font-family: 'Klagin', serif;
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  color: #f9f4e2;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.thing-italic {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  letter-spacing: 0.03em;
}

.thing-desc {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(0.8rem, 2.2vw, 0.95rem);
  color: rgba(255, 248, 235, 0.9);
}

/* ── Mobile tweaks ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .things-inner {
    padding: 0 5vw;
    box-sizing: border-box;
  }

  .thing-card {
    padding: 16px 20px;
    gap: 15px;
  }

  .thing-icon {
    width: 44px;
    height: 44px;
  }

  .thing-icon svg {
    width: 18px;
    height: 18px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Music Button — fixed bottom-right, always on top
   ═══════════════════════════════════════════════════════════════════════ */

.music-btn {
  position: fixed;
  bottom: 22px;
  right: 20px;
  z-index: 9999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(249, 244, 226, 0.92);
  border: 1.5px solid rgba(90, 10, 10, 0.28);
  color: #5a0a0a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}

.music-btn:hover {
  transform: scale(1.1);
  background: #fff8eb;
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.28);
}

.music-btn:active {
  transform: scale(0.93);
}

.music-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Gentle breathing pulse ring when music is playing */
.music-btn.is-playing::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid rgba(90, 10, 10, 0.28);
  animation: musicRing 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes musicRing {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* Playing muted until first tap — optional visual hint (title also set in JS) */
.music-btn.music-awaiting-unmute {
  animation: musicUnmuteHint 1.8s ease-in-out infinite;
}

@keyframes musicUnmuteHint {
  0%,
  100% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22), 0 0 0 0 rgba(90, 10, 10, 0.35);
  }
  50% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22), 0 0 0 12px rgba(90, 10, 10, 0);
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   RSVP Section
   ═══════════════════════════════════════════════════════════════════════ */

.rsvp-section {
  width: calc(100% + 10vw);
  margin-left: -5vw;
  background: #FFFFFF;
  padding: 12vh 5vw 4vh;
  margin-top: -2px;
  /* Prevent rounding gaps exactly like the maroon section */
  flex-shrink: 0;
  text-align: center;
}

.rsvp-inner {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rsvp-sub {
  font-family: 'Klagin', serif;
  font-size: clamp(0.82rem, 1.8vw, 1rem);
  letter-spacing: 0.22em;
  color: #8b1a1a;
  font-style: italic;
  font-weight: normal;
  text-transform: none;
  margin-bottom: 2vh;
}

.rsvp-title {
  font-family: 'Klagin', serif;
  font-size: clamp(2.2rem, 5.8vw, 3.8rem);
  letter-spacing: 0.12em;
  color: #5a0a0a;
  font-weight: normal;
  line-height: 1.15;
  margin-bottom: 2vh;
}

.rsvp-text {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: #5a0a0a;
  line-height: 1.5;
  opacity: 0.9;
  margin-bottom: 6vh;
}

.rsvp-action-area {
  width: 100%;
  max-width: 400px;
}

.rsvp-buttons {
  display: flex;
  gap: 16px;
  width: 100%;
}

.rsvp-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 30px;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(0.9rem, 2vw, 1rem);
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #5a0a0a;
  background: #5a0a0a;
  color: #f9f4e2;
}

.rsvp-btn.rsvp-no {
  background: transparent;
  color: #5a0a0a;
}

.rsvp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(90, 10, 10, 0.15);
}

.rsvp-btn.rsvp-no:hover {
  background: rgba(90, 10, 10, 0.05);
}

/* ── RSVP Form ───────────────────────────────────────────────────────── */
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
  animation: rsvpFadeIn 0.5s ease;
}

@keyframes rsvpFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rsvp-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(90, 10, 10, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #5a0a0a;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.rsvp-input::placeholder {
  color: rgba(90, 10, 10, 0.5);
}

.rsvp-input:focus {
  outline: none;
  border-color: #8b1a1a;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(139, 26, 26, 0.1);
}

.rsvp-row {
  display: flex;
  gap: 14px;
}

.rsvp-textarea {
  min-height: 100px;
  resize: vertical;
  font-family: 'Inter', sans-serif;
}

.rsvp-submit {
  padding: 16px;
  border-radius: 8px;
  background: #5a0a0a;
  color: #f9f4e2;
  border: none;
  font-family: 'Klagin', serif;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  margin-top: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rsvp-submit:hover {
  background: #8b1a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(90, 10, 10, 0.2);
}

.rsvp-thank-you {
  font-family: 'Klagin', serif;
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: #5a0a0a;
  line-height: 1.4;
  animation: rsvpFadeIn 0.5s ease;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  border: 1px dashed rgba(90, 10, 10, 0.2);
}

.rsvp-miss {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  margin-top: 10px;
  color: #8b1a1a;
}

.rsvp-functions-label {
  font-family: 'Klagin', serif;
  font-size: 1.2rem;
  color: #5a0a0a;
  margin-top: 10px;
  margin-bottom: 8px;
  text-align: left;
}

.rsvp-checkboxes-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.rsvp-checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 0.95rem;
  color: #5a0a0a;
}

.rsvp-checkbox-label input {
  display: none;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(90, 10, 10, 0.4);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.rsvp-checkbox-label input:checked+.custom-checkbox {
  background: #5a0a0a;
  border-color: #5a0a0a;
}

.rsvp-checkbox-label input:checked+.custom-checkbox::after {
  content: '✓';
  color: #f9f4e2;
  font-size: 14px;
}

.rsvp-checkbox-label:hover .custom-checkbox {
  border-color: #5a0a0a;
}

/* Mobile */
@media (max-width: 640px) {
  .rsvp-inner {
    padding: 0 5vw;
    box-sizing: border-box;
  }

  .rsvp-buttons {
    flex-direction: column;
  }

  .rsvp-row {
    flex-direction: column;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Wishes Section (Inherits RSVP Styles)
   ═══════════════════════════════════════════════════════════════════════ */

.wishes-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}

/* ── Wish wall — rotating 2×2 grid (desktop) / 1-col 3-card (mobile) ── */
.wish-wall {
  margin-top: 4vh;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  align-items: start;
}

/* Individual wish card */
.aamantran-wish {
  position: relative;
  background: rgba(255, 252, 245, 0.92);
  border: 1px solid rgba(180, 140, 80, 0.22);
  border-radius: 12px;
  padding: 22px 18px 16px;
  box-shadow: 0 2px 12px rgba(120, 70, 20, 0.07);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Decorative opening quote */
.aamantran-wish::before {
  content: '\201C';
  font-family: Georgia, serif;
  font-size: 3.2rem;
  line-height: 1;
  color: #c9956b;
  opacity: 0.55;
  position: absolute;
  top: 6px;
  left: 12px;
}

.aamantran-wish-message {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(0.78rem, 1.5vw, 0.92rem);
  color: #5a0a0a;
  line-height: 1.65;
  margin: 0;
  padding-top: 18px;
  word-break: break-word;
}

.aamantran-wish-author {
  font-family: 'Klagin', serif;
  font-style: italic;
  font-size: clamp(0.7rem, 1.3vw, 0.82rem);
  color: #9a6a2a;
  letter-spacing: 0.04em;
  align-self: flex-end;
}

/* Fade states for rotation */
.aamantran-wish {
  animation: wishFadeIn 0.4s ease both;
}

@keyframes wishFadeIn {
  from { opacity: 0; transform: scale(0.97) translateY(6px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);   }
}

.aamantran-wish.wish-out {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}

.aamantran-wish.wish-hidden {
  display: none;
}

.wishes-status-text {
  font-family: 'Inter', sans-serif;
  color: #5a0a0a;
  margin-top: 10px;
}

/* ── Mobile: single column, 3 cards ─────────────────────────────────── */
@media (max-width: 640px) {
  .wish-wall {
    grid-template-columns: 1fr;
  }
  .aamantran-wish-message {
    font-size: clamp(0.82rem, 3.8vw, 0.95rem);
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Footer / Ending
   ═══════════════════════════════════════════════════════════════════════ */

.footer-ending {
  margin-top: 8vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.ending-img {
  width: clamp(450px, 15vw, 750px);
  height: auto;
  object-fit: contain;
}

.watermark {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: rgba(90, 10, 10, 0.7);
  letter-spacing: 0.05em;
  margin-bottom: 2vh;
}

.watermark a {
  color: #8b1a1a;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dotted rgba(139, 26, 26, 0.5);
  transition: all 0.2s ease;
}

.watermark a:hover {
  color: #5a0a0a;
  border-bottom-style: solid;
}


/* ── RSVP Field Labels ────────────────────────────────────────────────── */
.rsvp-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}

.rsvp-field-label {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 0.95rem;
  color: #8b1a1a;
  padding-left: 4px;
}