/* ═══════════════════════════════════════════════
   Soumya Weds — palette pulled from the photos:
   wine sherwani · champagne gown · blush roses · candle gold
   ═══════════════════════════════════════════════ */
:root {
  color-scheme: light only;
  --wine-950: #1c060d;
  --wine-900: #2a0b14;
  --wine-800: #3d1020;
  --wine-700: #5b1a2e;
  --wine-500: #8a3148;
  --rose: #d8a1a4;
  --blush: #f3dcd6;
  --champagne: #e8d3b4;
  --champagne-2: #d9bf98;
  --ivory: #fbf6ee;
  --paper: #f6eee2;
  --gold: #c9a45c;
  --gold-2: #e9cf8f;
  --gold-3: #9c7434;
  --ink: #2b1d1f;
  --muted: #7a6460;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --script: "Great Vibes", cursive;
  --mono: "Cormorant Garamond", serif;
  --sans: "Jost", system-ui, sans-serif;
  --bn: "Noto Serif Bengali", serif;

  --gutter: clamp(16px, 5vw, 64px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; height: 100svh; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }

.tiny-caps {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--muted);
}
.dark .tiny-caps { color: var(--champagne-2); }
.script { font-family: var(--script); font-weight: 400; line-height: 1.1; }
.gold-text {
  background: linear-gradient(110deg, var(--gold-3) 0%, var(--gold-2) 30%, #fff4d2 42%, var(--gold) 55%, var(--gold-2) 72%, var(--gold-3) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: -250% 0; } }

.div-ico { width: 180px; height: 18px; color: var(--gold); display: block; margin: 18px auto 0; }

/* ───────── Loader ───────── */
#loader {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-content: center; justify-items: center; gap: 18px;
  background: radial-gradient(ellipse at 50% 40%, var(--wine-800), var(--wine-950) 75%);
  color: var(--champagne);
}
.loader-mono { width: min(60vw, 280px); overflow: visible; }
.mono-text {
  font-family: var(--mono); font-style: italic; font-weight: 500; font-size: 112px; letter-spacing: .02em;
  fill: transparent; stroke: url(#goldGrad); stroke-width: 1.2;
  stroke-dasharray: 900; stroke-dashoffset: 900;
  animation: draw 2.6s var(--ease) forwards, fillIn 1s ease 2s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillIn { to { fill: url(#goldGrad); } }
.loader-line { width: 160px; height: 1px; background: rgba(233, 207, 143, .2); overflow: hidden; }
.loader-line span { display: block; height: 100%; width: 0; background: var(--gold-2); transition: width .3s; }
.loader-pct { font-family: var(--sans); font-size: 11px; letter-spacing: .3em; color: var(--champagne-2); }

/* ───────── Envelope gate ───────── */
#gate {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  background: radial-gradient(ellipse at 50% 30%, var(--wine-700), var(--wine-900) 60%, var(--wine-950));
  perspective: 1400px;
  overflow: hidden;
}
.gate-pattern {
  position: absolute; inset: -10%;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(233,207,143,.09) 0 2px, transparent 3px),
    radial-gradient(circle at 75% 75%, rgba(233,207,143,.07) 0 2px, transparent 3px),
    repeating-conic-gradient(from 45deg at 50% 50%, rgba(233,207,143,.035) 0 25%, transparent 0 50%);
  background-size: 46px 46px, 46px 46px, 92px 92px;
  animation: drift 40s linear infinite;
}
@keyframes drift { to { transform: translate(46px, 46px); } }
.gate-eyebrow { font-family: var(--bn); color: var(--gold-2); font-size: 22px; letter-spacing: .08em; position: relative; }
/* "Tap the seal to open": big, bold, unmistakable — guests must know what to do */
.gate-hint { position: relative; display: inline-block; font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: #8d1521; padding: 12px 26px; border: 1.5px solid rgba(141, 21, 33, .45); border-radius: 999px; background: rgba(255, 250, 240, .85);
  box-shadow: 0 6px 18px -10px rgba(110, 7, 16, .45); }
.gate-hint span { animation: breathe 1.8s ease-in-out infinite; display: inline-block; }
@keyframes breathe { 50% { opacity: .7; } }

.envelope {
  --w: min(86vw, 440px);
  position: relative; width: var(--w); height: calc(var(--w) / 1.45);
  transform-style: preserve-3d;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.45));
}
.env-back, .env-front, .env-flap { position: absolute; inset: 0; border-radius: 6px; }
.env-back { background: linear-gradient(180deg, #caa985, #b8936c); }
.env-front {
  z-index: 3;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), transparent 40%),
    linear-gradient(135deg, #ead5b6, #d6b993);
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
}
.env-front::after { /* gold foil edge */
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(156,116,52,.45); border-radius: 3px;
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
}
.env-flap {
  z-index: 4; transform-origin: 50% 0; transform-style: preserve-3d;
  background: linear-gradient(180deg, #f0dfc4, #dcc19b);
  clip-path: polygon(0 0, 100% 0, 50% 60%);
  border-radius: 6px 6px 0 0;
}
.letter {
  position: absolute; z-index: 2; left: 6%; right: 6%; top: 6%; height: 90%;
  background: var(--ivory);
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  overflow: hidden;
}
.letter-inner {
  position: absolute; inset: 8px; border: 1px solid rgba(201,164,92,.6); border-radius: 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px;
  padding: 12px;
}
.letter-names { font-family: var(--script); font-size: clamp(30px, 8vw, 46px); color: var(--wine-700); line-height: 1.1; }
.letter-names em { font-style: normal; color: var(--gold); padding: 0 .25em; font-size: .8em; }
.letter .div-ico { width: 120px; margin-top: 4px; }
.letter-sprig { position: absolute; width: 60px; height: 60px; color: var(--gold); opacity: .7; }
.letter-sprig.l { left: 6px; bottom: 6px; }
.letter-sprig.r { right: 6px; top: 6px; transform: rotate(180deg); }

.seal {
  position: absolute; z-index: 6; left: 50%; top: 60%;
  width: 84px; height: 84px; margin: -42px 0 0 -42px;
  border-radius: 50%;
  display: grid; place-items: center;
}
.seal::before { /* breathing halo */
  content: ""; position: absolute; inset: -14px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(246,227,168,.55), transparent 68%);
  animation: halo 2.4s ease-in-out infinite;
}
@keyframes halo { 50% { transform: scale(1.25); opacity: .35; } }
.seal-half {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff1c4 0%, #e3c57f 18%, #b98e45 48%, #8a632b 75%, #6d4c1f 100%);
  box-shadow: inset 0 -4px 10px rgba(0,0,0,.35), inset 0 3px 6px rgba(255,255,255,.4), 0 6px 14px rgba(0,0,0,.4);
}
.seal-half::before { /* wax drips */
  content: ""; position: absolute; inset: -6px; border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%;
  background: inherit; z-index: -1; filter: brightness(.85);
}
.seal-half.a { clip-path: polygon(0 0, 54% 0, 46% 100%, 0 100%); }
.seal-half.b { clip-path: polygon(54% 0, 100% 0, 100% 100%, 46% 100%); }
.seal-mono {
  position: relative; font-family: var(--mono); font-style: italic; font-weight: 600; font-size: 30px; letter-spacing: .02em; color: #6d4c1f;
  text-shadow: 0 1px 0 rgba(255,241,196,.7), 0 -1px 0 rgba(0,0,0,.3);
  pointer-events: none;
}
.seal::after {
  content: ""; position: absolute; inset: 9px; border-radius: 50%;
  border: 1px dashed rgba(109,76,31,.55); pointer-events: none;
}

/* ───────── FX layers ───────── */
#petals, #fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#petals { z-index: 40; }
#fx { z-index: 80; }
.cursor-dot { display: none; }
@media (pointer: fine) {
  .cursor-dot {
    display: block; position: fixed; z-index: 95; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px;
    border-radius: 50%; background: var(--gold-2); mix-blend-mode: difference; pointer-events: none;
    transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease);
  }
  .cursor-dot.big { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
}

/* ───────── Music ───────── */
.music-btn {
  position: fixed; z-index: 45; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(42,11,20,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(233,207,143,.6);
  display: grid; place-items: center;
}
.music-btn .bars { display: flex; gap: 3px; align-items: flex-end; height: 16px; }
.music-btn i { width: 3px; height: 4px; background: var(--gold-2); border-radius: 2px; }
.music-btn.playing i { animation: eq 1s ease-in-out infinite; }
.music-btn.playing i:nth-child(2) { animation-delay: .2s; }
.music-btn.playing i:nth-child(3) { animation-delay: .4s; }
.music-btn.playing i:nth-child(4) { animation-delay: .1s; }
@keyframes eq { 50% { height: 16px; } }

/* ───────── Story / film stage ───────── */
#story { position: relative; }
.stage {
  position: relative; height: 100vh; height: 100svh; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(243,220,214,.7), transparent 60%),
    var(--ivory);
}
.film { position: absolute; inset: 0; clip-path: inset(30% 30% 20% 30% round 999px 999px 18px 18px); will-change: clip-path; background: var(--wine-950); }
.film canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#filmBg { filter: blur(30px) brightness(.5) saturate(1.1); transform: scale(1.15); }
.film-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 55%, rgba(28,6,13,.55)); pointer-events: none; }
.arch-outline {
  position: absolute; border: 1px solid var(--gold); pointer-events: none;
  border-radius: 999px 999px 24px 24px;
}
.arch-outline::before {
  content: ""; position: absolute; inset: 6px; border: 1px solid rgba(201,164,92,.45); border-radius: inherit;
}

.hero-top {
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px;
  text-align: center; padding: 0 var(--gutter) 14px;
}
.hero-top .bn { font-family: var(--bn); color: var(--wine-500); font-size: 16px; }
.hero-names {
  font-family: var(--script); font-weight: 400; color: var(--wine-700);
  font-size: clamp(42px, 11vw, 92px); line-height: 1.05;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: .25em;
}
.hero-names .amp { color: var(--gold); font-size: .7em; }
/* Great Vibes "y" tails hang well below the line box: keep room so they never touch the arch */
.hero-names { padding-bottom: .2em; max-width: 100%; }
.split .ch { display: inline-block; will-change: transform; }
.hero-bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  text-align: center; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
}
.hero-date { font-family: var(--sans); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--wine-700); }
.scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--sans); font-size: 14px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #8d1521; }
.scroll-cue i { width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -100%; width: 100%; height: 100%; background: var(--wine-700); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { to { top: 100%; } }

.captions { position: absolute; inset: 0; pointer-events: none; }
.caption {
  position: absolute; left: 50%; bottom: 13%; width: min(88vw, 520px); transform: translateX(-50%);
  text-align: center; color: var(--ivory);
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(26px, 6.4vw, 44px); line-height: 1.15;
  text-shadow: 0 2px 24px rgba(0,0,0,.6);
  opacity: 0;
}
.caption .w { display: inline-block; }
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .caption { bottom: auto; top: 50%; width: 26vw; transform: translateY(-50%); text-align: left; font-size: clamp(30px, 2.8vw, 48px); }
  .caption:nth-child(odd) { left: 6vw; }
  .caption:nth-child(even) { left: auto; right: 6vw; text-align: right; }
}
.film-progress { position: absolute; right: 14px; top: 50%; height: 26vh; width: 1px; transform: translateY(-50%); background: rgba(251,246,238,.25); opacity: 0; }
.film-progress span { position: absolute; inset: 0; background: var(--gold-2); transform-origin: top; transform: scaleY(0); }

