/* =========================================================
  Osama & Mashal — Wedding Invitation
   ========================================================= */

/* ---------- Local fonts (self-hosted, no external CDN) ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/CormorantGaramond-400-italic.woff2") format("woff2");
}
/* Bodoni Moda italic, for the couple's names only: a variable font (weight
   and optical size) under the SIL Open Font License */
@font-face {
  font-family: "Bodoni Moda";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/BodoniModa-italic.woff2") format("woff2");
}
/* Cormorant, Dancing Script and Playfair are variable fonts: one file each
   covers every weight the page uses (the copies saved per weight were the
   same file, downloaded again under each name) */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/CormorantGaramond-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Dancing Script";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/DancingScript-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/GreatVibes-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Italianno";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Italianno-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/PlayfairDisplay-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/PlayfairDisplay-400-normal.woff2") format("woff2");
}

/* ---------- Design tokens ---------- */
:root {
  --primary: #b08d57;
  --primary-dark: #8f6f3f;
  --primary-foreground: #fff9ef;
  --background: #f4ebdd;
  --foreground: #171717;
  --card: #e8ddca;
  --muted-foreground: #5c564d;
  --cream: #f1e7d7;
  --gold: #b08d57;
  --gold-light: #d6b978;
  --gold-dark: #8f6f3f;
  --border: #d3c1a2;
  --slate: #0b1726;

  --font-script: "Great Vibes", "Dancing Script", cursive;
  --font-message: "Italianno", "Dancing Script", cursive;
  --font-body: "Cormorant Garamond", serif;
  --font-display: "Playfair Display", serif;

  --shell-width: 460px;
  --shadow-elegant: 0 18px 45px -12px rgba(59, 22, 30, 0.35);
  --shadow-gold: 0 10px 28px -8px rgba(201, 161, 90, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  /* one-finger panning only: no pinch or double-tap zoom (the viewport tag
     already asks for this; this rule covers browsers that ignore it) */
  touch-action: pan-x pan-y;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--foreground);
  background: radial-gradient(
    circle at 50% 0%,
    #2a1620 0%,
    #150b10 55%,
    #0c0709 100%
  );
  overflow-x: hidden;
}
body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

button {
  font-family: inherit;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}

/* ---------- Mobile invitation canvas ---------- */
.invitation-shell {
  position: relative;
  width: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--background);
  overflow-x: hidden;
  /* clip (unlike hidden) doesn't make the shell a scroll container, so
     position: sticky inside the wedding film still pins to the viewport */
  overflow-x: clip;
  box-shadow: var(--shadow-elegant);
  isolation: isolate;
}

@media (min-width: 640px) {
  body {
    padding: 32px 16px;
  }
  .invitation-shell {
    min-height: calc(100vh - 64px);
    border-radius: 22px;
    overflow: hidden;
    overflow: clip;
  }
}

/* subtle full-canvas texture, matches original quatrefoil overlay */
.invitation-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a15a' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.invitation-shell > * {
  position: relative;
  z-index: 1;
}

/* ---------- Envelope opening screen ---------- */
#envelope-screen {
  position: absolute;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  cursor: pointer;
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}
/* TAP TO OPEN: small white capitals on a faint navy backing with a gold
   hairline. The envelope on this screen is the intro video's first frame
   (9:16), filling the one-screen #intro-video-layer behind it (object-fit:
   cover, 100vh tall, as wide as the shell). The hint is placed on that frame,
   centred 73.5% of the way down, in the plain blue between the floral sprays
   just above the minarets. --hv is the frame's rendered height: the screen
   height, or more when the shell is wide enough that cover trims the top and
   bottom; (100vh - --hv) / 2 is where the frame's top lands. */
#envelope-screen .envelope-hint {
  --hv: max(100vh, calc(min(100vw, var(--shell-width)) * 16 / 9));
  position: absolute;
  left: 50%;
  top: calc((100vh - var(--hv)) / 2 + var(--hv) * 0.735 - 13px);
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  background: rgba(11, 23, 38, 0.6);
  border: 1px solid rgba(214, 185, 120, 0.45);
  padding: 7px 14px 7px 18px; /* the letter-spacing trails the last letter */
  border-radius: 999px;
  animation: pulse-hint 2.2s ease-in-out infinite;
}
@keyframes pulse-hint {
  0%,
  100% {
    opacity: 0.65;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
  }
}
#envelope-screen.is-opening {
  opacity: 0;
  transform: scale(1.08);
  pointer-events: none;
}
#envelope-screen.is-closed {
  display: none;
}

