/* ===========================================================
   Desa Duri Emas — Animation Library
   =========================================================== */

/* ---------------- KEYFRAMES ---------------- */
@keyframes loaderRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes floatY {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-12px); }
}

@keyframes scrollWheel {
  0% { transform: translateX(-50%) translateY(0); opacity: 1; }
  100% { transform: translateX(-50%) translateY(12px); opacity: 0; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0.4; }
}

/* ---------------- SCROLL REVEAL ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children reveals */
.reveal[data-delay="100"] { transition-delay: 0.1s; }
.reveal[data-delay="200"] { transition-delay: 0.2s; }
.reveal[data-delay="300"] { transition-delay: 0.3s; }
.reveal[data-delay="400"] { transition-delay: 0.4s; }

/* ---------------- HERO ENTRANCE ---------------- */
.hero-content > * {
  animation: fadeInUp 1s var(--ease-out) backwards;
}

.hero-badge { animation-delay: 0.2s; }
.hero-title { animation-delay: 0.4s; }
.hero-subtitle { animation-delay: 0.6s; }
.hero-cta { animation-delay: 0.8s; }
.scroll-indicator { animation: fadeIn 1s ease 1.5s backwards; }

/* ---------------- PULSE EFFECTS ---------------- */
.dot.peak::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  animation: pulse 2s ease-in-out infinite;
}

.timeline-month.peak { position: relative; }
.timeline-month.peak .dot { position: relative; }

/* ---------------- HOVER TRANSFORMS ---------------- */
.info-card,
.why-card,
.variety-card,
.tourism-card,
.gallery-item {
  will-change: transform;
}

/* ---------------- GRADIENT ANIMATION ---------------- */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--secondary-green), var(--gold));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.btn-primary:hover::before { opacity: 1; }

/* ---------------- SMOOTH SCROLLING ---------------- */
@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;
  }
}