(function () { if (window.location.pathname !== '/' && window.location.pathname !== '') return; function showPopup() { var overlay = document.createElement('div'); overlay.className = 'inatural-overlay'; overlay.style.cssText = 'position:fixed;inset:0;z-index:999990;background:rgba(10,22,16,.75);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:1;transition:opacity .3s ease;'; overlay.innerHTML = '' + ''; document.body.appendChild(overlay); var closeTimer; var isClosing = false; function closePopup() { if (isClosing) return; isClosing = true; clearTimeout(closeTimer); overlay.style.opacity = '0'; setTimeout(function () { overlay.remove(); }, 300); } overlay.addEventListener('click', function (e) { if (e.target === overlay) { closePopup(); } }); overlay.querySelector('#inaturalClose').addEventListener('click', closePopup); closeTimer = setTimeout(closePopup, 12000); } setTimeout(showPopup, 7000); })();