/* =========================================================
   Pearlescent wedding invitation template (Talvoco)
   ========================================================= */

:root {
  --pearl: #fbf6f1;
  --linen: #f4ebe1;
  --blush: #f5e7e0;
  --champagne: #ead9c6;
  --gold: #9a6f2e;
  --gold-deep: #7a5520;
  --ink: #3d2a22;
  --ink-soft: #5e463a;
  --maroon: #7a1426;
  --maroon-deep: #5c0d1b;
  --iris-pink: #f3d6e2;
  --iris-lilac: #e2dcf4;
  --iris-aqua: #d6eef0;
  --iris-peach: #f8e2cf;

  --iridescent: linear-gradient(115deg,
      var(--iris-peach) 0%, var(--iris-pink) 22%, var(--iris-lilac) 42%,
      var(--iris-aqua) 60%, #fff6ea 78%, var(--iris-pink) 100%);
  --gold-text: linear-gradient(100deg, #9a7444 0%, #c9a46c 30%, #f1dfbf 48%, #c19a62 62%, #8f6c3f 100%);

  --display: "Cormorant Garamond", "Times New Roman", serif;
  --hand: "Great Vibes", "Cormorant Garamond", cursive;
  --script: var(--display);
  --serif: "Lora", Georgia, serif;
  --caps: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --arabic: var(--display);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--pearl);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; height: 100svh; }
img, video, canvas { display: block; max-width: 100%; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
a { color: inherit; }

/* ---------- floating pearls ---------- */
.pearls { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.pearls i {
  position: absolute; bottom: -20px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff 0 18%, #f6e9ef 38%, #e6d9e8 62%, #d8c6b8 100%);
  box-shadow: 0 1px 3px rgba(140, 110, 90, .25), inset -1px -2px 3px rgba(170, 140, 160, .35);
  opacity: 0;
  animation: drift linear infinite;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  10%  { opacity: .75; }
  85%  { opacity: .6; }
  100% { transform: translate3d(var(--dx, 20px), -110vh, 0); opacity: 0; }
}

/* =========================================================
   WELCOME
   ========================================================= */
.welcome {
  position: fixed; inset: 0; z-index: 100;
  background: #efe6db;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* handover: the bow video's last frame is the hero's first, so it simply disappears */
.welcome.is-gone { visibility: hidden; pointer-events: none; }
.welcome.is-gone--fade { opacity: 0; transition: opacity 1s var(--ease), visibility 1s; }

/* one 9:16 stage shared by video and envelope pieces so they always line up.
   Phones: covers the screen exactly like the hero video does. Wide screens: a column. */
.welcome__stage {
  position: absolute; left: 50%; top: 50%;
  width: max(100vw, calc(100svh * 9 / 16));
  height: max(100svh, calc(100vw * 16 / 9));
  transform: translate(-50%, -50%);
  perspective: 1800px;
}
@media (min-width: 760px) {
  .welcome::before, .welcome::after {
    content: ""; position: absolute; inset: -40px;
    background: url("../assets/envelope-closed.webp") center / cover;
    filter: blur(28px) saturate(1.05); opacity: .8;
  }
  /* side glow drifts to the hero's while the bow unties, so the handover matches */
  .welcome::after { background-image: url("../assets/hero-poster.jpg"); opacity: 0; transition: opacity 3s ease 2s; }
  .welcome.is-unsealed::after { opacity: .8; }
  .welcome__stage { z-index: 1; width: calc(100svh * 9 / 16); height: 100svh; box-shadow: 0 0 80px rgba(160, 130, 110, .25); }
}
.welcome__bow { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.env { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.env__bottom, .env__flap, .env__closed { position: absolute; inset: 0; }
.env__closed { background: url("../assets/envelope-closed.webp") center / cover no-repeat; transition: opacity .3s ease; }
.env__bottom {
  background: url("../assets/envelope-bottom.webp") center / cover no-repeat;
  filter: drop-shadow(0 -4px 12px rgba(60, 45, 25, .14));
  transition: transform 3s cubic-bezier(.55, 0, .35, 1) .1s;
}
/* the flap rises while it tilts up from its fold — two motions on nested layers */
.env__flap { transform-style: preserve-3d; }
.env__flap::before {
  content: ""; position: absolute; inset: 0;
  background: url("../assets/envelope-flap.webp") center / cover no-repeat;
  transform-origin: 50% 0;
  /* soft shadow the flap and seal cast on the envelope, as in the poster */
  filter: drop-shadow(-2px 3px 4px rgba(90, 65, 40, .22)) drop-shadow(-9px 14px 20px rgba(90, 65, 40, .42));
}
.welcome.is-unsealing .env__closed { opacity: 0; }
.welcome.is-unsealing .env__flap { animation: flap-rise 3s cubic-bezier(.55, 0, .35, 1) .1s forwards; }
.welcome.is-unsealing .env__flap::before { animation: flap-tilt 1.8s cubic-bezier(.3, 0, .3, 1) .1s forwards; }
.welcome.is-unsealing .env__bottom { transform: translateY(105%); }
.welcome.is-unsealed .env { visibility: hidden; }
@keyframes flap-rise { to { transform: translateY(-110%); } }
@keyframes flap-tilt { to { transform: rotateX(30deg); } }

.welcome__cta {
  position: absolute; z-index: 2; left: 50%; bottom: max(10vh, 60px);
  transform: translateX(-50%);
  border: 0; background: none; padding: 14px 20px; cursor: pointer;
  font-family: var(--caps); font-weight: 600; font-size: 14px; letter-spacing: .38em; text-transform: uppercase;
  color: #2e1d14; white-space: nowrap;
  animation: breathe 2.4s ease-in-out infinite;
  transition: opacity .5s;
  -webkit-tap-highlight-color: transparent;
}
.welcome.is-unsealing .welcome__cta { opacity: 0; animation: none; pointer-events: none; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; z-index: 2;
  height: 100svh; min-height: 560px;
  overflow: hidden;
  background: #f3ece6;
  isolation: isolate;
}
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  opacity: 0; transition: opacity 1.4s var(--ease) .2s;
  background:
    linear-gradient(180deg, rgba(251, 246, 241, .92) 0%, rgba(251, 246, 241, .62) 22%, rgba(251, 246, 241, 0) 44%),
    linear-gradient(0deg, rgba(251, 246, 241, .55) 0%, rgba(251, 246, 241, 0) 18%);
}
.hero__top {
  position: absolute; top: 0; left: 0; right: 0;
  padding: max(5.5vh, 28px) 20px 0;
  text-align: center;
}
.invite-lead {
  font-family: var(--arabic); font-size: clamp(15px, 4vw, 20px); line-height: 1.6;
  color: var(--gold-deep);
}
.hero__basmala {
  font-style: italic; font-size: clamp(12px, 3.2vw, 15px); color: var(--ink);
  margin-top: 2px;
}
.hero__names {
  margin-top: clamp(6px, 1.6vh, 14px);
  font-family: "Playball", var(--hand), cursive; font-style: normal; font-weight: 400;
  font-size: clamp(46px, 13.4vw, 100px);
  line-height: 1.2; letter-spacing: 0;
  display: flex; align-items: baseline; justify-content: center; gap: .12em; white-space: nowrap;
}
.hero__names .name {
  color: var(--maroon);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 2px 14px rgba(255, 255, 255, .9);
}
.hero__names .amp { font-family: "Playfair Display", var(--display), serif; font-style: italic; font-weight: 400; font-size: .5em; color: var(--gold-deep); padding: 0 .12em; }
@keyframes goldshine { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.hero__date {
  margin-top: 6px;
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--caps); font-weight: 600; font-size: clamp(11px, 3vw, 14px); letter-spacing: .28em;
  color: var(--ink);
}
.hero__date i { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

.is-open .hero__shade, .is-open .scroll-cue { opacity: 1; }
/* hero entrance (after envelope) */
.hero__top > * { opacity: 0; transform: translateY(14px); }
.is-open .hero__top > * { animation: rise 1.3s var(--ease) forwards; }
.is-open .hero__top > *:nth-child(2) { animation-delay: .25s; }
.is-open .hero__top > *:nth-child(3) { animation-delay: .5s; }
.is-open .hero__top > *:nth-child(4) { animation-delay: .85s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* frosted pearl pill so "Scroll" reads over the bride's red train */
.scroll-cue {
  position: absolute; z-index: 2; left: 50%; bottom: max(4vh, calc(env(safe-area-inset-bottom) + 18px)); transform: translateX(-50%);
  opacity: 0; transition: opacity 1s ease 1.4s;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px 8px 18px; border-radius: 999px;
  background: rgba(251, 246, 241, .82);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 6px 18px rgba(60, 20, 20, .18);
  text-decoration: none; color: var(--maroon);
  font-family: var(--caps); font-weight: 600; font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
}
.scroll-cue svg { animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }

@media (min-width: 760px) {
  .hero::before {
    content: ""; position: absolute; inset: -40px; z-index: -3;
    background: url("../assets/hero-poster.jpg") center / cover;
    filter: blur(28px) saturate(1.05); opacity: .8;
  }
  .hero__top { left: 50%; right: auto; width: calc(100svh * 9 / 16); transform: translateX(-50%); }
  .hero__names { font-size: calc(100svh * 9 / 16 * .134); }
  .hero__video { left: 50%; right: auto; width: auto; height: 100%; aspect-ratio: 9 / 16; transform: translateX(-50%); box-shadow: 0 0 80px rgba(160, 130, 110, .25); }
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section {
  position: relative; z-index: 2;
  padding: 84px 16px 92px;
  text-align: center;
  overflow: hidden;
}
.section--pearl { background: var(--pearl); }
.section--linen { background: var(--linen); }
.section--blush { background: var(--blush); }
/* these two match the paper colour of their artwork so the images bleed seamlessly */
.section--plaque { background: #e9dcc9; }
.section--curtain { background: #f3e9e0; }

/* ---------- Reception (below the wedding curtain) ---------- */
.reception { max-width: 560px; margin: 46px auto 0; text-align: center; }
.reception__title {
  font-family: var(--display); font-style: italic; font-weight: 600;
  font-size: clamp(54px, 15vw, 80px); line-height: 1; color: var(--maroon);
}
.reception__lights { width: calc(100% + 16px); max-width: none; margin: 10px -8px 0; height: auto; }
.reception__body { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: 6px; }
.reception__body .curtain__label { font-size: 10px; margin-top: 10px; }
.reception__day { font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); line-height: 1.1; }
.reception__date { font-family: var(--display); font-weight: 700; font-size: 25px; color: var(--maroon); line-height: 1.15; white-space: nowrap; }
.reception__date i { font-style: normal; font-weight: 400; color: var(--gold); padding: 0 .15em; }
.reception__time { font-style: italic; font-size: 17px; color: var(--ink); }
.reception__venue { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.1; color: var(--maroon); }
.reception__addr { font-size: 15px; line-height: 1.45; color: var(--ink); }
.curtain__map { margin-top: 1.6cqw !important; font-size: 2.3cqw !important; padding: 2px 2px 3px !important; }
.curtain__map span { font-size: 3.2cqw !important; }
.reception__map {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 2px;
  font-family: var(--caps); font-weight: 600; font-size: 10.5px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--maroon); text-decoration: none;
  border-bottom: 1px solid rgba(122, 20, 38, .35);
  transition: border-color .3s, gap .3s;
}
.reception__map span { font-family: var(--serif); font-size: 14px; letter-spacing: 0; transition: transform .3s; }
.reception__map:hover { border-bottom-color: var(--maroon); }
.reception__map:hover span { transform: translateX(3px); }
.reception__table { width: min(88%, 420px); height: auto; margin: 18px auto -28px; }
#event { padding-bottom: 40px; }
#map { padding-top: 60px; }
.section--plaque::before, .section--curtain::before, #family::before { display: none; }
.section::before {
  /* soft iridescent glow */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(60% 40% at 10% 0%, rgba(243, 214, 226, .45), transparent 70%),
    radial-gradient(55% 40% at 95% 100%, rgba(214, 238, 240, .45), transparent 70%);
}
.section { isolation: isolate; }

.section__head { margin-bottom: 30px; }
.script-title.script-title--one { white-space: nowrap; font-size: clamp(22px, 6.6vw, 50px); }
.eyebrow {
  font-family: var(--hand); font-size: clamp(28px, 7.6vw, 36px); line-height: 1.15;
  color: var(--gold-deep); margin-bottom: 2px;
}
.script-title {
  font-family: "Playfair Display", var(--display), serif; font-style: italic; font-weight: 500;
  font-size: clamp(32px, 9vw, 54px); line-height: 1.2;
  color: var(--maroon);
  padding: 0 .1em;
}
.section__sub { font-style: italic; color: var(--ink); margin-top: 4px; }
.center { text-align: center; }

.reveal-up { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal-up.in { opacity: 1; transform: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 12px 28px;
  font-family: var(--caps); font-weight: 600; font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  color: #fff; border: 0; border-radius: 999px;
  background: linear-gradient(120deg, var(--maroon-deep), #9a2236 45%, var(--maroon-deep));
  background-size: 200% 100%;
  box-shadow: 0 8px 20px rgba(143, 108, 63, .25), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: background-position .6s var(--ease), transform .2s;
}
.btn:hover { background-position: 100% 0; }
.btn:active { transform: scale(.98); }
.btn--ghost {
  color: var(--maroon); background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(122, 20, 38, .45); box-shadow: none;
}
.btn--ghost:hover { background: rgba(255, 255, 255, .9); }

/* iridescent sheen sweeping across pearl surfaces */
.sheen {
  position: absolute; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .85) 45%, rgba(243, 214, 226, .7) 50%, rgba(214, 238, 240, .7) 55%, transparent 70%);
  background-size: 250% 100%;
  animation: sheen 6s ease-in-out infinite;
}
@keyframes sheen { 0% { background-position: 120% 0; } 60%, 100% { background-position: -120% 0; } }

/* =========================================================
   SCRATCH
   ========================================================= */
/* =========================================================
   QUOTE — inside the lavender scrolled frame (after the hero)
   ========================================================= */
/* lavender wall with an ivory panel in a scrolled frame; everything sits inside the panel */
/* red velvet wall with an ivory panel in a carved frame (artwork 941 wide, so the
   frame keeps its design size on phones); everything sits inside the panel */
.quote { position: relative; z-index: 2; background: #5c0a16; overflow: hidden; }
@media (min-width: 620px) {
  .quote::before { content: ""; position: absolute; inset: -40px; background: url("../assets/quote-frame.jpg") center / cover; filter: blur(24px); opacity: .9; }
}
.quote__frame {
  position: relative; width: 100%; max-width: 620px; margin: 0 auto;
  aspect-ratio: 941 / 700;
  background: url("../assets/quote-frame.jpg") center / 100% 100% no-repeat;
  container-type: inline-size;
}
/* ivory panel measured from quote-frame.jpg: x 18.5–81.3%, y 16–80%; kept clear of the scrolls */
.quote__body {
  position: absolute; left: 21%; right: 21%; top: 18.5%; bottom: 22%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  color: var(--maroon);
}
.quote__ar { font-family: var(--arabic); font-weight: 400; font-size: 6.2cqw; line-height: 1.55; color: var(--maroon); }
.quote__en { margin-top: .4cqw; font-family: var(--caps); font-weight: 400; font-size: 3.55cqw; letter-spacing: .01em; line-height: 1.3; white-space: nowrap; }
.quote__text { margin-top: 2.6cqw; display: flex; flex-direction: column; font-family: var(--caps); font-weight: 300; font-size: 2.82cqw; line-height: 1.7; }
.quote__text span { white-space: nowrap; }
.quote__ref { margin-top: 2.4cqw; font-family: var(--caps); font-weight: 500; font-size: 2.08cqw; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-deep); }

/* the whole Scratch section is one mother-of-pearl artwork (941×1400, trimmed from 1672):
   heading in the top band, oval in the dotted frame, caption in the bottom band */
.reveal { position: relative; z-index: 2; background: #efe3dc; overflow: hidden; }
.scratch {
  position: relative; width: 100%; max-width: 560px; margin: 0 auto;
  aspect-ratio: 941 / 1400;
  background: url("../assets/reveal-bg.jpg") center / 100% 100% no-repeat;
}
@media (min-width: 560px) {
  .reveal::before {
    content: ""; position: absolute; inset: -40px;
    background: url("../assets/reveal-bg.jpg") center / cover; filter: blur(30px); opacity: .9;
  }
}
.reveal__head { position: absolute; z-index: 4; left: 6%; right: 6%; top: 4.5%; text-align: center; }
.reveal__head .script-title { text-shadow: 0 1px 10px rgba(255, 250, 246, .9); }
/* oval measured from reveal-bg.jpg: centre 469,728.5 · radii 169×246.5 */
.scratch__photo {
  position: absolute;
  left: 31.88%; top: 34.43%; width: 35.92%; height: 35.21%;
  border-radius: 50%;
  object-fit: cover; object-position: 50% 60%;
}
.scratch__canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scratch__pad {
  position: absolute; left: 31.88%; top: 34.43%; width: 35.92%; height: 35.21%;
  border-radius: 50%; cursor: grab; touch-action: none; z-index: 2;
}
.scratch.is-done .scratch__pad { display: none; }
.scratch__hint {
  position: absolute; left: 49.84%; top: 52.04%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: #fff; font-family: var(--caps); font-weight: 600; font-size: 10px; letter-spacing: .25em; text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(70, 80, 95, .5);
  pointer-events: none; z-index: 3;
  transition: opacity .4s;
}
.scratch__hint svg { animation: wiggle 2.2s ease-in-out infinite; filter: drop-shadow(0 1px 3px rgba(70, 80, 95, .5)); }
@keyframes wiggle { 0%, 100% { transform: translate(-10px, 0) rotate(-8deg); } 50% { transform: translate(10px, 6px) rotate(8deg); } }
.scratch.is-scratching .scratch__hint, .scratch.is-done .scratch__hint { opacity: 0; }

.scratch__caption {
  position: absolute; z-index: 4; left: 0; right: 0; top: 87%;
  text-align: center; font-family: "Parisienne", var(--hand), cursive; font-size: clamp(17px, 5.4vw, 30px); line-height: 1.3; color: var(--maroon);
  white-space: nowrap; text-shadow: 0 1px 8px rgba(255, 250, 246, .9);
  opacity: 0; transform: translateY(10px); transition: opacity 1s .3s, transform 1s .3s;
}
.scratch__caption.show { opacity: 1; transform: none; }

.glitter { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.sparkle {
  position: absolute; width: 8px; height: 8px; border-radius: 50%; pointer-events: none; z-index: 4;
  background: radial-gradient(circle at 35% 30%, #fff, #f3d6e2 45%, #d6eef0 75%, transparent 76%);
  animation: burst 1.4s var(--ease) forwards;
}
@keyframes burst {
  from { transform: translate(-50%, -50%) scale(.4); opacity: 1; }
  to { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1); opacity: 0; }
}

/* =========================================================
   COUNTDOWN — plaque
   ========================================================= */
.plaque {
  position: relative;
  width: calc(100% + 32px); max-width: 680px;
  margin-left: 50%; transform: translateX(-50%);
  /* show only the band of pearl-plaque.jpg that holds the plaque (y 347–907 of 1254) */
  aspect-ratio: 1254 / 560;
  background: url("../assets/pearl-plaque.jpg") center 50% / 100% auto no-repeat;
  container-type: inline-size;
}
.plaque.reveal-up { transform: translate(-50%, 26px); }
.plaque.reveal-up.in { transform: translateX(-50%); }
/* inner panel measured from pearl-plaque.jpg: x 200–1080, y 475–765 */
.plaque__inner, .plaque .sheen {
  position: absolute; left: 17%; right: 15.5%; top: 23.5%; height: 51%;
}
.plaque .sheen { border-radius: 4px; }
.plaque__inner {
  display: flex; align-items: center; justify-content: center; gap: 1.2cqw;
  z-index: 1;
}
.cd { display: flex; flex-direction: column; align-items: center; min-width: 13cqw; }
.cd__num {
  font-family: var(--hand); font-weight: 400; font-size: 12.5cqw; line-height: 1.05;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--maroon);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .9);
}
.cd__lbl {
  margin-top: 1.4cqw;
  font-family: var(--caps); font-weight: 600; font-size: 1.9cqw; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink);
}
.cd__sep { font-size: 7cqw; color: var(--gold-deep); margin-top: -4cqw; }
.countdown__note { font-family: var(--caps); font-weight: 600; font-size: 12px; letter-spacing: .14em; color: var(--ink); margin: 10px 0 22px; position: relative; z-index: 1; }

/* =========================================================
   EVENT — curtain
   ========================================================= */
.curtain {
  position: relative;
  width: calc(100% + 32px); max-width: 620px;
  margin-left: 50%; transform: translateX(-50%);
  aspect-ratio: 921 / 1470;
  background: url("../assets/pearl-curtain.jpg") center / 100% 100% no-repeat;
  container-type: inline-size;
  }
/* open area between the drapes (measured): ~36–62% wide at 18% down, ~22–78% from 30% to 88% */
.curtain__top .curtain__lead { font-size: 4.2cqw; line-height: 1.4; margin-top: 2.2cqw; }
.curtain__top {
  position: absolute; left: 28%; right: 28%; top: 26%; height: 19%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.curtain__title {
  font-family: var(--display); font-style: italic; font-weight: 600; font-size: 14cqw; line-height: 1.05;
  color: var(--maroon);
  padding: .1em .12em;
}
.curtain__body {
  position: absolute; left: 22%; right: 22%; top: 46%; bottom: 14%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .6cqw;
}
.curtain__lead { font-style: italic; font-size: 3.9cqw; line-height: 1.2; color: var(--ink); }
.curtain__label {
  font-family: var(--caps); font-weight: 600; font-size: 2.5cqw; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-deep);
  margin-top: 1.4cqw;
}
.curtain__time + .curtain__label { margin-top: 4.5cqw; }
.curtain__day { font-family: var(--display); font-weight: 600; font-size: 5cqw; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); line-height: 1.1; }
.curtain__date { font-family: var(--display); font-size: 5.6cqw; font-weight: 700; color: var(--maroon); line-height: 1.15; white-space: nowrap; }
.curtain__date i { font-style: normal; font-weight: 400; color: var(--gold); padding: 0 .15em; }
.curtain__time { font-style: italic; font-size: 3.8cqw; color: var(--ink); line-height: 1.2; }
.curtain__venue { font-family: var(--display); font-weight: 700; font-size: 6.2cqw; line-height: 1.1; color: var(--maroon); }
.curtain__addr { font-size: 3.4cqw; line-height: 1.3; color: var(--ink); }
.pearl-rule {
  display: block; width: 60%; height: 6px; margin: 2cqw 0 .6cqw;
  background:
    radial-gradient(circle, #fff 0 1.4px, #e9d9cc 1.6px 2.6px, transparent 3px) center / 10px 6px repeat-x;
  opacity: .95;
}

/* =========================================================
   FAMILY
   ========================================================= */
.card {
  position: relative;
  max-width: 460px; margin: 0 auto;
  padding: 28px 22px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .85), rgba(255, 250, 246, .6));
  border: 1px solid rgba(208, 182, 150, .55);
  box-shadow: 0 14px 34px rgba(150, 120, 100, .12), inset 0 1px 0 #fff;
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35; mix-blend-mode: multiply;
  background: var(--iridescent); background-size: 300% 300%;
  animation: iris 14s ease-in-out infinite;
}
@keyframes iris { 0%, 100% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } }
.card > * { position: relative; z-index: 1; }

.card__eyebrow { font-family: var(--hand); font-size: 28px; line-height: 1.2; color: var(--gold-deep); margin-bottom: 8px; }
.card__elder { font-family: var(--display); font-size: 23px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.card__elder span { font-style: italic; font-weight: 400; color: var(--ink-soft); }
.card__and { font-family: var(--hand); font-size: 34px; color: var(--maroon); line-height: 1.2; }

.invite-text { max-width: 440px; margin: 34px auto 26px; font-size: 18px; color: var(--ink); }
.invite-text strong { display: block; font-family: var(--display); font-weight: 700; font-size: 25px; color: var(--maroon); margin-bottom: 4px; }

.couple-cards { display: grid; gap: 4px; max-width: 460px; margin: 0 auto; }
.card--person { padding-top: 30px; }
.pearl-medal {
  width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 34% 28%, #fff 0 14%, #f7edf1 32%, #e8dcea 58%, #d9c8b6 100%);
  box-shadow: 0 6px 16px rgba(150, 120, 100, .25), inset -3px -5px 10px rgba(180, 150, 170, .35), inset 3px 3px 6px #fff;
}
.pearl-medal span { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 34px; color: var(--maroon); line-height: 1; margin-top: 4px; }
.card__role { font-family: var(--caps); font-weight: 600; font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-deep); }
.card__name { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 9.5vw, 46px); line-height: 1.2; color: var(--maroon); }
.card__rel { font-style: italic; font-size: 17px; color: var(--ink); }
.with { font-family: var(--hand); font-size: 40px; color: var(--gold-deep); line-height: 1.5; }

@media (min-width: 860px) {
  .couple-cards { grid-template-columns: 1fr auto 1fr; align-items: center; max-width: 900px; gap: 18px; }
  .with { padding: 0 4px; }
}

/* =========================================================
   MAP
   ========================================================= */
.map-card {
  max-width: 560px; margin: 0 auto;
  border-radius: 24px; overflow: hidden;
  background: #fffaf6;
  border: 1px solid rgba(208, 182, 150, .55);
  box-shadow: 0 16px 40px rgba(150, 120, 100, .15);
}
.map-frame { position: relative; aspect-ratio: 4 / 3; background: var(--champagne); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: sepia(.18) saturate(.85) brightness(1.03); }
.map-card__info { padding: 22px 20px 26px; }
.maps {
  display: flex; gap: 14px; max-width: 560px; margin: 0 auto;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px 0 28px; margin-bottom: -16px;
}
.maps::-webkit-scrollbar { display: none; }
.maps .map-card { margin: 0; flex: 0 0 100%; scroll-snap-align: center; box-shadow: 0 10px 22px rgba(150, 120, 100, .14); }
.map-tabs { display: flex; justify-content: center; gap: 26px; margin: -10px 0 18px; }
.map-tabs__btn {
  border: 0; background: none; cursor: pointer; padding: 4px 0 6px;
  font-family: var(--display); font-style: italic; font-weight: 600; font-size: 20px; color: rgba(61, 42, 34, .5);
  border-bottom: 1px solid transparent; transition: color .25s, border-color .25s;
}
.map-tabs__btn.is-active { color: var(--maroon); border-bottom-color: var(--maroon); }
.map-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.map-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(122, 20, 38, .25); transition: background .25s, transform .25s; }
.map-dots i.is-active { background: var(--maroon); transform: scale(1.2); }
.map-card__when { font-family: var(--caps); font-weight: 600; font-size: 10px; letter-spacing: .16em; white-space: nowrap; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 4px; }
.map-card__name { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.15; color: var(--maroon); }
.map-card__addr { font-size: 17px; color: var(--ink); margin: 4px 0 18px; }

/* =========================================================
   RSVP
   ========================================================= */
/* mother-of-pearl backdrop, one frosted panel, hairline details */
.rsvp-section {
  background: #efe7df url("../assets/pearl-shell.jpg") center / cover no-repeat;
  padding: 72px 16px 80px;
}
.rsvp-section::before { display: none; }
.rsvp-panel {
  position: relative;
  max-width: 460px; margin: 0 auto;
  padding: 34px 24px 30px;
  background: rgba(255, 252, 249, .52);
  backdrop-filter: blur(10px) saturate(1.1); -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 20px 50px rgba(110, 80, 70, .12);
  text-align: center;
}
.rsvp-panel::after {               /* inner gold hairline */
  content: ""; position: absolute; inset: 8px; pointer-events: none;
  border: 1px solid rgba(154, 111, 46, .35);
}
.rsvp-head { margin-bottom: 18px; }
.rsvp-head .script-title { line-height: 1.05; }
.rsvp-head__sub { font-style: italic; font-size: 15px; line-height: 1.45; color: var(--ink); margin-top: 4px; text-wrap: balance; }

.rsvp { display: grid; gap: 16px; text-align: center; }
.field { display: grid; gap: 0; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > span, .field legend {
  font-family: var(--caps); font-weight: 600; font-size: 10px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold-deep); padding: 0; margin: 0 auto;
}
.field em { text-transform: none; letter-spacing: 0; font-family: var(--serif); font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 18px; color: var(--ink); text-align: center;
  padding: 4px 4px 6px; border: 0; border-radius: 0; line-height: 1.35;
  border-bottom: 1px solid rgba(61, 42, 34, .35);
  background: transparent;
  outline: none; transition: border-color .25s;
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(61, 42, 34, .45); font-style: italic; }
.field select { text-align-last: center; cursor: pointer; }
.field select:invalid, .field select:has(option[value=""]:checked) { color: rgba(61, 42, 34, .45); font-style: italic; }
.field textarea { resize: none; min-height: 0; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--maroon); }

.choice { display: flex; justify-content: center; gap: 24px; margin-top: 2px; }
.choice__opt { position: relative; cursor: pointer; }
.choice__opt input { position: absolute; opacity: 0; }
.choice__opt span {
  display: inline-block; padding: 2px 0 4px;
  font-family: var(--display); font-style: italic; font-weight: 600; font-size: 20px; color: rgba(61, 42, 34, .5);
  border-bottom: 1px solid transparent;
  transition: color .25s, border-color .25s;
}
.choice__opt input:checked + span { color: var(--maroon); border-bottom-color: var(--maroon); }
.choice__opt input:focus-visible + span { outline: 2px solid rgba(122, 20, 38, .3); outline-offset: 3px; }

.rsvp__btn {
  justify-self: center; margin-top: 4px;
  min-width: 200px; min-height: 48px; padding: 14px 34px;
  font-family: var(--caps); font-weight: 600; font-size: 11px; letter-spacing: .32em; text-transform: uppercase;
  color: #fbf3ea; background: var(--maroon); border: 0; border-radius: 0; cursor: pointer;
  transition: background .3s, letter-spacing .3s;
}
.rsvp__btn:hover { background: var(--maroon-deep); letter-spacing: .36em; }
.rsvp__btn:active { transform: scale(.99); }
.rsvp__error { color: #a4553f; font-size: 15px; margin-top: -10px; }
.rsvp__error:empty { display: none; }
.rsvp-thanks { padding: 10px 0 4px; }
.rsvp-thanks__wa { margin-top: 18px; }
.rsvp__btn:disabled { opacity: .7; cursor: wait; }
.hand-title { font-family: var(--hand); font-size: 46px; line-height: 1.2; color: var(--maroon); }
.rsvp-thanks p:last-child { font-style: italic; color: var(--ink); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  position: relative; z-index: 2;
  text-align: center; padding: 56px 16px calc(48px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, var(--pearl), #f1e5da);
}
.footer__logo { width: 92px; height: auto; margin: 0 auto 18px; }
.footer__names {
  font-family: var(--display); font-weight: 500; font-size: 26px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--maroon); line-height: 1.3;
}
.footer__names span { font-family: var(--hand); text-transform: none; letter-spacing: 0; font-size: 1.3em; color: var(--gold-deep); padding: 0 .2em 0 0; }
.footer__date { font-family: var(--caps); font-weight: 600; letter-spacing: .4em; font-size: 12px; color: var(--ink); margin-top: 4px; }
.footer__dua { font-style: italic; color: var(--ink); margin-top: 18px; font-size: 16px; }
.footer__credit {
  margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(154, 111, 46, .25);
  max-width: 320px; margin-left: auto; margin-right: auto;
  font-family: var(--caps); font-weight: 500; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft);
}
.footer__credit a { color: var(--maroon); text-decoration: none; border-bottom: 1px solid rgba(122, 20, 38, .3); text-transform: lowercase; letter-spacing: .08em; }
.footer__credit a:hover { border-bottom-color: var(--maroon); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .pearls { display: none; }
}
[hidden] { display: none !important; }

/* ---------- music toggle (bottom right) ---------- */
.music-toggle {
  position: fixed; z-index: 40;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, calc(env(safe-area-inset-bottom) + 8px));
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(122, 20, 38, .35); border-radius: 50%;
  background: rgba(251, 246, 241, .9);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(92, 13, 27, .15);
  color: var(--maroon); cursor: pointer;
  opacity: 0; transform: translateY(8px); transition: opacity .6s, transform .6s;
  -webkit-tap-highlight-color: transparent;
}
.music-toggle.is-shown { opacity: 1; transform: none; }
.music-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.music-toggle__bars { display: flex; align-items: center; gap: 2.5px; height: 16px; }
.music-toggle__bars i { width: 2.5px; height: 55%; border-radius: 2px; background: currentColor; }
.music-toggle.is-playing .music-toggle__bars i { animation: music-bar 1s ease-in-out infinite; }
.music-toggle.is-playing .music-toggle__bars i:nth-child(2) { animation-delay: -.4s; }
.music-toggle.is-playing .music-toggle__bars i:nth-child(3) { animation-delay: -.7s; }
.music-toggle.is-playing .music-toggle__bars i:nth-child(4) { animation-delay: -.2s; }
@keyframes music-bar { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.music-toggle:not(.is-playing)::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 24px; height: 1.5px; margin: -.75px 0 0 -12px;
  background: currentColor; transform: rotate(-45deg);
}
.curtain.reveal-up { transform: translate(-50%, 26px); }
.curtain.reveal-up.in { transform: translateX(-50%); }

