@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap");

body {
  width: 100vw;
  height: 100vh;
  inset: 0px;
  padding: 0px;
  margin: 0px;
  overflow: hidden;
  font-family: "Montserrat", sans-serif;
  user-select: none; touch-action: none;
  position: fixed;
}

.loading-elements-container {
  width: 100%;
  height: 100vh;
  inset: 0px;
  padding: 0px;
  margin: 0px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle, #e1bc9c, #ddbea2, #e9cdb7, #f1d8c5, #d6c9b8);
  background-size: 100%;
}

.load-image {
  height: 100%;
  width: 70vw;
  min-width: 1200px;
  inset: 0px;
  padding: 0px;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  transition: opacity 2s ease;
  overflow: hidden;
}

.slide-up {
  animation: slideUp ease-out 850ms forwards;
}

@keyframes slideUp {
  0% {
    top: 50%;
  }

  100% {
    top: 10%;
  }
}

.welcome-text {
  width: 65vw;
  padding: 0px;
  z-index: 2;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 20%);
  font-size: 3vh;
  text-shadow: 0px 2px 10px rgba(20, 32, 35, 0.3);
  letter-spacing: 5px;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  color: #fff;
  text-align: center;
  opacity: 0;
  font-family: "Montserrat", sans-serif;
  animation: ShakeAndFadeIn ease 2s forwards;
}

@keyframes ShakeAndFadeIn {
  0% {
    opacity: 0;
    transform: translate(-50%, 20%) rotate(0deg);
  }

  20% {
    transform: translate(-50%, 20%) rotate(1deg);
  }

  20% {
    transform: translate(-50%, 20%) rotate(-1deg);
  }

  30% {
    transform: translate(-50%, 20%) rotate(1deg);
  }

  40% {
    transform: translate(-50%, 20%) rotate(-1deg);
  }

  50% {
    transform: translate(-50%, 20%) rotate(1deg);
  }

  60% {
    transform: translate(-50%, 20%) rotate(-1deg);
  }

  70% {
    transform: translate(-50%, 20%) rotate(1deg);
  }

  80% {
    transform: translate(-50%, 20%) rotate(-1deg);
  }

  90% {
    transform: translate(-50%, 20%) rotate(1deg);
  }

  100% {
    transform: translate(-50%, 20%) rotate(0deg);
    opacity: 1;
  }
}


/* Apply styles when the screen width is 768px or less and touch screen (for mobile) */
@media (max-width: 768px),
screen and (max-width: 768px) and (pointer: coarse) {
  .load-image {
    height: 101vh;
    width: auto;
    margin-left: -7vw;
    object-fit: contain;
  }

  .welcome-text {
    width: 95vw;
    padding: 0px;
    margin-bottom: 30%;
    font-size: 2.5vh;
    letter-spacing: 4px;
  }
}

/* For tablets */
@media (min-width: 481px) and (max-width: 768px),
screen and (min-width: 481px) and (max-width: 768px) and (pointer: coarse) {
  .load-image {
    margin-left: 0;
  }
}

* {
  box-sizing: border-box;
}

.loading-text-container {
  width: 100%;
  max-width: 1000px;
  text-align: center;
  color: #fff;
  margin: 0 45px;
  position: absolute;
  top: 50%;
  z-index: 2;
}

.loading-text-container:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 0.7vh;
  background-color: #fff;
  bottom: 0;
  left: 0;
  border-radius: 10px;
  animation: movingLine 5s infinite ease-in-out;
  animation-delay: 0.1s;
}

.loading-text {
  font-size: 10vh;
  line-height: 64px;
  letter-spacing: 10px;
  margin-bottom: 3vh;
  display: flex;
  justify-content: space-evenly;
}

.loading-text span {
  animation: moveLetters 5s infinite ease-in-out;
  transform: translateX(0);
  position: relative;
  display: inline-block;
  opacity: 0;
  text-shadow: 0px 2px 10px rgba(46, 74, 81, 0.3);
}

/* Apply styles when the screen width is 768px or less and touch screen (for mobile) */
@media (max-width: 768px),
screen and (max-width: 768px) and (pointer: coarse) {
  .loading-text-container {
    width: 90%;
  }

  .loading-text-container:before {
    width: 90%;
    max-width: 1000px;
    height: 0.6vh;
  }

  .loading-text {
    font-size: 6vh;
    line-height: 4vh;
    text-align: center;
    margin-left: 10px;
    margin-bottom: 2vh;
  }
}

@keyframes movingLine {
  0% {
    opacity: 0;
    width: 0;
  }

  33.3%,
  66% {
    opacity: 0.8;
    width: 100%;
  }

  85% {
    width: 0;
    left: initial;
    right: 0;
    opacity: 1;
  }

  100% {
    opacity: 0;
    width: 0;
  }
}

/* @for $i from 1 through 7 {
  .loading-text span:nth-child(#{$i}) {
    animation-delay: $i * 0.4s;
  }
} */

.loading-text span:nth-child(1) {
  animation-delay: 0.1s;
}

.loading-text span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-text span:nth-child(3) {
  animation-delay: 0.3s;
}

.loading-text span:nth-child(4) {
  animation-delay: 0.4s;
}

.loading-text span:nth-child(5) {
  animation-delay: 0.5s;
}

.loading-text span:nth-child(6) {
  animation-delay: 0.6s;
}

.loading-text span:nth-child(7) {
  animation-delay: 0.7s;
}

@keyframes moveLetters {
  0% {
    transform: translateX(-15vw);
    opacity: 0;
  }

  20%,
  80% {
    transform: translateX(0);
    opacity: 1;
  }

  100% {
    transform: translateX(15vw);
    opacity: 0;
  }
}