/* ---------- Intro / hero video sequence ---------- */
#intro-video-layer {
  /* #intro-video-layer is a sibling of #main-content inside .invitation-shell,
     and .invitation-shell's height is the FULL stacked page (every section
     below the hero contributes to it even while #main-content is opacity:0).
     inset:0 was therefore stretching this layer to the whole page height
     instead of one screen, which is why object-fit:cover "zoomed" the video.
     #hero avoids this because it pins its own box to min-height:100vh and
     .hero-video-layer sizes against #hero, not the whole shell — so we pin
     this layer's height the same explicit way, to match #hero exactly. */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  z-index: 90;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.9s ease;
}
#intro-video-layer.is-hidden {
  opacity: 0;
  pointer-events: none;
}
#intro-video-layer.is-closed {
  display: none;
}
#intro-video {
  /* percentage height on a normal (non-absolutely-positioned) <video> child
     is unreliable here, which is what left the black gap at the bottom;
     positioning the video itself with inset:0 sizes it directly from the
     layer's box, the same reliable technique used for the envelope art
     and hero video. */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-video-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero-video-layer.is-active {
  opacity: 1;
}
.hero-video-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease;
  filter: blur(6px);
  transform: scale(1.18);
  animation: heroVideoSettle 3.2s ease-out forwards;
}
.hero-video-el.is-active {
  opacity: 1;
}
.hero-video-layer.is-active .hero-video-el {
  animation:
    heroVideoSettle 3.2s ease-out forwards,
    heroVideoDrift 20s ease-in-out 3.2s infinite alternate;
}
@keyframes heroVideoSettle {
  0% {
    filter: blur(6px);
    transform: scale(1.18);
  }
  100% {
    filter: blur(0);
    transform: scale(1.06);
  }
}
@keyframes heroVideoDrift {
  0% {
    transform: scale(1.06) translate(0, 0);
  }
  100% {
    transform: scale(1.12) translate(0, -1.5%);
  }
}
#hero .hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.15) 45%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

/* ---------- Main content ---------- */
#main-content {
  opacity: 0;
  transition: opacity 1s ease;
}
#main-content.is-visible {
  opacity: 1;
}

section {
  position: relative;
  padding: 64px 24px;
  overflow: hidden;
}
.cream-bg {
  background: var(--cream);
}

.section-heading {
  font-family: var(--font-script);
  font-size: 2.1rem;
  text-align: center;
  color: var(--primary);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.section-heading svg {
  width: 22px;
  height: 22px;
  stroke: var(--primary);
  flex-shrink: 0;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 28px;
  max-width: 220px;
}
.divider .line {
  flex: 1;
  height: 1px;
  background: rgba(176, 141, 87, 0.35);
}
.divider svg {
  width: 16px;
  height: 16px;
  fill: var(--primary);
  flex-shrink: 0;
}

/* ---------- Hero ---------- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  background:
    radial-gradient(
      ellipse at 50% -10%,
      rgba(201, 161, 90, 0.35),
      transparent 60%
    ),
    linear-gradient(160deg, #3b1420 0%, #5c1f30 35%, #7a2a41 60%, #3b1420 100%);
  color: var(--primary-foreground);
  overflow: hidden;
}
#hero .hero-inner {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(30px);
  filter: blur(8px);
  transition:
    opacity 1.1s ease,
    transform 1.1s ease,
    filter 1.1s ease;
}
#hero.is-revealed .hero-inner {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.hero-heart {
  width: 42px;
  height: 42px;
  margin: 0 auto 18px;
  color: #c98a98;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.8s ease 0.15s,
    transform 0.8s ease 0.15s;
}
#hero.is-revealed .hero-heart {
  opacity: 1;
  transform: scale(1);
  animation: heartbeat 2.6s ease-in-out 1s infinite;
}
@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

.hero-message {
  font-family: var(--font-message);
  font-size: 26px;
  line-height: 1.3;
  white-space: pre-line;
  color: #f8efec;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  margin: 0 0 20px;
  margin-right: 20px;
  margin-left: 20px;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.8s ease 0.35s,
    transform 0.8s ease 0.35s;
}
#hero.is-revealed .hero-message {
  opacity: 1;
  transform: none;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 22px;
  max-width: 180px;
}
.hero-divider .line {
  flex: 1;
  height: 1px;
  background: rgba(245, 230, 224, 0.45);
}
.hero-divider svg {
  width: 14px;
  height: 14px;
  fill: rgba(245, 230, 224, 0.8);
}

.couple-name {
  /* a Didone italic at its display optical size: hairline contrast */
  font-family: "Bodoni Moda", "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 600;
  font-variation-settings: "opsz" 96;
  font-size: clamp(2.5rem, 11vw, 4rem);
  line-height: 1;
  color: #f5e6e0;
  margin: 0;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s ease 0.55s,
    transform 0.8s ease 0.55s;
}
#hero.is-revealed .couple-name {
  opacity: 1;
  transform: none;
}
#hero.is-revealed .couple-name.bride {
  transition-delay: 0.85s;
}

