/* ==========================================================================
   SHARWESHA YOGA - Animated Engine & Page Loader
   Includes: Full-screen Yogi & Atom Page Loader, Peepal Leaf Particle System
   ========================================================================== */

/* 1. Divine Animated Lotus Yogi Page Loader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #0b2419 0%, #1b4332 50%, #081c13 100%);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  overflow: hidden;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
}

.sun-halo-glow {
  position: absolute;
  top: 35%;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, rgba(82, 183, 136, 0.2) 50%, transparent 70%);
  border-radius: 50%;
  animation: haloPulse 2.5s ease-in-out infinite alternate;
}

.loader-emblem-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-emblem-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.6));
  animation: yogiBreathe 2.8s ease-in-out infinite alternate;
}

.loader-aura-ring {
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
  border-radius: 50%;
  border: 2px dashed rgba(212, 175, 55, 0.75);
  animation: ringSpin 10s linear infinite;
}

.loader-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 2px;
  margin-bottom: 0.35rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.loader-subtitle {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #d4af37;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.loader-spinner-bar {
  width: 130px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 1rem;
  position: relative;
}

.loader-spinner-bar div {
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, #52b788 0%, #d4af37 100%);
  border-radius: 10px;
  position: absolute;
  animation: barSlide 1.4s ease-in-out infinite alternate;
}

/* Loader Keyframe Animations */
@keyframes haloPulse {
  0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(1.25); opacity: 0.95; }
}

@keyframes yogiBreathe {
  0% { transform: scale(0.96); filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5)); }
  100% { transform: scale(1.05); filter: drop-shadow(0 0 24px rgba(212, 175, 55, 0.95)); }
}

@keyframes ringSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes barSlide {
  0% { left: 0%; }
  100% { left: 55%; }
}

/* 2. Floating Peepal Leaf Particle System */
.lotus-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.floating-leaf {
  position: absolute;
  top: -60px;
  pointer-events: none;
  opacity: 0.75;
  animation: floatLeaf linear infinite;
  will-change: transform, opacity;
}

@keyframes floatLeaf {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0;
  }
  12% {
    opacity: 0.8;
  }
  50% {
    transform: translateY(50vh) rotate(140deg) translateX(45px);
  }
  88% {
    opacity: 0.65;
  }
  100% {
    transform: translateY(105vh) rotate(320deg) translateX(-35px);
    opacity: 0;
  }
}

/* Scroll Reveal Animations */
.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.animate-fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility Support */
@media (prefers-reduced-motion: reduce) {
  .page-loader,
  .floating-leaf,
  .animate-fade-up {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .page-loader {
    display: none !important;
  }
}
