/* ═══════════════════════════════════════════════════════════════════════════
   ELITE+ PREMIUM EFFECTS - CSS
   Adds premium micro-interactions and animations to site pages
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   1. SCROLL PROGRESS BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7);
  z-index: 9999;
  transition: width 0.05s linear;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   2. CUSTOM CURSOR (Desktop only)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (hover: hover) and (pointer: fine) {
  .cursor-dot {
    width: 6px;
    height: 6px;
    background: #6366f1;
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    transition:
      opacity 0.3s ease,
      transform 0.1s ease;
    mix-blend-mode: difference;
  }

  .cursor-ring {
    width: 36px;
    height: 36px;
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99998;
    opacity: 0;
    transition:
      opacity 0.3s ease,
      transform 0.15s ease-out,
      width 0.2s ease,
      height 0.2s ease,
      border-color 0.2s ease;
  }

  body:hover .cursor-dot,
  body:hover .cursor-ring {
    opacity: 1;
  }

  .cursor-ring.hovering {
    width: 50px;
    height: 50px;
    border-color: rgba(99, 102, 241, 0.8);
    background: rgba(99, 102, 241, 0.1);
  }

  .cursor-ring.clicking {
    transform: scale(0.8);
  }
}

/* Hide custom cursor on touch devices */
@media (hover: none) {
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   3. SCROLL-TRIGGERED ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Fade in from bottom */
[data-animate="fade-up"] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate="fade-up"].animated {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in from left */
[data-animate="fade-left"] {
  opacity: 0;
  transform: translateX(-40px);
  transition:
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate="fade-left"].animated {
  opacity: 1;
  transform: translateX(0);
}

/* Fade in from right */
[data-animate="fade-right"] {
  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate="fade-right"].animated {
  opacity: 1;
  transform: translateX(0);
}

/* Scale in */
[data-animate="scale-up"] {
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate="scale-up"].animated {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delay classes */
[data-delay="1"] {
  transition-delay: 0.1s;
}
[data-delay="2"] {
  transition-delay: 0.2s;
}
[data-delay="3"] {
  transition-delay: 0.3s;
}
[data-delay="4"] {
  transition-delay: 0.4s;
}
[data-delay="5"] {
  transition-delay: 0.5s;
}

/* ═══════════════════════════════════════════════════════════════════════════
   4. PARALLAX EFFECT
   ═══════════════════════════════════════════════════════════════════════════ */
[data-parallax] {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ═══════════════════════════════════════════════════════════════════════════
   5. MAGNETIC BUTTON EFFECT
   ═══════════════════════════════════════════════════════════════════════════ */
.magnetic-btn {
  position: relative;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   6. TILT EFFECT ON CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.3s ease-out;
  will-change: transform;
}

.tilt-card-inner {
  transform: translateZ(20px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   7. GLOW HOVER EFFECT
   ═══════════════════════════════════════════════════════════════════════════ */
.glow-card {
  position: relative;
  overflow: hidden;
}

.glow-card::before {
  content: "";
  position: absolute;
  top: var(--glow-y, 50%);
  left: var(--glow-x, 50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

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

.glow-card > * {
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   8. SHIMMER ANIMATION
   ═══════════════════════════════════════════════════════════════════════════ */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 50%,
    transparent 100%
  );
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   9. BUTTON RIPPLE EFFECT
   ═══════════════════════════════════════════════════════════════════════════ */
.ripple-btn {
  position: relative;
  overflow: hidden;
}

.ripple-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple-effect 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes ripple-effect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   10. ANIMATED NUMBER COUNTERS
   ═══════════════════════════════════════════════════════════════════════════ */
.count-up {
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════════════════════
   11. ENHANCED CARD HOVER
   ═══════════════════════════════════════════════════════════════════════════ */
.hover-glow {
  position: relative;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.hover-glow::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.hover-glow:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

.hover-glow:hover::after {
  opacity: 0.15;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EXTRA: FLOATING ANIMATION
   ═══════════════════════════════════════════════════════════════════════════ */
.float {
  animation: float 6s ease-in-out infinite;
}

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

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

/* ═══════════════════════════════════════════════════════════════════════════
   EXTRA: GRADIENT TEXT ANIMATION
   ═══════════════════════════════════════════════════════════════════════════ */
.gradient-text-animated {
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7, #6366f1);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

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

  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
  }

  .scroll-progress {
    display: none;
  }
}
