/* The invitation. Colours, fonts, materials and borders come from the theme as CSS variables (see themes.js). */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
html.locked, html.locked body { overflow: hidden; }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; overflow-x: hidden;
  background: var(--pattern), var(--page); background-attachment: fixed, fixed; -webkit-tap-highlight-color: transparent; }
@supports (-webkit-touch-callout: none) { body { background-attachment: scroll, scroll; } }
img, svg { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.inv { max-width: 480px; margin: 0 auto; padding: 0 0 72px; position: relative; overflow: hidden; }
.foil { background: var(--foilT); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 7s ease-in-out infinite alternate; }
@keyframes sheen { from { background-position: 0% 0; } to { background-position: 100% 0; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 26px 16px 52px; text-align: center; }
.hero::before, .hero::after { content: ''; position: absolute; left: 0; right: 0; height: var(--bandH); background: var(--band) repeat-x center / auto 100%; pointer-events: none; }
.hero::before { top: 0; } .hero::after { bottom: 0; transform: scaleY(-1); }
.th-ivory-minimal .hero::before, .th-ivory-minimal .hero::after { left: 22px; right: 22px; top: 18px; }
.th-ivory-minimal .hero::after { top: auto; bottom: 18px; }
.th-royal-rose .hero::before, .th-royal-rose .hero::after, .th-emerald-nikah .hero::before, .th-emerald-nikah .hero::after { opacity: .9; }
.garland { position: absolute; top: 0; left: 0; width: 100%; height: 86px; z-index: 2; filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)); pointer-events: none; }
.th-temple-gold .garland, .th-phulkari .garland { top: calc(var(--bandH) - 6px); }
.th-temple-gold .hero, .th-phulkari .hero { padding-top: calc(var(--bandH) + 64px); padding-bottom: calc(var(--bandH) + 34px); }
.th-bengali .hero { padding-top: calc(var(--bandH) + 18px); padding-bottom: calc(var(--bandH) + 34px); }
.hero-in { position: relative; padding: 70px 24px 40px; z-index: 1; }
.th-ivory-minimal .hero-in { padding-top: 44px; }
.frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; filter: drop-shadow(0 1px 0 rgba(255,255,255,.25)); }
.hero-med { position: absolute; left: 50%; top: 47%; width: 118%; max-width: 520px; transform: translate(-50%, -50%); opacity: .13; pointer-events: none; z-index: -1; }
.light .hero-med { opacity: .16; }
.th-bengali .hero-med { opacity: .1; }
.th-phulkari .hero-med { opacity: .1; }