/* ───────── Generic sections ───────── */
.section { position: relative; padding: clamp(84px, 14vh, 150px) var(--gutter); overflow: hidden; }
.section.dark {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(138,49,72,.45), transparent 60%),
    linear-gradient(180deg, var(--wine-900), var(--wine-950));
  color: var(--ivory);
}
.sec-head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 7vh, 72px); }
.title {
  font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 7vw, 64px); line-height: 1.08;
  color: var(--wine-700); margin-top: 10px; letter-spacing: -.01em;
}
.dark .title { color: var(--champagne); }
.split-words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.split-words .w > span { display: inline-block; }
.hint { margin-top: 10px; font-style: italic; color: var(--champagne-2); }

.corner { position: absolute; width: clamp(90px, 18vw, 180px); height: clamp(90px, 18vw, 180px); color: var(--gold); opacity: .55; pointer-events: none; }
.corner.tl { top: 18px; left: 10px; transform: rotate(90deg) scaleX(-1); }
.corner.tr { top: 18px; right: 10px; transform: rotate(-90deg); }
.corner.br { bottom: 18px; right: 10px; transform: rotate(180deg) scaleX(-1) rotate(90deg); }

/* ───────── Couple ───────── */
#couple { background: linear-gradient(180deg, var(--ivory), var(--paper)); }
.couple-grid {
  display: grid; grid-template-columns: 1fr; gap: 28px; justify-items: center;
  max-width: 1000px; margin: 0 auto;
}
@media (min-width: 760px) { .couple-grid { grid-template-columns: 1fr auto 1fr; align-items: center; gap: 40px; } }
.person { text-align: center; width: min(100%, 340px); }
.arch-pic {
  position: relative; aspect-ratio: 3 / 4; border-radius: 999px 999px 20px 20px; overflow: hidden;
  outline: 1px solid var(--gold); outline-offset: 8px;
  margin: 10px 10px 26px;
  box-shadow: 0 30px 60px -30px rgba(61,16,32,.5);
}
.arch-pic img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); }
.person h3 { font-size: clamp(34px, 7vw, 46px); color: var(--wine-700); }
.parents { margin-top: 6px; font-style: italic; color: var(--muted); font-size: 17px; }
.couple-amp { position: relative; width: 92px; height: 92px; display: grid; place-items: center; }
.amp-ring { position: absolute; inset: 0; fill: none; stroke: var(--gold); stroke-width: .8; }
.amp-ring circle:last-child { stroke-dasharray: 3 5; }
.couple-amp span { font-family: var(--script); font-size: 54px; color: var(--gold); line-height: 1; transform: translateY(6px); }

