//Mobile Get Started Pop Up///
// Close actions
closeBtn.addEventListener('click', closeModal);
closeBtn.addEventListener('touchstart', closeModal, { passive: true });
modal.addEventListener('click', function(e) {
if (e.target === modal) closeModal();
});
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape' && modal.classList.contains('active')) closeModal();
});
}
// Init now
initModal();
// Re-init after Squarespace AJAX loads
if (window.Squarespace && window.Squarespace.onInitialize) {
window.Squarespace.onInitialize(window.Y, initModal);
}
window.addEventListener('load', initModal);
document.addEventListener('DOMContentLoaded', initModal);
// Watch for DOM changes from AJAX navigation and rebind
try {
var lastUrl = location.href;
new MutationObserver(function() {
var url = location.href;
if (url !== lastUrl) {
lastUrl = url;
setTimeout(initModal, 300);
}
}).observe(document.body, { childList: true, subtree: true });
} catch(e) {}
})();
//more code//