// INIT AOS
AOS.init();

// POPUP
const popup = document.getElementById("popup");
const openBtn = document.getElementById("openBtn");
const audio = document.getElementById("audio");

openBtn.addEventListener("click", () => {
    popup.classList.add("hide");
    audio.play();
});

// COUNTDOWN
const targetDate = new Date("2026-07-26T10:00:00").getTime();

setInterval(() => {
    const now = new Date().getTime();
    const diff = targetDate - now;

    if (diff <= 0) return;

    document.getElementById("days").innerText =
        Math.floor(diff / (1000 * 60 * 60 * 24));

    document.getElementById("hours").innerText =
        Math.floor((diff / (1000 * 60 * 60)) % 24);

    document.getElementById("mins").innerText =
        Math.floor((diff / (1000 * 60)) % 60);

    document.getElementById("secs").innerText =
        Math.floor((diff / 1000) % 60);

}, 1000);