/* ───────── Scratch + countdown ───────── */
.scratch-row { display: flex; justify-content: center; gap: clamp(14px, 4vw, 40px); flex-wrap: nowrap; }
.scratch { position: relative; width: clamp(92px, 26vw, 140px); aspect-ratio: 1; text-align: center; }
.scratch .under {
  position: absolute; inset: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #fffaf0, var(--champagne));
  color: var(--wine-700); font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 7vw, 40px);
  box-shadow: inset 0 0 0 2px var(--gold), inset 0 0 0 6px rgba(255,255,255,.4), 0 14px 30px -10px rgba(0,0,0,.6);
}
.scratch canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; touch-action: none; cursor: grab; }
.scratch small { position: absolute; left: 0; right: 0; bottom: -30px; font-family: var(--sans); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--champagne-2); }
.scratch.done .under { animation: pop .8s var(--ease); }
@keyframes pop { 40% { transform: scale(1.12); } }
.date-label { text-align: center; margin-top: 58px; font-style: italic; color: var(--champagne-2); opacity: 0; font-size: 20px; }

.countdown { margin: 54px auto 0; max-width: 620px; text-align: center; opacity: .25; filter: blur(3px); transition: opacity 1s, filter 1s; }
.countdown.live { opacity: 1; filter: none; }
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 2.5vw, 18px); margin-top: 16px; }
.cd {
  padding: 16px 6px 12px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(251,246,238,.07), rgba(251,246,238,.02));
  border: 1px solid rgba(233,207,143,.35);
}
.cd b { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 8vw, 52px); line-height: 1; color: var(--gold-2); font-variant-numeric: tabular-nums; overflow: hidden; height: 1em; }
.cd b .roll { display: inline-block; }
.cd small { display: block; margin-top: 8px; font-family: var(--sans); font-size: 9px; letter-spacing: .28em; text-transform: uppercase; color: var(--champagne-2); }

