/* ============================================
   XARKLO PREMIUM ANIMATIONS
   Smooth, cinematic, interactive motion
   ============================================ */

/* ========== FADE UP ON SCROLL ========== */
@keyframes fadeUpIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fadeUpIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.fade-up-delay-1 { animation-delay: 0.1s; }
.fade-up-delay-2 { animation-delay: 0.2s; }
.fade-up-delay-3 { animation-delay: 0.3s; }
.fade-up-delay-4 { animation-delay: 0.4s; }

/* ========== STAGGERED CARD ENTRANCE ========== */
@keyframes cardEntry {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-enter {
  animation: cardEntry 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.card-enter-1 { animation-delay: 0.05s; }
.card-enter-2 { animation-delay: 0.1s; }
.card-enter-3 { animation-delay: 0.15s; }
.card-enter-4 { animation-delay: 0.2s; }
.card-enter-5 { animation-delay: 0.25s; }
.card-enter-6 { animation-delay: 0.3s; }

/* ========== HERO ENTRANCE ========== */
@keyframes heroTitle {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroSubtitle {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  animation: heroTitle 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.hero-subtitle {
  animation: heroSubtitle 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
  opacity: 0;
}

.hero-cta {
  animation: heroSubtitle 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
  opacity: 0;
}

/* ========== HOVER LIFT ========== */
@keyframes hoverLift {
  0% {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  100% {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

.hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* ========== LINK UNDERLINE ANIMATION ========== */
@keyframes linkUnderline {
  from {
    width: 0;
    left: 0;
  }
  to {
    width: 100%;
    left: 0;
  }
}

.link-underline {
  position: relative;
  text-decoration: none;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--xk-cyan);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-underline:hover::after {
  width: 100%;
}

/* ========== BUTTON GLOW ========== */
@keyframes buttonGlow {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(216, 181, 106, 0.25);
  }
  50% {
    box-shadow: 0 8px 24px rgba(216, 181, 106, 0.35);
  }
}

.btn-primary.pulse {
  animation: buttonGlow 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* ========== SMOOTH PAGE TRANSITION ========== */
@keyframes pageEnter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pageExit {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.page-enter {
  animation: pageEnter 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.page-exit {
  animation: pageExit 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ========== GLOW PULSE ========== */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 30px rgba(41, 227, 207, 0.1);
  }
  50% {
    box-shadow: 0 0 50px rgba(41, 227, 207, 0.2);
  }
}

.glow-pulse {
  animation: glowPulse 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* ========== SCROLL REVEAL ========== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== SECTION DIVIDER ANIMATION ========== */
@keyframes expandWidth {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.divider-animate {
  height: 2px;
  background: linear-gradient(90deg, var(--xk-cyan), var(--xk-gold), var(--xk-purple));
  animation: expandWidth 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  width: 0;
}

/* ========== TEXT REVEAL ========== */
@keyframes textReveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

.text-reveal {
  animation: textReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.text-reveal-1 { animation-delay: 0s; }
.text-reveal-2 { animation-delay: 0.1s; }
.text-reveal-3 { animation-delay: 0.2s; }

/* ========== COUNTER ANIMATION ========== */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.counter {
  animation: countUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.counter-1 { animation-delay: 0.2s; }
.counter-2 { animation-delay: 0.3s; }
.counter-3 { animation-delay: 0.4s; }

/* ========== PARALLAX LIGHT ========== */
@keyframes parallaxShift {
  0% {
    transform: translateY(0px);
  }
  100% {
    transform: translateY(-20px);
  }
}

.parallax-light {
  animation: parallaxShift 6s ease-in-out infinite;
}

/* ========== REDUCED MOTION PREFERENCES ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
