/**
 * AOS (Animate On Scroll) plugin (client-only).
 * Initializes scroll animations across the app.
 */
import AOS from 'aos'
import 'aos/dist/aos.css'

export default defineNuxtPlugin(() => {
  AOS.init({
    duration: 800,
    easing: 'ease-in',
    once: true,
    offset: 50,
  })

  // Refresh AOS on route change (SPA navigation)
  const router = useRouter()
  router.afterEach(() => {
    setTimeout(() => AOS.refresh(), 500)
  })
})
