/* ==========================================================================
   MANTO — Handwritten Signature Logo Preloader
   Reveals the exact Manto. logo stroke-by-stroke, ending with the dot "."
   ========================================================================== */

.manto-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: #0b0b0b;
  display: grid;
  place-items: center;
  clip-path: inset(0 0 0 0);
  opacity: 1;
  will-change: clip-path, opacity;
  transition:
    clip-path 780ms cubic-bezier(0.76, 0, 0.24, 1),
    opacity 540ms ease-out 220ms;
}

.manto-loader.is-exiting {
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  pointer-events: none;
}

.manto-loader.is-done {
  display: none;
}

.manto-loader__stage {
  width: clamp(165px, 24vw, 235px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(1);
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.manto-loader.is-exiting .manto-loader__stage {
  transform: translateY(-24px) scale(0.96);
}

.manto-loader__svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Mask stroke styling — white reveals the exact Manto_logo_White_2.avif pixels */
.manto-stroke {
  fill: none;
  stroke: #ffffff;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.manto-stroke--thin {
  stroke-width: 10;
}

.manto-dot {
  fill: #ffffff;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  opacity: 0;
}

.manto-dot.is-popping {
  animation: manto-dot-pop 320ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes manto-dot-pop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  70% {
    transform: scale(1.22);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Reduced motion: show logo cleanly without stroke motion */
@media (prefers-reduced-motion: reduce) {
  .manto-dot {
    transform: scale(1);
    opacity: 1;
  }
}
