.preloader {
  position: fixed;
  inset: 0;
  background-color: var(--color-black);
  z-index: var(--z-preloader);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preloader__logo {
  width: 80px;
  height: 80px;
  position: relative;
}

.preloader__logo svg {
  width: 100%;
  height: 100%;
}

/* SVG stroke draw-in animation */
.preloader__logo .logo-stroke {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  fill: transparent;
  stroke: var(--color-orange);
  stroke-width: 2;
  animation: drawLogo 1s var(--ease-out) 0.2s forwards;
}

.preloader__logo .logo-fill {
  fill: transparent;
  animation: fillLogo 0.5s var(--ease-out) 1.1s forwards;
}

@keyframes drawLogo {
  to { stroke-dashoffset: 0; }
}

@keyframes fillLogo {
  to { fill: var(--color-orange); }
}

/* Progress bar */
.preloader__bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-orange-deep), var(--color-orange), var(--color-orange-soft));
  transition: width 0.3s var(--ease-out);
}

/* Exit animation */
.preloader.is-exiting .preloader__logo {
  animation: preloaderLogoExit 0.5s var(--ease-in-out) forwards;
}

.preloader.is-exiting {
  animation: preloaderSlideUp 0.7s var(--ease-in-out) 0.3s forwards;
}

@keyframes preloaderLogoExit {
  to { transform: scale(1.4); opacity: 0; }
}

@keyframes preloaderSlideUp {
  to { transform: translateY(-100%); }
}

/* Body locked while preloader active */
body.preloader-active {
  overflow: hidden;
}

/* Instant hide on reduced motion */
@media (prefers-reduced-motion: reduce) {
  .preloader {
    animation: none;
    opacity: 0;
    pointer-events: none;
  }
}
