/* ============================================
   PREMIUM ENHANCEMENTS
   Loader, hero graphics, animations
   ============================================ */

/* Page Loader */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}

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

.loader-mandala,
.loader-logo {
  animation: loaderSpin 3s linear infinite;
}

.loader-logo {
  animation: loaderPulse 2s ease-in-out infinite;
}

.loader-mandala img {
  width: 100px;
  height: 100px;
  opacity: 0.8;
}

@keyframes loaderSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loader-text {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--color-saffron-light);
  letter-spacing: 0.1em;
}

.loader-bar {
  width: 120px;
  height: 2px;
  background: rgba(245, 235, 224, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--color-saffron), var(--color-rose));
  animation: loaderProgress 1.8s var(--ease-out) forwards;
}

@keyframes loaderProgress {
  from { width: 0; }
  to { width: 100%; }
}

body:not(.ready) .hero-content,
body:not(.ready) .header {
  opacity: 0;
}

body.ready .header {
  animation: fadeDown 0.8s var(--ease-out) 0.2s both;
}

body.ready .hero-content {
  animation: fadeUp 1s var(--ease-out) 0.4s both;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Rhythm pulse bar */
.rhythm-pulse {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  z-index: 100;
  opacity: 0.35;
  pointer-events: none;
}

.rhythm-bar {
  width: 3px;
  background: var(--color-saffron);
  border-radius: 2px;
  animation: rhythmBounce 0.8s ease-in-out infinite alternate;
}

.rhythm-bar:nth-child(1) { animation-delay: 0s; }
.rhythm-bar:nth-child(2) { animation-delay: 0.1s; }
.rhythm-bar:nth-child(3) { animation-delay: 0.2s; }
.rhythm-bar:nth-child(4) { animation-delay: 0.15s; }
.rhythm-bar:nth-child(5) { animation-delay: 0.05s; }
.rhythm-bar:nth-child(6) { animation-delay: 0.25s; }
.rhythm-bar:nth-child(7) { animation-delay: 0.12s; }

@keyframes rhythmBounce {
  from { height: 4px; opacity: 0.4; }
  to { height: 22px; opacity: 1; }
}

/* Logo SVG */
.logo-svg {
  display: none !important;
}

/* Hero particles canvas */
.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Hero visual — dancer & mandala */
.hero-visual {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 55%;
  height: 90%;
  z-index: 2;
  pointer-events: none;
}

.hero-mandala {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.35;
  animation: mandalaRotate 80s linear infinite;
}

.hero-mandala img {
  width: min(500px, 45vw);
  height: auto;
}

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

.hero-dancer {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  animation: dancerSway 6s ease-in-out infinite;
  filter: drop-shadow(0 0 40px rgba(232, 168, 56, 0.25));
}

.hero-dancer img {
  width: min(280px, 28vw);
  height: auto;
  opacity: 0.85;
}

@keyframes dancerSway {
  0%, 100% { transform: translateX(-50%) rotate(-2deg) translateY(0); }
  25% { transform: translateX(calc(-50% + 8px)) rotate(1deg) translateY(-10px); }
  50% { transform: translateX(-50%) rotate(2deg) translateY(-5px); }
  75% { transform: translateX(calc(-50% - 8px)) rotate(-1deg) translateY(-12px); }
}

.hero-glow-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 350px;
  height: 350px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 168, 56, 0.12) 0%, transparent 70%);
  animation: glowPulse 4s ease-in-out infinite;
}

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

/* Hero text char reveal */
.hero-line .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px) rotateX(-40deg);
}

.hero-line.revealed .char {
  animation: charReveal 0.6s var(--ease-out) forwards;
}

@keyframes charReveal {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

.hero-line--accent.revealed .char {
  color: var(--color-saffron-light);
}

/* Hero layout adjustment */
.hero-content {
  max-width: 650px;
  z-index: 3;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
}

/* Premium buttons */
.btn {
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-saffron) 0%, var(--color-saffron-light) 50%, var(--color-saffron) 100%);
  background-size: 200% 100%;
  transition: background-position 0.5s, transform 0.35s, box-shadow 0.35s;
}

