/* PHARAON-PERF-02
   No-JS safety net for the deferred hero slides. If pharaon-perf.js never
   runs, the slides below still need a visible background - so the attribute
   itself carries no styling and the slide simply keeps the theme's default
   background. This rule exists to make that state explicit rather than
   accidental, and to stop a half-loaded slide flashing transparent. */
.slider-img[data-ph-bg] {
  background-color: var(--themeht-bg-dark-color, #111);
}

/* ==================================================================
   PHARAON-PERF-02 COMPLETION — preloader safety
   ==================================================================
   The loader is an opaque, fixed, full-viewport layer at z-index 99999.
   Anything that stops its dismiss script from running - JavaScript
   disabled, a script error, a blocked asset - would leave the site
   permanently behind it. Two independent nets, neither of which needs
   JavaScript to work:

   1. <noscript> removes it outright.
   2. A CSS animation dismisses it after 6s no matter what. That is longer
      than the script's own 4s ceiling, so in the normal case the script
      always wins and this is never seen; it only matters when the script
      never ran at all. */

#ht-preloader {
  animation: ph-loader-failsafe 0s linear 6s forwards;
}

@keyframes ph-loader-failsafe {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

/* Its own decorative spin should not keep repainting a full-screen layer
   once the loader is on its way out. */
#ht-preloader[style*="display: none"] .loader-circle {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  #ht-preloader .loader-circle {
    animation: none !important;
  }
}
