/* ============================================================
   LAASYA ACADEMY — ANIMATIONS & MOTION DESIGN
   ============================================================ */

/* ============================================================
   KEYFRAME DEFINITIONS
   ============================================================ */

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

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleInBounce {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  70% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(-3deg);
  }
  33% {
    transform: translateY(-18px) rotate(0deg);
  }
  66% {
    transform: translateY(-8px) rotate(3deg);
  }
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-24px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -400px 0;
  }
  100% {
    background-position: 400px 0;
  }
}

@keyframes shimmerText {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(194, 24, 91, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(194, 24, 91, 0.6), 0 0 80px rgba(212, 175, 55, 0.2);
  }
}

@keyframes pulseGoldGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  }
  50% {
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.7);
  }
}

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

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes borderGlow {
  0%, 100% { border-color: rgba(194, 24, 91, 0.3); }
  50%       { border-color: rgba(212, 175, 55, 0.8); }
}

@keyframes particleFloat {
  0%   { transform: translateY(120%) scale(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-20px) scale(1); opacity: 0; }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14%       { transform: scale(1.1); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.08); }
  70%       { transform: scale(1); }
}

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

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

@keyframes blink {
  0%, 100% { border-color: transparent; }
  50%       { border-color: var(--gold); }
}

@keyframes wave {
  0%   { transform: rotate(0deg); }
  10%  { transform: rotate(-10deg); }
   20% { transform: rotate(14deg); }
  30%  { transform: rotate(-7deg); }
  40%  { transform: rotate(13deg); }
  50%  { transform: rotate(-4deg); }
  60%  { transform: rotate(10deg); }
  70%  { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

/* ============================================================
   SCROLL REVEAL — .reveal class
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Staggered reveal delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ============================================================
   FLOATING ELEMENTS
   ============================================================ */
.floating {
  animation: float 5s ease-in-out infinite;
}

.floating-slow {
  animation: floatSlow 7s ease-in-out infinite;
}

.floating-delayed {
  animation: float 6s ease-in-out infinite;
  animation-delay: 2s;
}

/* ============================================================
   SHIMMER EFFECTS
   ============================================================ */
.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--gold) 0%,
    #fff8c0 25%,
    var(--gold) 50%,
    var(--gold-light) 75%,
    var(--gold) 100%
  );
  background-size: 400px 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s infinite linear;
}

.shimmer-bg {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 40%,
    rgba(255, 255, 255, 0.24) 50%,
    rgba(255, 255, 255, 0.12) 60%,
    transparent 100%
  );
  background-size: 400px 100%;
  animation: shimmer 2s infinite linear;
}

.animated-gradient-text {
  background: linear-gradient(
    270deg,
    var(--primary),
    var(--gold),
    var(--purple-mid),
    var(--primary-light)
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

/* ============================================================
   COUNTER ANIMATION
   ============================================================ */
.counter-number {
  animation: countUp 0.5s ease-out forwards;
}

.counter-ready {
  opacity: 1;
}

/* ============================================================
   PULSE GLOW
   ============================================================ */
.pulse-glow {
  animation: pulseGlow 2.5s ease-in-out infinite;
}

.pulse-gold-glow {
  animation: pulseGoldGlow 2.5s ease-in-out infinite;
}

/* ============================================================
   PARTICLE BACKGROUND
   ============================================================ */
.particle-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.5);
  animation: particleFloat linear infinite;
}

.particle:nth-child(1)  { left: 5%;   width: 4px;  height: 4px;  animation-duration: 12s; animation-delay: 0s;  }
.particle:nth-child(2)  { left: 15%;  width: 7px;  height: 7px;  animation-duration: 16s; animation-delay: 2s;  background: rgba(194,24,91,0.4);  }
.particle:nth-child(3)  { left: 25%;  width: 5px;  height: 5px;  animation-duration: 14s; animation-delay: 4s;  }
.particle:nth-child(4)  { left: 35%;  width: 8px;  height: 8px;  animation-duration: 18s; animation-delay: 1s;  background: rgba(212,175,55,0.3); }
.particle:nth-child(5)  { left: 45%;  width: 4px;  height: 4px;  animation-duration: 13s; animation-delay: 6s;  }
.particle:nth-child(6)  { left: 55%;  width: 6px;  height: 6px;  animation-duration: 15s; animation-delay: 3s;  background: rgba(194,24,91,0.3); }
.particle:nth-child(7)  { left: 65%;  width: 5px;  height: 5px;  animation-duration: 17s; animation-delay: 5s;  }
.particle:nth-child(8)  { left: 75%;  width: 9px;  height: 9px;  animation-duration: 20s; animation-delay: 0.5s; background: rgba(212,175,55,0.4); }
.particle:nth-child(9)  { left: 85%;  width: 4px;  height: 4px;  animation-duration: 12s; animation-delay: 7s;  }
.particle:nth-child(10) { left: 95%;  width: 6px;  height: 6px;  animation-duration: 14s; animation-delay: 2.5s; background: rgba(194,24,91,0.35); }

/* ============================================================
   HERO-SPECIFIC ANIMATION CLASSES
   ============================================================ */
.hero-animate-1 { animation: fadeInUp 0.9s ease both; animation-delay: 0.1s; }
.hero-animate-2 { animation: fadeInUp 0.9s ease both; animation-delay: 0.3s; }
.hero-animate-3 { animation: fadeInUp 0.9s ease both; animation-delay: 0.5s; }
.hero-animate-4 { animation: fadeInUp 0.9s ease both; animation-delay: 0.7s; }

/* ============================================================
   PAGE TRANSITION
   ============================================================ */
.page-transition {
  animation: fadeInUp 0.6s ease both;
}

/* ============================================================
   CARD HOVER EFFECTS
   ============================================================ */
.card-hover-lift {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: 0 32px 80px rgba(194, 24, 91, 0.22);
}

/* ============================================================
   ROTATING BORDER GRADIENT
   ============================================================ */
.border-animate {
  animation: borderGlow 2.5s ease-in-out infinite;
}

/* ============================================================
   WAVE EMOJI
   ============================================================ */
.wave {
  display: inline-block;
  animation: wave 1.5s ease-in-out;
  transform-origin: 70% 70%;
}

/* ============================================================
   SPIN ON HOVER
   ============================================================ */
.spin-hover:hover {
  animation: spinOnce 0.5s ease;
}

/* ============================================================
   TYPEWRITER EFFECT
   ============================================================ */
.typewriter {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--gold);
  width: 0;
  animation:
    typewriter 3s steps(40) 0.5s forwards,
    blink 0.75s step-end infinite;
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(194, 24, 91, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: rotateSlow 0.8s linear infinite;
  display: inline-block;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, #f0e6f0 25%, #fde8f5 50%, #f0e6f0 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

.skeleton-text  { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 24px; margin-bottom: 12px; width: 70%; }
.skeleton-img   { height: 200px; }