.couple-subtext {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.35;
  white-space: pre-line;
  color: #ffffff;
  margin: 6px 0 0;
}

.couple-amp {
  font-family: var(--font-script);
  font-size: 2rem;
  color: rgba(245, 230, 224, 0.85);
  margin: 10px 0;
  opacity: 0;
  transition: opacity 0.8s ease 0.7s;
}
#hero.is-revealed .couple-amp {
  opacity: 1;
}

.scroll-cue {
  margin-top: 38px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(245, 230, 224, 0.7);
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 1s ease 1.1s;
}
#hero.is-revealed .scroll-cue {
  opacity: 1;
}
.scroll-cue svg {
  width: 16px;
  height: 16px;
  animation: bob 1.8s ease-in-out infinite;
}
/* scroll cue for the whole film: fixed near the left edge (inside the
   invitation column), it appears 3 s after the hero does and keeps rising -
   emerging from below, growing a little, then shrinking away above - every
   1.6 s while the reader is anywhere in the film. Past the film's last frame
   it fades out (js: initSwipeHint toggles .is-past) and returns on the way
   back up. It never takes a touch. */
.swipe-hint {
  position: fixed;
  left: calc(
    (100vw - min(100vw, var(--shell-width))) / 2 + 12px +
      env(safe-area-inset-left, 0px)
  );
  top: 80%;
  z-index: 30;
  margin-top: -70px;
  height: 140px;
  color: #d5a982;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
#main-content.is-visible .swipe-hint {
  opacity: 1;
  transition-delay: 4s;
}
#main-content .swipe-hint.is-past {
  opacity: 0;
  transition-delay: 0s;
}
/* after its first appearance it comes back without the 3 s wait */
#main-content.is-visible .swipe-hint.is-seen {
  transition-delay: 0s;
}
#main-content .swipe-hint.is-seen.is-past {
  opacity: 0;
}
.swipe-hint__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 0 8px rgba(0, 0, 0, 0.35);
  will-change: transform, opacity;
  animation: swipe-hint-rise 3s cubic-bezier(0.45, 0, 0.85, 1) infinite;
}
/* the label runs up the edge beside the arrow, so the cue stays narrow */
.swipe-hint span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.swipe-hint svg {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
@keyframes swipe-hint-rise {
  0% {
    opacity: 0;
    transform: translateY(70px) scale(0.86);
  }
  25% {
    opacity: 1;
  }
  55% {
    opacity: 1;
    transform: translateY(0) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: translateY(-70px) scale(0.8);
  }
}
@media (prefers-reduced-motion: reduce) {
  .swipe-hint__inner {
    animation: none;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* ---------- Wedding film: scroll-controlled video segments ---------- */
/* Scrolling through the section scrubs the clip (js/script.js); the stage
   inside pins to the viewport using the shared .film-stage rule below. */
.film-segment {
  height: 450vh; /* 3 screens of animation + the half-screen joined overlap */
  padding: 0;
  overflow: visible;
  background: var(--slate);
}
.film-video,
.film-canvas,
.film-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
/* the keyframe holds until the clip has a frame ready to take over */
.film-poster {
  transition: opacity 0.35s ease;
}
.film-segment.is-playing .film-poster {
  opacity: 0;
}
/* when frames are cached, the video only plays once off screen to capture
   them — the canvas shows the film */
.film-segment.uses-frames .film-video {
  opacity: 0;
}
/* a segment that carries straight on from the one before overlaps its last
   screen and only appears once it pins, so the hand-off is a clean cut
   between matching frames rather than one frame scrolling over another */
/* The overlap is one and a half stage heights: the joined stage pins half a
   screen before the previous one unpins. The previous section finishes its
   animation at that moment (filmTravel in js/script.js) and stays pinned on
   its last frame underneath, so even if the joined stage shows a frame late
   there is only the matching frame behind it — never page background, and
   never the previous stage visibly sliding away. */
.film-segment--joined {
  margin-top: -150vh;
  margin-top: -150lvh;
  background: transparent;
}
.film-segment--joined .film-stage {
  visibility: hidden;
}
.film-segment--joined.is-reached .film-stage {
  visibility: visible;
}
/* while part of a clip isn't captured yet, the clip's own video is shown
   (sought to the scroll position) instead of the canvas */
.film-segment.uses-frames.shows-video .film-video {
  opacity: 1;
}
.film-segment.shows-video .film-canvas {
  opacity: 0;
}
/* the hidden copy a clip is captured from sits in a tiny on-screen spot, so
   mobile browsers don't pause it as off-screen. It must stay on top of the
   page: a fully covered video stops updating its picture. */
.film-capture-video {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 2px;
  height: 2px;
  opacity: 0.01;
  pointer-events: none;
  z-index: 2147483647;
}

/* ---------- Wedding film: captions ---------- */
/* Scroll drives each caption's fade (js/script.js, initFilmCaptions); they
   sit inside the pinned stage, above the footage, and pin and hand off with
   it. No boxes: legibility comes from a soft shadow only. */
.film-captions {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.film-caption {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  margin: 0;
  opacity: 0;
  transform: translate(var(--tx, -50%), var(--rise, 0px));
  will-change: opacity, transform;
  color: #f6eedf;
  /* light lettering: a hairline stroke in the letter's own colour fills the
     strokes out a little, and the black outline sits just outside it */
  -webkit-text-stroke: 0.35px currentColor;
  --caption-outline:
    0 0 1px rgba(0, 0, 0, 0.9), 0.8px 0.8px 0 rgba(0, 0, 0, 0.6),
    -0.8px 0.8px 0 rgba(0, 0, 0, 0.6), 0.8px -0.8px 0 rgba(0, 0, 0, 0.6),
    -0.8px -0.8px 0 rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.45),
    0 4px 16px rgba(0, 0, 0, 0.35);
  text-shadow: var(--caption-outline);
}
.film-caption--left {
  --tx: 0px;
  text-align: left;
}
.film-caption--center {
  width: calc(100% - 32px);
  max-width: 360px;
  text-align: center;
}
.film-caption__sub {
  display: block;
  margin-top: 8px;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #f6eedf;
}
/* a poetic line */
.film-caption--line {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(22px, 6.1vw, 26px);
  line-height: 1.35;
  letter-spacing: 0.01em;
  padding-top: 144px;
}
/* OSAMA: spaced capitals that draw together as they appear */
.film-caption--name {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(26px, 7.4vw, 32px);
  line-height: 1;
  letter-spacing: calc(0.3em + var(--track, 0em));
  color: #532013;
  -webkit-text-stroke: 0;
  text-shadow:
    0 0 2px rgba(255, 248, 236, 0.6),
    0 0 16px rgba(255, 248, 236, 0.5);
}
/* Mashal: the script, a counterpart to the capitals */
.film-caption--script {
  font-family: var(--font-script);
  font-size: clamp(38px, 10.5vw, 44px);
  line-height: 1;
  color: #532013;
  -webkit-text-stroke: 0;
  text-shadow:
    0 0 2px rgba(255, 248, 236, 0.6),
    0 0 16px rgba(255, 248, 236, 0.5);
  white-space: nowrap;
  /* the script's capital M sweeps far left of its letter box: keep it on screen */
  padding-left: 0.35em;
}
.film-caption--script .film-caption__sub {
  margin-top: -2px; /* the script's deep descent leaves a gap: draw the line in */
  padding-left: 0.9em;
}
/* "the groom" / "the bride" stay at their tuned size, in outlined ivory */
.film-caption--name .film-caption__sub,
.film-caption--script .film-caption__sub {
  font-size: 19px;
  -webkit-text-stroke: 0.35px currentColor;
  text-shadow: var(--caption-outline);
}
/* Osama & Mashal over the aerial: small, widely spaced capitals */
.film-caption--caps {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #7792cc;
  padding-top: 144px;
}
/* a fine gold hairline that draws out from the centre with the caption */
.film-caption--rule::after {
  content: "";
  display: block;
  width: 64px;
  height: 1.5px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, transparent, #c78244, transparent);
  transform: scaleX(var(--a, 0));
}
/* a line that widens as the camera pulls away (--spread, 0 → 1 with scroll),
   its hairline reaching out toward the destination */
.film-caption--spread {
  letter-spacing: calc(0.02em + var(--spread, 0) * 0.12em);
}
.film-caption--spread.film-caption--rule::after {
  width: 120px;
  transform: scaleX(calc(var(--a, 0) * (0.35 + var(--spread, 0) * 0.65)));
}
/* Qubool hai: the vow */
.film-caption--vow {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(30px, 8.5vw, 36px);
  line-height: 1.1;
}
.film-caption--vow .film-caption__sub {
  /* "I accept" answers a beat after the vow: it begins once "Qubool hai" is
     half shown (--a, the caption's fade from js) and leaves just ahead of it */
  opacity: clamp(0, calc(var(--a, 1) * 2 - 1), 1);
  margin-top: 6px;
  font-style: normal;
  font-size: 14px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
/* over the bright ivory silk: warm ivory letters held by a fine dark outline
   (four hairline shadows) and a soft dark halo — still no box */
.film-caption--on-silk {
  color: #fff7ea;
  font-size: clamp(24px, 6.7vw, 28px);
  text-shadow:
    0 0 1px rgba(28, 20, 12, 0.95),
    0.6px 0.6px 0 rgba(28, 20, 12, 0.7),
    -0.6px 0.6px 0 rgba(28, 20, 12, 0.7),
    0.6px -0.6px 0 rgba(28, 20, 12, 0.7),
    -0.6px -0.6px 0 rgba(28, 20, 12, 0.7),
    0 2px 12px rgba(20, 14, 8, 0.55);
}
/* Qubool hai, over the light screen between the couple: large deep-wine
   letters (the only dark, saturated colour in the frame), held off the
   bright lattice by a faint ivory halo; "I accept" small and quieter below */
.film-caption--on-divider {
  font-size: clamp(42px, 12vw, 52px);
  color: #5b1a2a;
  -webkit-text-stroke: 0;
  text-shadow:
    0 0 1px rgba(255, 250, 240, 0.9),
    0 0 14px rgba(255, 248, 236, 0.85);
}
.film-caption--on-divider .film-caption__sub {
  margin-top: 8px;
  font-size: 15px;
  letter-spacing: 0.3em;
  color: rgba(91, 26, 42, 0.85);
  text-shadow: 0 0 10px rgba(255, 248, 236, 0.95);
}

/* every film stage pins to the screen while its section scrolls */
.film-stage {
  position: sticky;
  top: 0;
  /* the large viewport (address bar collapsed) is never shorter than what's
     visible, so no strip of page shows below the frame as the bar slides away;
     its fixed height also means the frame never resizes mid-scroll */
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
  background: var(--slate);
}
/* a joined stage has no backdrop of its own: in the instant it takes over,
   before its first frame is drawn, the stage before it (still pinned beneath,
   holding the matching last frame) shows through instead of a dark flash */
.film-segment--joined .film-stage {
  background: transparent;
}

/* ---------- Welcome band ---------- */
/* carries on out of the film's last frame (the Mehndi: near-black at its
   foot, emerald velvet, brass and candlelight) and comes to rest exactly on
   the cream of the section below */
#welcome {
  background: linear-gradient(
    180deg,
    #0a100d 0%,
    #10261f 22%,
    #2a1d10 46%,
    var(--gold-dark) 78%,
    var(--cream) 100%
  );
  padding: 88px 28px;
  text-align: center;
}
#welcome .divider .line {
  background: rgba(201, 138, 152, 0.6);
}
#welcome .divider svg {
  fill: #c98a98;
}
.welcome-text {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 19px;
  line-height: 1.6;
  color: #fbe6ea;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  max-width: 340px;
  margin: 0 auto;
}

/* scroll reveal (generic) */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
[data-reveal="left"] {
  transform: translateX(-24px);
}
[data-reveal="left"].is-visible {
  transform: none;
}
[data-reveal="up-sm"] {
  transform: translateY(22px);
}
[data-reveal="up-sm"].is-visible {
  transform: none;
}
[data-reveal="pop"] {
  transform: scale(0.9);
}
[data-reveal="pop"].is-visible {
  transform: none;
}

/* ---------- Scratch to reveal ---------- */
#scratch {
  text-align: center;
}
.scratch-wrap {
  position: relative;
  width: clamp(200px, 62vw, 260px);
  aspect-ratio: 260 / 240;
  margin: 0 auto 26px;
  filter: drop-shadow(0 10px 18px rgba(70, 20, 35, 0.35));
}
.scratch-heart-clip {
  width: 0;
  height: 0;
  position: absolute;
}
.scratch-reveal-content {
  position: absolute;
  inset: 0;
  clip-path: url(#royal-heart-clip);
  background:
    radial-gradient(
      circle at 30% 25%,
      rgba(255, 255, 255, 0.55),
      transparent 55%
    ),
    radial-gradient(circle at 70% 80%, rgba(20, 8, 0, 0.35), transparent 60%),
    var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.scratch-reveal-content .reveal-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: break-word;
}
.scratch-reveal-content .invited {
  font-family: var(--font-body);
  font-style: italic;
  color: #913041;
  font-size: clamp(10px, 6.2vw, 24px);
  margin: 0 0 2px;
}
.scratch-reveal-content .date {
  font-family: math;
  font-weight: 700;
  color: var(--foreground);
  font-size: clamp(10.5px, 3.4vw, 22px);
  margin: 0;
}
.scratch-reveal-content .day {
  font-family: var(--font-body);
  color: #912738;
  font-size: clamp(9.5px, 5vw, 20px);
  margin: 1px 0 0;
}
.scratch-reveal-content .time {
  font-family: var(--font-body);
  color: #644047;
  font-size: clamp(9px, 4.8vw, 20px);
  margin: 0;
  font-weight: bold;
}
.scratch-heart-outline {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.scratch-canvas {
  /* canvas is a replaced element with intrinsic width/height attributes
     (260x240); without an explicit CSS size it renders at that intrinsic
     size instead of tracking .scratch-wrap's responsive clamp() width like
     the plain-div .scratch-reveal-content does — that mismatch is what let
     the scratch heart stay full-size while the card underneath shrank. */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  clip-path: url(#royal-heart-clip);
  cursor: pointer;
  touch-action: none;
}
.scratch-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--gold-dark);
  pointer-events: none;
  clip-path: url(#royal-heart-clip);
}
.scratch-wrap.is-cleared .scratch-label {
  display: none;
}

.save-date-wrap {
  position: relative;
  display: inline-block;
}
.calendar-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-elegant);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s;
  z-index: 10;
}
.calendar-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.calendar-menu button,
.calendar-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--foreground);
  padding: 10px 12px;
  border-radius: 9px;
  text-decoration: none;
}
.calendar-menu button:hover,
.calendar-menu a:hover {
  background: var(--cream);
}
.calendar-menu svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(
    135deg,
    var(--gold-light),
    var(--gold) 60%,
    var(--gold-dark)
  );
  color: #3b1a0a;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 08px 13px;
  margin-bottom: 35px;
  border: none;
  border-radius: 999px;
  box-shadow: var(--shadow-gold);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -8px rgba(201, 161, 90, 0.7);
}
.btn-gold:active {
  transform: translateY(0) scale(0.98);
}
.btn-gold svg {
  width: 17px;
  height: 17px;
}

