(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const c of t.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function i(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function r(e){if(e.ep)return;e.ep=!0;const t=i(e);fetch(e.href,t)}})();document.addEventListener("DOMContentLoaded",()=>{const o={root:null,rootMargin:"0px",threshold:.1},n=new IntersectionObserver(r=>{r.forEach((e,t)=>{e.isIntersecting&&(setTimeout(()=>{e.target.classList.add("visible")},t*200),n.unobserve(e.target))})},o);document.querySelectorAll(".fade-in, .slide-up, .section").forEach(r=>n.observe(r))});function m(){const o=document.querySelector(".header"),n=document.getElementById("nav-toggle"),i=document.getElementById("nav-menu"),r=document.querySelectorAll(".header__link");let e=!1;window.addEventListener("scroll",()=>{e||(window.requestAnimationFrame(()=>{o.classList.toggle("is-scrolled",window.scrollY>30),e=!1}),e=!0)}),n&&i&&(n.addEventListener("click",()=>{const s=i.classList.toggle("is-open");n.classList.toggle("is-active"),o.classList.toggle("menu-open",s),s?document.body.style.overflow="hidden":document.body.style.overflow="auto"}),r.forEach(s=>{s.addEventListener("click",()=>{window.innerWidth<=991&&(i.classList.remove("is-open"),n.classList.remove("is-active"),o.classList.remove("menu-open"),document.body.style.overflow="auto")})}),window.addEventListener("resize",()=>{window.innerWidth>991&&i.classList.contains("is-open")&&(i.classList.remove("is-open"),n.classList.remove("is-active"),o.classList.remove("menu-open"),document.body.style.overflow="auto")}));const t=document.querySelectorAll("section[id]"),c=new IntersectionObserver(s=>{s.forEach(a=>{if(a.isIntersecting){const d=a.target.getAttribute("id");r.forEach(l=>{l.classList.toggle("active",l.getAttribute("href")===`#${d}`)})}})},{rootMargin:"-30% 0px -60% 0px",threshold:0});t.forEach(s=>c.observe(s)),document.querySelectorAll('a[href^="#"]').forEach(s=>{s.addEventListener("click",function(a){const d=this.getAttribute("href").substring(1);if(!d)return;const l=document.getElementById(d);if(l){a.preventDefault();const u=o.offsetHeight,f=l.getBoundingClientRect().top+window.pageYOffset-u-20;window.scrollTo({top:f,behavior:"smooth"})}})}),console.log("%cHeader místico inicializado ✨","color:#d4af37;font-weight:bold")}document.addEventListener("DOMContentLoaded",()=>{m(),console.log("App initialized"),particlesJS("particles-js",{particles:{number:{value:80,density:{enable:!0,value_area:800}},color:{value:"#d4af37"},shape:{type:"circle"},opacity:{value:.5,random:!1},size:{value:3,random:!0},line_linked:{enable:!0,distance:150,color:"#ff8c00",opacity:.4,width:1},move:{enable:!0,speed:2,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!0,mode:"repulse"},onclick:{enable:!0,mode:"push"},resize:!0},modes:{repulse:{distance:200,duration:.4},push:{particles_nb:4}}},retina_detect:!0})});window.addEventListener("load",()=>{const o=document.querySelector(".preloader");o&&(o.classList.add("fade-out"),setTimeout(()=>{o.style.display="none"},800))});