/* =============================================================
   ANIMATIONS.CSS — High-End Keyframes & Transitions
   ============================================================= */

/* ─── Premium Scroll Reveal ─── */
/* Using a luxurious 'snap' curve (Out-Quart variant) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s var(--transition-smooth), 
              transform 1.2s var(--transition-smooth);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--scale {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 1.5s var(--transition-smooth), 
              transform 1.5s var(--transition-smooth);
}

.reveal--scale.visible {
  opacity: 1;
  transform: scale(1);
}

.reveal--scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal--scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered entry for grids */
.stagger-children .reveal:nth-child(1) { transition-delay: 0.1s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.2s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.3s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.4s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.5s; }

/* ─── Hero Transitions ─── */
@keyframes heroEntrance {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero__title {
  animation: heroEntrance 1.8s var(--transition-smooth) 0.2s both;
}

/* ─── Magnetic Hover Logic (Controlled via JS) ─── */
.magnetic-wrap {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ─── Live Indicator Redesign ─── */
@keyframes pulseDot {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(2.5); opacity: 0; }
}

.live-dot {
  width: 10px;
  height: 10px;
  background: var(--color-gold-vivid);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  box-shadow: 0 0 10px var(--color-gold-metallic);
}

.live-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--color-gold-vivid);
  animation: pulseDot 1.5s infinite;
}

/* ─── Smooth Anchor Transition ─── */
html {
  scroll-behavior: smooth;
}

/* ─── Utility: Entrance Delays ─── */
.delay-100 { animation-delay: 0.1s !important; transition-delay: 0.1s !important; }
.delay-200 { animation-delay: 0.2s !important; transition-delay: 0.2s !important; }
.delay-300 { animation-delay: 0.3s !important; transition-delay: 0.3s !important; }
.delay-400 { animation-delay: 0.4s !important; transition-delay: 0.4s !important; }
.delay-500 { animation-delay: 0.5s !important; transition-delay: 0.5s !important; }

/* ─── Text Reveal ─── */
@keyframes maskReveal {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.reveal-text {
  animation: maskReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Removed Premium Gold Text Shine for stability */

/* ─── Glass Card Shine (Brighter) ─── */
.glass-card {
  position: relative;
  overflow: hidden;
}

.glass-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 215, 0, 0.25),
    transparent
  );
  transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover::after {
  left: 150%;
}

/* ─── Transitions Redesign ─── */
.btn, .navbar__link, .glass-card, .achiever-card {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.2) contrast(1.1);
}

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

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