.btn-primary:hover {
  background-position: 100% 0;
}

.btn-magnetic {
  transition: transform 0.2s var(--ease-out), box-shadow 0.35s, background-position 0.5s !important;
}

.btn-magnetic:hover {
  transform: translateY(-3px);
}

/* Section divider wave */
.section-divider {
  height: 60px;
  background: var(--color-bg-elevated);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath d='M0,30 C360,60 720,0 1080,30 C1260,45 1380,15 1440,30 L1440,60 L0,60 Z' fill='black'/%3E%3C/svg%3E");
  mask-size: cover;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath d='M0,30 C360,60 720,0 1080,30 C1260,45 1380,15 1440,30 L1440,60 L0,60 Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-size: cover;
}

.section-divider--down {
  margin-top: -1px;
}

/* Marquee diamond dots */
.marquee-dot {
  color: var(--color-saffron) !important;
  opacity: 0.5 !important;
  font-size: 0.6rem !important;
}

/* Class cards — premium */
.class-card {
  position: relative;
  overflow: hidden;
}

.class-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232, 168, 56, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 1;
  pointer-events: none;
}

.class-card:hover::before {
  opacity: 1;
}

.class-card-visual {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.class-svg {
  width: 80px;
  height: 80px;
  z-index: 2;
  position: relative;
  transition: transform 0.5s var(--ease-spring);
}

.class-card:hover .class-svg {
  transform: scale(1.15) rotate(5deg);
}

.class-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.class-card:hover .class-shimmer {
  transform: translateX(100%);
}

.class-card[data-discipline="garba"]:hover .class-svg {
  animation: garbaSpin 2s ease-in-out;
}

@keyframes garbaSpin {
  0%, 100% { transform: scale(1.15) rotate(5deg); }
  50% { transform: scale(1.2) rotate(185deg); }
}

.class-card[data-discipline="yoga"]:hover .class-svg {
  animation: yogaBreathe 3s ease-in-out infinite;
}

@keyframes yogaBreathe {
  0%, 100% { transform: scale(1.1); }
  50% { transform: scale(1.2); }
}

.class-card[data-discipline="bollywood"]:hover .class-svg {
  animation: bollywoodBounce 0.6s ease infinite;
}

@keyframes bollywoodBounce {
  0%, 100% { transform: scale(1.15) translateY(0); }
  50% { transform: scale(1.15) translateY(-8px); }
}

.class-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.class-link svg {
  transition: transform 0.3s var(--ease-out);
}

.class-link:hover svg {
  transform: translateX(4px);
}

/* About — photo frame */
.about-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.about-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4/5;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.about-image-wrap:hover img {
  transform: scale(1.05);
}

.about-image-frame {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(232, 168, 56, 0.3);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
  transition: inset 0.4s var(--ease-out);
}

.about-image-wrap:hover .about-image-frame {
  inset: 8px;
}

.about-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: var(--color-bg-card);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(232, 168, 56, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.about-badge img {
  width: 50px;
  height: 50px;
  animation: mandalaRotate 20s linear infinite;
}

.about-badge span {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-saffron);
  margin-top: 2px;
}

.feature-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(232, 168, 56, 0.1);
  border: 1px solid rgba(232, 168, 56, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-saffron);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-spring), background 0.3s;
}

.feature:hover .feature-icon-wrap {
  transform: scale(1.1) rotate(5deg);
  background: rgba(232, 168, 56, 0.18);
}

/* Gallery — real photos */
.gallery-item {
  position: relative;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out), filter 0.5s;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 10, 12, 0.85) 0%,
    rgba(15, 10, 12, 0.2) 40%,
    transparent 100%
  );
  opacity: 0.7;
  transition: opacity 0.4s;
}

.gallery-item:hover img {
  transform: scale(1.1);
  filter: brightness(1.1);
}

.gallery-item:hover .gallery-overlay {
  opacity: 0.9;
}

.gallery-item::after {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  letter-spacing: 0.02em;
}

