/* ==========================================================================
   HERO ASSET PRELOADER STYLES (Modern Graphical Motion Loader)
   ========================================================================== */
body.preloader-active {
  overflow: hidden !important;
  touch-action: none;
}

.hero-preloader {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background: radial-gradient(circle at 50% 50%, #FFFFFF 0%, #F8FAFC 55%, #EEF2F6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1);
}

.hero-preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.04);
}

.preloader-stage-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.preloader-graphic-stage {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-counter-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 22px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 9999px;
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.preloader-counter-text {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #1553D6;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: 0.04em;
  line-height: 1;
}

/* Ambient Radial Backlight */
.preloader-ambient-aura {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, rgba(37, 99, 235, 0.12) 50%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  animation: preloaderAuraPulse 3s ease-in-out infinite alternate;
}

/* Concentric Liquid Pulse Waves */
.preloader-pulse-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  pointer-events: none;
  opacity: 0;
  animation: preloaderWave 2.8s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.preloader-pulse-wave.wave-2 {
  animation-delay: 1.4s;
  border-color: rgba(37, 99, 235, 0.35);
}

/* Outer Dashed Compass Ring */
.preloader-orbit-ring.ring-outer-dashed {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 186px;
  height: 186px;
  border-radius: 50%;
  border: 1.5px dashed rgba(37, 99, 235, 0.35);
  animation: spinCW 12s linear infinite;
}

/* Middle Dual-Arc Gradient Spinner */
.preloader-orbit-ring.ring-middle-gradient {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 148px;
  height: 148px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: #1553D6;
  border-right-color: #38BDF8;
  border-bottom-color: transparent;
  border-left-color: rgba(37, 99, 235, 0.2);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.45));
  animation: spinCCW 2.4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

/* Inner Subtle Glow Ring */
.preloader-orbit-ring.ring-inner-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 116px;
  height: 116px;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2) inset, 0 0 12px rgba(56, 189, 248, 0.2);
  animation: spinCW 6s linear infinite;
}

/* Revolving Particle Orbit Tracks */
.preloader-orbit-track {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}

.preloader-orbit-track.track-1 {
  width: 164px;
  height: 164px;
  animation: spinCW 3.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.preloader-orbit-track.track-2 {
  width: 130px;
  height: 130px;
  animation: spinCCW 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.preloader-orbit-track.track-3 {
  width: 196px;
  height: 196px;
  animation: spinCW 7s linear infinite;
}

.orbit-particle {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.orbit-particle.particle-cyan {
  background: #38BDF8;
  box-shadow: 0 0 10px #38BDF8, 0 0 4px #FFFFFF;
}

.orbit-particle.particle-blue {
  background: #1553D6;
  box-shadow: 0 0 10px #1553D6, 0 0 4px #60A5FA;
}

.orbit-particle.particle-indigo {
  background: #6366F1;
  width: 6px;
  height: 6px;
  box-shadow: 0 0 8px #6366F1;
}

/* Center Logo Emblem */
.preloader-logo-core {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.8) inset;
  animation: preloaderLogoBreath 2.2s ease-in-out infinite alternate;
}

.preloader-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(37, 99, 235, 0.15));
}

/* Keyframes */
@keyframes spinCW {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes spinCCW {
  from { transform: translate(-50%, -50%) rotate(360deg); }
  to { transform: translate(-50%, -50%) rotate(0deg); }
}

@keyframes preloaderWave {
  0% {
    transform: translate(-50%, -50%) scale(0.65);
    opacity: 0.8;
  }
  70% {
    opacity: 0.3;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.35);
    opacity: 0;
  }
}

@keyframes preloaderAuraPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1;
  }
}

@keyframes preloaderLogoBreath {
  0% {
    transform: scale(0.96);
  }
  100% {
    transform: scale(1.04);
  }
}

/* ==========================================================================
   HERO SCROLL CONTAINER
   ========================================================================== */
.hero-scroll-container {
  position: relative;
  height: 400vh; /* 4 times viewport height for scrolling duration */
  background-color: #000; 
  margin-top: -100px; /* Pull up to sit behind navbar if navbar is transparent */
}

/* Ensure the header navigation sits above the canvas */
.smart-header-wrapper {
  position: fixed; /* Keep it fixed at the top */
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(0,0,0,0.5); /* Slight dark background to ensure readability over the images */
  backdrop-filter: blur(10px);
}

.hero-sticky-section {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background-color: #030712;
  background-image: url('../hero/ezgif-frame-001.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-canvas-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* Slight darkening for text readability */
  z-index: 2;
}

.hero-features-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* Allows clicks to pass through */
}

.hero-feature-text {
  position: absolute;
  width: 90%;
  max-width: 800px;
  text-align: center;
  color: white;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.hero-feature-text.active {
  opacity: 1;
  transform: translateY(0);
}

.hero-feature-text h2 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero-feature-text p {
  font-size: 1.25rem;
  opacity: 0.95;
  line-height: 1.6;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-feature-text .cta-button-group {
  margin-top: 2.5rem;
  pointer-events: auto; /* Re-enable clicks for buttons inside pointer-events: none container */
  justify-content: center;
}

@media (max-width: 768px) {
  .hero-scroll-container {
    height: 300vh; /* Slightly shorter scroll on mobile */
  }
  .hero-feature-text h2 {
    font-size: 2.2rem;
  }
  .hero-feature-text p {
    font-size: 1rem;
  }
}