/* ───────── Timeline ───────── */
#events { background: linear-gradient(180deg, var(--paper), var(--ivory)); }
.timeline { position: relative; max-width: 940px; margin: 0 auto; }
.tl-line { position: absolute; top: 0; bottom: 0; left: 27px; width: 4px; height: 100%; overflow: visible; }
.tl-line line { stroke: var(--gold); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-dasharray: 100; stroke-dashoffset: 100; }
.tl-items { display: grid; gap: clamp(28px, 6vh, 56px); }
.tl-item { position: relative; padding-left: 76px; }
.tl-dot {
  position: absolute; left: 4px; top: 6px; width: 50px; height: 50px; border-radius: 50%;
  background: var(--ivory); border: 1px solid var(--gold); color: var(--wine-700);
  display: grid; place-items: center; box-shadow: 0 0 0 6px var(--ivory);
}
.tl-dot svg { width: 26px; height: 26px; }
.tl-card {
  background: #fff; border-radius: 18px; padding: 22px 24px;
  border: 1px solid rgba(201,164,92,.35);
  box-shadow: 0 24px 50px -30px rgba(61,16,32,.35);
}
.tl-card .bn { font-family: var(--bn); color: var(--gold-3); font-size: 15px; }
.tl-card h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 5vw, 30px); color: var(--wine-700); line-height: 1.15; margin: 2px 0 8px; }
.tl-meta { font-family: var(--sans); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 16px; }
@media (min-width: 820px) {
  .tl-line { left: calc(50% - 2px); }
  .tl-item { padding-left: 0; width: 50%; }
  .tl-item:nth-child(odd) { padding-right: 64px; text-align: right; }
  .tl-item:nth-child(even) { margin-left: 50%; padding-left: 64px; }
  .tl-item:nth-child(odd) .tl-meta { justify-content: flex-end; }
  .tl-item .tl-dot { left: auto; right: -25px; }
  .tl-item:nth-child(even) .tl-dot { right: auto; left: -25px; }
}