/* ---------- Gallery slideshow ---------- */
.slideshow {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-elegant);
  background: var(--card);
}
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--primary);
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(255, 255, 255, 0.5),
      transparent 55%
    ),
    linear-gradient(
      135deg,
      var(--gold-light) 0%,
      var(--card) 45%,
      var(--cream) 100%
    );
}
.slide.is-active {
  opacity: 1;
}
.slide svg {
  width: 46px;
  height: 46px;
  opacity: 0.55;
}
.slide span {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 15px;
  opacity: 0.75;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slide-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
}
.slide-dots button {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: rgba(59, 22, 30, 0.3);
  cursor: pointer;
  padding: 0;
  transition:
    width 0.3s ease,
    background 0.3s ease;
}
.slide-dots button.is-active {
  width: 22px;
  background: var(--primary);
}

/* ---------- Countdown ---------- */
#countdown {
  text-align: center;
}
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 360px;
  margin: 0 auto;
}
.countdown-box {
  background: rgba(176, 141, 87, 0.08);
  border: 1px solid rgba(40, 17, 97, 0.274);
  border-radius: 12px;
  padding: 14px 4px;
}
.countdown-box .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.countdown-box .lbl {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* confetti */
#confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
}
#confetti-layer.is-active {
  opacity: 1;
}
.confetti-piece {
  position: absolute;
  top: -5%;
  border-radius: 2px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--drift), 108vh) rotate(var(--spin));
    opacity: 0.9;
  }
}