/* =========================================================
   FAMILY — velvet inside the pearl-petal frame
   family-frame.webp = petal border with velvet filling only its opening.
   Text box sits inside the measured opening (≈22–78% across, 19–79% down).
   ========================================================= */
.family-frame {
  position: relative;
  width: calc(100% + 32px); max-width: 600px;
  margin-left: 50%; transform: translateX(-50%);
  aspect-ratio: 952 / 1452;               /* border artwork cropped to the petals, so they touch the edges */
  background: url("../assets/family-frame.webp") center / 100% 100% no-repeat;
  container-type: inline-size;
}
.family-frame.reveal-up { transform: translate(-50%, 26px); }
.family-frame.reveal-up.in { transform: translateX(-50%); }
.family-frame__inner {
  position: absolute; left: 19%; right: 19%; top: 13%; bottom: 13%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #f7e9dc;
  text-shadow: 0 1px 2px rgba(40, 0, 8, .35);
}
.ff__hand { font-family: var(--caps); font-weight: 400; font-size: 4.2cqw; letter-spacing: .02em; line-height: 1.3; color: #ecd2a2; margin-bottom: 3.2cqw; }
.ff__elder { font-family: var(--display); font-weight: 600; font-size: 4.9cqw; line-height: 1.2; margin-top: .8cqw; }
.ff__elder span { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 3.5cqw; color: #e9cfc4; }
.ff__amp { font-family: var(--hand); font-size: 6.8cqw; line-height: 1; color: #ecd2a2; margin-top: .8cqw; }
.ff__rule {
  display: block; width: 55%; height: 6px; margin: 2.6cqw 0 2.2cqw;
  background: radial-gradient(circle, #fff 0 1.3px, #e9d9cc 1.5px 2.4px, transparent 2.8px) center / 9px 6px repeat-x;
}
.ff__hosts { font-family: var(--display); font-weight: 700; font-size: 5.2cqw; line-height: 1.15; color: #ecd2a2; margin-top: 4cqw; }
.ff__text { font-family: var(--serif); font-style: italic; font-size: 3.6cqw; line-height: 1.4; margin-top: 1cqw; }
.ff__name { font-family: var(--display); font-weight: 700; font-size: 8cqw; line-height: 1.05; color: #fff6ec; margin-top: 3cqw; }
.ff__with { font-family: var(--hand); font-size: 7.4cqw; line-height: 1.1; color: #ecd2a2; margin: .6cqw 0 -.6cqw; }
.ff__with + .ff__name { margin-top: 0; }
.ff__rel { font-family: var(--serif); font-style: italic; font-size: 3.6cqw; line-height: 1.3; color: #e9cfc4; margin-top: .6cqw; }

/* UK edition: longer names stay on one line; music credit sits under the Talvoco credit */
.footer__names { font-size: clamp(16px, 5.4vw, 22px); letter-spacing: .18em; white-space: nowrap; }
.footer__credit.footer__music { margin-top: 8px; padding-top: 0; border-top: 0; text-transform: none; letter-spacing: .04em; font-size: 10px; opacity: .8; }