/* ───────── Gallery ───────── */
#gallery { background: var(--wine-900); color: var(--ivory); }
.gal-pin { height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 4vh; overflow: hidden; }
.gal-head { padding: 0 var(--gutter); }
.gal-head .tiny-caps { color: var(--champagne-2); }
.gal-head .title { color: var(--champagne); margin-top: 4px; }
.gal-track { display: flex; gap: clamp(18px, 4vw, 48px); padding: 0 var(--gutter); width: max-content; align-items: center; will-change: transform; }
.gal-card { flex: none; width: clamp(230px, 64vw, 380px); cursor: zoom-in; }
.gal-card:nth-child(even) { margin-top: 8vh; }
.gal-frame { aspect-ratio: 3 / 4; height: auto; max-height: 58svh; overflow: hidden; border-radius: 16px; position: relative; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
.gal-frame::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(233,207,143,.45); border-radius: 10px; pointer-events: none; }
.gal-frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.2); }
.gal-card p { font-family: var(--script); font-size: 30px; color: var(--gold-2); margin-top: 10px; }
.gal-end { flex: none; width: 40vw; max-width: 380px; font-family: var(--serif); font-style: italic; font-size: clamp(24px, 4vw, 36px); color: var(--champagne); }

/* ───────── Family polaroids ───────── */
#family { background: var(--ivory); }
.polaroids { position: relative; height: clamp(460px, 80vw, 560px); max-width: 1100px; margin: 0 auto; }
.polaroid {
  position: absolute; left: 50%; top: 50%; width: clamp(150px, 42vw, 330px);
  background: #fff; padding: 10px 10px 46px; border-radius: 4px;
  box-shadow: 0 20px 40px -18px rgba(43,29,31,.45);
  transform: translate(-50%, -50%);
  cursor: zoom-in;
}
.polaroid img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: 2px; }
.polaroid::after { content: "with love"; position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-family: var(--script); font-size: 24px; color: var(--wine-500); }
.polaroid::before { /* tape */
  content: ""; position: absolute; top: -10px; left: 50%; width: 70px; height: 20px; margin-left: -35px;
  background: rgba(232,211,180,.75); transform: rotate(-3deg);
}

