/* ================================
   FULLSCREEN LOADER OVERLAY
================================ */

.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;
  
  background: #f7f7f4;
  overflow: hidden; /* hard stop scrolling */
}

/* background image layer */
.loader-overlay::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image: url("/assets/images/logo.png"); /* your image */
  background-repeat: no-repeat;
  background-position: center;
  background-size: 300px auto; /* 👈 YOU control this */

  opacity: 0.10;
  pointer-events: none;
  z-index: -1;
}

.hidden {
  display: none !important;
}


/* ================================
   LOADER ANIMATION
================================ */

.container {
  --uib-size: clamp(60px, 8vw, 90px);
  --uib-color: #d97706;
  --uib-speed: 1.75s;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  width: var(--uib-size);
  height: calc(var(--uib-size) * 0.6);

  /* move visually without affecting layout */
  transform: none;
}

.container {
  transform: translateY(-14px);
}


.cube {
  flex-shrink: 0;
  width: calc(var(--uib-size) * 0.2);
  height: calc(var(--uib-size) * 0.2);
  animation: jump var(--uib-speed) ease-in-out infinite;
}

.cube__inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 25%;
  background-color: var(--uib-color);
  transform-origin: center bottom;
  animation: morph var(--uib-speed) ease-in-out infinite;
  transition: background-color 0.3s ease;
}

/* stagger timing */
.cube:nth-child(2) {
  animation-delay: calc(var(--uib-speed) * -0.36);
}

.cube:nth-child(2) .cube__inner {
  animation-delay: calc(var(--uib-speed) * -0.36);
}

.cube:nth-child(3) {
  animation-delay: calc(var(--uib-speed) * -0.2);
}

.cube:nth-child(3) .cube__inner {
  animation-delay: calc(var(--uib-speed) * -0.2);
}

/* ================================
   KEYFRAMES
================================ */

@keyframes jump {
  0% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(0);
    animation-timing-function: ease-out;
  }

  50% {
    transform: translateY(-200%);
    animation-timing-function: ease-in;
  }

  75% {
    transform: translateY(0);
    animation-timing-function: ease-in;
  }
}

@keyframes morph {
  0%,
  10%,
  40%,
  70%,
  85%,
  100% {
    transform: scaleY(1);
  }

  20%,
  25% {
    transform: scaleY(0.6) scaleX(1.3);
  }

  30% {
    transform: scaleY(1.15) scaleX(0.9);
  }

  75% {
    transform: scaleY(0.8) scaleX(1.2);
  }
}
