/* ================================================
   animations.css — Nusabit Studio (global)
   - Animasi halus di semua halaman
   - Menghormati prefers-reduced-motion
   ================================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Page enter */
  body {
    opacity: 0;
    animation: gsPageIn 0.38s ease forwards;
  }

  @keyframes gsPageIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* Page exit (dipakai saat redirect maintenance) */
  html.gs-fade-out,
  body.gs-fade-out {
    animation: none !important;
    opacity: 0 !important;
    transition: opacity 0.26s ease !important;
  }

  /* Subtle hover lift (buat card & tombol) */
  a, button {
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  }
  a:hover, button:hover { transform: translateY(-1px); }
  a:active, button:active { transform: translateY(0); }

  /* Reveal on scroll (diaktifkan oleh assets/js/animations.js) */
  .gs-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    will-change: opacity, transform;
  }
  .gs-reveal.is-in {
    opacity: 1;
    transform: translateY(0);
  }
}
