/* =============================================================================
   PRELOADER.CSS — MadeByKoch Theme
   Scanner Preloader Styles
   ============================================================================= */

#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0C0C0C;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-direction: column;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* =============================================================================
   SCAN WRAP
   ============================================================================= */

.scan-wrap {
  position: relative;
  width: 200px;
  height: 48px;
  overflow: hidden;
}

/* =============================================================================
   SCAN LOGO — DIM (BACKGROUND LAYER)
   ============================================================================= */

.scan-logo-dim {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  color: #1e1e1e;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  letter-spacing: 0.06em;
  user-select: none;
  white-space: nowrap;
}

/* =============================================================================
   SCAN LOGO — REVEAL (FOREGROUND LAYER)
   ============================================================================= */

.scan-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  color: #EDEAE4;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  letter-spacing: 0.06em;
  user-select: none;
  white-space: nowrap;
  clip-path: inset(0 100% 0 0);
  animation: scanReveal 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

/* =============================================================================
   SCAN LINE
   ============================================================================= */

.scan-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    #D42B2B 30%,
    #FF3E3E 50%,
    #D42B2B 70%,
    transparent 100%
  );
  box-shadow:
    0 0 8px 2px rgba(212, 43, 43, 0.8),
    0 0 20px 4px rgba(212, 43, 43, 0.4);
  animation: scanLine 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
  z-index: 2;
}

.scan-line::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(212, 43, 43, 0.6) 50%,
    transparent 100%
  );
}

/* =============================================================================
   SCAN BAR (PROGRESS)
   ============================================================================= */

.scan-bar {
  position: relative;
  width: 200px;
  height: 1px;
  background: #1a1a1a;
  overflow: hidden;
}

.scan-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: #D42B2B;
  animation: scanFill 1.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

/* =============================================================================
   SCAN TAG
   ============================================================================= */

.scan-tag {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #6A6A6A;
  animation: tagFade 1.6s ease 0.2s both;
}

/* =============================================================================
   KEYFRAMES
   ============================================================================= */

@keyframes scanReveal {
  0%   { clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0 0% 0 0); }
}

@keyframes scanLine {
  0%   { left: 0%;   opacity: 1; }
  90%  { left: 100%; opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

@keyframes scanFill {
  0%   { width: 0%;   }
  100% { width: 100%; }
}

@keyframes tagFade {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0.4; }
}