.gallery-item.expanded {
  position: fixed;
  inset: 5%;
  z-index: 5000;
  grid-row: unset !important;
  grid-column: unset !important;
  border-radius: var(--radius-lg);
  cursor: zoom-out;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.gallery-item.expanded img {
  transform: scale(1);
}

/* Testimonials premium */
.testimonial-quote-mark {
  font-family: var(--font-serif);
  font-size: 8rem;
  line-height: 0.5;
  color: var(--color-saffron);
  opacity: 0.15;
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.testimonials-slider {
  position: relative;
  padding-top: var(--space-lg);
}

/* Contact icons */
.contact-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(232, 168, 56, 0.08);
  border: 1px solid rgba(232, 168, 56, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-saffron);
  flex-shrink: 0;
}

.contact-form {
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

/* Premium card borders */
.class-card,
.schedule-item,
.contact-form {
  background: linear-gradient(145deg, var(--color-bg-card), rgba(34, 24, 32, 0.8));
}

/* Header premium glass */
.header.scrolled {
  background: rgba(15, 10, 12, 0.75);
  backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Stat numbers glow */
.stat-num {
  background: linear-gradient(135deg, var(--color-cream), var(--color-saffron-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .loader-mandala,
  .hero-mandala,
  .hero-dancer,
  .hero-glow-ring,
  .garba-ring,
  .rhythm-bar,
  .logo-svg,
  .about-badge img {
    animation: none !important;
  }

  .hero-line .char {
    opacity: 1;
    transform: none;
  }

  .page-loader {
    display: none;
  }
}

/* Responsive — hero visual */
@media (max-width: 1024px) {
  .hero-visual {
    width: 100%;
    opacity: 0.4;
    right: -10%;
  }

  .hero-dancer img {
    width: 220px;
  }

  .hero-mandala img {
    width: 380px;
  }
}

@media (max-width: 768px) {
  .rhythm-pulse {
    display: none;
  }

  .about-badge {
    width: 80px;
    height: 80px;
    bottom: -10px;
    right: -10px;
  }

  .about-badge img {
    width: 36px;
    height: 36px;
  }
}

/* ============================================
   SCROLL MOTION — Premium reveals & progress
   ============================================ */

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 10001;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.04);
}

.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-fuchsia), var(--color-accent), var(--color-gold));
  box-shadow: 0 0 12px rgba(217, 70, 168, 0.6);
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* Directional reveals */
.reveal-left {
  opacity: 0;
  transform: translateX(-48px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal-right {
  opacity: 0;
  transform: translateX(48px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-spring);
}

.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible {
  opacity: 1;
  transform: none;
}

/* Section tag line draw */
.section-tag {
  position: relative;
  display: inline-block;
}

.section-tag::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-fuchsia), var(--color-accent));
  border-radius: 2px;
  transition: width 0.8s var(--ease-out) 0.2s;
}

.section-header.visible .section-tag::after,
.reveal.visible .section-tag::after {
  width: 100%;
}

/* Image clip reveal — removed (was hiding images) */

/* Floating scroll indicator pulse */
.section-header .section-title {
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.section-header:not(.visible) .section-title {
  opacity: 0;
  transform: translateY(20px);
}

.section-header.visible .section-title {
  opacity: 1;
  transform: translateY(0);
}

/* Floating scroll indicator pulse */
.hero-scroll .scroll-line {
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50% { transform: scaleY(1.3); opacity: 1; }
}

/* Marquee premium glow */
.marquee-section {
  position: relative;
}

.marquee-section::before,
.marquee-section::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.marquee-section::before {
  left: 0;
  background: linear-gradient(90deg, var(--color-bg), transparent);
}

.marquee-section::after {
  right: 0;
  background: linear-gradient(-90deg, var(--color-bg), transparent);
}

/* Card performance */
.service-card,
.class-showcase-card,
.gallery-item {
  will-change: transform;
}

/* Counter pop on finish */
.big-num.counted,
.stat-num.counted {
  animation: countPop 0.5s var(--ease-spring);
}

@keyframes countPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Reduced motion — scroll effects */
@media (prefers-reduced-motion: reduce) {
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }

  .scroll-progress {
    display: none;
  }

  .section-header .section-title {
    opacity: 1 !important;
    transform: none !important;
  }
}
