/**
 * Festliche Willkommens-Szenen (Weihnachten, Ostern, Pfingsten, Geburtstag) inkl. prefers-reduced-motion
 */
.welcome-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: transparent;
}

.welcome-animation-stage {
  position: fixed;
  inset: 0;
  z-index: 2100;
  overflow: hidden;
  background: transparent;
}

.scene-christmas {
  background: transparent;
}

.christmas-star {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.2rem;
  height: 2.2rem;
  background: #fff8b5;
  clip-path: polygon(50% 0, 62% 36%, 100% 50%, 62% 64%, 50% 100%, 38% 64%, 0 50%, 38% 36%);
  filter: drop-shadow(0 0 1rem #fff3a3);
  transform: translate(-50%, -50%);
  animation: christmas-star-move 4s ease-in-out forwards;
}

@keyframes christmas-star-move {
  0%,
  20% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 1;
  }
  70%,
  100% {
    transform: translate(7.4rem, -5.1rem) scale(0.65);
    opacity: 0.95;
  }
}

.nativity {
  position: absolute;
  right: clamp(1rem, 8vw, 8rem);
  bottom: clamp(1rem, 7vh, 5rem);
  width: clamp(16rem, 38vw, 34rem);
  height: clamp(11rem, 30vh, 20rem);
  opacity: 0;
  animation: scene-appear 0.6s ease-out 2.1s forwards;
}

.stable {
  position: absolute;
  inset: 0 0 0.5rem;
  background: #875b3c;
  clip-path: polygon(0 100%, 8% 30%, 50% 0, 92% 30%, 100% 100%);
}

.manger {
  position: absolute;
  left: 38%;
  bottom: 12%;
  width: 24%;
  height: 12%;
  background: #d69e2e;
  transform: skew(-18deg);
}

.christmas-baby {
  position: absolute;
  left: 35%;
  top: -45%;
  width: 30%;
  height: 75%;
  border-radius: 50%;
  background: #f7fafc;
}

.christmas-baby::before {
  content: '';
  position: absolute;
  top: -45%;
  left: 20%;
  width: 60%;
  height: 60%;
  border-radius: 50%;
  background: #c98b68;
}

.nativity-person {
  position: absolute;
  bottom: 14%;
  width: 13%;
  height: 52%;
  border-radius: 0.7rem 0.7rem 0.2rem 0.2rem;
  background: #2c5282;
}

.nativity-person::before {
  content: '';
  position: absolute;
  top: -26%;
  left: 13%;
  width: 74%;
  height: 32%;
  border-radius: 50%;
  background: #c98b68;
}

.person-one {
  left: 17%;
}
.person-two {
  right: 17%;
  background: #c05621;
}

.wise-men {
  position: absolute;
  left: -5rem;
  bottom: 1.1rem;
  display: flex;
  gap: 0.35rem;
  animation: wise-men-travel 4.3s linear 2.2s forwards;
}

.wise-men span {
  position: relative;
  width: 1rem;
  height: 2.7rem;
  border-radius: 0.6rem 0.6rem 0.2rem 0.2rem;
  background: #b7791f;
}

.wise-men span::before {
  content: '';
  position: absolute;
  top: -0.6rem;
  left: 0.1rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: #a66b4c;
}

.wise-men span:nth-child(2) {
  background: #805ad5;
  transform: translateY(-0.25rem);
}
.wise-men span:nth-child(3) {
  background: #2f855a;
}

@keyframes wise-men-travel {
  to {
    transform: translateX(calc(100vw - 8rem));
  }
}

.scene-easter {
  background: transparent;
}

.tomb {
  position: absolute;
  left: 50%;
  bottom: 4vh;
  width: min(72vw, 48rem);
  height: min(76vh, 38rem);
  transform: translateX(-50%);
}

.tomb-opening {
  position: absolute;
  left: 10%;
  bottom: 0;
  width: 72%;
  height: 78%;
  border-radius: 4rem 4rem 0 0;
  background: #243b53;
}

.tomb-opening::after {
  content: '';
  position: absolute;
  inset: 15% 18% 0;
  border-radius: 3rem 3rem 0 0;
  background: #101820;
}

.tomb-stone {
  position: absolute;
  left: 70%;
  bottom: 12%;
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #718096;
  border: 0.25rem solid #4a5568;
  animation: stone-roll 2.2s ease-in 1s forwards;
}

@keyframes stone-roll {
  to {
    transform: translateX(5rem) rotate(270deg);
  }
}

.resurrected-figure {
  position: absolute;
  left: 42%;
  bottom: 14%;
  width: 12%;
  height: 58%;
  border-radius: 0.7rem 0.7rem 0.2rem 0.2rem;
  background: #f7fafc;
  opacity: 0;
  animation:
    figure-rises 1.2s ease-out 2.4s forwards,
    figure-walks 1.5s ease-in 3.7s forwards;
}

.resurrected-figure::before {
  content: '';
  position: absolute;
  top: -16%;
  left: 13%;
  width: 74%;
  height: 22%;
  border-radius: 50%;
  background: #c98b68;
}

