:root {
  --columns: 6;
  --rows: 4;
}

body {
  margin: 0;
  height: 100vh;
  background-color: #111;
  font-family: sans-serif;
  background: url("./front-images/Adventskalender Hintergrund.jpg") center/cover no-repeat fixed;
  overflow: scroll;
  background-size: 100% 100%;
  animation: pageFadeIn 1s ease;

  @media (width < 900px) {
    gap: 1rem;
    background: url("./front-images/Adventskaleneder Hintergrund_mobil.png") center/cover no-repeat fixed;
  }

}


@keyframes pageFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


#modals {
  font: 24pt sans-serif;
}

main {
  margin: 1vw 3vw 2vw 3vw;
  perspective: 1200px;
  display: grid;
  grid-template-columns: repeat(var(--columns), 1fr);
  grid-template-rows: repeat(var(--rows), 1fr);

  @media (width > 40rem) {
    gap: 1rem;
  }

  @media (width > 48rem) {
    gap: 1rem;
  }

  @media (width > 64rem) {
    gap: 1rem;
  }

  @media (width > 80rem) {
    gap: 0.5rem;
  }

  @media (width > 96rem) {
    gap: 0.5rem;
  }

  font: 24pt sans-serif;
  transform-style: preserve-3d;
  transition: transform 1.5s cubic-bezier(0.7, 0, 0.3, 1);
}

.allinfo {
  margin-top: 2.5rem;
  text-align: center;
  transition: transform 1s cubic-bezier(0.7, 0, 0.3, 1),
    opacity 1.5s ease;
}

.allinfo-btn {
  font-size: 1.2rem;
  color: aliceblue;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(3px);
  transition: 0.3s ease;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0);
  z-index: 3;
}

.allinfo-btn:hover {
  color: gold;
  box-shadow: 0 0 100px gold, 0 0 30px gold;
  transform: scale(1.1);
  font-weight: bold;
  padding: 30px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
}

.door-container {
  position: relative;
  transform-style: preserve-3d;
  cursor: pointer;
  transition: transform 1.5s cubic-bezier(0.7, 0, 0.3, 1),
    opacity 1.5s ease;
  aspect-ratio: 1 / 0.65;
}

.door-frame {
  position: relative;
  width: 100%;
  height: 100%;

  border: 3px solid #da980c;
  box-sizing: border-box;
  box-shadow: 0 0 15px rgba(221, 171, 5, 0.8);
  transform-style: preserve-3d;
}

.website-preview {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  transition: visibility 0.5s, opacity 0.5s;
  opacity: 0;
}

.website-preview iframe {
  width: 400%;
  height: 400%;
  border: none;
  transform: scale(0.25);
  transform-origin: top left;
  pointer-events: none;
}

.door-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(1px);
  border: 1px solid #3a2e22;
  transform-origin: left;
  transition: transform 0.5s ease-out;
  z-index: 2;
  font-weight: 900;

  @media (width > 40rem) {
    font-size: 2rem;
  }

  @media (width > 48rem) {
    font-size: 2.5rem;
  }

  @media (width > 64rem) {
    font-size: 3rem;
  }

  @media (width > 80rem) {
    font-size: 3rem;
  }

  @media (width > 96rem) {
    font-size: 3rem;
  }

  display: flex;
  justify-content: center;
  align-items: center;
  color: rgb(255, 255, 255);
  text-shadow: 1px 2px 2px black;
}

.door-container:hover .door-frame {
  box-shadow: 0 0 100px rgb(255, 196, 0);

  .door-panel {
    color: rgb(255, 196, 0);
  }

}

.door-container:focus-within .door-frame {
  box-shadow: 0 0 100px rgb(255, 196, 0);

  .door-panel {
    color: rgb(255, 196, 0);
  }
}

.inactive {
  transform: translateZ(-1000px) scale(0.5);
  opacity: 0;
  pointer-events: none;
}

.website-preview button {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 0;
}

@media screen and (orientation: portrait) {
  body {
    --columns: 3;
    --rows: 8;
  }

  main {
    gap: 1rem;
  }

  .door {
    height: 8.5vh;
  }
}

@media (max-width: 768px) {
  .door {
    font-size: 0.5rem;
    padding: 0.3rem;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40
}

.modal {
  background: #fff;
  color: #071029;
  padding: 22px;
  border-radius: 12px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.55)
}

.modal-init {
  background: #fff;
  color: #071029;
  padding: 22px;
  border-radius: 12px;
  max-width: 750px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.55);
  overflow-wrap: anywhere;
}

.forbidden {
  background: #0b1220;
  color: #ffdde0;
  padding: 24px;
  border-radius: 10px;
  border: 1px solid rgba(255, 0, 0, 0.08);
  text-align: center
}

.forbidden h2 {
  margin: 0 0 8px 0;
  font-size: 2rem;
  color: #7f1d1d
}

.audio-player {
  margin: 35px auto;
  display: block;
  width: 80%;
  max-width: 100px;
}

/* flying santa */
.santa {
  position: fixed;
  left: -10vw;
  top: 10vh;
  font-size: 56px;
  z-index: -1;
  pointer-events: none;
  transform: translateX(0) rotate(0deg);
  transition-property: transform, opacity;
  transition-timing-function: linear;
  will-change: transform, opacity;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5));
  opacity: 0.95;
}

.santa.small {
  font-size: 40px;
}

.santa.medium {
  font-size: 56px;
}

.santa.large {
  font-size: 72px;
}

.santa img {
  display: block;
  width: auto;
  height: 56px;
  image-rendering: pixelated;
}

.santa.small img {
  height: 40px;
}

.santa.medium img {
  height: 56px;
}

.santa.large img {
  height: 72px;
}