/* ---------- Timeline ---------- */
.timeline {
  max-width: 340px;
  margin: 0 auto;
  position: relative;
  padding-left: 26px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--primary);
  opacity: 0.35;
}
.timeline-item {
  position: relative;
  margin-bottom: 28px;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(143, 47, 71, 0.15);
}
.timeline-item h3 {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--foreground);
}
.timeline-item .when {
  font-size: 13px;
  color: var(--gold-dark);
  font-weight: 400;
  margin-bottom: 3px;
  font-family: none;
}
.timeline-item p {
  margin: 0;
  font-size: 16.5px;
  color: var(--muted-foreground);
}

/* ---------- Venue ---------- */
#venue {
  text-align: center;
}
.venue-art {
  width: 100%;
  max-width: 320px;
  margin: 0 auto 18px;
  color: var(--primary);
  opacity: 0.85;
}
.venue-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--foreground);
  margin: 40px 0 6px;
}
.venue-address {
  font-family: none;
  font-size: 14px;
  color: var(--muted-foreground);
  margin: 0 0 22px;
}

/* ---------- Dress code ---------- */
.dress-grid {
  display: grid;
  /* one card per row: each carries an event, its dress code and a short note */
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 360px;
  margin: 0 auto;
}
.dress-card {
  background: var(--card);
  border-radius: 14px;
  padding: 20px 14px;
  text-align: center;
  border: 1px solid var(--border);
}
.dress-card h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--primary);
}
.dress-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted-foreground);
}
.dress-card__label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.dress-card__code {
  display: block;
  margin: 4px 0 10px;
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--foreground);
}