@keyframes figure-rises {
  from {
    opacity: 0;
    transform: translateY(2.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes figure-walks {
  to {
    transform: translateX(4rem);
  }
}

.scene-pentecost {
  background: transparent;
}

.holy-dove {
  position: absolute;
  top: 42%;
  left: -8rem;
  width: clamp(7rem, 13vw, 12rem);
  height: clamp(4rem, 8vw, 7rem);
  z-index: 2;
  animation: dove-flight 3.5s ease-in-out forwards;
}

.dove-body {
  position: absolute;
  left: 28%;
  top: 30%;
  width: 48%;
  height: 40%;
  border-radius: 55% 45% 48% 52%;
  background: #f7fafc;
  filter: drop-shadow(0 0 0.8rem rgba(255, 255, 255, 0.8));
}

.dove-body::after {
  content: '';
  position: absolute;
  right: -18%;
  top: 18%;
  width: 0;
  height: 0;
  border-top: 0.45rem solid transparent;
  border-bottom: 0.45rem solid transparent;
  border-left: 1rem solid #d69e2e;
}

.dove-wing {
  position: absolute;
  top: 0;
  width: 40%;
  height: 58%;
  border-radius: 70% 30% 70% 30%;
  background: #edf2f7;
}

.dove-wing-left {
  left: 18%;
  transform: rotate(-25deg);
  animation: wing-flap 0.45s ease-in-out infinite alternate;
}
.dove-wing-right {
  left: 44%;
  transform: rotate(25deg) scaleX(-1);
  animation: wing-flap 0.45s ease-in-out 0.12s infinite alternate;
}

.dove-tail {
  position: absolute;
  left: 18%;
  top: 38%;
  width: 0;
  height: 0;
  border-top: 1.1rem solid #e2e8f0;
  border-left: 1.7rem solid transparent;
  transform: rotate(-16deg);
}

@keyframes dove-flight {
  0% {
    transform: translate(0, 5vh) rotate(5deg);
  }
  45% {
    transform: translate(48vw, -10vh) rotate(-4deg);
  }
  100% {
    transform: translate(calc(100vw + 10rem), 4vh) rotate(5deg);
  }
}

@keyframes wing-flap {
  to {
    transform: rotate(-55deg) translateY(-0.4rem);
  }
}

.fire-trail {
  position: absolute;
  top: 54%;
  left: -7rem;
  width: 100vw;
  height: 3rem;
  animation: trail-follow 3.5s ease-in-out forwards;
}

.fire-trail span {
  position: absolute;
  bottom: 0;
  width: 1.5rem;
  height: 2.8rem;
  border-radius: 70% 30% 65% 35%;
  background: #f6ad55;
  box-shadow: 0 0 1rem #ed8936;
  transform: rotate(35deg);
  animation: fire-flicker 0.35s ease-in-out infinite alternate;
}

.fire-trail span:nth-child(1) {
  left: 8%;
}
.fire-trail span:nth-child(2) {
  left: 27%;
  height: 2.1rem;
  background: #fbd38d;
  animation-delay: 0.08s;
}
.fire-trail span:nth-child(3) {
  left: 46%;
  height: 3.3rem;
  background: #dd6b20;
  animation-delay: 0.16s;
}
.fire-trail span:nth-child(4) {
  left: 65%;
  height: 2.3rem;
  animation-delay: 0.24s;
}
.fire-trail span:nth-child(5) {
  left: 84%;
  height: 3rem;
  background: #c05621;
  animation-delay: 0.32s;
}

@keyframes trail-follow {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  18%,
  80% {
    opacity: 1;
  }
  100% {
    transform: translateX(100vw);
    opacity: 0;
  }
}

@keyframes fire-flicker {
  to {
    transform: rotate(25deg) scale(0.72, 1.15);
  }
}

.scene-birthday {
  background: transparent;
}

.birthday-balloons span {
  position: absolute;
  bottom: -5rem;
  width: clamp(2rem, 4vw, 4rem);
  height: clamp(2.7rem, 5vw, 5rem);
  border-radius: 50% 50% 45% 45%;
  background: #e53e3e;
  animation: balloon-rise 2.2s ease-out forwards;
}

.birthday-balloons span::after {
  content: '';
  position: absolute;
  top: 2.7rem;
  left: 50%;
  width: 1px;
  height: 8rem;
  background: #718096;
}

.birthday-balloons span:nth-child(1) {
  left: 4%;
  background: #3182ce;
  animation-delay: 0.1s;
}
.birthday-balloons span:nth-child(2) {
  left: 14%;
  background: #d69e2e;
  animation-delay: 0.5s;
}
.birthday-balloons span:nth-child(3) {
  left: 24%;
  background: #e53e3e;
  animation-delay: 0.2s;
}
.birthday-balloons span:nth-child(4) {
  left: 35%;
  background: #805ad5;
  animation-delay: 0.7s;
}
.birthday-balloons span:nth-child(5) {
  left: 45%;
  background: #38a169;
  animation-delay: 0.35s;
}
.birthday-balloons span:nth-child(6) {
  left: 56%;
  background: #dd6b20;
  animation-delay: 0.15s;
}
.birthday-balloons span:nth-child(7) {
  left: 66%;
  background: #319795;
  animation-delay: 0.85s;
}
.birthday-balloons span:nth-child(8) {
  left: 76%;
  background: #d53f8c;
  animation-delay: 0.42s;
}
.birthday-balloons span:nth-child(9) {
  left: 87%;
  background: #2b6cb0;
  animation-delay: 0.65s;
}
.birthday-balloons span:nth-child(10) {
  left: 9%;
  background: #b7791f;
  animation-delay: 1s;
}
.birthday-balloons span:nth-child(11) {
  left: 49%;
  background: #9f7aea;
  animation-delay: 0.95s;
}
.birthday-balloons span:nth-child(12) {
  left: 92%;
  background: #48bb78;
  animation-delay: 0.25s;
}

@keyframes balloon-rise {
  to {
    transform: translateY(calc(-100vh - 8rem)) rotate(18deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-animation-stage *,
  .welcome-animation-stage *::before,
  .welcome-animation-stage *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}