.bless { font-family: 'Tiro Devanagari Hindi', var(--accentFont), serif; font-size: 1.02rem; letter-spacing: .04em; color: var(--accent); margin: 0 0 4px; }
.bless.ar { font-family: 'Amiri', serif; font-size: 1.45rem; letter-spacing: 0; line-height: 1.7; }
.bless.ik { font-family: 'Noto Serif Gurmukhi', serif; font-size: 2.4rem; line-height: 1; margin-bottom: 0; }
.bless-sub { font: 400 .68rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink2); margin: 2px auto 10px; max-width: 260px; }
.accent-line { font-family: var(--accentFont); color: var(--accent); font-size: 1.05rem; margin: 4px 0 6px; letter-spacing: .03em; }
.kick { font: 500 .7rem/1.9 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--ink2); margin: 14px auto 6px; max-width: 300px; }
.names { margin: 0; font-weight: 400; display: flex; flex-direction: column; align-items: center; }
.nm { display: block; width: 100%; max-width: 330px; height: 92px; overflow: visible; }
.nm text { font-family: var(--script); font-size: 128px; fill: url(#foilT); stroke: url(#foilT); stroke-width: 1.3; paint-order: stroke; }
.th-bengali .nm text { fill: #b30d27; stroke: #b30d27; }
.th-ivory-minimal .nm text { fill: #4a463b; stroke: #8b6d35; stroke-width: .8; }
.th-royal-rose .nm text { stroke-width: 1; }
.join { font: italic 400 1.35rem var(--body); color: var(--accent); margin: -4px 0; letter-spacing: .06em; }
.th-temple-gold .join, .th-emerald-nikah .join { font-family: var(--serif); font-style: normal; font-size: 1.1rem; }

/* names write in: the outline draws, a mask sweeps left to right, then the fill comes in */
html:not(.go) .nm { visibility: hidden; }
.go .nm { -webkit-mask: linear-gradient(90deg, #000 40%, transparent 60%) 100% 0 / 260% 100% no-repeat; mask: linear-gradient(90deg, #000 40%, transparent 60%) 100% 0 / 260% 100% no-repeat;
  animation: sweep 2.3s cubic-bezier(.45,.05,.4,1) .1s both; }
.go .nm.n2 { animation-delay: 1.05s; }
.go .nm text { stroke-dasharray: var(--len, 1800px); stroke-dashoffset: var(--len, 1800px); fill-opacity: 0; animation: draw 2.7s ease .1s forwards; }
.go .nm.n2 text { animation-delay: 1.05s; }
@keyframes sweep { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes draw { 0% { stroke-dashoffset: var(--len, 1800px); fill-opacity: 0; } 65% { stroke-dashoffset: 0; fill-opacity: .15; } 100% { stroke-dashoffset: 0; fill-opacity: 1; } }
html:not(.go) .join, html:not(.go) .medal, html:not(.go) .kick { opacity: 0; }
.go .join { animation: fadeUp .9s ease .8s both; }
html.pre .kick, html.pre .medal { opacity: 1; }
.go .medal.covered, .pre .medal { animation: none; opacity: 1; } .go .kick { animation: fadeUp .9s ease both; } .go .medal { animation: fadeUp 1s ease 2.2s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.medal { position: relative; width: 156px; height: 156px; margin: 20px auto 0; border-radius: 50%; display: grid; place-items: center; }
.medal::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--foil); background-size: 200% 200%; animation: sheen 6s ease-in-out infinite alternate;
  -webkit-mask: radial-gradient(circle, transparent 66%, #000 67%, #000 69%, transparent 70%, transparent 73%, #000 74%); mask: radial-gradient(circle, transparent 66%, #000 67%, #000 69%, transparent 70%, transparent 73%, #000 74%); }
.medal-in { display: flex; flex-direction: column; align-items: center; line-height: 1.1; color: var(--ink); }
.m-day, .m-mon, .m-time { font: 500 .62rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ink2); }
.m-num { font: 400 3.1rem/1 var(--serif); margin: 2px 0; background: var(--foilT); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.th-bengali .m-num { background: none; color: #b30d27; }
.m-time { margin-top: 4px; color: var(--accent); }
.medal canvas.scratch { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; touch-action: none; cursor: grab; transition: opacity .7s, transform .7s;
  box-shadow: 0 8px 22px -8px rgba(0,0,0,.5); }
.medal canvas.gone { opacity: 0; transform: scale(1.15); pointer-events: none; }
.medal.covered .medal-in { visibility: hidden; }
.scratch-hint { font: 500 .72rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); margin: 12px 0 0; transition: opacity .5s; }
.scratch-hint span { animation: pulse 1.8s ease-in-out infinite; display: block; }
.scratch-hint.gone { opacity: 0; }
.scratch-skip { display: inline-block; margin-top: 6px; background: none; border: 0; text-decoration: underline; font: 400 .72rem var(--sans); color: var(--ink2); cursor: pointer; padding: 6px; letter-spacing: .05em; text-transform: none; }
@keyframes pulse { 50% { opacity: .45; } }

.cue { position: absolute; left: 50%; bottom: calc(var(--bandH) + 6px); width: 22px; height: 36px; margin-left: -11px; border: 1px solid var(--line); border-radius: 12px; opacity: .7; }
.cue span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--line); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: none; opacity: 1; } 80% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- sections ---------- */
.sec { position: relative; padding: 54px 16px 10px; text-align: center; }
.sec-kick { font: 500 .7rem var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--ink2); margin: 0 0 2px; }
.sec-title { font: 400 2.9rem/1.1 var(--script); margin: 0 0 18px; padding: 0 4px 6px; }
.th-bengali .sec-title .foil { background: none; color: #b30d27; animation: none; }
.th-ivory-minimal .sec-title .foil { background: none; color: #5d5a4b; animation: none; }
.panel { position: relative; padding: 34px 22px 30px; isolation: isolate; }
.panel::before { content: ''; position: absolute; inset: 6px; z-index: -2; box-shadow: 0 18px 40px -18px rgba(40, 10, 10, .45); }
.panel::after { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--card); }
.light .panel::after { background: linear-gradient(var(--card), var(--card)), var(--page);
  -webkit-mask: var(--dk-t) top / 140px 7px repeat-x, var(--dk-b) bottom / 140px 7px repeat-x, var(--dk-l) left / 7px 140px repeat-y, var(--dk-r) right / 7px 140px repeat-y, linear-gradient(#000, #000) center / calc(100% - 12px) calc(100% - 12px) no-repeat;
  mask: var(--dk-t) top / 140px 7px repeat-x, var(--dk-b) bottom / 140px 7px repeat-x, var(--dk-l) left / 7px 140px repeat-y, var(--dk-r) right / 7px 140px repeat-y, linear-gradient(#000, #000) center / calc(100% - 12px) calc(100% - 12px) no-repeat; }
.dark .panel::after { border: 1px solid transparent; border-image: var(--foil) 1; box-shadow: inset 0 0 0 5px rgba(0,0,0,0), inset 0 0 60px rgba(0,0,0,.25); }
.dark .panel { background: linear-gradient(var(--line), var(--line)) 10px 10px / calc(100% - 20px) 1px no-repeat, linear-gradient(var(--line), var(--line)) 10px calc(100% - 10px) / calc(100% - 20px) 1px no-repeat,
  linear-gradient(var(--line), var(--line)) 10px 10px / 1px calc(100% - 20px) no-repeat, linear-gradient(var(--line), var(--line)) calc(100% - 10px) 10px / 1px calc(100% - 20px) no-repeat; background-blend-mode: normal; }
.dark .panel { --line: rgba(232, 189, 106, .35); }
.th-bengali .panel { border-left: 0; }
.th-bengali .panel::after { box-shadow: inset 0 0 0 1px rgba(200,16,46,.0); }
.th-bengali .panel { background: linear-gradient(#c8102e, #c8102e) 14px 14px / calc(100% - 28px) 3px no-repeat, linear-gradient(#c8102e, #c8102e) 14px calc(100% - 17px) / calc(100% - 28px) 3px no-repeat,
  linear-gradient(#c8102e, #c8102e) 14px 20px / calc(100% - 28px) 1px no-repeat, linear-gradient(#c8102e, #c8102e) 14px calc(100% - 21px) / calc(100% - 28px) 1px no-repeat; }
.cn { position: absolute; width: 46px; height: 46px; pointer-events: none; }
.cn svg { width: 100%; height: 100%; display: block; }
.cn.tl { top: 8px; left: 8px; } .cn.tr { top: 8px; right: 8px; transform: scaleX(-1); } .cn.bl { bottom: 8px; left: 8px; transform: scaleY(-1); } .cn.br { bottom: 8px; right: 8px; transform: scale(-1); }
.divider { display: block; width: 220px; height: 26px; margin: 6px auto; }
.lede { font: italic 400 1.08rem/1.55 var(--body); color: var(--ink2); margin: 12px auto 20px; max-width: 320px; }
.fam-name { font: 400 2.5rem/1.1 var(--script); margin: 0; color: var(--accent); }
.th-bengali .fam-name { color: #b30d27; }
.fam-line { font: 400 1rem/1.5 var(--body); margin: 2px auto 0; max-width: 300px; color: var(--ink); }
.amp { font: 400 1.8rem var(--script); color: var(--ink2); margin: 8px 0; }
.msg { font: italic 400 1.05rem/1.6 var(--body); margin: 20px auto 8px; max-width: 320px; color: var(--ink2); }

.big-date { font: 500 1.3rem/1.35 var(--serif); margin: 0; letter-spacing: .02em; }
.th-temple-gold .big-date, .th-emerald-nikah .big-date { font-size: 1.05rem; letter-spacing: .06em; }
.muhurat { font: 500 .74rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin: 6px 0 22px; }
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 340px; margin: 0 auto 24px; }
.cd-cell { position: relative; padding: 14px 0 10px; border: 1px solid var(--line); background: var(--card); }
.cd-cell::before { content: ''; position: absolute; inset: 3px; border: 1px solid var(--line); opacity: .45; }
.cd-cell b { display: block; font: 400 1.9rem/1 var(--serif); background: var(--foilT); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.th-bengali .cd-cell b { background: none; color: #b30d27; }
.cd-cell span { font: 500 .56rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink2); }
.cd-done { font: 400 1.8rem var(--script); color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 50px; padding: .7rem 1.6rem; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  font: 500 .8rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #2c1a08; background: var(--foil); background-size: 200% 100%; animation: sheen 6s ease-in-out infinite alternate;
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(0,0,0,.2); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; animation: none; }
.th-bengali .btn:not(.btn-ghost):not(.btn-wa) { background: #b30d27; color: #fff; }
.btn-wa { background: linear-gradient(180deg, #2fbf6a, #1c9a52); color: #fff; animation: none; width: 100%; }
.btn-wa svg { stroke-width: 1.4; }

/* ---------- function cards ---------- */
.evs { display: grid; gap: 22px; }
.ev { position: relative; padding: calc(var(--bandH) * .62 + 22px) 22px calc(var(--bandH) * .62 + 22px); color: var(--et); overflow: hidden;
  background: linear-gradient(118deg, rgba(255,255,255,0) 10%, rgba(255,255,255,.16) 28%, rgba(255,255,255,0) 44%, rgba(255,255,255,0) 60%, rgba(255,255,255,.1) 74%, rgba(255,255,255,0) 88%),
    radial-gradient(130% 90% at 30% 10%, var(--ec3), var(--ec) 45%, var(--ec2));
  box-shadow: 0 22px 40px -22px rgba(0,0,0,.65), inset 0 0 0 1px rgba(255,255,255,.12); opacity: 0; transform: translateY(26px) scale(.98); transition: opacity .9s, transform .9s cubic-bezier(.2,.7,.2,1); }
.ev::before { content: ''; position: absolute; inset: 0; background: var(--pattern); opacity: .5; mix-blend-mode: soft-light; pointer-events: none; }
.ev::after { content: ''; position: absolute; inset: 10px; border: 1px solid rgba(255,236,190,.55); pointer-events: none; }
.ev.lt::after { border-color: rgba(90,60,20,.35); }
.ev.in { opacity: 1; transform: none; }
.ev-band { position: absolute; left: 0; right: 0; height: calc(var(--bandH) * .62); background: var(--band) repeat-x center / auto 100%; }
.ev-band.t { top: 0; } .ev-band.b { bottom: 0; transform: scaleY(-1); }
.th-ivory-minimal .ev-band { filter: brightness(1.4); }
.ev-date { font: 500 .68rem var(--sans); letter-spacing: .22em; text-transform: uppercase; margin: 0; opacity: .85; }
.ev-title { font: 400 2.6rem/1.15 var(--script); margin: 2px 0 6px; font-weight: 400; text-shadow: 0 2px 10px rgba(0,0,0,.2); }
.ev.main .ev-title { font-size: 3rem; }
.ev-time { font: 500 1.02rem var(--body); margin: 0 0 6px; }
.ev-place { display: flex; align-items: flex-start; justify-content: center; gap: 6px; font: 400 .98rem/1.4 var(--body); margin: 0 auto 8px; max-width: 290px; }
.ev-place svg { flex: none; width: 15px; height: 15px; margin-top: 3px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.ev-dress { display: flex; width: max-content; max-width: 100%; align-items: center; gap: 8px; font: 400 .74rem var(--sans); letter-spacing: .08em; margin: 2px auto 12px; padding: 5px 12px; border-radius: 99px; background: rgba(0,0,0,.16); }
.ev.lt .ev-dress { background: rgba(255,255,255,.4); }
.sw { width: 12px; height: 12px; border-radius: 50%; background: var(--ec3); box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.ev-map { display: inline-block; font: 500 .7rem var(--sans); letter-spacing: .2em; text-transform: uppercase; padding: 9px 18px; border: 1px solid currentColor; border-radius: 99px; text-decoration: none; opacity: .9; }

/* ---------- story carousel ---------- */
.car { margin: 0 -16px; outline-offset: -4px; }
.track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 16px 14px; scrollbar-width: none; scroll-padding: 0 16px; }
.track::-webkit-scrollbar { display: none; }
.sl { flex: 0 0 82%; margin: 0; scroll-snap-align: center; }
.ph { position: relative; aspect-ratio: 4 / 5; overflow: hidden; padding: 12px; background: var(--card); box-shadow: 0 18px 30px -18px rgba(0,0,0,.6), inset 0 0 0 1px var(--line); }
.ph::after { content: ''; position: absolute; inset: 5px; border: 1px solid var(--line); pointer-events: none; opacity: .7; }
.light .ph { background: #fffdf8; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-empty { display: grid; place-items: center; }
.ph-empty::before { content: ''; position: absolute; inset: 12px; background: var(--pattern), var(--door); box-shadow: inset 0 0 30px rgba(0,0,0,.18); }
.ph-empty svg { position: absolute; width: 86%; left: 7%; top: 50%; transform: translateY(-50%); opacity: .35; }
.ph-ini { position: relative; font: 400 3rem var(--script); color: var(--accent); }
.ph-note { position: absolute; bottom: 22px; left: 0; right: 0; font: 500 .62rem var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--ink2); }
.sl figcaption { font: 400 1.9rem var(--script); color: var(--accent); margin-top: 8px; }
.car-dots { display: flex; gap: 8px; justify-content: center; margin: 0 0 14px; }
.car-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); opacity: .35; transition: opacity .3s, transform .3s; }
.car-dots i.on { opacity: 1; transform: scale(1.4); }
.story-p { font: italic 400 1.06rem/1.7 var(--body); max-width: 360px; margin: 0 auto 12px; color: var(--ink); }

.venue .v-name { font: 500 1.35rem/1.3 var(--serif); margin: 0 0 4px; }
.venue .v-addr { font: 400 1.02rem var(--body); color: var(--ink2); margin: 0 0 22px; }

/* ---------- RSVP ---------- */
.by { font: 500 .72rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin: -6px 0 18px; }
.rsvp { max-width: 380px; margin: 0 auto; text-align: left; display: grid; gap: 16px; }
.fl span, .guests > span { display: block; font: 500 .66rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink2); margin-bottom: 6px; }
.fl i { text-transform: none; letter-spacing: 0; font-style: normal; opacity: .8; }
.fl input, .fl textarea { width: 100%; font: 400 1.05rem var(--body); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 0; padding: 12px 14px; outline: none; resize: vertical; }
.fl input:focus, .fl textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.att { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.att label { position: relative; }
.att input { position: absolute; opacity: 0; }
.att span { display: grid; place-items: center; min-height: 52px; padding: 8px; text-align: center; border: 1px solid var(--line); font: 500 .74rem var(--sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; background: var(--card); transition: background .3s, color .3s; }
.att input:checked + span { background: var(--foil); color: #2c1a08; border-color: transparent; }
.th-bengali .att input:checked + span { background: #b30d27; color: #fff; }
.att input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.guests { display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: opacity .3s; }
.guests > span { margin: 0; }
.guests.off { opacity: .35; pointer-events: none; }
.step { display: flex; align-items: center; border: 1px solid var(--line); background: var(--card); }
.step button { width: 46px; height: 46px; border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--accent); }
.step output { min-width: 34px; text-align: center; font: 500 1.25rem var(--serif); }
.rsvp-msg { min-height: 1.2em; margin: 0; font: italic 400 .98rem var(--body); color: var(--ink2); text-align: center; }

/* ---------- footer ---------- */
.foot { text-align: center; padding: 50px 16px 10px; }
.thanks { font: 400 3.4rem/1.1 var(--script); margin: 6px 0 0; padding-bottom: 6px; }
.th-bengali .thanks { background: none; color: #b30d27; animation: none; }
.foot-names { font: 500 .78rem var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--ink2); margin: 0 0 20px; }
.share { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.chip { padding: 10px 16px; border: 1px solid var(--line); background: var(--card); font: 500 .7rem var(--sans); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.made { font: 400 .78rem var(--sans); color: var(--ink2); opacity: .8; }

/* ---------- reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.rv.in { opacity: 1; transform: none; }

/* ---------- opening: doors and wax seal ---------- */
.op { position: fixed; inset: 0; z-index: 60; perspective: 1700px; perspective-origin: 50% 50%; cursor: pointer; overflow: hidden; }
.op-glow { position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 50%, rgba(255,240,205,.95), rgba(255,220,160,.35) 45%, transparent 75%); opacity: 0; transition: opacity 1.2s ease .2s; }
.op.open .op-glow { opacity: .9; }
.door { position: absolute; top: 0; bottom: 0; width: 50%; transform-style: preserve-3d; transition: transform 1.55s cubic-bezier(.62,.02,.22,1); will-change: transform; }
.door.l { left: 0; transform-origin: 0 50%; }
.door.r { right: 0; transform-origin: 100% 50%; }
.op.open .door.l { transform: rotateY(-108deg); }
.op.open .door.r { transform: rotateY(108deg); }
.door-face { position: absolute; inset: 0; overflow: hidden; background: var(--pattern), var(--door); backface-visibility: hidden; }
.door.l .door-face { box-shadow: inset -1px 0 0 rgba(255,255,255,.25), inset -14px 0 22px -14px rgba(0,0,0,.55); }
.door.r .door-face { box-shadow: inset 1px 0 0 rgba(0,0,0,.25), inset 14px 0 22px -14px rgba(0,0,0,.45); }
.door::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.15)); opacity: 0; transition: opacity 1.4s; backface-visibility: hidden; pointer-events: none; }
.door.r::after { background: linear-gradient(270deg, rgba(0,0,0,.55), rgba(0,0,0,.15)); }
.op.open .door::after { opacity: 1; }
.db { position: absolute; left: 0; right: 0; height: var(--bandH); background: var(--band) repeat-x center / auto 100%; }
.door.l .db { background-position: right center; } .door.r .db { background-position: left center; }
.db.t { top: 0; } .db.b { bottom: 0; transform: scaleY(-1); }
.th-ivory-minimal .db.t { top: 16px; } .th-ivory-minimal .db.b { bottom: 16px; }
.dline { position: absolute; top: calc(var(--bandH) + 12px); bottom: calc(var(--bandH) + 12px); border: 1px solid var(--line); opacity: .55; }
.door.l .dline { left: 14px; right: -1px; border-right: 0; } .door.r .dline { right: 14px; left: -1px; border-left: 0; }
.door-med { position: absolute; top: 50%; max-width: none; width: min(92vw, 440px); height: min(92vw, 440px); margin-top: calc(min(92vw, 440px) / -2); opacity: .7; }
.door.l .door-med { right: calc(min(92vw, 440px) / -2); } .door.r .door-med { left: calc(min(92vw, 440px) / -2); }
.light .door-med { opacity: .55; }
.th-phulkari .door-med { opacity: .95; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.seal-half { position: absolute; top: 50%; width: 74px; height: 148px; margin-top: -74px; overflow: hidden; transition: transform .35s ease; z-index: 3; }
.seal-half.l { right: 0; } .seal-half.r { left: 0; }
.seal-half .wax { position: absolute; top: 0; width: 148px; height: 148px; max-width: none; filter: drop-shadow(0 10px 12px rgba(0,0,0,.45)); }
.seal-half.l .wax { left: 0; } .seal-half.r .wax { right: 0; }
.op.press .seal-half { transform: scale(.95); }
.op.crack .seal-half.l { transform: translateX(-3px) rotate(-2deg); } .op.crack .seal-half.r { transform: translateX(3px) rotate(2deg); }
.op-text { position: absolute; left: 0; right: 0; top: calc(50% - 74px - 150px); text-align: center; z-index: 4; transition: opacity .4s; pointer-events: none; padding: 0 20px; }
.op-kick { font: 500 .68rem var(--sans); letter-spacing: .34em; text-transform: uppercase; color: var(--ink2); margin: 0 0 6px; }
.op-names { font: 400 3rem/1.1 var(--script); margin: 0; background: var(--foilT); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 5s ease-in-out infinite alternate; padding: 0 0 6px; }
.th-bengali .op-names { background: none; color: #b30d27; animation: none; }
.th-ivory-minimal .op-names { background: none; color: #4a463b; animation: none; }
.op-hint { position: absolute; left: 0; right: 0; top: calc(50% + 96px); text-align: center; font: 500 .7rem var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--ink2); z-index: 4; margin: 0; animation: pulse 1.8s ease-in-out infinite; pointer-events: none; transition: opacity .3s; }
.op-hint span { display: inline-block; padding: 7px 14px; border-radius: 99px; background: var(--card); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.op.press .op-text, .op.press .op-hint { opacity: 0; }
.seal-btn { position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; margin: -85px 0 0 -85px; border-radius: 50%; border: 0; background: transparent; z-index: 5; cursor: pointer; }
.seal-btn::after { content: ''; position: absolute; inset: 8px; border-radius: 50%; box-shadow: 0 0 0 0 rgba(255,230,170,.5); animation: ring 2.2s ease-out infinite; }
.op.press .seal-btn::after { display: none; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255,230,170,.55); } 100% { box-shadow: 0 0 0 26px rgba(255,230,170,0); } }
.op.fade { opacity: 0; transition: opacity .55s ease; pointer-events: none; }

/* ---------- A: satin ribbon ---------- */
.rb { position: fixed; inset: 0; z-index: 55; pointer-events: none; --p: 0; }
.rb-band { position: absolute; top: 61%; height: 46px; margin-top: -23px; width: 50%; pointer-events: none;
  background: linear-gradient(180deg, var(--r3) 0%, var(--r1) 14%, var(--r2) 38%, var(--r1) 55%, var(--r3) 100%); box-shadow: 0 10px 16px -8px rgba(0,0,0,.45);
  transition: transform 1.1s cubic-bezier(.55,0,.6,1), opacity 1.1s; }
.rb-band::after { content: ''; position: absolute; left: 0; right: 0; top: 5px; bottom: 5px; border-top: 1px dashed rgba(255,255,255,.35); border-bottom: 1px dashed rgba(255,255,255,.35); }
.rb-band.l { left: 0; transform-origin: 0 50%; } .rb-band.r { right: 0; transform-origin: 100% 50%; }
.rb-tail { position: absolute; top: 61%; width: 34px; height: 150px; transform-origin: 50% 0; pointer-events: none;
  background: linear-gradient(90deg, var(--r3), var(--r1) 22%, var(--r2) 48%, var(--r1) 70%, var(--r3)); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%);
  filter: drop-shadow(0 8px 8px rgba(0,0,0,.35)); transition: transform .5s cubic-bezier(.3,1.4,.5,1); }
.rb-tail.l { left: calc(50% - 40px); transform: rotate(18deg); }
.rb-tail.r { left: calc(50% + 6px); transform: rotate(-16deg) translateY(calc(var(--p) * 120px)) scaleY(calc(1 + var(--p) * .35)); }
.rb.drag .rb-tail.r, .rb.drag .rb-bow { transition: none; }
.rb-bow { position: absolute; left: 50%; top: 61%; width: 210px; height: 105px; margin: -62px 0 0 -105px; filter: drop-shadow(0 10px 10px rgba(0,0,0,.4)); transition: transform .5s cubic-bezier(.3,1.4,.5,1);
  transform: translateY(calc(var(--p) * 18px)) scale(calc(1 - var(--p) * .22), calc(1 + var(--p) * .08)); }
.rb-bow .lp { transition: transform .9s cubic-bezier(.55,0,.6,1), opacity .7s; transform-box: fill-box; }
.rb-bow .lp.l { transform-origin: 100% 60%; } .rb-bow .lp.r { transform-origin: 0 60%; }
.rb-grab { position: absolute; left: calc(50% - 110px); top: calc(61% - 70px); width: 220px; height: 260px; border: 0; background: transparent; pointer-events: auto; cursor: grab; touch-action: none; border-radius: 30px; }
.rb.drag .rb-grab { cursor: grabbing; }
.rb-hint { position: absolute; left: 0; right: 0; top: calc(61% + 170px); text-align: center; margin: 0; font: 500 .7rem var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--ink2); transition: opacity .3s; }
.rb-hint span { display: inline-block; padding: 8px 14px; background: var(--card); border-radius: 99px; animation: pulse 1.8s ease-in-out infinite; backdrop-filter: blur(4px); }
.rb.auto .rb-tail.r { transition: transform .65s cubic-bezier(.5,0,.5,1); }
.rb.untie .rb-hint, .rb.drag .rb-hint { opacity: 0; }
.rb.untie .rb-bow { transform: translateY(30px) scale(.4); opacity: 0; transition: transform .8s cubic-bezier(.5,0,.7,1), opacity .7s .1s; }
.rb.untie .lp.l { transform: rotate(-40deg) scale(.3); } .rb.untie .lp.r { transform: rotate(40deg) scale(.3); }
.rb.untie .rb-band.l { transform: translate(-70%, 40px) rotate(-14deg); opacity: 0; }
.rb.untie .rb-band.r { transform: translate(70%, 40px) rotate(14deg); opacity: 0; }
.rb.untie .rb-tail { transform: translateY(110vh) rotate(30deg); transition: transform 1.1s cubic-bezier(.55,0,.85,.4); }
.rb.untie .rb-tail.l { transform: translateY(110vh) rotate(-30deg); }

/* ---------- petals, music, watermark ---------- */
.pt { position: fixed; z-index: 70; pointer-events: none; animation-name: fall, sway; animation-timing-function: cubic-bezier(.3,.1,.6,1), ease-in-out; animation-fill-mode: both; animation-iteration-count: 1, infinite; animation-direction: normal, alternate; }
.pt svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
@keyframes fall { 0% { transform: translate(0,0) rotate(0); opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }
@keyframes sway { from { margin-left: calc(var(--sw) * -1); } to { margin-left: var(--sw); } }
.music { position: fixed; right: 14px; bottom: 70px; z-index: 40; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; padding: 0;
  background: var(--foil); background-size: 200% 200%; color: #2c1a08; box-shadow: 0 8px 20px -8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.5); }
.music .play { width: 18px; height: 18px; fill: currentColor; margin-left: 2px; }
.music .eq { display: none; gap: 2.5px; align-items: flex-end; height: 16px; }
.music .eq i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; transform-origin: 50% 100%; animation: eq 1s ease-in-out infinite; }
.music .eq i:nth-child(2) { animation-delay: -.35s; } .music .eq i:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.music[aria-pressed="true"] .eq { display: flex; } .music[aria-pressed="true"] .play { display: none; }
.music .ring { position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--line); opacity: 0; }
.music[aria-pressed="true"] .ring { animation: ring2 1.8s ease-out infinite; opacity: 1; }
@keyframes ring2 { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.our-song { position: fixed; right: 70px; bottom: 76px; z-index: 40; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; text-decoration: none;
  font: 600 .62rem 'Montserrat', 'Jost', sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #2c1a08; background: rgba(255,250,240,.86); backdrop-filter: blur(6px); box-shadow: 0 8px 20px -10px rgba(0,0,0,.5), inset 0 0 0 1px rgba(176,133,52,.5); }
.our-song svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
#wm { position: fixed; inset: 0; z-index: 50; pointer-events: none; display: grid; grid-template-columns: repeat(3, 1fr); align-content: space-around; overflow: hidden; }
#wm span { transform: rotate(-28deg); text-align: center; font: 600 1.15rem/1 'Jost', 'Montserrat', sans-serif; letter-spacing: .3em; color: rgba(120, 120, 120, .2); padding: 40px 0; }
.dark #wm span { color: rgba(255, 255, 255, .13); }
#wm-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 12px 16px; text-align: center; font: 500 .85rem 'Jost', 'Montserrat', sans-serif; color: #fff; background: rgba(20, 12, 10, .88); backdrop-filter: blur(6px); }
#wm-bar a { color: #f3d58a; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01s !important; }
  .go .nm text { stroke-dasharray: none; fill-opacity: 1; }
  .go .nm { -webkit-mask: none; mask: none; }
  html:not(.go) .join, html:not(.go) .medal, html:not(.go) .kick { opacity: 1; }
  .rv, .ev { opacity: 1; transform: none; }
}
@media (min-width: 700px) { .inv { box-shadow: 0 0 80px rgba(0,0,0,.25); } }

/* ---------- laptops: a wide, cinematic card for openings A, B and C ---------- */
.amb-card { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
@media (min-width: 900px) {
  html.wide-card { scroll-snap-type: y proximity; }
  .wide-card .inv { max-width: 1180px; box-shadow: none; overflow: visible; z-index: 1; }
  .wide-card .inv > section, .wide-card .inv > footer { scroll-snap-align: start; }
  .wide-card body { font-size: 19px; }
  .wide-card .hero { min-height: 100vh; padding-left: 8vw; padding-right: 8vw; }
  .wide-card .hero-in { max-width: 640px; margin: 0 auto; padding: 90px 60px 60px; }
  .wide-card .hero-med { width: 860px; max-width: none; opacity: .16; will-change: transform; }
  .wide-card .nm { max-width: 520px; height: 140px; }
  .wide-card .join { font-size: 1.8rem; }
  .wide-card .medal { width: 190px; height: 190px; } .wide-card .m-num { font-size: 3.8rem; }
  .wide-card .sec { padding: 96px 40px 30px; min-height: 80vh; display: flex; flex-direction: column; justify-content: center; }
  .wide-card .sec-title { font-size: 4.4rem; }
  .wide-card #families .panel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 40px; padding: 60px 70px; max-width: 980px; margin: 0 auto; }
  .wide-card #families .panel > .divider, .wide-card #families .lede, .wide-card #families .msg { grid-column: 1 / -1; }
  .wide-card .fam-name { font-size: 3.6rem; } .wide-card .amp { font-size: 3rem; margin: 0; }
  .wide-card .date-sec { display: grid; grid-template-columns: 1fr 1fr; column-gap: 60px; align-items: center; text-align: left; max-width: 1040px; margin: 0 auto; }
  .wide-card .date-sec > .sec-kick, .wide-card .date-sec > .sec-title { grid-column: 1 / -1; text-align: center; }
  .wide-card .big-date { font-size: 2rem; text-align: right; } .wide-card .muhurat { text-align: right; }
  .wide-card .date-sec .cd { grid-column: 2; grid-row: 3 / span 2; margin: 0; max-width: 420px; } .wide-card .cd-cell b { font-size: 2.6rem; }
  .wide-card .date-sec .btn-ghost { grid-column: 1; justify-self: end; }
  .wide-card .evs { grid-template-columns: repeat(3, 1fr); gap: 28px; perspective: 1400px; }
  .wide-card .ev { transition: opacity .9s, transform .6s cubic-bezier(.2,.7,.2,1), box-shadow .6s; }
  .wide-card .ev.in:hover { transform: translateY(-8px) rotateX(4deg); box-shadow: 0 40px 60px -30px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.15); }
  .wide-card .sl { flex-basis: 31%; }
  .wide-card .story-p { max-width: 640px; font-size: 1.2rem; }
  .wide-card .venue { max-width: 760px; margin: 0 auto; padding: 60px; }
  .wide-card .rsvp { max-width: 560px; }
  .wide-card .music { bottom: 30px; right: 30px; } .wide-card .our-song { bottom: 36px; right: 92px; }
}