/* ───────── Venue ───────── */
#venue { background: linear-gradient(180deg, var(--ivory), var(--blush)); }
.venue-card {
  position: relative; max-width: 640px; margin: 0 auto; text-align: center; overflow: hidden;
  padding: clamp(44px, 8vw, 72px) clamp(22px, 6vw, 56px);
  border-radius: 999px 999px 28px 28px;
  background: linear-gradient(180deg, var(--wine-800), var(--wine-950));
  color: var(--ivory);
  box-shadow: 0 40px 80px -30px rgba(61,16,32,.7), inset 0 0 0 1px rgba(233,207,143,.5), inset 0 0 0 8px var(--wine-800), inset 0 0 0 9px rgba(233,207,143,.3);
}
.venue-card .tiny-caps { color: var(--champagne-2); margin-top: 24px; position: relative; }
.venue-card h2 { font-size: clamp(44px, 10vw, 72px); margin: 8px 0 6px; position: relative; padding: 0 .1em; }
.venue-addr { color: var(--champagne); font-style: italic; position: relative; }
.venue-glow { position: absolute; left: 50%; top: -30%; width: 140%; aspect-ratio: 1; transform: translateX(-50%); background: radial-gradient(circle, rgba(233,207,143,.18), transparent 60%); animation: glow 6s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .4; transform: translateX(-50%) scale(1.1); } }
.btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; position: relative; }
.btn {
  display: inline-block; padding: 14px 22px; border-radius: 999px; text-decoration: none;
  font-family: var(--sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  background: linear-gradient(110deg, var(--gold-3), var(--gold-2), var(--gold));
  color: var(--wine-950);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(233,207,143,.6); }
.btn.ghost { background: transparent; color: var(--gold-2); border: 1px solid rgba(233,207,143,.6); }

/* ───────── Finale ───────── */
#finale { text-align: center; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; padding-bottom: 160px; }
.finale-mono { width: min(70vw, 340px); overflow: visible; }
.finale-mono .mono-text { animation: none; }
.finale-line { font-family: var(--serif); font-style: italic; font-size: clamp(26px, 5.5vw, 44px); color: var(--champagne); max-width: 640px; line-height: 1.2; }
.finale-names { font-size: clamp(44px, 10vw, 80px); }
.credit { margin-top: 40px; font-family: var(--sans); font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: rgba(217,191,152,.55); }
.candles { position: absolute; left: 0; right: 0; bottom: 0; height: 130px; display: flex; justify-content: center; gap: clamp(24px, 8vw, 90px); align-items: flex-end; pointer-events: none; }
.candles i { position: relative; width: 14px; background: linear-gradient(90deg, #e9dcc8, #fffaf0, #d9c8ae); border-radius: 3px 3px 0 0; }
.candles i:nth-child(1) { height: 70px; } .candles i:nth-child(2) { height: 100px; } .candles i:nth-child(3) { height: 120px; }
.candles i:nth-child(4) { height: 90px; } .candles i:nth-child(5) { height: 64px; }
.candles i::before { /* flame */
  content: ""; position: absolute; left: 50%; bottom: 100%; width: 10px; height: 22px; margin-left: -5px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(ellipse at 50% 80%, #fff 0%, #ffe8a3 30%, #f3a64b 65%, transparent 72%);
  animation: flicker 1.6s ease-in-out infinite alternate; transform-origin: 50% 100%;
}
.candles i::after { content: ""; position: absolute; left: 50%; bottom: 100%; width: 90px; height: 90px; margin: 0 0 -30px -45px; border-radius: 50%; background: radial-gradient(circle, rgba(255,214,140,.25), transparent 65%); animation: flicker 2s ease-in-out infinite alternate; }
.candles i:nth-child(2)::before { animation-delay: -.4s; } .candles i:nth-child(3)::before { animation-delay: -.9s; } .candles i:nth-child(4)::before { animation-delay: -1.3s; }
@keyframes flicker { 0% { transform: scale(1) rotate(-2deg); opacity: 1; } 50% { transform: scale(.92, 1.08) rotate(2deg); opacity: .85; } 100% { transform: scale(1.04, .95) rotate(-1deg); opacity: 1; } }

/* ───────── Lightbox ───────── */
.lightbox { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; background: rgba(28,6,13,.9); opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); cursor: zoom-out; padding: 16px; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 100%; max-height: 88svh; border-radius: 10px; box-shadow: 0 40px 80px rgba(0,0,0,.6); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
.seal.opening::before { animation: none; opacity: 0; transition: opacity .3s; }
.music-btn[hidden] { display: none; }

/* ───────── Reel player ───────── */
#reel { text-align: center; }
.reel-frame {
  position: relative; width: min(78vw, 360px); aspect-ratio: 9 / 16; margin: 0 auto;
  border-radius: 999px 999px 28px 28px; overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(233,207,143,.6), 0 0 0 10px var(--wine-900), 0 0 0 11px rgba(233,207,143,.3),
              0 0 calc(20px + var(--bar, 0) * 50px) rgba(233,207,143, calc(.1 + var(--bar, 0) * .25));
  background: var(--wine-950);
}
.reel-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(circle, rgba(28,6,13,.15), rgba(28,6,13,.55));
  transition: opacity .5s var(--ease);
}
.reel-play svg { width: 84px; height: 84px; }
.reel-play circle { fill: rgba(28,6,13,.45); stroke: var(--gold-2); stroke-width: 1.2; }
.reel-play path { fill: var(--gold-2); }
.reel-play::before { content: ""; position: absolute; width: 84px; height: 84px; border-radius: 50%; border: 1px solid var(--gold-2); animation: ring 2.2s var(--ease) infinite; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.9); opacity: 0; } }
.reel-frame.playing .reel-play { opacity: 0; }
.reel-bar { position: absolute; left: 18%; right: 18%; bottom: 14px; height: 2px; background: rgba(251,246,238,.25); border-radius: 2px; overflow: hidden; }
.reel-bar span { display: block; height: 100%; width: 100%; background: var(--gold-2); transform-origin: left; transform: scaleX(0); }

/* ───────── Beat-reactive touches (driven by --beat / --bar from the audio clock) ───────── */
.arch-outline { box-shadow: 0 0 calc(var(--beat, 0) * 26px) rgba(233,207,143,.55), inset 0 0 calc(var(--beat, 0) * 14px) rgba(233,207,143,.35); }
.hero-names .amp { filter: drop-shadow(0 0 calc(var(--beat, 0) * 14px) rgba(201,164,92,.9)); }
.gold-text { filter: brightness(calc(1 + var(--beat, 0) * .22)); }
.film-vignette { opacity: calc(1 - var(--bar, 0) * .35); }
.film-progress span { box-shadow: 0 0 calc(var(--beat, 0) * 10px) var(--gold-2); }
.couple-amp span { text-shadow: 0 0 calc(var(--beat, 0) * 18px) rgba(201,164,92,.8); }
.cd { box-shadow: 0 0 calc(var(--beat, 0) * 22px) rgba(233,207,143,.18); }
.tl-dot { box-shadow: 0 0 0 6px var(--ivory), 0 0 0 calc(6px + var(--beat, 0) * 6px) rgba(201,164,92,.25); }
.venue-glow { opacity: calc(.6 + var(--bar, 0) * .4); }
.candles { filter: brightness(calc(1 + var(--beat, 0) * .3)); }
.gal-frame::after { border-color: rgba(233,207,143, calc(.35 + var(--beat, 0) * .5)); }
/* music button bars follow the real beat instead of a fake loop */
.music-btn.playing i { animation: none; height: calc(4px + var(--beat, 0) * 12px); transition: height .05s linear; }
.music-btn.playing i:nth-child(2) { height: calc(4px + var(--bar, 0) * 12px); }
.music-btn.playing i:nth-child(3) { height: calc(6px + var(--beat, 0) * 8px); }
.music-btn.playing i:nth-child(4) { height: calc(3px + var(--bar, 0) * 9px); }
