.animation-modal {
  display: grid;
  place-items: center;
  width: 350px;
  animation: animation-modal 2s forwards ease-in-out;
}

.paper-01,
.paper-02,
.paper-03 {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: auto;
  perspective: 1000px;
}

.paper-01 .front,
.paper-01 .back {
  grid-area: 1 / 1;
  width: 100%;
  height: auto;
  background: #fff;
  transform-origin: top;
  animation: paper-01 2s forwards ease-in-out;
}

.paper-01 .front {
  backface-visibility: hidden;
}

.paper-01 .back {
  backface-visibility: visible;
}

.paper-03 .front,
.paper-03 .back {
  grid-area: 1 / 1;
  width: 100%;
  height: auto;
  transform-origin: bottom;
  animation: paper-03 2s 2s forwards ease-in-out;
}

.paper-03 .front {
  backface-visibility: hidden;
}

.paper-03 .back {
  backface-visibility: visible;
}

.paper-01 .front {
  z-index: 1;
}

.paper-01 .back {
  z-index: 0;
}

.paper-03 .front {
  z-index: 1;
}

.paper-03 .back {
  z-index: 0;
}

img {
  width: 100%;
  height: auto;
}

.paper-01 {
  z-index: 3;
}

.paper-02 {
  z-index: 1;
}

.paper-03 {
  z-index: 2;
}

.paper-01,
.paper-02,
.paper-03 {
  animation: paper 3s forwards ease-in-out;
}

@keyframes animation-modal {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(0, 208px);
  }
}

@keyframes paper-01 {
  0% {
    transform: rotateX(0deg);
  }

  100% {
    transform: rotateX(180deg);
  }
}

@keyframes paper-03 {
  0% {
    transform: rotateX(0deg);
  }

  100% {
    transform: rotateX(-180deg);
  }
}

@media (max-width: 1048px) {
  .animation-modal {
    width: 300px;
  }
  .animation-modal,
  .paper-01 .front,
  .paper-01 .back,
  .paper-03 .front,
  .paper-03 .back {
    /* Deaktiviert die Animationen komplett */
    animation: none !important;
    /* Verhindert ungewollte Transformationen im Ausgangszustand */
    transform: none !important;
  }
}
