/* A slow, independently launched procession of warmly lit paper sky lanterns. */
.invitation-lanterns {
  position: fixed;
  inset: 0;
  z-index: 12;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  transition: opacity 350ms ease;
  contain: layout paint style;
}
.invitation-lanterns.is-leaving { opacity: 0; }
.invitation-lantern-flight {
  position: absolute;
  left: var(--lantern-left);
  bottom: -90px;
  display: block;
  width: var(--lantern-size);
  aspect-ratio: 100 / 128;
  opacity: 0;
  will-change: transform, opacity;
  animation: invitation-lantern-rise var(--lantern-duration) linear var(--lantern-delay) both;
}
.invitation-lantern-paper {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 85%;
  animation: invitation-lantern-sway var(--lantern-sway-duration) ease-in-out var(--lantern-sway-delay) infinite alternate both;
}
.invitation-lantern-paper::before {
  content: '';
  position: absolute;
  inset: -30% -55% -22%;
  z-index: -1;
  background: radial-gradient(ellipse, #ffe4a23d 0, #ffe7b318 38%, #ffe7b300 70%);
}
.invitation-lantern-paper svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 5px #f2cf8e42);
}
#invitation .invitation-script-names,
#invitation .invitation-calendar {
  position: relative;
  z-index: 13;
}
@keyframes invitation-lantern-rise {
  0% { opacity: 0; transform: translate3d(-50%, 0, 0); }
  4%, 89% { opacity: var(--lantern-opacity); }
  100% { opacity: 0; transform: translate3d(calc(-50% + var(--lantern-drift)), calc(-100vh - 150px), 0); }
}
@keyframes invitation-lantern-sway {
  from { transform: translateX(-3px) rotate(calc(var(--lantern-tilt) * -.65)); }
  to { transform: translateX(3px) rotate(var(--lantern-tilt)); }
}
@media (prefers-reduced-motion: reduce) {
  .invitation-lanterns { display: none; }
}
