/* Deferred non-critical UI styles: loader visuals and decorative animations */

/* Reusable pulsing loader */
.pulse-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.pulse-loader-full {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0, 0, 0);
  animation: fluctuateBg 1.2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fluctuateBg {
  0% {
    opacity: 1;
  }
  20% {
    filter: brightness(2.08);
  }
  40% {
    filter: brightness(2.96);
  }
  60% {
    filter: brightness(2.04);
  }
  80% {
    filter: brightness(1.95);
  }
  100% {
    opacity: 0.8;
  }
}

.pulse-loader-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #464040;
  animation: pulse 1.2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.15);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.15);
    opacity: 1;
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 32px rgba(0, 0, 0, 0);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    opacity: 1;
  }
}

@font-face {
  font-family: "Anton";
  src: url("/assets/fonts/anton.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.svg-loader-full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.svg-loader-shape {
  width: 80px;
  height: 80px;
  animation: scribbleShake 1.2s infinite steps(1);
  z-index: 2;
}

.animate-scribble {
  animation: scribbleShake 1.2s infinite steps(1);
}

/* Small rhombuses */
.svg-loader-mini {
  position: absolute;
  z-index: 1;
  animation: loaderMiniFloat 1.5s infinite alternate;
}

.mini-1 {
  top: 28%;
  left: 32%;
  width: 32px;
  height: 32px;
  animation-delay: 0.1s;
}

.mini-2 {
  top: 25%;
  right: 30%;
  width: 24px;
  height: 24px;
  animation-delay: 0.4s;
}

.mini-3 {
  bottom: 28%;
  left: 36%;
  width: 20px;
  height: 20px;
  animation-delay: 0.7s;
}

@keyframes loaderStarSpin {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  30% {
    transform: scale(1.15) rotate(10deg);
    opacity: 0.85;
  }
  60% {
    transform: scale(0.95) rotate(-10deg);
    opacity: 0.95;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes scribbleShake {
  0% {
    transform: rotate(-2deg) scale(1.01) translateY(0);
  }
  10% {
    transform: rotate(2deg) scale(0.99) translateY(-1px);
  }
  20% {
    transform: rotate(-1deg) scale(1.02) translateY(1px);
  }
  30% {
    transform: rotate(1deg) scale(1.01) translateY(-1px);
  }
  40% {
    transform: rotate(-2deg) scale(0.98) translateY(1px);
  }
  50% {
    transform: rotate(2deg) scale(1.01) translateY(0);
  }
  60% {
    transform: rotate(-1deg) scale(1.02) translateY(-1px);
  }
  70% {
    transform: rotate(1deg) scale(0.99) translateY(1px);
  }
  80% {
    transform: rotate(-2deg) scale(1.01) translateY(-1px);
  }
  90% {
    transform: rotate(2deg) scale(1) translateY(1px);
  }
  100% {
    transform: rotate(-2deg) scale(1.01) translateY(0);
  }
}

@keyframes loaderMiniFloat {
  0% {
    transform: scale(1) translateY(0);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.15) translateY(-10px);
    opacity: 1;
  }
}

/* Continuous animation for "Absolutely" text - typewriter effect */
@keyframes typewriter {
  0% {
    width: 0;
  }
  20% {
    width: 100%;
  }
  80% {
    width: 100%;
  }
  100% {
    width: 0;
  }
}

.animate-absolutely {
  overflow: hidden;
  white-space: nowrap;
  animation: typewriter 4s ease-in-out infinite;
}