/* ---------- Pre-wedding events ---------- */
.events-list {
  max-width: 340px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.event-card {
  background: var(--cream);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 14px 16px;
}
.event-card h4 {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--foreground);
}
.event-card .when {
  font-size: 13px;
  color: var(--gold-dark);
  font-weight: 600;
}
.event-card p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted-foreground);
}

.vine-corner {
  position: absolute;
  width: 56px;
  height: 56px;
  opacity: 0.18;
  color: var(--primary);
}
.vine-corner.br {
  right: 14px;
  bottom: 14px;
  transform: scaleX(-1);
}
.vine-corner.bl {
  left: 14px;
  bottom: 14px;
}
.vine-corner.tl {
  left: 14px;
  top: 14px;
}
.vine-corner.tr {
  right: 14px;
  top: 14px;
  transform: scaleX(-1);
}

/* ---------- RSVP ---------- */
#rsvp {
  text-align: center;
}
.rsvp-form {
  max-width: 340px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--foreground);
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(143, 47, 71, 0.15);
}
.submit-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  box-shadow: var(--shadow-gold);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}
.submit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}
.submit-btn:active {
  transform: translateY(0) scale(0.98);
}
.form-message {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
  display: none;
}
.form-message.is-success {
  display: block;
  background: rgba(76, 140, 90, 0.12);
  color: #2e6b3d;
}
.form-message.is-error {
  display: block;
  background: rgba(180, 50, 50, 0.12);
  color: #a13333;
}
.rsvp-list {
  max-width: 340px;
  margin: 22px auto 0;
  text-align: left;
}
.rsvp-list h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  margin: 0 0 10px;
}
.rsvp-entry {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--card);
  margin-bottom: 8px;
  font-size: 14px;
}
.rsvp-entry .name {
  font-weight: 600;
}
.rsvp-entry .status {
  font-size: 12px;
  margin-left: 6px;
}
.rsvp-entry .status.yes {
  color: #2e6b3d;
}
.rsvp-entry .status.no {
  color: #a13333;
}
.rsvp-entry .msg {
  display: block;
  margin-top: 3px;
  color: var(--muted-foreground);
  font-style: italic;
}

