html,
body {
  height: 100%;
  margin: 0;
}

html {
  overflow: hidden scroll;
}

#loading-bg {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--initial-loader-bg);
}

.loading-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.loading-logo p {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 5px;
  font-family: "Public Sans", sans-serif;
  text-transform: uppercase;
}

.loading-logo p span {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  -webkit-text-fill-color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  background-image: linear-gradient(
    to right,
    color-mix(in srgb, var(--initial-loader-color) 25%, transparent) 50%,
    var(--initial-loader-color) 50%
  );
  background-size: 200% 100%;
  background-position: 0% center;
  animation:
    letterFade 0.2s ease forwards,
    letterFill 4s ease infinite,
    letterPulse 2s ease-in-out infinite;
}

.loading-logo p span:nth-child(1) {
  animation-delay: 0s, 0.8s, 0.9s;
}
.loading-logo p span:nth-child(2) {
  animation-delay: 0.1s, 1s, 1.1s;
}
.loading-logo p span:nth-child(3) {
  animation-delay: 0.2s, 1.2s, 1.3s;
}
.loading-logo p span:nth-child(4) {
  animation-delay: 0.3s, 1.4s, 1.5s;
}
.loading-logo p span:nth-child(5) {
  animation-delay: 0.4s, 1.6s, 1.7s;
}
.loading-logo p span:nth-child(6) {
  animation-delay: 0.5s, 1.8s, 1.9s;
}
.loading-logo p span:nth-child(7) {
  animation-delay: 0.6s, 2s, 2.1s;
}
.loading-logo p span:nth-child(8) {
  animation-delay: 0.7s, 2.2s, 2.3s;
}

@keyframes letterFade {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes letterFill {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: -100% center;
  }
}

@keyframes letterPulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
