/* ===================================================================
   ANIMASI ELEGAN & INTERAKTIF
   File: assets/css/animations.css
   Deskripsi: Keyframes, Scroll Reveal, Ambient Movement, & Hover FX
   =================================================================== */

/* Cursor Blink */
@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Pulse Dot (Status Live) */
@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Ambient Ring Pulse */
@keyframes pulseGlow {
  0%, 100% {
    transform: scale(0.98);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.6;
  }
}

/* Subtle Floating Elements */
@keyframes floatSubtle {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.floating-badge.badge-pos-left {
  animation: floatSubtle 5s ease-in-out infinite;
}

.floating-badge.badge-pos-right {
  animation: floatSubtle 6s ease-in-out infinite 1s;
}

/* Ambient Blobs Drifting */
@keyframes blobDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.06); }
}

@keyframes blobDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-25px, -30px) scale(0.94); }
}

.blob-1 { animation: blobDrift1 14s ease-in-out infinite alternate; }
.blob-2 { animation: blobDrift2 18s ease-in-out infinite alternate; }

/* ===================================================================
   SCROLL REVEAL ANIMATIONS (Intersection Observer)
   =================================================================== */
.reveal {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-up {
  transform: translateY(36px);
}

.reveal-left {
  transform: translateX(-40px);
}

.reveal-right {
  transform: translateX(40px);
}

.reveal-scale {
  transform: scale(0.92);
}

/* When in viewport */
.reveal.revealed {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Stagger Delays for child cards */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ===================================================================
   INTERACTIVE 3D CARD TILT
   =================================================================== */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.15s ease-out;
}

/* Ripple Button Effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple-circle {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: rippleAnimation 0.6s linear;
  background-color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

@keyframes rippleAnimation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Shimmer Loading / Highlight */
.shimmer-effect {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  background-size: 200% 100%;
  animation: shimmer 2.5s infinite;
}

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

/* Reduced motion preference for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

