:root {
  color-scheme: dark;
  font-family: Georgia, serif;
  background: #230d17;
  color: #fff0cd;
}
* { box-sizing: border-box; }
body { margin: 0; }
.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, #774038, #3b1725 53%, #190c12);
}
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse, transparent 23%, #17080dc4 100%);
}
video { position: absolute; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
video.active { opacity: 1; }
main { position: relative; }
.arrival {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 3rem 1.25rem;
  perspective: 1100px;
}
.invitation {
  display: grid;
  justify-items: center;
  gap: 2rem;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
  animation: present 1.15s cubic-bezier(.18,.77,.32,1.06) both;
}
@keyframes present {
  from { opacity: 0; transform: translate3d(-14vw, 39vh, 175px) rotateX(27deg) rotateZ(-12deg); }
  to { opacity: 1; transform: translate3d(0,0,0); }
}
.action {
  padding: .65rem 1.35rem;
  border: 1px solid #dcb7829c;
  border-radius: 2rem;
  background: #220b16ba;
  letter-spacing: .08em;
}
.invitation:focus-visible { outline: 2px solid #ffe0a4; outline-offset: 12px; }
.scroll { width: min(88%, 650px); margin: auto; padding: 11svh 0 15svh; }
.scroll:not([hidden]) { animation: unroll .95s ease-out both; }
@keyframes unroll {
  from { clip-path: inset(0 0 87%); opacity: .35; transform: translateY(24px); }
  to { clip-path: inset(0); opacity: 1; transform: translateY(0); }
}
.roller {
  position: relative;
  z-index: 1;
  margin-inline: -2%;
  height: 1.4rem;
  border-radius: .65rem;
  background: linear-gradient(#814c2d,#c39561 28%,#9f693d 59%,#5b331d);
  box-shadow: 0 5px 8px #2d100e80;
}
.paper {
  margin-block: -.25rem;
  min-height: 110svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(2rem, 9vw, 5rem) 1.5rem;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 36%,#fae9bc,transparent 83%),
    repeating-linear-gradient(4deg,#ffe6a213 0 2px,#65421d13 2px 4px),
    #d6ad76;
  color: #5d2b2a;
  box-shadow: inset 0 0 45px #8c4d3880,0 13px 38px #11070cb3;
}
.paper::before { content: ""; position: absolute; inset: 1rem; border: 3px double #99683f; pointer-events: none; }
.ornament { font-size: 2.6rem; color: #945b36; }
.end { margin-top: auto; padding-top: 4rem; rotate: 180deg; padding-bottom: 4rem; }
h1 { font-size: clamp(2.1rem, 7vw, 4.3rem); font-weight: normal; margin: .85rem 0; line-height: 1.02; }
h1:focus { outline: none; }
.rule { display: flex; align-items: center; gap: .8rem; color: #965b35; }
.rule::before, .rule::after { content: ""; width: clamp(2rem, 10vw, 5rem); height: 1px; background: currentColor; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Vermilion paper, gold foil, and Bengali alpana-inspired detailing. */
:root { background: #240504; color: #fff1c9; }
.backdrop {
  background: radial-gradient(ellipse at 50% 44%, #85261b, #450d10 57%, #210508);
}
.action {
  background: linear-gradient(135deg,#fce2a0,#e8b451);
  border-color: #ffe6a8;
  color: #1d1410;
  letter-spacing: .03em;
}
.roller { background: linear-gradient(#790b12, #cd3540 24%, #a2141e 58%, #56080b); border-block: 2px solid #d3a243; }
.paper {
  background: radial-gradient(ellipse at 50% 35%, #fff1cd, #ebc789);
  border-inline: clamp(.55rem,2vw,1.25rem) solid #a9131a;
}
.paper::before { border: 4px double #af7526; }
.alpana { color: #a0151d; letter-spacing: .2em; font-size: clamp(1.4rem,5vw,2.7rem); }
.subtitle { margin: 0 0 1.2rem; font-size: 1.1rem; }
.rule { color: #985f1f; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.presentation {
  position: relative;
  display: block;
  width: min(69vw, 21rem, 50svh);
  aspect-ratio: 4 / 5;
  perspective: 1000px;
}
.back-envelope {
  position: absolute;
  inset: auto -11% 0 11%;
  height: 61%;
  border: 1px solid #c09955;
  border-radius: 3px;
  background: linear-gradient(155deg, #f3dfaa, #c6a371);
  box-shadow: 6px 14px 24px #1904089c;
  transform: translate(3%, 0) rotate(12deg);
}
.back-envelope::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 100% 15%, 50% 65%, 0 15%);
  background: linear-gradient(175deg, #fff0c9, #d0aa74);
}
.envelope-seal {
  position: absolute;
  top: 52%;
  right: 7%;
  display: grid;
  place-items: center;
  width: clamp(1.45rem, 7vw, 2.25rem);
  aspect-ratio: 1;
  border-radius: 46% 52% 49% 48%;
  background: radial-gradient(circle at 32% 22%, #c74344, #8c111e 66%, #570b16);
  box-shadow: 0 2px 4px #4c1908a6, inset 0 0 0 2px #bb5d4a;
  color: #f5c77a;
}
.folded-card {
  position: absolute;
  inset: 0;
  border-radius: 2px;
  transform: rotate(-5deg) rotateY(-8deg);
  transform-style: preserve-3d;
  transition: transform .48s ease-out;
}
.invitation:hover:not(:disabled) .folded-card { transform: translateY(-6px) rotate(-2deg); }
.inside-page, .card-cover, .card-front, .cover-lining { position: absolute; inset: 0; border-radius: 2px; }
.inside-page, .cover-lining {
  background: linear-gradient(110deg, #d8a96a, #fff1cf 12%, #f5dba7 90%, #bd8a50);
}
.inside-page {
  display: grid;
  place-items: center;
  color: #1d1410;
  font: 1.6rem "Noto Serif Bengali", "Bangla MN", "Nirmala UI", serif;
  box-shadow: 2px 1px #c59c62, 4px 3px #ebce9b, 6px 5px #730f1d, 12px 16px 23px #190408bf;
}
.inside-page::before, .cover-lining::before {
  content: "";
  position: absolute;
  inset: 7%;
  border: 3px double #bd8a49;
}
.card-cover {
  transform-origin: left;
  transform: translateZ(2px);
  transform-style: preserve-3d;
  transition: transform .82s cubic-bezier(.23,.66,.22,1);
}
.cover-lining { transform: rotateY(180deg); backface-visibility: hidden; }
.card-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(.35rem, 1.8svh, .8rem);
  overflow: hidden;
  border: 1px solid #c4554e;
  backface-visibility: hidden;
  background:
    linear-gradient(90deg, #47040e 0, transparent 4%),
    repeating-linear-gradient(118deg, #ffffff06 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 55% 28%, #bd2632, #90121e 60%, #620711);
  color: #f9d588;
  font-family: "Noto Serif Bengali", "Bangla MN", "Nirmala UI", serif;
  box-shadow: inset 0 0 18px #510a1770;
}
.card-front::before {
  content: "";
  position: absolute;
  inset: 5%;
  border: 4px double #f1ca71;
  pointer-events: none;
}
.card-corner { position: absolute; font-size: clamp(.95rem, 5vw, 1.6rem); line-height: 1; }
.top-left { top: 7%; left: 8%; }
.top-right { top: 7%; right: 8%; scale: -1 1; }
.bottom-left { bottom: 7%; left: 8%; scale: 1 -1; }
.bottom-right { bottom: 7%; right: 8%; scale: -1; }
.card-occasion { font-size: clamp(.9rem, 4vw, 1.26rem); }
.card-portrait {
  width: 46%;
  height: 31%;
  border-radius: 50% 50% 46% 46%;
  background: #801524 url("bengali-couple.jpg") center / auto 114% no-repeat;
  border: 4px double #ffdf96;
  box-shadow: 0 2px 7px #520711;
}
.card-names {
  padding: .3rem .65rem;
  border: 3px double #966123;
  background: linear-gradient(115deg, #d7a447, #f7e4a5 48%, #dbac4d);
  color: #1d1410;
  font-size: clamp(1rem, 5.3vw, 1.75rem);
  line-height: 1.3;
}
.card-flourish { font-size: .8rem; }
.scroll-names { font-family: "Noto Serif Bengali", "Bangla MN", "Nirmala UI", serif; font-size: 1.55rem; }
.opening .folded-card { transform: translateX(15%) rotate(1deg); }
.opening .card-cover { transform: translateZ(2px) rotateY(-148deg); }

/* Invitation printed onto one continuous parchment. */
.scroll { font-family: "Noto Serif Bengali", "Bangla MN", "Nirmala UI", serif; }
.paper { min-height: 0; gap: clamp(2.8rem, 8vw, 5rem); color: #201511; }
.paper h2 { font-size: clamp(1.65rem, 5vw, 2.4rem); line-height: 1.2; margin: 0 0 1rem; }
.paper p { font-size: clamp(1.03rem, 3vw, 1.22rem); line-height: 1.78; margin: .65rem 0; }
.scroll-intro, .programme, .scroll-closing { width: min(100%, 32rem); }
.scroll-intro .rule { justify-content: center; margin: 1.35rem 0; }
.scroll-intro .scroll-names { font-size: clamp(1.45rem, 5vw, 2.15rem); margin-block: 0; }
.lotus { color: #9f1c26; font-size: 2.75rem; line-height: 1; }
.paper blockquote {
  margin: 1.25rem auto;
  padding: .8rem .55rem;
  background: #deb46c40;
  border-block: 1px solid #a87836;
  line-height: 1.65;
  font-size: clamp(1.05rem, 3.2vw, 1.32rem);
}
.family-insert {
  width: min(100%, 30rem);
  padding: clamp(1rem, 5vw, 2.25rem);
  background: linear-gradient(145deg, #fff0cc, #efd49d);
  border: 5px double #a35d32;
  box-shadow: 3px 5px 0 #c19560, 4px 9px 18px #5b2f2733;
}
.family-insert h2::after { content: "◆"; display: block; margin-top: .55rem; color: #a21d28; font-size: .8rem; }
.family-insert .family-name { font-size: clamp(1.25rem, 4vw, 1.65rem); font-weight: bold; }
.family-photo { display: block; width: 100%; height: auto; margin: .8rem auto; }
.timeline { padding: 0 0 0 1.35rem; list-style: none; text-align: left; margin: 1.6rem auto 0; border-left: 1px solid #b58039; }
.timeline li { position: relative; padding: .1rem 0 1.5rem .35rem; }
.timeline li + li { padding-top: .55rem; }
.timeline li::before { content: "✿"; position: absolute; left: -2rem; top: .1rem; color: #a01b26; background: #f5dca7; line-height: 1; padding: .12rem; }
.timeline h3 { font-size: clamp(1.25rem, 4.4vw, 1.75rem); margin: 0; }
.scroll-reveal.revealed { animation: settle .65s ease-out both; }
.groom-side { --entry-tilt: -2deg; }
.bride-side { --entry-tilt: 2deg; }
@keyframes settle {
  from { opacity: .62; transform: translateY(1.25rem) rotate(var(--entry-tilt, 0deg)); }
  to { opacity: 1; transform: translateY(0) rotate(0deg); }
}
.scroll-closing { position: relative; padding-bottom: 1.4rem; }
.petals { pointer-events: none; position: absolute; inset: 0; overflow: hidden; }
.petals i { position: absolute; top: -1rem; left: 12%; width: .45rem; height: .65rem; border-radius: 80% 0 75% 40%; background: #d88d21; opacity: 0; }
.petals i:nth-child(2) { left: 31%; animation-delay: .15s; }
.petals i:nth-child(3) { left: 71%; animation-delay: .28s; }
.petals i:nth-child(4) { left: 87%; animation-delay: .43s; }
.revealed .petals i { animation-name: petal-fall; animation-duration: 1.45s; animation-fill-mode: both; }
@keyframes petal-fall {
  0% { opacity: 0; transform: translate(0, 0) rotate(0); }
  23% { opacity: .85; }
  100% { opacity: 0; transform: translate(1.3rem, 8rem) rotate(130deg); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal.revealed, .revealed .petals i { animation: none; }
}
.timeline { border-left-color: #b5803960; }
.timeline li::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 calc(-1.35rem - 1px);
  width: 1px;
  background: #a77531;
  transform-origin: top;
}
.timeline li.revealed::after { animation: draw-line .65s ease-out both; }
@keyframes draw-line { from { transform: scaleY(0); } }
@media (prefers-reduced-motion: reduce) {
  .timeline li.revealed::after { animation: none; }
}
.family-photo { border: 3px double #a35d32; }
