.vestibule {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  background: #2f0d1b;
}
.invitation-frame {
  position: relative;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  background: #3c1427;
  color: #fff8e9;
}
.invitation-frame::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at 50% 28%, #f8d2a326, transparent 62%); pointer-events: none; }
.opening-backdrop {
  position: absolute;
  inset: -25px;
  background: linear-gradient(#2a091b65, #290815e8), url("ao-dai.webp") center / cover;
  filter: blur(18px);
  transform: scale(1.08);
}
.stage-border { position: absolute; z-index: 2; inset: 13px; border: 1px solid #cba76d; box-shadow: inset 0 0 0 5px #3e15245c, 0 0 0 1px #2b0a1c; pointer-events: none; }
.stage-border::before, .stage-border::after { content: "✦"; position: absolute; left: 50%; transform: translateX(-50%); color: #d8b77b; font: 1.15rem/1 var(--serif); background: #40182a; padding: 0 12px; }
.stage-border::before { top: -9px; }.stage-border::after { bottom: -9px; }
.mailer { display: block; position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; }
.mailer:focus-visible { outline: 3px solid #e6ca94; outline-offset: -7px; }
.salutation { position: absolute; z-index: 1; top: 5.5%; left: 0; right: 0; font: 600 .79rem/1.5 var(--sans); letter-spacing: .17em; text-transform: uppercase; color: #f5d5a2; }
.guest-name { position: absolute; z-index: 2; top: 8%; left: 6%; right: 6%; color: #fff8e9; font: 500 clamp(1.5rem, 7cqw, 2.15rem)/1.05 var(--serif); text-shadow: 0 3px 12px #13030d; overflow-wrap: anywhere; }
.vestibule.has-guest .opening-photo { top: 20%; height: 49%; }
.vestibule.has-guest:not(.personalized) .opening-photo { top: 16%; height: 53%; }
.vestibule.has-long-guest .guest-name { font-size: 1.35rem; }
.vestibule.has-long-guest .opening-photo { top: 24%; height: 45%; }
.opening-photo { position: absolute; top: 12.5%; left: 8%; right: 8%; height: 57%; overflow: hidden; border: 3px solid #d8b77b; border-radius: 49% 49% 2px 2px; background: #681d35; box-shadow: 0 22px 38px #14040eaa, 0 0 0 7px #4b182d99; }
.opening-photo::after { content: ""; position: absolute; inset: 6px; border: 1px solid #fff0ce8f; border-radius: inherit; pointer-events: none; }
.opening-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 51% 37%; }
.photo-vignette { position: absolute; inset: 0; background: linear-gradient(transparent 55%, #3c0e21b3); pointer-events: none; }
.wax { position: absolute; z-index: 2; top: 68%; left: 50%; transform: translate(-50%, -50%) rotate(-7deg); display: grid; place-items: center; width: 72px; height: 72px; border-radius: 47% 52% 45% 51%; background: linear-gradient(135deg, #f9e5b2, #c6965c 43%, #ead097 72%, #a67942); box-shadow: 2px 8px 14px #18040fa9, inset 0 2px 3px #fff4d7; }
.wax i { display: grid; place-items: center; width: 78%; height: 78%; border: 2px double #825936; border-radius: 50%; color: #6b4529; font: italic 1.75rem/1 var(--serif); letter-spacing: -.13em; padding-right: .13em; }
.pair { position: absolute; top: 74%; left: 4%; right: 4%; color: #fff7ec; font: 500 clamp(2.6rem, 11cqw, 3.4rem)/.78 var(--serif); text-shadow: 0 3px 12px #13030d; }
.pair i { display: block; margin: .1em 0 .15em; color: #dcb780; font-size: .66em; }
.wedding-day { position: absolute; bottom: 9%; left: 0; right: 0; font: 500 .9rem/1.4 var(--sans); letter-spacing: .24em; color: #f2d3a4; }
.open-hint { position: absolute; bottom: 3%; left: 50%; transform: translateX(-50%); width: max-content; max-width: 82%; padding: 8px 18px; border: 1px solid #d8b77b; border-radius: 30px; background: #42172bbd; font: 500 .8rem/1.3 var(--sans); letter-spacing: .06em; color: #fff5e4; box-shadow: 0 4px 18px #20051175; }
.opening .wax { animation: seal-break .28s ease-in both; }
.opening .opening-photo { animation: arch-lift .42s ease-out both; }
.opening .salutation, .opening .guest-name, .opening .pair, .opening .wedding-day, .opening .open-hint { animation: label-away .28s ease-out both; }
.opening .open-hint { animation-name: hint-away; }
.vestibule.in-flight { position: fixed; inset: 0; width: min(430px, 100%); margin: auto; z-index: 2; pointer-events: none; background: transparent; }
.in-flight .invitation-frame { opacity: 0; }
.curtain { display: none; }
.in-flight .curtain { display: block; position: absolute; top: 0; bottom: 0; width: 50.5%; z-index: 1; background: repeating-linear-gradient(90deg, #3c091b 0, #6b1e34 12%, #8f3047 19%, #531126 31%, #3a0c1d 40%); box-shadow: 0 0 25px #16050faa; }
.curtain-left { left: 0; animation: curtain-left .7s cubic-bezier(.48,.03,.22,1) forwards; }
.curtain-right { right: 0; animation: curtain-right .7s cubic-bezier(.48,.03,.22,1) forwards; }
.curtain-left::after, .curtain-right::after { content: ""; position: absolute; top: 0; bottom: 0; width: 3px; background: #c18c58; opacity: .72; }
.curtain-left::after { right: 0; }.curtain-right::after { left: 0; }
.flying-photo { position: fixed; z-index: 3; object-fit: cover; object-position: 51% 37%; pointer-events: none; border: 3px solid #d8b77b; border-radius: 49% 49% 2px 2px; box-shadow: 0 18px 36px #1807138f; }
@keyframes seal-break { to { opacity: 0; transform: translate(-50%, -70%) rotate(-17deg) scale(1.35); } }
@keyframes arch-lift { to { transform: translateY(-8px) scale(1.03); } }
@keyframes label-away { to { opacity: 0; transform: translateY(9px); } }
@keyframes hint-away { to { opacity: 0; transform: translate(-50%, 9px); } }
@keyframes curtain-left { to { transform: translateX(-103%); } }
@keyframes curtain-right { to { transform: translateX(103%); } }
@media (prefers-reduced-motion: no-preference) {
  .opening-photo img { animation: photo-breathe 7s ease-in-out infinite alternate; }
  .open-hint { animation: hint-pulse 2s ease-in-out infinite; }
  @keyframes photo-breathe { to { transform: scale(1.04); } }
  @keyframes hint-pulse { 50% { opacity: .58; } }
}
@media (max-height: 700px) {
  .guest-name { top: 9.5%; }
  .vestibule.has-guest .opening-photo { top: 20%; height: 43%; }
  .vestibule.has-guest:not(.personalized) .opening-photo { top: 16%; height: 47%; }
  .vestibule.has-long-guest .opening-photo { top: 24%; height: 39%; }
  .opening-photo { top: 11%; height: 52%; }
  .wax { top: 62%; }
  .pair { top: 68%; font-size: clamp(2.3rem, 10cqw, 3rem); }
  .wedding-day { bottom: 12%; }
  .open-hint { bottom: 4.5%; }
}
@media (prefers-reduced-motion: no-preference) {
  .titles-arrive .photo-title { animation: title-arrive .48s .05s ease-out both; }
  .countdown.is-visible, .album-heading.is-visible, .ceremony.is-visible, footer.is-visible { animation: section-arrive .65s ease-out both; }
  .schedule.is-visible .timeline li { animation: section-arrive .55s ease-out both; }
  .schedule.is-visible .timeline li:nth-child(2) { animation-delay: .1s; }
  .schedule.is-visible .timeline li:nth-child(3) { animation-delay: .2s; }
  .formal-invite.is-visible .section-kicker,
  .formal-invite.is-visible h2,
  .formal-invite.is-visible .full-names,
  .formal-invite.is-visible .invite,
  .formal-invite.is-visible .date-card,
  .formal-invite.is-visible .lunar,
  .reception.is-visible .section-kicker,
  .reception.is-visible h2,
  .reception.is-visible .times,
  .reception.is-visible .venue { animation: section-arrive .6s ease-out both; }
  .formal-invite.is-visible h2,
  .reception.is-visible h2 { animation-delay: .07s; }
  .formal-invite.is-visible .full-names,
  .reception.is-visible .times { animation-delay: .14s; }
  .formal-invite.is-visible .invite,
  .reception.is-visible .venue { animation-delay: .22s; }
  .formal-invite.is-visible .date-card { animation-delay: .3s; }
  .formal-invite.is-visible .lunar { animation-delay: .38s; }
  .formal-invite.is-visible .rule::before { animation: rule-draw .55s .12s ease-out both; }
  .formal-invite.is-visible .rule::after { animation: rule-draw .55s .12s ease-out both; }
  .prints figure.on-screen:first-child img { animation: slide-closeup 1.1s ease-out both; }
  .prints figure.on-screen:nth-child(2) a { animation: arch-reveal .85s ease-out both; }
  .prints figure.on-screen:nth-child(3) a { animation: print-settle .85s ease-out both; }
  .prints figure.on-screen figcaption { animation: caption-arrive .5s .2s ease-out both; }
  .viewer[open] img { animation: section-arrive .35s ease-out both; }
  @keyframes title-arrive { from { opacity: 0; transform: translateY(25px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes section-arrive { from { opacity: .55; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes slide-closeup { from { transform: scale(1.08); } to { transform: scale(1); } }
  @keyframes arch-reveal { from { clip-path: inset(0 0 38%); } to { clip-path: inset(0); } }
  @keyframes print-settle { from { transform: translateY(8%) rotate(2deg); } to { transform: rotate(-4deg); } }
  @keyframes caption-arrive { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes rule-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
@media (prefers-reduced-motion: reduce) {
  .opening *, .vestibule.in-flight, .flying-photo { animation: none !important; }
  .prints { scroll-behavior: auto; }
}
