window.onload = function(){

    const opening=document.getElementById("opening");

    const button=document.getElementById("openInvitation");

    const music=document.getElementById("bgMusic");

    document.documentElement.style.overflow="hidden";
    document.body.style.overflow="hidden";

    button.onclick=function(){

        music.play().catch(()=>{});

        document.documentElement.style.overflow="";
        document.body.style.overflow="";

        opening.style.opacity="0";

        opening.style.pointerEvents="none";

        setTimeout(()=>{

            opening.remove();

        },900);

    }

}