/* ---------- Guest Wishes ---------- */
/* every guest's RSVP wishes (js: Guest Wishes): one translucent card each,
   edged in fine gold, with a small ornament that varies from card to card */
#guest-wishes {
  --wish-sage: #6f7d62;
  text-align: center;
}
#guest-wishes[hidden] {
  display: none;
}
.wishes-intro {
  max-width: 300px;
  margin: -12px auto 28px;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted-foreground);
}
.wishes-list {
  list-style: none;
  max-width: 360px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}
.wish {
  position: relative;
  padding: 22px 20px 20px;
  border-radius: 14px;
  border: 1px solid rgba(176, 141, 87, 0.38);
  background: linear-gradient(
    160deg,
    rgba(255, 252, 246, 0.82),
    rgba(241, 231, 215, 0.55)
  );
  box-shadow:
    0 12px 28px -20px rgba(59, 22, 30, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  overflow-wrap: anywhere;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.wish.is-in {
  opacity: 1;
  transform: none;
}
/* a second, finer gold line just inside the edge */
.wish::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(176, 141, 87, 0.16);
  border-radius: 10px;
  pointer-events: none;
}
.wish__mark {
  position: absolute;
  top: 17px;
  right: 17px;
  width: 14px;
  height: 14px;
  color: var(--gold);
  opacity: 0.6;
}
.wish__mark svg {
  display: block;
  width: 100%;
  height: 100%;
}
.wish__name {
  margin: 0;
  padding-right: 24px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--foreground);
}
.wish__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 7px 0 0;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.wish__status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}
.wish__status--yes {
  color: var(--wish-sage);
}
.wish__status--no {
  color: var(--muted-foreground);
}
.wish__message {
  margin: 13px 0 0;
  padding-top: 13px;
  border-top: 1px solid rgba(176, 141, 87, 0.22);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: #3d3833;
  white-space: pre-line;
}
/* the same card, presented four ways in turn */
.wish--b::after {
  /* a gold hairline drawn across the top edge */
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 84px;
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.wish--c {
  /* a faint sage wash */
  background: linear-gradient(
    160deg,
    rgba(255, 252, 246, 0.84),
    rgba(111, 125, 98, 0.09)
  );
}
.wish--d::after {
  /* gold corner brackets */
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  background:
    linear-gradient(var(--gold), var(--gold)) top left / 16px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top left / 1px 16px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right / 16px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right / 1px 16px no-repeat;
  opacity: 0.55;
}
.wishes-more {
  display: block;
  margin: 26px auto 0;
  padding: 10px 22px;
  border: 1px solid rgba(176, 141, 87, 0.55);
  border-radius: 999px;
  background: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  cursor: pointer;
  transition: background 0.2s ease;
}
.wishes-more:hover {
  background: rgba(176, 141, 87, 0.1);
}
@media (prefers-reduced-motion: reduce) {
  .wish {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Closing ---------- */
#closing {
  text-align: center;
}
.wavy-divider {
  width: 100%;
  max-width: 280px;
  margin: 0 auto 20px;
  color: var(--primary);
  opacity: 0.5;
}
.wavy-divider.flip {
  transform: rotate(180deg);
  margin: 20px auto 0;
}
.closing-text {
  font-family: var(--font-script);
  font-size: 1.7rem;
  color: var(--primary);
  margin: 0 0 10px;
}
.closing-names {
  font-family: var(--font-script);
  font-size: 2.4rem;
  color: var(--muted-foreground);
  margin: 0;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 0px 24px 56px;
}
footer .signature {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--primary);
  margin: 0;
}
footer .footer-note {
  font-size: 18px;
  color: var(--muted-foreground);
  margin-top: 8px;
  letter-spacing: 0.05em;
}

/* ---------- Music toggle ---------- */
#music-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(143, 47, 71, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
#music-toggle svg {
  width: 19px;
  height: 19px;
  color: var(--primary);
}
#music-toggle.is-hidden {
  display: none;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 360px) {
  .couple-name {
    font-size: 2.15rem;
  }
  .countdown-box .num {
    font-size: 1.5rem;
  }
}

/* Play Animation: a small pill in the top-left corner of the invitation
   column, shown whenever the visitor is looking around by hand (js:
   initAutoScroll adds .is-shown), hidden while the auto-scroll plays. */
.play-animation {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: calc(
    (100vw - min(100vw, var(--shell-width))) / 2 + 12px +
      env(safe-area-inset-left, 0px)
  );
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 11px 5px 9px;
  border: 1px solid rgba(214, 185, 120, 0.6);
  border-radius: 999px;
  background: rgba(11, 23, 38, 0.42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    visibility 0s linear 0.35s;
}
/* a comfortable touch target around the small pill */
.play-animation::before {
  content: "";
  position: absolute;
  inset: -8px;
}
.play-animation.is-shown {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    visibility 0s;
}
.play-animation__icon {
  width: 8px;
  height: 10px;
  flex: none;
  fill: var(--gold-light);
}
.play-animation:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}
