
document.addEventListener("DOMContentLoaded", function () {

  const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
  const arLink = isIOS
    ? 'cup_AR_mac.usdz'
    : 'intent://arvr.google.com/scene-viewer/1.0?file=https://innolab.studio/Air-Serbia/Summer/cup_AR.glb&mode=ar_only#Intent;scheme=https;package=com.google.ar.core;action=android.intent.action.VIEW;S.browser_fallback_url=https://innolab.studio/Air-Serbia/Summer/;end;';

  document.getElementById("ar-link").setAttribute("href", arLink);
  
  animation(document.querySelector("section"), 0);



  function animation(section, delay = 0) {
    const elementsToAnimate = section.querySelectorAll(".animate"); 

    gsap.fromTo(elementsToAnimate,
      { opacity: 0, y: 50 },
      {
        opacity: 1,
        y: 0,
        duration: 1,
        delay: delay,
        stagger: 0.2,
        ease: "power2.out"
      }
    );
  }



});

