/* Shubhangi & Dhruv · the Dhars' invitation
   Palette: ivory paper, walnut ink, Kashmiri crimson, kesar saffron, night indigo, gold.
   One page at a time, like the groom's invitation: swipe, tap, wheel, keys or tabs turn it, or it turns itself.
   Motion rule: only transform and opacity animate. */

:root {
  --ivory: #F4ECDF;
  --ivory-2: #EDE3D3;
  --paper: #FCF8F1;
  --ink: #221714;
  --ink-2: #5A4940;
  --ink-3: #8C796C;
  --crimson: #8E1B2E;
  --crimson-2: #6C1121;
  --saffron: #E39A36;
  --gold: #C9A45E;
  --gold-2: #E8CB8A;
  --night: #19120F;
  --display: "Kalnia", "Iowan Old Style", "Times New Roman", serif;
  --serif: var(--display);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --deva: "Sahitya", "Noto Serif Devanagari", "Kohinoor Devanagari", serif;
  --ease: cubic-bezier(.2, .75, .2, 1);
  --turn: cubic-bezier(.22, .78, .18, 1);
  --topbar: 0px;
  --gutter: 20px;
  --dockh: 64px;
  --dockb: calc(10px + env(safe-area-inset-bottom));
  --ctrlb: calc(var(--dockb) + var(--dockh) + 12px);          /* the row of round buttons sits just above the tabs */
  --pad-top: calc(22px + env(safe-area-inset-top));
  --pad-bottom: calc(var(--ctrlb) + 46px + 16px);
}
@media (min-width: 900px) {
  :root { --topbar: 64px; --gutter: clamp(84px, 7vw, 110px); --pad-top: 30px; --pad-bottom: 110px; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* hidden always wins over a component's display */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ivory); color-scheme: light; }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
.js body { position: fixed; inset: 0; overflow: hidden; overscroll-behavior: none; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
img { display: block; max-width: 100%; height: auto; -webkit-user-drag: none; }
button { font: inherit; color: inherit; }
a { color: inherit; }
p { margin: 0; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.kicker { font: 500 11px/1.4 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--crimson); }
.kicker span { opacity: .55; margin: 0 .25em; }
.kicker--gold { color: var(--gold-2); }
.h2 { font: 300 clamp(38px, 10.4vw, 80px)/1.02 var(--display); letter-spacing: -.01em; margin: 10px 0 0; }
.h2 i { font-style: normal; color: var(--crimson); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 22px;
  border: 0; border-radius: 999px; font: 500 15px/1 var(--sans); letter-spacing: .01em; text-decoration: none;
  cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s, background-color .25s, color .25s; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn .ico { width: 20px; height: 20px; }
.btn--ink { background: var(--ink); color: #FBF3E6; box-shadow: 0 16px 30px -16px rgba(34, 23, 20, .7); }
.btn--crimson { background: var(--crimson); color: #FFF6EA; box-shadow: 0 16px 30px -16px rgba(142, 27, 46, .8); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(34, 23, 20, .22); }
.btn--ivory { background: #FCF0E0; color: var(--crimson); box-shadow: 0 18px 34px -18px rgba(20, 4, 8, .8); }
.btn--line { background: rgba(255, 240, 222, .06); color: #FBF0E1; box-shadow: inset 0 0 0 1px rgba(251, 240, 225, .38); }
.btn--line .ico { color: var(--gold-2); }
@media (hover: hover) {
  .btn--ink:hover, .btn--crimson:hover, .btn--ivory:hover { transform: translateY(-2px); }
}
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; }

/* ---------- the envelope stage ---------- */
.stage {
  position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: 1fr auto 1fr; justify-items: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); overflow: hidden; touch-action: none;
}
.stage__bg {
  position: absolute; inset: 0; z-index: -1;
  background: url(/img/paper-ivory.webp) 0 0 / 256px, radial-gradient(120% 85% at 50% 44%, #FDF9F2 0%, #F4EBDD 58%, #E9DCC8 100%);
}
.stage__top { align-self: end; text-align: center; margin-bottom: clamp(28px, 6svh, 56px); }
.stage__line { font: 300 clamp(17px, 4.6vw, 21px)/1.3 var(--display); color: var(--ink-2); margin-top: 10px; }
.stage__foot { align-self: start; margin-top: clamp(34px, 7svh, 60px); display: grid; justify-items: center; gap: 14px; }
.stage__open { min-height: 54px; padding: 0 30px; font-size: 15.5px; }
.stage__hint { display: flex; align-items: center; gap: 7px; font: 400 12.5px/1 var(--sans); color: var(--ink-3); }
.stage__hint .ico { width: 16px; height: 16px; }

.env {
  --ew: min(88vw, 420px, 60svh); --rx: 14deg; --ry: 0deg; position: relative; width: var(--ew); height: calc(var(--ew) * .68);
  transform: perspective(1300px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .6s cubic-bezier(.2, .7, .2, 1);
  animation: envArrive 1.5s cubic-bezier(.2, .8, .2, 1) .15s both;
}
@keyframes envArrive { from { opacity: 0; transform: perspective(1300px) translateY(60px) rotateX(38deg) scale(.92); } }
.stage__top, .stage__foot { animation: fadeUp 1.1s var(--ease) both; }
.stage__top { animation-delay: .5s; }
.stage__foot { animation-delay: .9s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
.env__sheen { position: absolute; inset: 0; z-index: 5; overflow: hidden; border-radius: 9px; pointer-events: none; clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%); }
.env__sheen::before {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 45%;
  background: linear-gradient(100deg, rgba(255, 236, 200, 0) 0%, rgba(255, 236, 200, .16) 45%, rgba(255, 246, 220, .3) 50%, rgba(255, 236, 200, .16) 55%, rgba(255, 236, 200, 0) 100%);
  transform: translateX(0) skewX(-12deg); animation: sheen 5.5s cubic-bezier(.45, 0, .2, 1) 2.2s infinite;
}
@keyframes sheen { 0% { transform: translateX(0) skewX(-12deg); } 38%, 100% { transform: translateX(420%) skewX(-12deg); } }
.env__shadow {
  position: absolute; left: 4%; right: 4%; bottom: -12%; height: 30%;
  background: radial-gradient(closest-side, rgba(70, 25, 10, .34), rgba(70, 25, 10, 0)); animation: shadowFloat 6s ease-in-out infinite;
}
.env__body { position: absolute; inset: 0; animation: envFloat 6s ease-in-out infinite; }
@keyframes envFloat { 0%, 100% { transform: translateY(0) rotate(-.5deg); } 50% { transform: translateY(-7px) rotate(.35deg); } }
@keyframes shadowFloat { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.94); opacity: .8; } }
.env__inside {
  position: absolute; inset: 0; border-radius: 9px;
  background: url(/img/liner-saffron.svg) 50% 0 / 66px auto, #DA8B2C;
  box-shadow: inset 0 22px 30px -12px rgba(70, 20, 0, .5);
}
.env__card {
  position: absolute; left: 5%; right: 5%; top: 5%; height: 90%; z-index: 2; border-radius: 4px;
  background: url(/img/paper-ivory.webp), #FBF7EF; box-shadow: 0 -1px 4px rgba(60, 20, 10, .15), inset 0 0 0 1px rgba(201, 164, 94, .35);
  display: grid; justify-items: center; align-content: start; padding-top: 9%;
}
.letter { text-align: center; }
.letter__dej { width: 14px; height: auto; margin: 0 auto 8px; }
.letter__names { font: 300 calc(var(--ew) * .066)/1 var(--display); color: var(--ink); white-space: nowrap; }
.letter__names i, .env__names i { font-style: italic; }
.letter__names i { color: var(--crimson); }
.letter__date { font: 500 9.5px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); margin-top: 10px; }
.env__pocket {
  position: absolute; inset: 0; z-index: 3; border-radius: 9px;
  clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%);
  background: url(/img/paper-crimson.webp), linear-gradient(160deg, #9A2236 0%, #8A1B2D 60%, #7E1627 100%);
}
.env__pocket::before, .env__pocket::after { content: ""; position: absolute; inset: 0; }
.env__pocket::before { clip-path: polygon(0 0, 50% 55%, 0 100%); background: linear-gradient(90deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .02)); }
.env__pocket::after { clip-path: polygon(100% 0, 50% 55%, 100% 100%); background: linear-gradient(270deg, rgba(0, 0, 0, .16), rgba(0, 0, 0, .04)); }
.env__names {
  position: absolute; left: 0; right: 0; bottom: 12%; z-index: 1; text-align: center; white-space: nowrap;
  font: 300 calc(var(--ew) * .06)/1.1 var(--display);
  background: linear-gradient(100deg, #C39447 0%, #F6DE9E 38%, #C99A4C 58%, #EFD08C 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.env__flap {
  position: absolute; left: 0; right: 0; top: 0; height: 61%; z-index: 4; transform-origin: 50% 0;
  transform: perspective(1100px) rotateX(0deg);
  clip-path: polygon(0 0, 100% 0, 54% 93%, 51.6% 98.6%, 50% 100%, 48.4% 98.6%, 46% 93%);
}
.env__flap-out, .env__flap-in, .env__flap-shade { position: absolute; inset: 0; border-radius: 9px 9px 0 0; }
.env__flap-out { background: url(/img/paper-crimson.webp), linear-gradient(172deg, #A92B40 0%, #951F33 55%, #8A1A2C 100%); }
.env__flapshadow { position: absolute; inset: 0; z-index: 3; pointer-events: none; filter: blur(3.5px); opacity: .55; transform: translateY(3px); }
.env__flapshadow i { position: absolute; left: 0; right: 0; top: 0; height: 61%; background: #2E040D; clip-path: polygon(0 0, 100% 0, 54% 93%, 51.6% 98.6%, 50% 100%, 48.4% 98.6%, 46% 93%); }
.env__flap-out::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(0, 0, 0, .12)); }
.env__flap-in { background: url(/img/liner-saffron.svg) 50% 0 / 66px auto, #DA8B2C; opacity: 0; }
.env__flap-shade { background: #1a0a05; opacity: 0; }
.env__flap.is-open { z-index: 1; }
.env__flap.is-open .env__flap-out { opacity: 0; }
.env__flap.is-open .env__flap-in { opacity: 1; }
.env__seal {
  position: absolute; left: 50%; top: 61%; width: 27%; aspect-ratio: 1; z-index: 6; margin: 0; padding: 0; border: 0;
  background: none; border-radius: 50%; cursor: pointer; transform: translate(-50%, -50%);
}
.seal__shadow { position: absolute; inset: 18%; border-radius: 50%; box-shadow: 0 10px 18px -6px rgba(40, 8, 4, .55); }
.seal__half { position: absolute; inset: 0; background: url(/img/seal.webp) center / 100% 100% no-repeat; }
.seal__half--l { clip-path: polygon(0 0, 53% 0, 48% 22%, 55% 41%, 47% 60%, 54% 79%, 50% 100%, 0 100%); }
.seal__half--r { clip-path: polygon(53% 0, 100% 0, 100% 100%, 50% 100%, 54% 79%, 47% 60%, 55% 41%, 48% 22%); }
.seal__ring { position: absolute; inset: 10%; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(240, 210, 140, .9); animation: sealRing 2.6s cubic-bezier(.2, .6, .3, 1) infinite; }
@keyframes sealRing { 0% { transform: scale(.92); opacity: .95; } 80%, 100% { transform: scale(1.55); opacity: 0; } }
@media (hover: hover) { .env__seal:hover .seal__half { transform: scale(1.04); transition: transform .3s var(--ease); } }
.stage.is-opening { pointer-events: none; }
.stage.is-opening .seal__ring, .stage.is-opening .env__sheen { display: none; }
.stage.is-opening .env__body, .stage.is-opening .env__shadow { animation-play-state: paused; }

/* ---------- chrome: top bar (wide screens) ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 64px; display: none; align-items: center; justify-content: space-between;
  padding: 0 28px; background: rgba(246, 240, 230, .9); border-bottom: 1px solid rgba(34, 23, 20, .08);
  -webkit-backdrop-filter: saturate(1.3) blur(14px); backdrop-filter: saturate(1.3) blur(14px);
  opacity: 0; transform: translateY(-100%); transition: opacity .7s var(--ease), transform .8s var(--ease);
}
.topbar__mark { font: 300 22px/1 var(--display); text-decoration: none; }
.topbar__mark i { color: var(--crimson); margin: 0 .04em; }
.topbar__nav { display: flex; gap: 6px; }
.topbar__nav a {
  position: relative; padding: 10px 14px; font: 500 13.5px/1 var(--sans); color: var(--ink-2); text-decoration: none; letter-spacing: .01em;
  border-radius: 999px; transition: color .25s, background-color .25s;
}
.topbar__nav a:hover { color: var(--ink); background: rgba(34, 23, 20, .05); }
.topbar__nav a[aria-current] { color: var(--crimson); background: rgba(142, 27, 46, .08); }
.topbar__line { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--crimson); opacity: .55; transform: scaleX(var(--all, 0)); transform-origin: 0 50%; }
@media (min-width: 900px) { .topbar { display: flex; } .dock { display: none !important; } }
.opened .topbar { opacity: 1; transform: none; }

.sound {
  width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(34, 23, 20, .06); color: var(--ink); transition: background-color .25s, transform .2s;
}
.sound:active { transform: scale(.94); }
.sound__bars { display: flex; align-items: flex-end; gap: 2.5px; height: 15px; }
.sound__bars i { width: 2.5px; height: 100%; border-radius: 2px; background: currentColor; transform-origin: 50% 100%; transform: scaleY(.3); }
.sound.is-playing .sound__bars i { animation: bars 1.05s ease-in-out infinite; }
.sound.is-playing .sound__bars i:nth-child(2) { animation-delay: -.35s; animation-duration: .9s; }
.sound.is-playing .sound__bars i:nth-child(3) { animation-delay: -.6s; animation-duration: 1.2s; }
.sound.is-playing .sound__bars i:nth-child(4) { animation-delay: -.15s; animation-duration: .95s; }
@keyframes bars { 0%, 100% { transform: scaleY(.28); } 50% { transform: scaleY(1); } }
.sound__off { display: none; width: 20px; height: 20px; }
.sound[aria-pressed="true"] .sound__bars { display: none; }
.sound[aria-pressed="true"] .sound__off { display: block; }

/* ---------- chrome: tabs along the foot of a phone, with a hairline of progress across the top ---------- */
.dock {
  position: fixed; left: 10px; right: 10px; bottom: var(--dockb); z-index: 40;
  opacity: 0; transform: translateY(30px); pointer-events: none; transition: opacity .7s var(--ease) .2s, transform .8s var(--ease) .2s;
}
.opened .dock { opacity: 1; transform: none; pointer-events: auto; }
.dock__tabs {
  position: relative; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--dockh); padding: 5px; border-radius: 22px; overflow: hidden;
  background: rgba(252, 248, 241, .96); box-shadow: 0 12px 30px -12px rgba(40, 18, 8, .45), 0 0 0 1px rgba(34, 23, 20, .08);
}
.dock__tabs a {
  position: relative; z-index: 1; display: grid; justify-items: center; align-content: center; gap: 4px; min-width: 0;
  font: 500 10px/1 var(--sans); letter-spacing: .01em; color: var(--ink-3); text-decoration: none; transition: color .3s;
}
.dock__tabs a span { max-width: 100%; overflow: hidden; white-space: nowrap; }
.dock__tabs a .ico { width: 22px; height: 22px; }
.dock__tabs a[aria-current] { color: var(--crimson); }
.dock__pill {
  position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 5); border-radius: 17px; background: rgba(142, 27, 46, .09);
  transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .5s var(--ease);
}
.dock__line { position: absolute; left: 16px; right: 16px; top: 0; height: 2px; border-radius: 2px; background: var(--crimson); opacity: .5; transform: scaleX(var(--all, 0)); transform-origin: 0 50%; }
@media (max-width: 380px) {
  .dock { left: 8px; right: 8px; }
  .dock__tabs a { font-size: 9px; letter-spacing: 0; }
}

/* ---------- chrome: play, the way forward, music (phones); side arrows and progress (wide screens) ---------- */
.ctrl { position: fixed; inset: 0; z-index: 41; pointer-events: none; opacity: 0; transition: opacity .8s ease .4s; }
.opened .ctrl { opacity: 1; }
.ctrl button { pointer-events: auto; appearance: none; -webkit-appearance: none; margin: 0; padding: 0; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ctrl__play, .ctrl__sound, .ctrl__side {
  position: absolute; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--ink);
  background: rgba(252, 248, 241, .95); box-shadow: 0 10px 24px -12px rgba(40, 18, 8, .5), 0 0 0 1px rgba(34, 23, 20, .08); transition: transform .2s var(--ease), opacity .3s;
}
.ctrl__play:active, .ctrl__sound:active, .ctrl__side:active { transform: scale(.92); }
.ctrl__play { left: 14px; bottom: var(--ctrlb); }
.ctrl__play .ico { width: 20px; height: 20px; }
.ctrl__play .ico--pause, .ctrl__play[aria-pressed="true"] .ico--play { display: none; }
.ctrl__play[aria-pressed="true"] .ico--pause { display: block; }
.ctrl__sound { right: 14px; bottom: var(--ctrlb); }
.is-holding .ctrl__play { transform: scale(.9); }
.ctrl__side { display: none; top: 50%; margin-top: -23px; }
.ctrl__side .ico { width: 20px; height: 20px; }
.ctrl__side--prev { left: 22px; } .ctrl__side--next { right: 22px; }
.ctrl__side[disabled] { opacity: 0; pointer-events: none; }
.bars { display: none; }

.hint {
  position: absolute; left: 50%; bottom: var(--ctrlb); height: 46px; min-width: 46px; transform: translateX(-50%);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 0 12px;
  font: 500 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  background: rgba(252, 248, 241, .95); color: var(--ink); box-shadow: 0 10px 24px -12px rgba(40, 18, 8, .5), 0 0 0 1px rgba(34, 23, 20, .08);
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s;
}
.hint.is-on { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.hint .ico { width: 18px; height: 18px; stroke-width: 1.8; }
.hint__label { display: none; }
.hint:not(.is-full) .ico { animation: peek 2.6s ease-in-out infinite; }
.hint.is-full { padding: 0 18px 0 24px; background: var(--ink); color: #FBF3E6; box-shadow: 0 14px 28px -14px rgba(20, 8, 4, .8), 0 0 0 1px rgba(251, 240, 225, .22); }
.hint.is-full .hint__label { display: inline; }
body[data-tone="dark"] .hint.is-full { background: #FCF0E0; color: var(--ink); box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .8); }
.hint.is-grow { animation: grow .5s var(--ease); }
.hint.is-nudging { animation: nudge 1.8s var(--ease) 2; }
.hint.is-nudging .ico { animation: beckon .9s ease-in-out 4; }
@keyframes peek { 0%, 70%, 100% { transform: translateX(0); } 80% { transform: translateX(3px); } 90% { transform: translateX(0); } }
@keyframes grow { from { transform: translateX(-50%) scale(.7); opacity: .4; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
@keyframes nudge { 0%, 40%, 100% { transform: translateX(-50%) translateY(0); } 15% { transform: translateX(-50%) translateY(-7px); } 28% { transform: translateX(-50%) translateY(0); } 33% { transform: translateX(-50%) translateY(-3px); } }
@keyframes beckon { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }

@media (min-width: 900px) {
  :root { --ctrlb: 34px; }
  .ctrl__play { left: 28px; bottom: 28px; }
  .ctrl__sound { display: none; }
  .ctrl__side { display: grid; }
  .hint { bottom: 42px; }
  .bars { display: flex; position: absolute; left: 50%; bottom: 22px; width: min(340px, 40vw); transform: translateX(-50%); gap: 5px; margin: 0; padding: 0; list-style: none; }
  .bars li { flex: 1; height: 2px; border-radius: 2px; background: rgba(34, 23, 20, .16); overflow: hidden; }
  .bars li i { display: block; height: 100%; border-radius: 2px; background: var(--crimson); transform: scaleX(0); transform-origin: 0 50%; }
  .bars li.is-done i { transform: scaleX(1); }
  .bars li.is-now i { transform: scaleX(var(--p, 0)); }
  body[data-tone="dark"] .bars li { background: rgba(251, 240, 225, .22); }
  body[data-tone="dark"] .bars li i { background: var(--gold-2); }
}

/* ---------- the story: a stack of pages, one showing ---------- */
.js .story { position: fixed; inset: var(--topbar) 0 0 0; z-index: 2; touch-action: pinch-zoom; }
.scene {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 100svh;
  padding: var(--pad-top) var(--gutter) var(--pad-bottom); background: var(--ivory); overflow: hidden;
}
.js .scene { position: absolute; inset: 0; min-height: 0; visibility: hidden; border-radius: 0; transition: border-radius .3s ease; }
.js .scene.is-moving { border-radius: 28px 28px 0 0; }                 /* a page is a card only while it slides; at rest it meets the edges square */
.js .scene.is-current { visibility: visible; }
.js .scene:not(.is-current) *, .js .scene:not(.is-current)::before { animation-play-state: paused !important; }   /* only the page in view moves */
.scene__shade { position: absolute; inset: 0; z-index: 30; background: #0e0806; opacity: 0; pointer-events: none; }
.scene__body { position: relative; z-index: 1; width: 100%; transform: scale(var(--fit, 1)); transform-origin: 50% 50%; }

/* each page's words arrive as it does */
.js .scene [data-r] { opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity .6s var(--ease), transform .7s var(--ease); }
.js .scene.is-on [data-r] { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform 1s var(--ease); transition-delay: calc(80ms + var(--d, 0) * 110ms); }

/* ---------- 1 · names, dates, and the photograph in an arch, flowers blooming at its corners ---------- */
.scene--hero { background: radial-gradient(120% 80% at 50% 0%, #F8F1E6 0%, #EFE5D5 100%); }
.scene--hero::before { content: ""; position: absolute; left: 50%; top: 0; width: 130%; height: 75%; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 249, 238, .95), rgba(255, 249, 238, 0)); }   /* a soft light behind the arch */
.hero { display: grid; justify-items: center; gap: clamp(18px, 3.4svh, 30px); }
.harch { --aw: min(72vw, 50svh * .75, 330px); position: relative; width: var(--aw); aspect-ratio: 3 / 4; margin: 12px 0 0; }
.harch__shadow { position: absolute; inset: 6% -3% -4%; border-radius: 50% 50% 8px 8px / 36% 36% 8px 8px; background: rgba(88, 52, 30, .34); filter: blur(22px); opacity: .55; }
.harch__clip { position: absolute; inset: 0; overflow: hidden; clip-path: url(#archClip); background: #E6DCCB; }
.harch__clip img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
/* the gold line sits a step outside the photograph; insetting by a share of each side keeps it the arch's exact shape, so it scales evenly and draws to the end */
.harch__line { position: absolute; inset: -3.8%; width: 107.6%; height: 107.6%; overflow: visible; pointer-events: none; }
.harch__line path { fill: none; stroke: #C39A4E; stroke-width: 1.15; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
/* each corner's flowers are laid out in a square the width of the arch, so they keep their shape at any size */
.bloom { position: absolute; width: 100%; aspect-ratio: 1; pointer-events: none; }
.bloom--tl { left: 0; top: 0; transform-origin: 8% 16%; }
.bloom--br { right: 0; bottom: 0; transform-origin: 92% 92%; }
.fl { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: calc(var(--w) * 1%); height: auto;
  transform-origin: var(--ox, 50%) var(--oy, 50%); translate: calc(var(--ox, 50%) * -1) calc(var(--oy, 50%) * -1); rotate: var(--r); }

/* arriving: the photograph rises into the arch and settles, the gold line draws itself, the flowers open one by one */
.js .scene--hero .harch__clip, .js .scene--hero .harch__shadow { opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity .4s ease, transform .5s ease; }
.js .scene--hero .harch__clip img { transform: scale(1.1); transition: transform .5s ease; }
.js .scene--hero.is-on .harch__clip { opacity: 1; transform: none; transition: opacity 1s var(--ease) .1s, transform 1.3s cubic-bezier(.2, .8, .2, 1) .1s; }
.js .scene--hero.is-on .harch__clip img { transform: scale(1.02); transition: transform 9s cubic-bezier(.2, .6, .2, 1) .1s; }
.js .scene--hero.is-on .harch__shadow { opacity: .55; transform: none; transition: opacity 1.2s var(--ease) .3s, transform 1.3s cubic-bezier(.2, .8, .2, 1) .1s; }
.js .scene--hero.is-on .harch__line path { stroke-dashoffset: 0; transition: stroke-dashoffset 2.6s cubic-bezier(.55, 0, .25, 1) .45s; }
.js .scene--hero .fl { opacity: 0; scale: 0; rotate: calc(var(--r) - 38deg); transition: opacity .3s ease, scale .4s ease, rotate .4s ease; }
.js .scene--hero.is-on .fl { opacity: 1; scale: 1; rotate: var(--r);
  transition: opacity .5s ease calc(.7s + var(--d) * 110ms), scale 1.15s cubic-bezier(.3, 1.4, .5, 1) calc(.7s + var(--d) * 110ms), rotate 1.5s cubic-bezier(.2, .8, .2, 1) calc(.7s + var(--d) * 110ms); }
.scene--hero.is-on .bloom--tl { animation: bloomSway 9s ease-in-out 2.6s infinite; }
.scene--hero.is-on .bloom--br { animation: bloomSway 10s ease-in-out 3s infinite reverse; }
@keyframes bloomSway { 0%, 100% { rotate: 0deg; } 50% { rotate: 1.4deg; } }

.hero__text { max-width: 520px; text-align: center; display: grid; justify-items: center; }
.hero__names { margin: 8px 0 10px; font: 250 clamp(42px, 12.2vw, 104px)/1.02 var(--display); letter-spacing: -.01em; color: var(--ink); }
.hero__names .mask { display: block; overflow: hidden; padding: .04em .04em .12em; margin: -.04em -.04em -.12em; }
.hero__names .mask > span { display: block; }
.hero__amp { color: var(--crimson); }
.hero__date { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; font: 500 11.5px/1.5 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); }
.hero__date .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--crimson); }

.js .scene--hero .hero__names .mask > span { transform: translate3d(0, 108%, 0); transition: transform .5s ease; }
.js .scene--hero .hero__kicker, .js .scene--hero .hero__date { opacity: 0; transform: translate3d(0, 12px, 0); transition: opacity .4s ease, transform .5s ease; }
.js .scene--hero.is-on .hero__names .mask > span { transform: none; transition: transform 1.25s cubic-bezier(.2, .8, .15, 1) .5s; }
.js .scene--hero.is-on .hero__names .mask + .mask > span { transition-delay: .8s; }
.js .scene--hero.is-on .hero__kicker, .js .scene--hero.is-on .hero__date { opacity: 1; transform: none; transition: opacity .9s var(--ease) 1s, transform 1s var(--ease) 1s; }

@media (min-width: 900px) {
  .scene--hero::before { left: 34%; width: 70%; height: 100%; }
  .hero { max-width: 1060px; grid-template-columns: auto auto; justify-content: center; justify-items: start; align-items: center; column-gap: clamp(64px, 8vw, 120px); }
  .harch { --aw: min(32vw, 58svh * .75, 420px); margin: 0 0 0 clamp(20px, 3vw, 44px); }
  .hero__text { max-width: 560px; text-align: left; justify-items: start; }
  .hero__names { font-size: clamp(60px, 6.4vw, 108px); }
  .hero__date { justify-content: flex-start; }
}

/* ---------- 2 · blessings ---------- */
.scene--bless .scene__body { max-width: 680px; text-align: center; }
.shloka p { font: 400 clamp(24px, 6.6vw, 36px)/1.5 var(--deva); color: var(--crimson); }
.ornament { display: flex; align-items: center; justify-content: center; gap: 12px; margin: clamp(14px, 2.6svh, 24px) 0 clamp(18px, 3.4svh, 30px); }
.ornament i { width: 56px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament i:last-child { transform: scaleX(-1); }
.ornament b { width: 11px; height: 12.5px; background: var(--gold); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.blessings__lead { font: 400 clamp(15.5px, 4.2vw, 19px)/1.6 var(--sans); max-width: 22em; margin: 0 auto clamp(18px, 3.2svh, 28px); color: var(--ink-2); }
.elders p span { display: block; font: 300 clamp(21px, 5.7vw, 32px)/1.3 var(--display); }
.elders__amp { font: 300 22px/1 var(--display) !important; color: var(--crimson); margin: 12px 0 !important; }

/* ---------- 3 · the couple ---------- */
.scene--couple .scene__body { max-width: 1180px; text-align: center; }
.blessings__req { font: 400 clamp(15.5px, 4.2vw, 19px)/1.6 var(--sans); color: var(--ink-2); max-width: 22em; margin: 0 auto clamp(24px, 4.4svh, 44px); }
.couple__names { display: grid; justify-items: center; }
.couple__n { font: 250 clamp(46px, 13.4vw, 112px)/1 var(--display); letter-spacing: -.01em; }
.couple__of { margin-top: 12px; font: 500 10.5px/1.7 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); }
.couple__of span { display: block; font-size: 12px; letter-spacing: .16em; color: var(--ink); }
.couple__with { font: 300 clamp(22px, 6vw, 34px)/1 var(--display); color: var(--crimson); margin: clamp(14px, 2.6svh, 24px) 0; }
@media (min-width: 900px) {
  .couple__names { grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 40px; }
  .couple__n { font-size: clamp(56px, 6.4vw, 104px); }
  .couple__p:first-child { justify-self: end; text-align: right; }
  .couple__p:last-child { justify-self: start; text-align: left; }
}

/* ---------- 4 · the wish, a blessing card on the table ---------- */
.scene--wish { background: radial-gradient(120% 80% at 50% 0%, #F8F1E6 0%, #EEE3D2 100%); }
.scene--wish .scene__body { max-width: 480px; }
.wcard {
  position: relative; border-radius: 26px; padding: 12px 12px 26px; text-align: center; background: #FFFCF6;
  box-shadow: 0 18px 34px -24px rgba(60, 25, 10, .4), 0 1px 4px rgba(60, 25, 10, .08);
}
.wcard::after { content: ""; position: absolute; inset: 7px; border-radius: 20px; border: 1px solid rgba(201, 164, 94, .45); pointer-events: none; }
.js .wcard { opacity: 0; transform: translate3d(0, 50px, 0) rotate(1.8deg) scale(.96); transition: opacity .35s ease, transform .45s ease; }
.js .scene--wish.is-on .wcard { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform 1.15s cubic-bezier(.2, .9, .25, 1.04); }
.wcard__photo { position: relative; margin: 0; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 16px; }
.wcard__photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform .5s ease; }
.scene--wish.is-on .wcard__photo img { transform: scale(1.01); transition: transform 9s cubic-bezier(.2, .6, .3, 1); }
.wcard__orn { display: flex; align-items: center; justify-content: center; gap: 10px; margin: -17px 0 6px; position: relative; z-index: 1; }
.wcard__orn i { width: 46px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.wcard__orn i:last-child { transform: scaleX(-1); }
.wcard__orn img { width: 34px; height: 34px; filter: drop-shadow(0 3px 5px rgba(120, 50, 10, .3)); }
.wcard__kicker { margin-bottom: 10px; }
.wish { font: 300 clamp(18px, 4.9vw, 23px)/1.55 var(--display); max-width: 22em; margin: 0 auto; padding: 0 12px; text-wrap: balance; }
.wish em { font-style: normal; color: var(--crimson); }
.wish .w { opacity: .18; transition: opacity .45s ease; }
.wish .w.on { opacity: 1; }
@media (min-width: 900px) {
  .scene--wish .scene__body { max-width: 940px; }
  .wcard { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr auto auto auto 1fr; column-gap: 36px; padding: 14px 40px 14px 14px; }
  .wcard__photo { grid-row: 1 / 6; aspect-ratio: 5 / 4; }
  .wcard__orn { grid-row: 2; margin: 0 0 6px; }
  .wcard__kicker { grid-row: 3; }
  .wcard .wish { grid-row: 4; padding: 0; font-size: clamp(19px, 1.7vw, 24px); }
}

/* ---------- 5 · countdown ---------- */
.card--count { background: radial-gradient(130% 75% at 50% 0%, #33241D 0%, #1D1411 58%, #140E0B 100%); color: #F7EEE0; }
.card--count::before { content: ""; position: absolute; inset: 0; background: url(/img/liner-crimson.svg) 50% 0 / 78px auto; opacity: .16; pointer-events: none;
  -webkit-mask-image: radial-gradient(90% 70% at 50% 0%, #000 0%, transparent 75%); mask-image: radial-gradient(90% 70% at 50% 0%, #000 0%, transparent 75%); }
.scene--count { padding-top: calc(var(--pad-top) + clamp(190px, 33svh, 300px)); }
.count { display: grid; justify-items: center; gap: 16px; text-align: center; }
.count__dej { position: absolute; top: 0; left: 50%; z-index: 1; width: clamp(66px, 18vw, 104px); margin-left: calc(clamp(66px, 18vw, 104px) / -2); transform-origin: 50% 0; animation: swing 2s cubic-bezier(.37, 0, .63, 1) infinite; animation-delay: var(--swing-delay, 0s); }
@keyframes swing { 0%, 100% { transform: rotate(6deg); } 50% { transform: rotate(-6deg); } }
.count__row { display: flex; justify-content: center; gap: clamp(6px, 2.4vw, 26px); }
.count__u { display: grid; justify-items: center; gap: 10px; min-width: clamp(64px, 19vw, 150px); }
.count__u > span { font: 500 10px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: rgba(247, 238, 224, .55); }
.odo { display: flex; font: 200 clamp(44px, 12.6vw, 116px)/1 var(--display); color: var(--gold-2); }
.odo__col { display: block; height: 1em; overflow: hidden; }
.odo__strip { display: block; transition: transform .8s cubic-bezier(.2, .9, .2, 1); will-change: transform; }
.odo__strip b { display: block; height: 1em; font-weight: 400; text-align: center; }
.count__when { font: 500 11.5px/1.5 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: rgba(247, 238, 224, .72); margin-top: 10px; }
.count__when span { color: var(--gold); margin: 0 .2em; }

/* ---------- 6 to 8 · each day is an invitation card laid on the table ---------- */
.scene--event { background: radial-gradient(120% 80% at 50% 0%, #F8F1E6 0%, #EEE3D2 100%); }
@media (max-width: 899px) { .scene--event, .scene--wish { padding-left: 12px; padding-right: 12px; } }
.scene--event .scene__body { max-width: 500px; }
.ecard {
  --rule: rgba(43, 23, 13, .16); position: relative; overflow: hidden; border-radius: 26px; padding: 0 22px 22px; text-align: center;
  box-shadow: 0 18px 34px -24px rgba(60, 25, 10, .45), 0 2px 6px -2px rgba(60, 25, 10, .16);
}
.ecard::after { content: ""; position: absolute; inset: 7px; z-index: 4; border-radius: 20px; border: 1px solid var(--frame); pointer-events: none; }
.ecard > * { position: relative; z-index: 1; }
.ecard--d1 { --frame: rgba(126, 22, 40, .3); background: linear-gradient(172deg, #F7C467 0%, #ECA642 46%, #DD8F2F 100%); color: #2B170D; }
.ecard--d2 { --frame: rgba(232, 203, 138, .42); --rule: rgba(246, 235, 214, .15); background: radial-gradient(120% 70% at 50% 0%, #36497F 0%, #1F2A4C 55%, #161D38 100%); color: #F4EBDD; }
.ecard--d3 { --frame: rgba(232, 203, 138, .45); --rule: rgba(251, 238, 220, .17); background: radial-gradient(125% 75% at 50% 0%, #B22E45 0%, #8E1B2E 52%, #6A1020 100%); color: #FCF0E0; }
.ecard--d2::before, .ecard--d3::before { content: ""; position: absolute; inset: 0; background: url(/img/liner-crimson.svg) 0 0 / 78px auto; opacity: .18; pointer-events: none; }
/* arriving: a card laid down in front of you */
.js .ecard { opacity: 0; transform: translate3d(0, 56px, 0) rotate(-2.4deg) scale(.95); transition: opacity .35s ease, transform .45s ease; }
.js .scene--event.is-on .ecard { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform 1.2s cubic-bezier(.2, .9, .25, 1.04); }

.ecard__art { position: relative; z-index: 0; height: clamp(104px, 18svh, 150px); margin: 0 -22px 4px; }
.ecard__date { display: flex; align-items: center; justify-content: center; gap: 12px; }
.ecard__num { font: 200 clamp(48px, 13vw, 64px)/1 var(--display); letter-spacing: -.02em; }
.ecard__when { text-align: left; font: 500 10.5px/1.55 var(--sans); letter-spacing: .22em; text-transform: uppercase; opacity: .82; }
.ecard__title { font: 300 clamp(29px, 8vw, 40px)/1.08 var(--display); margin: 6px auto 14px; max-width: 12em; }
.ecard .prog { max-width: 340px; margin: 0 auto; text-align: left; }
.ecard .venue { justify-items: center; margin-top: 14px; }
.ecard .venue__addr { margin: 4px auto 12px; }
.ecard__note { margin-top: 14px; font: 400 12.5px/1.45 var(--sans); opacity: .78; }
.ecard--d1 .prog__time { background: rgba(255, 247, 230, .55); }
.ecard--d1 .btn--dir { background: #2B170D; color: #FCE7C2; }
.ecard--d2 .prog__time { background: rgba(232, 203, 138, .15); color: var(--gold-2); }
.ecard--d2 .btn--dir { background: var(--gold-2); color: #1A2240; }
.ecard--d3 .prog__time { background: rgba(252, 240, 224, .15); color: #FFE9C4; }
.ecard--d3 .btn--dir { background: #FCF0E0; color: var(--crimson); }

.prog { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.prog li { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--rule); }
.prog .ico { width: 22px; height: 22px; opacity: .85; }
.prog__name { font: 500 clamp(14.5px, 3.9vw, 16px)/1.25 var(--sans); }
.prog__name small { display: block; margin-top: 3px; font: 500 10px/1.3 var(--sans); letter-spacing: .15em; text-transform: uppercase; opacity: .7; }
.prog__time { font: 500 13px/1 var(--sans); letter-spacing: .02em; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 7px 10px; border-radius: 999px; }
.prog__wide { grid-template-columns: 22px 1fr !important; align-items: start !important; }
.prog__wide .ico { margin-top: 1px; }
.prog__name--text { font: 400 13.5px/1.5 var(--sans); opacity: .9; }
.venue { display: grid; justify-items: start; gap: 2px; }
.venue__name { font: 300 clamp(19px, 5.2vw, 24px)/1.2 var(--display); max-width: 16em; }
.venue__addr { font: 400 13px/1.45 var(--sans); opacity: .82; max-width: 26em; }
.btn--dir { min-height: 46px; box-shadow: none; }

/* ---------- the illustrations: marigold strings, diyas, lanterns, a mandala, the arch, kalash, petals ---------- */
.strings { position: absolute; left: 0; right: 0; top: 0; height: 170px; z-index: 0; pointer-events: none; }
.strings--table { display: none; }
@media (min-width: 900px) { .strings--table { display: block; } }
.lari { position: absolute; top: 0; left: var(--x); width: var(--w, 26px); height: var(--len); transform-origin: 50% 0; animation: sway 5.4s ease-in-out infinite; animation-delay: calc(var(--t) * -6); }
.lari__in { position: absolute; left: 0; right: 0; bottom: 0; transform: translate3d(0, -120%, 0); transition: transform .4s ease; }
.lari__in img { display: block; width: 100%; height: auto; }
.is-on .lari__in { transform: none; transition: transform 1.2s cubic-bezier(.3, 1.3, .5, 1) calc(.2s + var(--t)); }
@keyframes sway { 0%, 100% { transform: rotate(2.4deg); } 50% { transform: rotate(-2.4deg); } }

.toran { position: absolute; left: 0; right: 0; top: 0; z-index: 0; height: 46px; pointer-events: none; background: url(/img/toran.webp) repeat-x 0 0 / auto 100%; transform: translate3d(0, -110%, 0); transition: transform .4s ease; }
.is-on .toran { transform: none; transition: transform 1.1s cubic-bezier(.3, 1.25, .5, 1) .35s; }
.toran--card { height: 38px; background-position: 50% 0; }

.diyas { position: absolute; left: 50%; bottom: 6px; display: flex; align-items: flex-end; gap: 16px; transform: translateX(-50%); }
.diya { position: relative; width: 66px; }
.diya--big { width: 88px; }
.diya--door { position: absolute; left: 50%; bottom: 4px; width: 46px; margin-left: -23px; }
.diya img { display: block; width: 100%; height: auto; }
.diya__flame {
  position: absolute; left: 97%; bottom: 74%; width: 16%; aspect-ratio: .52; margin-left: -8%; border-radius: 50% 50% 50% 50% / 64% 64% 36% 36%;
  background: radial-gradient(62% 56% at 50% 74%, #FFFDF0 0%, #FFE38E 34%, #FFA62B 68%, rgba(255, 120, 20, 0) 100%);
  transform-origin: 50% 92%; transform: scale(0); opacity: 0;
}
.diya__glow { position: absolute; left: 97%; bottom: 54%; width: 110%; aspect-ratio: 1; margin-left: -55%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 222, 140, .7) 0%, rgba(255, 176, 70, .2) 38%, rgba(255, 170, 60, 0) 68%); opacity: 0; }
.is-on .diya__flame { animation: ignite .5s ease-out var(--t) forwards, flicker 1.35s ease-in-out calc(var(--t) + .5s) infinite; }
.is-on .diya__glow { animation: glow 2.8s ease-in-out calc(var(--t) + .3s) infinite; }
@keyframes ignite { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes flicker { 0%, 100% { transform: scale(1, 1) skewX(0); opacity: 1; } 22% { transform: scale(.9, 1.1) skewX(3deg); } 45% { transform: scale(1.05, .93) skewX(-2deg); opacity: .9; } 68% { transform: scale(.95, 1.06) skewX(1.5deg); } 84% { transform: scale(1.02, .97) skewX(-2.5deg); } }
@keyframes glow { 0%, 100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.1); } }

.lamp { position: absolute; top: 0; left: var(--x); width: 38px; height: 100%; transform-origin: 50% 0; animation: swing 4.8s ease-in-out infinite; animation-delay: calc(var(--t) * -5); }
.lamp--big { width: 48px; }
.lamp__in { position: absolute; left: 0; right: 0; top: var(--len); transform: translate3d(0, -170%, 0); transition: transform .4s ease; }
.lamp__in::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 1.2px; margin-left: -.6px; height: calc(var(--len) + 2px); background: linear-gradient(#B78832, #E4BE6A); }
.lamp img { position: relative; display: block; width: 100%; height: auto; }
.lamp__glow { position: absolute; left: 50%; top: 50%; width: 260%; aspect-ratio: 1; transform: translate(-50%, -46%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 204, 116, .5) 0%, rgba(255, 172, 72, .16) 34%, rgba(255, 172, 72, 0) 64%); animation: glow 3.2s ease-in-out infinite; }
.is-on .lamp__in { transform: none; transition: transform 1.3s cubic-bezier(.3, 1.25, .5, 1) var(--t); }
@keyframes swing { 0%, 100% { transform: rotate(3.2deg); } 50% { transform: rotate(-3.2deg); } }
.mandala { position: absolute; left: 50%; top: 56%; width: 190px; height: 190px; margin: -95px 0 0 -95px; opacity: .55; overflow: visible; }
.mandala path, .mandala circle { fill: none; stroke: #E8CB8A; stroke-width: .7; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .3s; }
.is-on .mandala path, .is-on .mandala circle { stroke-dashoffset: 0; transition: stroke-dashoffset 2.4s cubic-bezier(.5, 0, .3, 1) calc(.5s + var(--i, 0) * .09s); }
.is-on .mandala { animation: spin 120s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.star { position: absolute; left: var(--x); top: var(--y); width: 3px; height: 3px; border-radius: 50%; background: #F6E3B0; box-shadow: 0 0 6px 1px rgba(246, 227, 176, .7); opacity: .2; animation: twinkle 3.4s ease-in-out var(--t) infinite; }
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.2); } }

.ecard__art--reception::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 72%; height: 100%; transform: translateX(-50%); pointer-events: none; background: radial-gradient(closest-side at 50% 70%, rgba(255, 214, 150, .34) 0%, rgba(255, 214, 150, .14) 55%, rgba(255, 214, 150, 0) 100%); }
.arch { position: absolute; left: 50%; bottom: 0; height: calc(100% - 22px); aspect-ratio: 160 / 150; transform: translateX(-50%); overflow: visible; }
.arch path { fill: none; stroke: #E8CB8A; stroke-width: 1.3; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .3s; }
.arch path + path { stroke-width: .8; opacity: .7; }
.is-on .arch path { stroke-dashoffset: 0; transition: stroke-dashoffset 2.2s cubic-bezier(.6, 0, .3, 1) .5s; }
.is-on .arch path + path { transition-delay: .85s; }
.kalash { position: absolute; bottom: 2px; width: 52px; height: auto; opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity .3s, transform .3s; }
.kalash--l { left: calc(50% - 128px); } .kalash--r { right: calc(50% - 128px); }
.is-on .kalash { opacity: 1; transform: none; transition: opacity .9s var(--ease) .7s, transform 1.1s cubic-bezier(.3, 1.3, .5, 1) .7s; }
.fall { position: absolute; top: -12px; left: var(--x); width: 9px; height: 12px; border-radius: 85% 0 85% 0; background: #E04C62; opacity: 0; }
.fall--y { background: #F2A23A; }
.is-on .fall { animation: fall var(--s) linear var(--t) infinite; }
@keyframes fall { 0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; } 12% { opacity: .95; } 50% { transform: translate3d(14px, 76px, 0) rotate(170deg); } 85% { opacity: .85; } 100% { transform: translate3d(-8px, 160px, 0) rotate(340deg); opacity: 0; } }

/* ---------- 9 · moments ---------- */
.scene--moments .scene__body { height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; transform: none; }
.moments__head { text-align: center; position: relative; z-index: 2; }
.prints { position: relative; }
.print {
  position: absolute; left: 50%; top: 50%; margin: 0; padding: 7px; background: #FFFDF8; border-radius: 2px;
  box-shadow: 0 22px 40px -18px rgba(45, 20, 8, .5), 0 1px 3px rgba(45, 20, 8, .12); transform: translate(-50%, -50%); will-change: transform;
}
.print img { width: 100%; height: auto; }
.print--sq { width: min(40vw, 290px); }
.print--wide { width: min(54vw, 400px); }
.print--land { width: min(46vw, 330px); }
.print--tall { width: min(36vw, 260px); }
.print--top { width: min(42vw, 300px); }
@media (min-width: 900px) {
  .print--sq { width: min(22vw, 31svh); } .print--wide { width: min(30vw, 42svh); } .print--land { width: min(25vw, 35svh); }
  .print--tall { width: min(18vw, 26svh); } .print--top { width: min(23vw, 32svh); }
}
.moments__credit { text-align: center; font: 500 10.5px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); position: relative; z-index: 2; }

/* ---------- 10 · reply and the closing lines ---------- */
.scene--final { color: #FBF0E1; background: radial-gradient(130% 70% at 50% 0%, #A6273C 0%, #8E1B2E 45%, #5F0F1C 100%); }
.scene--final::before { content: ""; position: absolute; inset: 0; background: url(/img/liner-crimson.svg) 0 0 / 78px auto; opacity: .25; pointer-events: none; }
.final { max-width: 560px; display: grid; justify-items: center; text-align: center; }
.final__seal { width: clamp(64px, 17vw, 92px); height: auto; margin-bottom: clamp(10px, 2svh, 18px); }
.final__title { font: 300 clamp(38px, 10.4vw, 72px)/1.04 var(--display); margin: 8px 0 12px; }
.final__lede { font: 400 15px/1.55 var(--sans); opacity: .85; max-width: 24em; }
.final__reply { display: grid; justify-items: center; gap: 10px; margin-top: clamp(16px, 3svh, 26px); }
.final__open { min-height: 54px; padding: 0 26px; font-size: 15.5px; }
.final__status { font: 400 13.5px/1.45 var(--sans); opacity: .85; max-width: 26em; }
.final__status b { font-weight: 500; }
.final__wa { margin-top: clamp(16px, 3svh, 26px); }
.final__wa p { font: 500 10.5px/1.4 var(--sans); letter-spacing: .22em; text-transform: uppercase; opacity: .72; margin-bottom: 12px; }
.final__wa-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.final__sign { margin-top: clamp(20px, 3.8svh, 34px); padding-top: clamp(16px, 3svh, 26px); border-top: 1px solid rgba(251, 240, 225, .2); }
.final__name { font: 300 clamp(28px, 7.6vw, 44px)/1 var(--display); }
.final__addr { font: 400 14px/1.5 var(--sans); opacity: .85; margin-top: 8px; }
.credits { margin-top: clamp(14px, 2.6svh, 22px); font: 400 11.5px/1.7 var(--sans); letter-spacing: .02em; opacity: .62; }
.credits__br { display: none; }
@media (max-width: 520px) { .credits span { display: none; } .credits__br { display: inline; } }

/* ---------- the reply sheet ---------- */
.sheet {
  position: fixed; inset: auto 0 0 0; width: 100%; max-width: 100%; max-height: 94svh; margin: 0; padding: 0; border: 0;
  display: flex; flex-direction: column; overflow: hidden; border-radius: 26px 26px 0 0; background: var(--paper); color: var(--ink);
  box-shadow: 0 -24px 70px -30px rgba(40, 20, 10, .55); -webkit-user-select: text; user-select: text; -webkit-touch-callout: default;
}
.sheet:not([open]) { display: none; }
.sheet::backdrop { background: rgba(25, 10, 6, .5); }
.sheet__grip { width: 38px; height: 4px; border-radius: 2px; background: rgba(34, 23, 20, .18); margin: 10px auto 0; flex: none; }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 18px 8px 22px; flex: none; }
.sheet__title { font: 300 30px/1.05 var(--display); margin: 8px 0 0; }
.sheet__close { width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(34, 23, 20, .06); cursor: pointer; }
.sheet__close .ico { width: 18px; height: 18px; }
.sheet__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 18px calc(22px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) {
  .sheet { inset: 0; margin: auto; width: min(560px, 92vw); max-height: min(88svh, 900px); border-radius: 26px; }
  .sheet__grip { display: none; }
  .sheet__head { padding-top: 22px; }
}

.rsvp__flip { display: grid; }
.rsvp__face { grid-area: 1 / 1; }
.rsvp__face.is-away { display: none; }
.rsvp__done { display: grid; justify-items: center; align-content: start; text-align: center; gap: 14px; padding: 12px 8px 20px; }
.rsvp__seal { width: 92px; height: 92px; }
.rsvp__thanks { font: 300 clamp(28px, 7.6vw, 38px)/1.12 var(--display); }
.rsvp__summary { font: 400 15px/1.6 var(--sans); color: var(--ink-2); max-width: 26em; }
.rsvp__summary b { font-weight: 500; color: var(--ink); }
.rsvp__done-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

.field { display: grid; gap: 8px; margin-top: 18px; border: 0; padding: 0; min-width: 0; }
.field__label { font: 500 13px/1.3 var(--sans); color: var(--ink-2); padding: 0; }
.field__label em { font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.field__input {
  width: 100%; font: 400 17px/1.35 var(--sans); color: var(--ink); background: #F3ECE1; border: 1px solid transparent; border-radius: 14px;
  padding: 14px 15px; outline: none; -webkit-appearance: none; appearance: none; transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field__input::placeholder { color: #A99A8E; }
.field__input:focus { background: #fff; border-color: rgba(142, 27, 46, .55); box-shadow: 0 0 0 4px rgba(142, 27, 46, .1); }
.field__input[aria-invalid="true"] { border-color: #B0182F; background: #FFF7F6; }
textarea.field__input { resize: vertical; min-height: 88px; }
.seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; padding: 5px; border-radius: 17px; background: #EFE7DA; }
.seg__opt { position: relative; }
.seg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg__opt span {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 50px; padding: 0 8px; border-radius: 13px; text-align: center;
  font: 500 14.5px/1.2 var(--sans); color: var(--ink-2); cursor: pointer; transition: background-color .25s, color .25s, box-shadow .25s;
}
.seg__opt span .ico { width: 16px; height: 16px; display: none; }
.seg__opt input:checked + span { background: #fff; color: var(--crimson); box-shadow: 0 6px 16px -8px rgba(60, 25, 10, .45); }
.seg__opt input:checked + span .ico { display: block; }
.seg__opt input:focus-visible + span { outline: 2px solid var(--crimson); outline-offset: 2px; }
.rsvp__yes { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .5s var(--ease), opacity .35s; }
.rsvp__yes.is-hidden { grid-template-rows: 0fr; opacity: 0; }
.rsvp__yes-in { overflow: hidden; min-height: 0; }
.field--row { grid-template-columns: 1fr auto; align-items: center; }
.stepper { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: #EFE7DA; }
.stepper button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 3px 10px -5px rgba(60, 25, 10, .45); transition: transform .15s, opacity .2s; }
.stepper button:active { transform: scale(.92); }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper button .ico { width: 18px; height: 18px; }
.stepper output { min-width: 2.2ch; text-align: center; font: 500 20px/1 var(--sans); }
.chips { border: 0; margin: 20px 0 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.chips legend { margin-bottom: 8px; }
.chip {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 15px; background: #F3ECE1; cursor: pointer;
  border: 1px solid transparent; transition: background-color .2s, border-color .2s;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip > span { flex: 1; display: grid; gap: 3px; min-width: 0; }
.chip b { font: 500 15px/1.25 var(--sans); }
.chip small { font: 400 12.5px/1.3 var(--sans); color: var(--ink-3); }
.chip .ico { width: 24px; height: 24px; padding: 4px; border-radius: 50%; stroke-width: 2.2; color: transparent; box-shadow: inset 0 0 0 1.5px rgba(34, 23, 20, .25); transition: background-color .2s, color .2s, box-shadow .2s; }
.chip:has(input:checked) { background: #fff; border-color: rgba(142, 27, 46, .3); }
.chip input:checked ~ .ico { background: var(--crimson); color: #fff; box-shadow: none; }
.chip input:focus-visible ~ span { outline: 2px solid var(--crimson); outline-offset: 4px; border-radius: 6px; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.rsvp__send { width: 100%; min-height: 56px; margin-top: 24px; font-size: 16px; }
.rsvp__send.is-busy { opacity: .75; pointer-events: none; }
.rsvp__send.is-busy span::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px; border-radius: 50%; border: 2px solid rgba(255, 246, 234, .45); border-top-color: #FFF6EA; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rsvp__err { min-height: 1.3em; margin-top: 12px; text-align: center; font: 500 14px/1.4 var(--sans); color: #A8172D; }

/* ---------- petals (a small posh puza when a reply is sent) ---------- */
.petals { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.petal { position: absolute; top: -30px; left: 0; width: 13px; height: 17px; border-radius: 85% 0 85% 0; will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) {
  .lari, .lamp, .mandala, .star, .fall, .diya__flame, .diya__glow, .lamp__glow { animation: none !important; }
  .diya__flame { transform: none !important; opacity: 1 !important; }
  .env, .stage__top, .stage__foot, .env__sheen::before, .env__body, .env__shadow, .seal__ring, .count__dej, .sound.is-playing .sound__bars i, .hint .ico, .hint { animation: none !important; }
  .bloom { animation: none !important; }
  .js .scene [data-r], .js .scene--hero *, .ecard, .wcard, .wcard__photo img, .lari__in, .lamp__in, .toran, .kalash, .arch path, .mandala * { transition-duration: .01s !important; transition-delay: 0s !important; }
}
