/* Aleena Khan Preloader
   Loaded with high priority in <head>. Kept intentionally tiny
   (no framework, no external font request) so it paints instantly
   and never causes a flash-of-unstyled-content or layout shift. */

#akp-preloader {
  position: fixed;
  inset: 0;
  z-index: 999999; /* sits above Jayden's header/nav/admin-bar */
  background: #0b0b0c;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* Prevent any scrollbar flash behind the overlay while it's up */
  overflow: hidden;
}

/* Lock body scroll while the preloader is visible */
html.akp-lock,
html.akp-lock body {
  overflow: hidden !important;
  height: 100%;
}

#akp-preloader .akp-line {
  text-align: center;
  max-width: 90vw;
  line-height: 1.3;
}

#akp-preloader .akp-typed,
#akp-preloader .akp-typed * {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(28px, 6vw, 64px);
  color: #f3eee3;
  letter-spacing: -0.01em;
}

#akp-preloader .akp-accent {
  font-style: italic;
  font-weight: 600;
  color: #ff5a00;
}

#akp-preloader .akp-cursor {
  display: inline-block;
  width: 0.05em;
  min-width: 3px;
  height: 0.85em;
  background: #ff5a00;
  margin-left: 8px;
  vertical-align: -0.08em;
  animation: akp-blink 0.9s steps(1) infinite;
}

@keyframes akp-blink {
  50% { opacity: 0; }
}

/* Fade-out transition class, toggled by JS */
#akp-preloader.akp-fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

/* Fully hidden after transition ends; JS also sets display:none
   to remove it from the accessibility/layout tree entirely. */
#akp-preloader.akp-hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  #akp-preloader .akp-cursor {
    animation: none;
  }
  #akp-preloader.akp-fade-out {
    transition: none;
  }
}
