/* Swarna Mahal v3 — royal maroon & gold, 3D/painted look, full-width responsive */
:root {
  --maroon: #5c0f2a;
  --maroon-2: #7d1838;
  --maroon-3: #3a0718;
  --maroon-4: #2a0411;
  --gold: #c9973f;
  --gold-hi: #f6d58b;
  --gold-text: #f7c46c;
  --cream: #fbeedb;
  --cream-2: #f4dfc0;
  --ink: #3f1414;
  --ink-soft: #7a5040;
  --display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Great Vibes', cursive;
  --deva: 'Tiro Devanagari Hindi', serif;
  --sans: 'Mulish', system-ui, sans-serif;
  --vw: 100vw;
  --gold-grad: linear-gradient(180deg, #fff0b8 0%, #e2b04c 30%, #a86f1c 62%, #f0c86a 100%);
  --cusp: polygon(16px 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 16px 100%, 0 50%);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; cursor: pointer; }
.slot { display: block; width: 100%; height: 100%; }
/* low specificity so positioned slots (.door-top, .door-bottom…) keep their own size */
.slot svg, img:where(.slot) { display: block; width: 100%; height: 100%; object-fit: contain; }
.only-wide { display: none !important; }
.wrap { max-width: 760px; margin: 0 auto; }

/* ---------- surfaces ---------- */
.maroon {
  background-color: var(--maroon-3);
  background-image: var(--damask-maroon), radial-gradient(ellipse at 50% 0%, var(--maroon-2), var(--maroon-3) 70%);
  background-size: 120px 140px, 100% 100%;
}
.cream {
  background-color: var(--cream);
  background-image: var(--paper), var(--damask-cream), linear-gradient(180deg, #fdf3e3, var(--cream) 50%, var(--cream-2));
  background-size: 300px 300px, 120px 140px, 100% 100%;
}

/* ---------- plaque button (cusped ends, gold rim) ---------- */
.btn-plaque {
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s ease;
}
/* gold rim */
.btn-plaque::before { content: ''; position: absolute; inset: 0; background: var(--gold-grad); clip-path: var(--cusp); }
/* shadow/glow: a same-shaped layer behind (no CSS filter, so Safari draws no box) */
.btn-plaque::after {
  content: '';
  position: absolute;
  inset: 3px -2px -5px;
  z-index: -1;
  clip-path: var(--cusp);
  background: rgba(60, 5, 20, .35);
  transition: background .3s ease, inset .3s ease;
}
.btn-plaque:hover::after { background: rgba(60, 5, 20, .45); inset: 5px -3px -7px; }
.btn-plaque:focus { outline: none; }
.btn-plaque:focus-visible span { box-shadow: inset 0 0 0 2px var(--gold-hi); }
.btn-plaque span {
  position: relative;
  display: block;
  margin: 2.5px;
  padding: 12px 40px;
  clip-path: var(--cusp);
  background: linear-gradient(180deg, #9a2348 0%, var(--maroon) 55%, var(--maroon-3) 100%);
  color: var(--gold-hi);
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-plaque:hover { transform: translateY(-1px); }
.btn-plaque:active { transform: translateY(1px); }
.btn-plaque.wide { justify-self: center; }
.btn-plaque:disabled { opacity: .6; }

/* ---------- stage: sticky hero + doors, opened by scrolling ---------- */
.runway { position: relative; height: 100vh; height: 100svh; }
/* page is locked on the invitation card until the guest taps to open */
body.locked { overflow: hidden; height: 100vh; height: 100dvh; touch-action: none; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--maroon-3); }
.hero { position: absolute; inset: 0; overflow: hidden; }
.hero-art { position: absolute; inset: -3% 0 0; will-change: transform; transform: scale(1.04); }
.hero-art .slot svg, .hero-art img.slot { object-fit: cover; }
.hero-art::after { content: ''; position: absolute; inset: 0; background: #2a0b1c; opacity: .35; pointer-events: none; }
body.opened .hero-art::after { animation: dusk 3s cubic-bezier(.2, .7, .2, 1) forwards; }
@keyframes dusk { to { opacity: 0; } }
.hero-names {
  position: absolute;
  top: 7%;
  left: 0;
  right: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(46px, 13vw, 62px);
  line-height: 1.02;
  color: var(--maroon);
  text-shadow: 0 2px 14px rgba(255, 240, 225, .7);
  z-index: 2;
}
.hero-names .amp { font-family: var(--script); font-style: normal; font-size: .5em; color: var(--maroon-2); margin: 2px 0; }
.hero-names span { opacity: 0; }
body.opened .hero-names span { animation: rise 1.4s cubic-bezier(.2, .8, .2, 1) both; }
body.opened .hero-names span:nth-child(2) { animation-delay: .3s; }
body.opened .hero-names span:nth-child(3) { animation-delay: .6s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(5px); } to { opacity: 1; } }

.gate { position: absolute; inset: 0; z-index: 5; perspective: 1400px; --p: 0; }
.gate.gone { visibility: hidden; }
.door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  transform-style: preserve-3d;
  will-change: transform;
}
.door-l { left: 0; transform-origin: left center; transform: rotateY(calc(var(--p) * -108deg)); }
.door-r { right: 0; transform-origin: right center; transform: rotateY(calc(var(--p) * 108deg)); }
.door-face {
  position: absolute;
  inset: 0;
  background-color: var(--maroon);
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, .35), transparent 12%, transparent 88%, rgba(0, 0, 0, .35)),
    var(--paper), var(--damask-maroon),
    radial-gradient(ellipse at 50% 40%, #7a1a3a, var(--maroon) 55%, var(--maroon-3));
  background-size: 100% 100%, 300px 300px, 120px 140px, 100% 100%;
  box-shadow: inset 0 0 0 3px #2a0411, inset 0 0 0 6px rgba(201, 151, 63, .55), inset 0 0 0 8px #2a0411, inset 0 0 70px rgba(0, 0, 0, .55);
  backface-visibility: hidden;
}
.door-l .door-face { border-right: 2px solid #1c020a; }
.door-r .door-face { border-left: 2px solid #1c020a; }
.door-edge { position: absolute; top: 0; bottom: 0; width: 18px; background: linear-gradient(90deg, #2a0411, #6a1530, #2a0411); }
.door-l .door-edge { right: 0; transform-origin: right center; transform: rotateY(-90deg); }
.door-r .door-edge { left: 0; transform-origin: left center; transform: rotateY(90deg); }
.door-top { position: absolute; top: 4%; width: 84%; height: 20%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.door-l .door-top { left: 8%; }
.door-r .door-top { right: 8%; transform: scaleX(-1); }
.door-bottom { position: absolute; bottom: 4%; width: 84%; height: 24%; left: 8%; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); }
.door-r .door-bottom { transform: scaleX(-1); } /* elephants face the centre */
.hero-art img.slot { object-position: 50% 40%; }
.door-ring {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  margin-top: 90px;
  border-radius: 50%;
  border: 4px solid #d9a548;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .6), inset 0 1px 2px rgba(255, 255, 255, .5);
}
.door-l .door-ring { right: 14px; }
.door-r .door-ring { left: 14px; }

/* the invitation sash across both doors (vertical panel on desktop) */
.gate-card {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 3;
  padding: 34px 28px 26px;
  text-align: center;
  background-color: var(--cream);
  background-image: var(--paper), var(--damask-cream), radial-gradient(ellipse at center, #fff8ea 0%, var(--cream) 60%, var(--cream-2) 100%);
  background-size: 300px 300px, 120px 140px, 100% 100%;
  box-shadow: 0 30px 50px rgba(0, 0, 0, .6), 0 -20px 40px rgba(0, 0, 0, .35);
  opacity: clamp(0, calc(1 - var(--p) * 2.4), 1);
  transform: translateY(-50%) scale(calc(1 + var(--p) * .12));
}
.gate-card::before, .gate-card::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 14px;
  background: linear-gradient(180deg, #9a2348, var(--maroon) 60%, var(--maroon-3));
  box-shadow: 0 0 0 1px #2a0411;
}
.gate-card::before { top: -14px; }
.gate-card::after { bottom: -14px; transform: scaleY(-1); }
.om { font-family: var(--deva); font-size: 56px; line-height: 1; color: #a8742a; text-shadow: 0 1px 0 #fff, 0 2px 6px rgba(168, 116, 42, .4); }
.gate-kalash { width: 80px; height: 90px; margin: 0 auto; }
.mantra { font-family: var(--deva); color: #8a5a22; font-size: 22px; margin: 10px 0 12px; }
.intro { font-family: var(--display); font-size: 18px; line-height: 1.45; color: #8a5a22; margin: 0 auto 22px; font-weight: 600; max-width: 290px; }
#openBtn::after { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { background: rgba(246, 213, 139, .75); inset: -4px -8px -8px; } }

/* ---------- music ---------- */
.music-btn {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  z-index: 60;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 252, 245, .92);
  color: var(--maroon);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.music-btn svg { width: 20px; height: 20px; fill: currentColor; }
.music-btn .wave { opacity: .25; }
.music-btn.on .wave { opacity: 1; animation: wave 1.4s ease-in-out infinite; }
@keyframes wave { 50% { opacity: .35; } }

/* ---------- content ---------- */
.content { position: relative; overflow: clip; }
section { position: relative; text-align: center; }
[data-reveal] { opacity: 0; transform: translateY(44px); transition: opacity .9s cubic-bezier(.215, .61, .355, 1), transform .9s cubic-bezier(.215, .61, .355, 1); }
[data-reveal].is-in { opacity: 1; transform: none; }

.h2 { font-family: var(--display); font-weight: 600; font-size: 34px; margin: 0 0 26px; }
.h2.light { color: var(--gold-text); text-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.h2.dark { color: var(--maroon); }

/* scrolls */
.families { padding: 50px 0 30px; }
.scroll { width: calc(100% - 64px); max-width: 760px; margin: 0 auto 34px; position: relative; }
.rod {
  position: relative;
  height: 28px;
  margin: 0 -4px;
  border-radius: 14px;
  background: linear-gradient(180deg, #3a0718 0%, #8e2346 30%, #c24a72 45%, #7d1838 65%, #3a0718 100%);
  z-index: 2;
}
.rod::before, .rod::after, .rod i::before, .rod i::after { content: ''; position: absolute; top: 50%; }
.rod::before, .rod::after { width: 18px; height: 34px; margin-top: -17px; border-radius: 4px; background: linear-gradient(180deg, #7a4a10, #f6d58b 35%, #c08a2c 60%, #6b3f0c); }
.rod::before { left: -6px; }
.rod::after { right: -6px; }
.rod i::before, .rod i::after { width: 16px; height: 24px; margin-top: -12px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff2c0, #e0aa48 40%, #8a5512 85%); }
.rod i::before { left: -20px; }
.rod i::after { right: -20px; }
.sheet {
  position: relative;
  margin: -8px 12px;
  padding: 50px 22px 30px;
  background-color: var(--maroon);
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, .45), transparent 9%, transparent 91%, rgba(0, 0, 0, .45)),
    var(--paper),
    radial-gradient(ellipse at 50% 45%, #85204a 0%, var(--maroon) 50%, var(--maroon-3) 100%);
  background-size: 100% 100%, 300px 300px, 100% 100%;
  color: var(--gold-text);
}
.sheet::before { content: ''; position: absolute; inset: 8px; border-left: 3px dotted rgba(246, 196, 108, .55); border-right: 3px dotted rgba(246, 196, 108, .55); pointer-events: none; }
.sheet h3 { font-family: var(--display); font-weight: 600; font-size: 27px; margin: 0 0 16px; color: #ffcf7a; }
.sheet .rel { font-family: var(--display); font-size: 17px; margin: 18px 0 4px; color: #f0b866; font-weight: 500; }
.sheet .who { font-family: var(--display); font-size: 19px; font-weight: 600; line-height: 1.3; margin: 0; color: #ffd185; }
.sheet .and { font-weight: 500; }
.sheet ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; font-family: var(--display); font-weight: 600; font-size: 17px; color: #ffd185; }
.sheet-orn { width: 230px; margin: 28px auto 0; }

/* unrolling: --u 0 = rolled shut, 1 = fully open (set from JS) */
.scroll { --u: 0; --sh: 400px; }
.scroll .sheet { clip-path: inset(0 0 calc((1 - var(--u)) * 100%) 0); }
.scroll .sheet-body { opacity: clamp(0, calc(var(--u) * 1.6 - .5), 1); transform: translateY(calc((1 - var(--u)) * -24px)); }
.scroll .rod-bottom { transform: translateY(calc((var(--u) - 1) * (var(--sh) - 16px))); }

/* scroll shadows without filters: rods cast their own soft shadow, and a
   separate shadow plate grows with the unrolled sheet (no flicker, no cut) */
.scroll .rod { box-shadow: 0 6px 10px -2px rgba(60, 10, 20, .35), 0 14px 24px -8px rgba(60, 10, 20, .25); }
.scroll::before {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  top: 14px;
  height: calc(var(--u) * (var(--sh) - 16px));
  border-radius: 6px;
  box-shadow: 0 22px 40px -10px rgba(60, 10, 20, .45), 0 6px 14px rgba(60, 10, 20, .18);
  pointer-events: none;
}
.scroll .rod-bottom { will-change: transform; }

/* floral ornament hanging from the bottom rod; travels down with it and
   blooms in as the scroll opens */
.scroll.has-orn { margin-bottom: 150px; }
.scroll-orn {
  position: absolute;
  left: 50%;
  top: 100%;
  width: 104px;
  margin: -4px 0 0 -52px;
  opacity: clamp(0, calc(var(--u) * 2 - 1), 1);
  transform: scale(calc(.6 + var(--u) * .4));
  transform-origin: 50% 0;
  filter: drop-shadow(0 6px 8px rgba(60, 10, 20, .25));
  pointer-events: none;
}
/* the bottom rod's surface turns as it rolls */
.scroll .rod-bottom {
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0) 0 5px, rgba(255, 255, 255, .10) 5px 7px) 0 calc(var(--u) * 140px) / 100% 14px,
    linear-gradient(180deg, #3a0718 0%, #8e2346 30%, #c24a72 45%, #7d1838 65%, #3a0718 100%);
}

/* date */
.date { padding: 0 0 4px; overflow: hidden; }
.strip { height: 22px; background-image: var(--strip); background-size: 34px 22px; border-top: 1px solid rgba(201, 151, 63, .4); border-bottom: 1px solid rgba(201, 151, 63, .4); background-color: rgba(246, 222, 190, .6); }
.date-top { width: 150px; margin: 30px auto 6px; filter: drop-shadow(0 8px 10px rgba(90, 30, 20, .25)); }
.date-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin: 0 auto 40px; max-width: 1000px; }
.date-side { height: 120px; margin: 0 -24px; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .25)); }
.date-side { position: relative; z-index: 2; }
.date-side.flip { transform: scaleX(-1); }
.plaques { position: relative; z-index: 1; }
.plaques { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; perspective: 600px; }
.plaque {
  position: relative;
  width: 82px;
  height: 66px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #9a2348, var(--maroon) 60%, var(--maroon-3));
  --m: radial-gradient(circle 10px at 0 0, #0000 98%, #000) top left / 51% 51% no-repeat,
    radial-gradient(circle 10px at 100% 0, #0000 98%, #000) top right / 51% 51% no-repeat,
    radial-gradient(circle 10px at 0 100%, #0000 98%, #000) bottom left / 51% 51% no-repeat,
    radial-gradient(circle 10px at 100% 100%, #0000 98%, #000) bottom right / 51% 51% no-repeat;
  -webkit-mask: var(--m);
  mask: var(--m);
  box-shadow: inset 0 0 0 2px rgba(246, 196, 108, .5), inset 0 2px 0 rgba(255, 255, 255, .2);
  margin-top: 10px;
}
.plaque .tab { position: absolute; top: 4px; font-family: var(--sans); font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--maroon); background: var(--cream); padding: 2px 8px; border-radius: 8px; }
.plaque .v { font-family: var(--display); font-weight: 700; font-size: 26px; color: var(--gold-hi); margin-top: 12px; }
/* reveal: the plaque glows, then the number rises out of it, blurred to sharp */
.plaque { overflow: hidden; }
.plaque .v { display: inline-block; opacity: 0; transform: translateY(70%) scale(.7); filter: blur(6px); }
.plaque.lit { animation: plaqueGlow 1.4s ease-out both; }
.plaque.lit .v { animation: numRise 1.1s cubic-bezier(.2, 1.3, .35, 1) .25s both; }
@keyframes plaqueGlow {
  0% { box-shadow: inset 0 0 0 2px rgba(246, 196, 108, .5); }
  35% { box-shadow: inset 0 0 0 2px var(--gold-hi), inset 0 0 40px rgba(255, 214, 120, .65); }
  100% { box-shadow: inset 0 0 0 2px rgba(246, 196, 108, .5), inset 0 0 14px rgba(255, 214, 120, .15); }
}
@keyframes numRise {
  0% { opacity: 0; transform: translateY(70%) scale(.7); filter: blur(6px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: none; filter: none; text-shadow: 0 0 14px rgba(255, 214, 120, .6); }
}
.plaque .shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 240, 200, .55) 50%, transparent 65%); transform: translateX(-120%); }
.plaque.lit .shine { animation: shine 1.2s ease-in-out .7s both; }
@keyframes shine { to { transform: translateX(120%); } }
.sparks { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 3; }
.sparks i { position: absolute; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: radial-gradient(circle, #fff6d0, #f2c45a 60%, transparent 70%); animation: spark .9s ease-out forwards; }
@keyframes spark { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
/* button and "Save the Date" share one slot and cross-fade: no layout jump */
.reveal-slot { display: grid; place-items: center; min-height: 64px; }
.reveal-slot > * { grid-area: 1 / 1; }
#revealBtn { transition: opacity .7s ease, transform .7s ease, visibility 0s linear .7s; }
#revealBtn.used { opacity: 0; transform: scale(.94); pointer-events: none; visibility: hidden; }
.after { margin: 0; opacity: 0; transform: translateY(8px); filter: blur(4px); transition: opacity 1.1s ease, transform 1.1s ease, filter 1.1s ease; pointer-events: none; }
.after.show { opacity: 1; transform: none; filter: none; }
.after { font-family: var(--script); font-size: 30px; color: var(--maroon); margin: 12px 0 0; }

/* gallery: a wall with a long rail and many hanging frames */
.gallery {
  padding: 0;
  background-color: #f6e6cf;
  background-image: var(--paper), radial-gradient(ellipse at 50% 30%, #fbf0dd, #f1dcbd 80%);
  background-size: 300px 300px, 100% 100%;
}
.divider-wide { width: min(92%, 640px); margin: 0 auto 18px; }
.wall { position: relative; }
.gal-runway { position: relative; }
.gal-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.gal-stage .h2 { margin-bottom: 2vh; }
.gal-stage .divider-wide { margin-bottom: 1vh; }
.track { overflow: hidden; overflow-x: clip; overflow-y: visible; padding-bottom: 60px; margin-bottom: -60px; }
.track-inner {
  position: relative;
  will-change: transform;
  display: flex;
  align-items: flex-start;
  gap: 40px;
  width: max-content;
  padding: 0 max(4vw, calc((100vw - 1280px) / 2)) 50px;
}
.track-inner::before {
  /* the rail runs the full length of the wall */
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(180deg, #a52a52, var(--maroon) 60%, var(--maroon-3));
  box-shadow: 0 3px 6px rgba(0, 0, 0, .3);
}
.frame3d {
  flex: none;
  width: min(68vw, 330px, 40vh);
  margin: 0;
  position: relative;
  /* lean from the hanging ring, driven by the rail's motion */
  transform-origin: 50% 0;
  transform: perspective(900px) rotate(var(--lean, 0deg)) rotateY(var(--yaw, 0deg));
}
.frame3d { --cordh: calc(70px + var(--drop)); }
.cords { position: relative; height: var(--cordh); }
.cords .ring { position: absolute; top: -4px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 3px solid #ecd6c4; z-index: 2; }
.cords svg { position: absolute; left: 0; top: 4px; width: 100%; height: calc(100% - 2px); overflow: visible; }
.cords .cord { fill: none; stroke: #7d1838; stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.cords .cord-twist { fill: none; stroke: #d7718f; stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.swing { transform-origin: 50% calc(-1 * var(--cordh)); transform: rotate(var(--tilt)); animation: sway 6s ease-in-out infinite; animation-delay: calc(var(--d) * -.8s); }
@keyframes sway { 0%, 100% { transform: rotate(var(--tilt)); } 50% { transform: rotate(calc(var(--tilt) * -1)); } }
.moulding {
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .22), transparent 40%), linear-gradient(180deg, #9c2452, #7d1838 50%, #5c0f2a);
  box-shadow: inset 0 0 0 2px #4a0a20, inset 4px 4px 0 rgba(255, 160, 190, .35), inset -4px -4px 0 rgba(0, 0, 0, .35),
    18px 26px 30px rgba(60, 20, 10, .35), 4px 6px 6px rgba(0, 0, 0, .3);
  position: relative;
}
.moulding::after { content: ''; position: absolute; inset: 16px; box-shadow: inset 2px 2px 0 #3a0718, inset -2px -2px 0 #c24a72; pointer-events: none; }
.mat { background: #f9ead6; padding: 14px 14px 10px; box-shadow: inset 2px 2px 6px rgba(0, 0, 0, .25); }
.mat img, .mat .ph { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.landscape { width: min(80vw, 440px, 52vh); }
@media (max-width: 899px) { .frame3d { --cordh: calc(46px + var(--drop) * .5); } }
@media (max-height: 720px) and (max-width: 899px) {
  .gal-stage .divider-wide { display: none; }
  .gal-stage .h2 { font-size: 28px; margin-bottom: 1vh; }
  .frame3d { width: min(62vw, 36vh); --cordh: calc(34px + var(--drop) * .35); }
  .landscape { width: min(76vw, 46vh); }
  .track-inner { padding-bottom: 24px; }
}
.landscape .mat img, .landscape .mat .ph { aspect-ratio: 4 / 3; }
.mat .ph { position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #fff5e6, #ecd2ae); }
.mat .ph svg, .mat .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; box-shadow: none; aspect-ratio: auto; }
.mat .ph img.contain { object-fit: contain; padding: 8%; }
.mat .ph span { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .8); font: 600 10px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.mat figcaption { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 22px; color: var(--maroon); padding-top: 8px; }
.story .mat blockquote { margin: 0; padding: 30px 20px; font-family: var(--display); font-style: italic; font-size: 20px; line-height: 1.45; color: var(--maroon); aspect-ratio: 4 / 5; display: grid; place-items: center; }
.frame-nav { display: flex; justify-content: center; align-items: center; gap: 22px; }
.gal-progress { width: 120px; height: 3px; border-radius: 2px; background: rgba(92, 15, 42, .15); overflow: hidden; }
.gal-progress i { display: block; height: 100%; width: 0; background: var(--maroon); }
.frame-nav button { border: 0; background: none; color: var(--maroon); font-size: 28px; letter-spacing: -2px; padding: 4px 10px; }

/* ceremonies */
.ceremonies { padding: 110px 22px 60px; }
.jh { position: absolute; top: 0; width: 140px; z-index: 1; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); }
.jh-l { left: 0; }
.jh-r { right: 0; transform: scaleX(-1); }
.cere-grid { max-width: 420px; margin: 0 auto; }
.arch-card {
  --arch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40 V30 C0 24 6 22 12 21 C20 20 24 14 28 10 C34 5 42 4 46 2 L50 0 L54 2 C58 4 66 5 72 10 C76 14 80 20 88 21 C94 22 100 24 100 30 V40Z'/%3E%3C/svg%3E");
  position: relative;
  padding: 7px;
  background: linear-gradient(180deg, #b47a3c, #6b3a14 40%, #a8703a 70%, #5a2c0c);
  -webkit-mask: var(--arch) top / 100% 120px no-repeat, linear-gradient(#000, #000) 0 119px / 100% calc(100% - 119px) no-repeat;
  mask: var(--arch) top / 100% 120px no-repeat, linear-gradient(#000, #000) 0 119px / 100% calc(100% - 119px) no-repeat;
  filter: drop-shadow(0 20px 24px rgba(0, 0, 0, .5));
}
.arch-card::before {
  content: '';
  position: absolute;
  inset: 7px;
  background-color: #fbe7c8;
  background-image: var(--paper), radial-gradient(ellipse at 50% 30%, #fff6e6, #f8dfb8 60%, #ecc895);
  background-size: 300px 300px, 100% 100%;
  -webkit-mask: var(--arch) top / 100% 113px no-repeat, linear-gradient(#000, #000) 0 112px / 100% calc(100% - 112px) no-repeat;
  mask: var(--arch) top / 100% 113px no-repeat, linear-gradient(#000, #000) 0 112px / 100% calc(100% - 112px) no-repeat;
}
.arch-card > * { position: relative; }
.arch-art { height: 200px; margin: 50px 18px 4px; }
.arch-card h3 { font-family: var(--display); font-weight: 700; font-size: 34px; color: var(--maroon-3); margin: 4px 0 14px; }
.arch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 22px; text-align: left; }
.venue { font-family: var(--sans); font-size: 19px; font-weight: 600; color: var(--ink); margin: 0; line-height: 1.25; }
.pin { flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: var(--maroon-3); border: 1.5px solid var(--maroon-3); box-shadow: 0 3px 0 rgba(58, 7, 24, .3); }
.pin svg { width: 22px; height: 22px; }
.arch-foot { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 22px 0; padding: 12px 0 22px; border-top: 1px solid rgba(90, 44, 12, .3); font-family: var(--sans); font-weight: 700; font-size: 18px; color: var(--ink); }
.arch-foot .t { font-size: 13px; }
.cere-div { width: 80%; max-width: 520px; margin: 30px auto; }

/* after ceremonies */
.after-cere { padding: 50px 0 20px; }
.torn {
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 16px;
  background: #fdf3e3;
  clip-path: polygon(0 60%, 4% 30%, 8% 70%, 12% 20%, 17% 60%, 21% 35%, 26% 75%, 30% 25%, 35% 55%, 40% 15%, 44% 65%, 49% 30%, 54% 70%, 58% 20%, 63% 60%, 67% 35%, 72% 75%, 76% 25%, 81% 55%, 86% 20%, 90% 65%, 95% 30%, 100% 60%, 100% 100%, 0 100%);
  z-index: 2;
}
.badges { display: flex; justify-content: center; gap: 26px; padding: 14px 16px 40px; flex-wrap: wrap; }
.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0;
  background: none;
  color: var(--maroon);
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
/* brass medallion: gold rim, maroon enamel centre, embossed gold icon */
.medal {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-hi);
  background:
    radial-gradient(circle at 35% 30%, #a1305a, var(--maroon) 55%, var(--maroon-3) 100%) padding-box,
    conic-gradient(from 200deg, #f8e2a0, #b7822c, #fff0b8, #a86f1c, #f0c86a, #8a5512, #f8e2a0) border-box;
  border: 4px solid transparent;
  box-shadow: 0 10px 18px rgba(80, 15, 30, .3), inset 0 0 0 2px rgba(246, 213, 139, .45), inset 0 -6px 10px rgba(0, 0, 0, .35);
  transition: transform .25s ease, box-shadow .25s ease;
}
.medal::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; border: 1px dashed rgba(246, 213, 139, .45); }
.medal svg { width: 30px; height: 30px; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .4)); }
.medal-label { font: 700 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--maroon); }
.badge:hover .medal, .badge:focus-visible .medal { transform: translateY(-3px); box-shadow: 0 16px 24px rgba(80, 15, 30, .35), inset 0 0 0 2px rgba(246, 213, 139, .6), inset 0 -6px 10px rgba(0, 0, 0, .35); }
.badge:focus { outline: none; }
.orn-img { display: block; width: 100%; height: auto; }

/* RSVP */
.rsvp { padding: 30px 18px 60px; }
.rsvp-card { max-width: 680px; margin: 0 auto; background: rgba(255, 253, 249, .96); border-radius: 22px; padding: 34px 20px 28px; box-shadow: 0 24px 50px rgba(90, 30, 20, .18), 0 0 0 1px rgba(201, 151, 63, .25); }
.rsvp .sub { margin: -14px 0 24px; color: var(--ink-soft); font-size: 18px; }
.rsvp form { text-align: left; display: grid; gap: 16px; }
.two { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span, .field-title { font-family: var(--sans); font-size: 13px; font-weight: 700; color: var(--maroon); margin: 0; }
input, textarea { font: 500 16px var(--sans); color: var(--ink); padding: 13px 14px; border-radius: 12px; border: 1.5px solid #e7d6c6; background: #fff; width: 100%; }
input:focus, textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.count-box { background: #f1ece9; border-radius: 16px; padding: 18px; text-align: center; display: grid; gap: 10px; }
.count-q { font-family: var(--sans); font-weight: 700; color: var(--maroon-3); }
.count-box small, .hint { font-family: var(--sans); font-size: 12px; color: var(--ink-soft); }
.stepper { display: flex; justify-content: center; align-items: center; gap: 10px; }
.stepper button { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid #d9c9c2; background: #fff; color: var(--maroon); font-size: 22px; font-weight: 700; }
.stepper output { width: 66px; height: 44px; border-radius: 12px; border: 1.5px solid #d9c9c2; background: #fff; display: grid; place-items: center; font: 700 18px var(--sans); }
.ev-list { border: 1.5px solid #ece0d8; border-radius: 16px; overflow: hidden; }
.rsvp-ev { border: 0; border-bottom: 1px solid #ece0d8; margin: 0; padding: 14px 16px; }
.rsvp-ev:last-child { border-bottom: 0; }
.rsvp-ev legend { float: left; width: 100%; font: 700 17px var(--sans); color: var(--maroon-3); padding: 0; margin-bottom: 10px; }
.rsvp-ev legend small { display: block; font-weight: 500; font-size: 12px; color: var(--gold); margin-top: 2px; }
.opts { clear: both; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opts input { position: absolute; opacity: 0; width: 1px; }
.opts span { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 0; border-radius: 12px; border: 1.5px solid #e2d4cc; background: #fff; font: 600 14px var(--sans); color: var(--ink); }
.opts span::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #8a7470; }
.opts input:checked + span { border-color: var(--maroon); background: #fbeef1; color: var(--maroon); }
.opts input:checked + span::before { border: 4.5px solid var(--maroon); }
.opts input:focus-visible + span { outline: 2px solid var(--gold); }
.hint { text-align: center; margin: 0; }
.status { text-align: center; font: 600 15px var(--sans); margin: 0; min-height: 1.2em; }
.status.ok { color: #2f7a3a; }
.status.err { color: #b3261e; }

/* outro */
.outro { height: 820px; overflow: hidden; background: #f3d9bf; }
.outro .torn.top { top: 0; z-index: 3; transform: scaleY(-1); background: #fdf3e3; height: 18px; }
.outro-art { position: absolute; inset: 0; will-change: transform; }
.outro-art .slot svg, .outro-art img.slot { object-fit: cover; }
.easel { position: absolute; left: 50%; top: 70px; width: 250px; margin-left: -125px; }
.easel-board { position: relative; height: 420px; padding: 10px; background: var(--gold-grad); border-radius: 125px 125px 6px 6px; box-shadow: 0 30px 40px rgba(60, 20, 10, .4); }
.finial { position: absolute; top: -40px; left: 50%; width: 16px; height: 46px; margin-left: -8px; background: var(--gold-grad); clip-path: polygon(50% 0, 70% 30%, 60% 40%, 75% 60%, 60% 100%, 40% 100%, 25% 60%, 40% 40%, 30% 30%); }
.board-inner {
  height: 100%;
  border-radius: 116px 116px 2px 2px;
  background-color: #fbf3e6;
  background-image: var(--paper);
  box-shadow: inset 0 0 0 8px #fbf3e6, inset 0 0 0 9px #c9973f, inset 0 0 0 18px #fbeedb, inset 0 0 0 19px rgba(201, 151, 63, .6), inset 0 0 40px rgba(150, 100, 50, .25);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 30px;
}
.farewell { font-family: var(--display); font-style: italic; font-size: 26px; line-height: 1.35; color: var(--maroon); margin: 0 0 16px; }
.couple-sm { font-family: var(--script); font-size: 34px; color: var(--maroon-2); margin: 0; }
.tag { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--gold); margin: 8px 0 0; }
.legs { position: relative; height: 250px; }
.legs i { position: absolute; top: -10px; width: 16px; height: 260px; background: linear-gradient(90deg, #a8703a, #f0d29a 40%, #b8803e); box-shadow: 0 8px 10px rgba(0, 0, 0, .25); }
.legs i:nth-child(1) { left: 18%; transform: rotate(8deg); transform-origin: top; }
.legs i:nth-child(2) { left: calc(50% - 8px); height: 200px; filter: brightness(.85); }
.legs i:nth-child(3) { right: 18%; transform: rotate(-8deg); transform-origin: top; }
.credit { position: absolute; bottom: 70px; left: 0; right: 0; font-family: var(--sans); font-size: 12px; color: var(--maroon-3); margin: 0; }


/* Realistic grounding for the farewell stand: a soft contact shadow where it
   meets the floor plus a faint, longer cast shadow from the warm side light. */
.easel-shadow {
  position: absolute;
  left: 50%;
  top: 700px;            /* floor line under the easel feet (phones) */
  width: 300px;
  height: 80px;
  margin-left: -150px;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse 12% 14% at 12% 55%, rgba(30, 8, 4, .85), transparent 72%),
    radial-gradient(ellipse 12% 14% at 88% 55%, rgba(30, 8, 4, .85), transparent 72%),
    radial-gradient(ellipse 10% 12% at 50% 6%, rgba(30, 8, 4, .7), transparent 72%),
    radial-gradient(ellipse 52% 40% at 50% 50%, rgba(50, 15, 8, .45), transparent 78%);
  filter: blur(3px);
}
.easel-shadow::after {
  /* cast shadow stretched across the floor, away from the lantern light */
  content: '';
  position: absolute;
  left: 20%;
  top: 30%;
  width: 90%;
  height: 120%;
  background: radial-gradient(ellipse at 30% 40%, rgba(50, 15, 10, .38), transparent 70%);
  transform: skewX(-38deg);
  filter: blur(10px);
}
.easel { z-index: 2; }
.easel-board::after {
  /* ambient occlusion: the board darkens slightly toward its lower edge */
  content: '';
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -18px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(40, 12, 8, .35), transparent 70%);
  filter: blur(6px);
  z-index: -1;
}
.credit a { color: inherit; font-weight: 700; text-decoration: none; }
.credit-logo { width: 22px; height: 22px; object-fit: contain; vertical-align: -6px; margin-right: 8px; }
.credit a:hover, .credit a:focus-visible { text-decoration: underline; }



/* per-leg contact shadows: a dark soft oval under each foot plus a faint
   shadow stretched across the floor (counter-rotated so it lies flat) */
.legs i::after, .legs i::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  pointer-events: none;
}
.legs i::after {
  width: 40px;
  height: 12px;
  margin-left: -20px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(30, 8, 4, .7), rgba(30, 8, 4, 0) 70%);
  filter: blur(2px);
}
.legs i::before {
  width: 90px;
  height: 18px;
  margin-left: -10px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 20% 50%, rgba(40, 12, 6, .32), rgba(40, 12, 6, 0) 70%);
  filter: blur(5px);
  transform-origin: 10px 50%;
  transform: rotate(14deg);
}
.legs i:nth-child(1)::after, .legs i:nth-child(1)::before { rotate: -8deg; }
.legs i:nth-child(3)::after, .legs i:nth-child(3)::before { rotate: 8deg; }
@media (max-width: 899px) {
  .easel-shadow { top: 690px; height: 60px; background: radial-gradient(ellipse 50% 40% at 50% 50%, rgba(50, 15, 8, .3), transparent 78%); }
  .easel-shadow::after { display: none; }
  .credit { bottom: 46px; }
}

.credit {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 7px 16px;
  border-radius: 18px;
  background: rgba(255, 249, 238, .9);
  color: var(--maroon-3);
  box-shadow: 0 4px 14px rgba(60, 20, 10, .18);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  z-index: 3;
}

/* ---------- living scenes ---------- */
.fx-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.scene { position: absolute; inset: 0; overflow: hidden; }
.scene-box { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.scene-img { display: block; width: 100%; height: 100%; }
.fx { position: absolute; background-repeat: no-repeat; pointer-events: none; }
/* water: light glinting and drifting across the surface. The pool itself is
   NOT distorted, so floating diyas and lotuses stay still and crisp. */
.fx-water { background: none !important; overflow: hidden; }
.fx-water::before, .fx-water::after {
  content: '';
  position: absolute;
  inset: 0 -240px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 100%);
}
.fx-water::before { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%27240%27%20height%3D%2770%27%3E%3Crect%20x%3D%2732%27%20y%3D%2759%27%20width%3D%2718%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.50%27/%3E%3Crect%20x%3D%27119%27%20y%3D%2731%27%20width%3D%2716%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.82%27/%3E%3Crect%20x%3D%2723%27%20y%3D%272%27%20width%3D%2719%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.61%27/%3E%3Crect%20x%3D%27183%27%20y%3D%270%27%20width%3D%2713%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.78%27/%3E%3Crect%20x%3D%2755%27%20y%3D%2766%27%20width%3D%2720%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.37%27/%3E%3Crect%20x%3D%276%27%20y%3D%2738%27%20width%3D%2721%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.58%27/%3E%3Crect%20x%3D%2752%27%20y%3D%2730%27%20width%3D%276%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.48%27/%3E%3Crect%20x%3D%27105%27%20y%3D%2735%27%20width%3D%2710%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.49%27/%3E%3Crect%20x%3D%2753%27%20y%3D%2732%27%20width%3D%2711%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.36%27/%3E%3Crect%20x%3D%27201%27%20y%3D%2739%27%20width%3D%2716%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.46%27/%3E%3Crect%20x%3D%27238%27%20y%3D%2760%27%20width%3D%278%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.55%27/%3E%3Crect%20x%3D%27173%27%20y%3D%2750%27%20width%3D%2721%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.60%27/%3E%3Crect%20x%3D%27199%27%20y%3D%2747%27%20width%3D%2711%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.70%27/%3E%3Crect%20x%3D%27212%27%20y%3D%2759%27%20width%3D%2714%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.70%27/%3E%3Crect%20x%3D%278%27%20y%3D%2717%27%20width%3D%2719%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.60%27/%3E%3Crect%20x%3D%2742%27%20y%3D%2738%27%20width%3D%2717%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.75%27/%3E%3C/svg%3E") 0 0 / 240px 70px repeat; animation: glide 14s linear infinite, glint 3.2s ease-in-out infinite alternate; }
.fx-water::after { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%27180%27%20height%3D%2750%27%3E%3Crect%20x%3D%2758%27%20y%3D%278%27%20width%3D%2716%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.39%27/%3E%3Crect%20x%3D%2796%27%20y%3D%2718%27%20width%3D%277%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.65%27/%3E%3Crect%20x%3D%277%27%20y%3D%2722%27%20width%3D%277%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.40%27/%3E%3Crect%20x%3D%2776%27%20y%3D%2741%27%20width%3D%278%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.48%27/%3E%3Crect%20x%3D%27113%27%20y%3D%2747%27%20width%3D%2715%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.59%27/%3E%3Crect%20x%3D%27176%27%20y%3D%272%27%20width%3D%2720%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.52%27/%3E%3Crect%20x%3D%2726%27%20y%3D%276%27%20width%3D%2711%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.84%27/%3E%3Crect%20x%3D%2733%27%20y%3D%2729%27%20width%3D%2716%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.57%27/%3E%3Crect%20x%3D%2799%27%20y%3D%273%27%20width%3D%277%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.47%27/%3E%3Crect%20x%3D%27122%27%20y%3D%2721%27%20width%3D%2711%27%20height%3D%271.6%27%20rx%3D%270.8%27%20fill%3D%27white%27%20opacity%3D%270.70%27/%3E%3C/svg%3E") 0 0 / 180px 50px repeat; animation: glideBack 19s linear infinite, glint 2.4s ease-in-out -1.2s infinite alternate; }
@keyframes glide { to { transform: translateX(240px); } }
@keyframes glideBack { to { transform: translateX(-180px); } }
@keyframes glint { from { opacity: .16; } to { opacity: .36; } }
/* foliage stirring in a breeze: a gentle sway of the feathered foliage crop
   (transform only — runs on the GPU, no per-frame repainting) */
.fx-breeze {
  transform-origin: 50% 100%;
  animation: leafSway 5.5s ease-in-out var(--d) infinite alternate;
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
}
@keyframes leafSway {
  0% { transform: rotate(-.5deg) skewX(.6deg); }
  100% { transform: rotate(.5deg) skewX(-.6deg); }
}
/* hanging lanterns swaying from their hooks */
.fx-swing {
  transform-origin: 50% 0;
  animation: lanternSwing 3.6s ease-in-out var(--d) infinite alternate;
  -webkit-mask-image: radial-gradient(closest-side, #000 75%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 75%, transparent 100%);
}
@keyframes lanternSwing { from { transform: rotate(-2.2deg); } to { transform: rotate(2.2deg); } }
/* flame glows: warm, soft, each flickering on its own rhythm */
.lights { position: absolute; inset: 0; pointer-events: none; }
.lights i {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 246, 200, .75) 0%, rgba(255, 200, 110, .38) 24%, rgba(255, 160, 60, .12) 50%, transparent 70%);
  animation: flick var(--t) ease-in-out var(--d) infinite alternate;
}
@keyframes flick {
  0% { opacity: .4; transform: translate(-50%, -50%) scale(.88); }
  22% { opacity: .85; transform: translate(-50%, -53%) scale(1.04); }
  48% { opacity: .55; transform: translate(-51%, -50%) scale(.96); }
  74% { opacity: 1; transform: translate(-50%, -52%) scale(1.1); }
  100% { opacity: .68; transform: translate(-49%, -50%) scale(.94); }
}

/* door art comes alive: the branch sways, the elephants breathe */
.door-top { animation: branchSway 5.5s ease-in-out infinite alternate; transform-origin: 50% 85%; }
@keyframes branchSway { from { rotate: -1.6deg; } to { rotate: 1.8deg; } }
.door-bottom { animation: breathe 4.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes breathe { 0%, 100% { scale: 1; translate: 0 0; } 50% { scale: 1.012; translate: 0 -1px; } }
/* a few petals drift over the closed doors */
.gate-petals { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.gate-petals i {
  position: absolute;
  top: -24px;
  width: 11px;
  height: 15px;
  border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, #ffc2cc, #d9476b);
  opacity: .85;
  animation: gateFall 11s linear infinite;
}
.gate-petals i:nth-child(odd) { background: linear-gradient(135deg, #ffd56a, #e8861a); }
.gate-petals i:nth-child(1) { left: 6%; animation-delay: -1s; }
.gate-petals i:nth-child(2) { left: 18%; animation-delay: -6s; animation-duration: 13s; }
.gate-petals i:nth-child(3) { left: 30%; animation-delay: -3s; }
.gate-petals i:nth-child(4) { left: 44%; animation-delay: -9s; animation-duration: 14s; }
.gate-petals i:nth-child(5) { left: 57%; animation-delay: -4.5s; }
.gate-petals i:nth-child(6) { left: 68%; animation-delay: -11s; animation-duration: 12s; }
.gate-petals i:nth-child(7) { left: 79%; animation-delay: -7s; }
.gate-petals i:nth-child(8) { left: 90%; animation-delay: -2s; animation-duration: 15s; }
.gate-petals i:nth-child(9) { left: 12%; animation-delay: -12.5s; animation-duration: 16s; }
.gate-petals i:nth-child(10) { left: 84%; animation-delay: -5.5s; animation-duration: 13.5s; }
@keyframes gateFall {
  0% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(30px, 52vh) rotate(260deg); }
  100% { transform: translate(-10px, 106vh) rotate(520deg); }
}
.gate.opening .gate-petals { opacity: 0; transition: opacity .8s; }

/* phones: no drawn birds over the painted opening scene */
@media (max-width: 899px) { .hero .birds { display: none; } }

/* ---------- accessibility (WCAG 2.2 AA) ---------- */
:where(a, button, input, textarea, [tabindex]):focus-visible {
  outline: 3px solid #b8862f;
  outline-offset: 3px;
  border-radius: 6px;
}
.btn-plaque:focus-visible { outline: 3px solid #b8862f; outline-offset: 4px; }
.frame-nav button { min-width: 44px; min-height: 44px; }
.medal { --pin-hole: var(--maroon); }
.pin { --pin-hole: #fbe7c8; width: 44px; height: 44px; }
.music-btn { width: 44px; height: 44px; }
.medal-label { font-size: 12px; }



/* phones: more visible life in the opening scene */
@media (max-width: 899px) {
  .fx-breeze { animation-duration: 4.2s; }
  .only-narrow .lights i { animation-name: flickStrong; }
}
@keyframes flickStrong {
  0% { opacity: .3; transform: translate(-50%, -50%) scale(.8); }
  18% { opacity: 1; transform: translate(-50%, -54%) scale(1.25); }
  40% { opacity: .5; transform: translate(-51%, -50%) scale(.95); }
  62% { opacity: .95; transform: translate(-50%, -53%) scale(1.3); }
  80% { opacity: .45; transform: translate(-49%, -51%) scale(.9); }
  100% { opacity: .85; transform: translate(-50%, -52%) scale(1.15); }
}

/* ---------- performance ---------- */
/* sections far from the screen pause every animation inside them */
.is-off, .is-off *, .is-off *::before, .is-off *::after { animation-play-state: paused !important; }

/* ---------- moving sky ---------- */
/* thin painted wisps drifting across the top of the scene, two depths */
.sky-drift {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 40%;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent);
  mask-image: linear-gradient(to bottom, #000 50%, transparent);
}
.sky-drift i { position: absolute; top: 0; bottom: 0; left: 0; will-change: transform; }
.sky-drift i:nth-child(1) {
  width: calc(100% + 1200px);
  background: var(--wisps-a) 0 0 / 1200px 360px repeat;
  opacity: .5;
  animation: skyDriftA 150s linear infinite;
}
.sky-drift i:nth-child(2) {
  width: calc(100% + 900px);
  background: var(--wisps-b) 0 70px / 900px 300px repeat;
  opacity: .32;
  animation: skyDriftB 90s linear infinite;
}
@keyframes skyDriftA { to { transform: translateX(-1200px); } }
@keyframes skyDriftB { to { transform: translateX(-900px); } }

/* clouds that part like curtains as the doors open, then drift softly */
.cloud-veil { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.cv {
  position: absolute;
  top: -10%;
  width: 90%;
  height: 78%;
  opacity: .95;
  transition: transform 5.5s cubic-bezier(.32, .08, .2, 1), opacity 6s ease;
  will-change: transform, opacity;
}
.cv b {
  position: absolute;
  inset: 0 -450px 0 0;
  background: var(--bank) 0 0 / 900px 520px repeat;
  -webkit-mask-image: radial-gradient(ellipse 46% 48% at 40% 45%, #000 35%, transparent 75%);
  mask-image: radial-gradient(ellipse 46% 48% at 40% 45%, #000 35%, transparent 75%);
  animation: bankDrift 70s ease-in-out infinite alternate;
}
.cv-l { left: -22%; }
.cv-r { right: -22%; }
.cv-r b { background-position: 380px 120px; -webkit-mask-position: 0 0; animation-duration: 84s; }
@keyframes bankDrift { to { transform: translateX(-450px); } }
body.opened .cv-l { transform: translateX(-58%); opacity: .55; }
body.opened .cv-r { transform: translateX(58%); opacity: .55; }
.hero-names { z-index: 3; }
@media (min-width: 900px) {
  .sky-drift { height: 46%; }
  .cv { width: 70%; height: 82%; }
  .cv-l { left: -10%; }
  .cv-r { right: -10%; }
  body.opened .cv-l { transform: translateX(-62%); opacity: .5; }
  body.opened .cv-r { transform: translateX(62%); opacity: .5; }
}

/* ---------- ambient motion ---------- */
.birds, .clouds { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bird { position: absolute; left: 0; top: var(--y); width: var(--s); opacity: 0; animation: fly var(--dur) linear var(--delay) infinite; }
.bird svg { display: block; width: 100%; fill: #4a2a38; }
.wing { transform-box: view-box; transform-origin: 20px 11px; animation: flap var(--flap) ease-in-out infinite alternate; }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(-.35); } }
@keyframes fly {
  0% { transform: translate(-40px, 0); opacity: 0; }
  10% { opacity: .85; }
  50% { transform: translate(calc(var(--vw) * .5), var(--rise)); }
  85% { opacity: .85; }
  100% { transform: translate(calc(var(--vw) + 40px), calc(var(--rise) * .4)); opacity: 0; }
}
.clouds i { position: absolute; height: 40px; border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%); filter: blur(6px); animation: drift 70s linear infinite; }
.clouds i:nth-child(1) { top: 9%; width: 260px; left: -30%; }
.clouds i:nth-child(2) { top: 20%; width: 200px; left: 20%; animation-duration: 95s; animation-delay: -40s; }
.clouds i:nth-child(3) { top: 30%; width: 300px; left: 60%; animation-duration: 120s; animation-delay: -80s; opacity: .7; }
@keyframes drift { from { transform: translateX(-60%); } to { transform: translateX(calc(var(--vw) + 60%)); } }
.flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 1.3s ease-in-out infinite alternate; }
.flame:nth-of-type(2n) { animation-duration: .9s; animation-delay: -.4s; }
@keyframes flicker { 0% { transform: scale(1, 1); } 40% { transform: scale(.92, 1.08) skewX(2deg); } 100% { transform: scale(1.04, .94) skewX(-2deg); } }
.halo { animation: halo 2.6s ease-in-out infinite alternate; }
@keyframes halo { from { opacity: .65; } to { opacity: 1; } }
.ripples path { animation: ripple 4s ease-in-out infinite; stroke-dasharray: 20 14; }
@keyframes ripple { 50% { stroke-dashoffset: 34; stroke-opacity: .5; } }

/* Reveals: each block rises into place the FIRST time it is reached and
   then stays (no fading out on the way past — calmer, like real paper). */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* petal shower */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.petals i { position: absolute; top: -20px; width: 12px; height: 16px; border-radius: 80% 0 80% 0; background: linear-gradient(135deg, #ffcf4a, #e8761a); animation: fall linear forwards; }
.petals i:nth-child(3n) { background: linear-gradient(135deg, #ffc2cc, #d9476b); }
.petals i:nth-child(5n) { background: linear-gradient(135deg, #fff, #f1d6dc); }
@keyframes fall { to { transform: translate(var(--x), 105vh) rotate(calc(var(--r) + 540deg)); opacity: .7; } }

/* =================== Desktop / large screens =================== */
@media (min-width: 900px) {
  .only-narrow { display: none !important; }
  .only-wide { display: block !important; }

  /* gate: central cream panel between two tall doors */
  .gate-card {
    top: 0;
    bottom: 0;
    left: 50%;
    right: auto;
    width: 500px;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(-50%) scale(calc(1 + var(--p) * .08));
    box-shadow: 0 0 60px rgba(0, 0, 0, .55);
  }
  .gate-card::before, .gate-card::after { top: 0; bottom: 0; left: auto; right: auto; width: 14px; height: auto; background: linear-gradient(90deg, #9a2348, var(--maroon) 60%, var(--maroon-3)); }
  .gate-card::before { left: -14px; }
  .gate-card::after { right: -14px; transform: scaleX(-1); }
  .om { font-size: 72px; }
  .mantra { font-size: 28px; }
  .intro { font-size: 22px; max-width: 340px; }
  .door-top { width: 44%; height: 30%; top: 6%; }
  .door-l .door-top { left: 6%; }
  .door-r .door-top { right: 6%; }
  .door-bottom { width: 42%; height: 42%; left: 6%; bottom: 6%; }
  .door-r .door-bottom { left: auto; right: 6%; }
  .hero-art img.slot { object-position: 50% 40%; }
  .hero-names { text-shadow: 0 0 18px rgba(255, 240, 225, .95), 0 0 40px rgba(255, 230, 210, .8), 0 2px 4px rgba(255, 255, 255, .6); }
  .outro-art img.slot { object-position: 50% 62%; }
  .door-ring { margin-top: 0; }
  .door-l .door-ring { right: 270px; }
  .door-r .door-ring { left: 270px; }

  .hero-names { flex-direction: row; justify-content: center; align-items: baseline; gap: 22px; top: 11%; font-size: clamp(60px, 5.4vw, 84px); }
  .hero-names .amp { font-size: .45em; }

  .h2 { font-size: 44px; margin-bottom: 40px; }
  .families { padding: 80px 0 40px; }
  .scroll { margin-bottom: 60px; }
  .scroll.has-orn { margin-bottom: 190px; }
  .scroll-orn { width: 140px; margin-left: -70px; }
  .sheet { padding: 70px 40px 40px; }
  .sheet h3 { font-size: 40px; }
  .sheet .rel { font-size: 22px; }
  .sheet .who { font-size: 26px; }
  .sheet ul { font-size: 22px; }
  .sheet-orn { width: 300px; }

  .date-top { width: 220px; margin-top: 60px; }
  .date-row { margin-bottom: 70px; }
  .date-side { height: 230px; margin: 0; }
  .plaques { gap: 24px; margin-bottom: 30px; }
  .plaque { width: 200px; height: 130px; }
  .plaque .tab { font-size: 13px; padding: 4px 16px; top: 8px; }
  .plaque .v { font-size: 52px; margin-top: 20px; }
  .btn-plaque span { font-size: 22px; padding: 14px 56px; }
  .after { font-size: 42px; }

  .gallery { padding: 0; }
  .frame3d { width: min(320px, 36vh); }
  .landscape { width: min(440px, 50vh); }
  .track-inner { gap: 70px; padding-bottom: 50px; }

  .ceremonies { padding: 200px 40px 100px; }
  .jh { width: 300px; }
  .cere-grid { max-width: 1320px; display: flex; flex-wrap: wrap; justify-content: center; gap: 60px 50px; align-items: flex-start; }
  .cere-grid .arch-card { flex: 0 1 calc((100% - 100px) / 3); min-width: 300px; }
  .cere-div { display: none; }
  .arch-art { height: 230px; }

  .after-cere { padding: 80px 0 30px; }
  .badges { gap: 70px; padding: 20px 0 60px; }
  .medal { width: 92px; height: 92px; }
  .medal svg { width: 38px; height: 38px; }
  .medal-label { font-size: 12px; }

  .rsvp { padding: 60px 24px 100px; }
  .rsvp-card { padding: 50px 50px 40px; }
  .two { grid-template-columns: 1fr 1fr; }

  /* desktop: no easel — an arched, gold-framed board set against the courtyard */
  .outro { height: 100vh; min-height: 760px; }
  .easel { width: 480px; margin-left: -240px; top: calc(50% - 290px); }
  .easel-board {
    height: 600px;
    padding: 12px;
    border-radius: 240px 240px 14px 14px;
    box-shadow: 0 40px 70px rgba(60, 20, 10, .45), 0 0 0 1px rgba(120, 70, 20, .4), 0 0 60px rgba(255, 210, 150, .35);
  }
  .board-inner { border-radius: 228px 228px 6px 6px; padding: 80px 50px 50px; }
  .finial { top: -46px; }
  .legs { display: none; }
  .easel-shadow { top: calc(50% + 300px); width: 560px; margin-left: -280px; height: 80px;
    background: radial-gradient(ellipse 46% 34% at 50% 30%, rgba(30, 8, 4, .75), transparent 72%), radial-gradient(ellipse 62% 60% at 50% 50%, rgba(50, 15, 8, .38), transparent 78%); filter: blur(4px); }
  .easel-shadow::after { left: 30%; width: 80%; }
  .sheet-orn { width: 360px; }
  .date-top { width: 230px; }
  .farewell { font-size: 34px; max-width: 360px; }
  .couple-sm { font-size: 46px; }
  .credit { bottom: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .hero-names span { opacity: 1; }
  .fx-breeze { animation: none; }
  .sky-drift i, .cv b { animation: none; }
  .cv { transition-duration: .01ms; }
  .fx-water::before, .fx-water::after { animation: none; }
  .gate-petals { display: none; }
}

/* music button: clear ON (sound waves pulsing) vs OFF (speaker with ×) */
.music-btn .ic-on, .music-btn .ic-off { position: absolute; width: 22px; height: 22px; transition: opacity .25s ease, transform .25s ease; }
.music-btn .ic-on { opacity: 0; transform: scale(.7); }
.music-btn .ic-off { opacity: 1; }
.music-btn.on .ic-on { opacity: 1; transform: none; }
.music-btn.on .ic-off { opacity: 0; transform: scale(.7); }
.music-btn.on .w1 { animation: mwave 1.2s ease-in-out infinite; }
.music-btn.on .w2 { animation: mwave 1.2s ease-in-out .3s infinite; }
@keyframes mwave { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.music-btn:not(.on) { background: rgba(255, 252, 245, .78); color: #8a7a74; }
.music-btn.on { box-shadow: 0 0 0 3px rgba(201, 164, 92, .55), 0 4px 14px rgba(0, 0, 0, .25); }
@media (prefers-reduced-motion: reduce) { .music-btn.on .w1, .music-btn.on .w2 { animation: none; } }

/* doors swing AND glide fully off-screen, fading only at the very end: no slivers, no pop */
.door-l { transform: translateX(calc(var(--p) * -100%)) rotateY(calc(var(--p) * -75deg)) translateZ(0); opacity: clamp(0, calc((1 - var(--p)) * 6), 1); }
.door-r { transform: translateX(calc(var(--p) * 100%)) rotateY(calc(var(--p) * 75deg)) translateZ(0); opacity: clamp(0, calc((1 - var(--p)) * 6), 1); }
.gate.opening .door-l, .gate.opening .door-r { transition: none; }

/* footer: Govindam credit at the very end, after RSVP */
.site-foot { position: relative; padding: 28px 16px 90px; text-align: center; background: var(--cream, #fbf4ea); }
.site-foot .credit { position: static !important; transform: none !important; translate: none !important; left: auto; right: auto; bottom: auto;
  display: inline-block; width: auto; max-width: 100%; margin: 0 auto; }

@media (max-width: 899px) { .fan-card, .scroll { width: calc(100% - 72px); } .timeline, .ceremonies, .rsvp { padding-left: 24px; padding-right: 24px; } }

/* calendar offer after RSVP */
.cal-offer { margin-top: 14px; text-align: center; }
.cal-offer .cal-note { margin: 10px 0 0; font-size: 14px; line-height: 1.5; }
.cal-offer .cal-note a { font-weight: 700; text-decoration: underline; }

/* distant birds: tiny, faint specks far away */
.bird svg { opacity: .55; }
/* soft clouds drifting in every sky */
.sky-drift i:nth-child(1) { opacity: .42 !important; }
.sky-drift i:nth-child(2) { opacity: .3 !important; }

/* gallery: a real wooden beam with frames hanging on jute cords */
.track-inner::before { height: 26px !important; border-radius: 4px !important;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.06) 0 2px, transparent 2px 38px),
    linear-gradient(180deg, #8a5a2b 0%, #b07a41 22%, #7a4c22 46%, #9a6633 70%, #5e3a18 100%) !important;
  box-shadow: inset 0 2px 0 rgba(255,220,170,.35), inset 0 -3px 4px rgba(0,0,0,.35), 0 8px 14px rgba(40,20,5,.35) !important; }

/* gallery rail in this theme's own materials */
.track-inner::before { background: linear-gradient(180deg, #f6d58b 0%, #c08a2c 30%, #7a4a10 55%, #c99a4a 80%, #5a3608 100%) !important; height: 18px !important; border-radius: 9px !important; }

/* (carved wood frames moved to Kalinga Parinaya) */
