/* global React, ReactDOM, Icon, Logo, CTA, Hero, Pratica, Testimonials, Resultados, VideoTestimonials, Modules, Bonuses, Pricing, Guarantee, Certificate, FAQ, Support, Footer */ const { useState, useEffect, useRef } = React; function Nav() { const [scrolled, setScrolled] = useState(false); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 24); onScroll(); window.addEventListener("scroll", onScroll, {passive: true}); return () => window.removeEventListener("scroll", onScroll); }, []); return ( ); } function StickyCTA() { const [visible, setVisible] = useState(false); useEffect(() => { const onScroll = () => { const hero = document.querySelector(".hero"); const preco = document.getElementById("preco"); if (!hero) return; const heroBottom = hero.getBoundingClientRect().bottom; const precoTop = preco ? preco.getBoundingClientRect().top : Infinity; setVisible(heroBottom < 0 && precoTop > 200); }; onScroll(); window.addEventListener("scroll", onScroll, {passive: true}); return () => window.removeEventListener("scroll", onScroll); }, []); return (
Quero entrar no CCA
); } // Set up scroll-reveal observer once on mount function useGlobalReveal() { useEffect(() => { const io = new IntersectionObserver((entries) => { entries.forEach(e => { if (e.isIntersecting) { e.target.classList.add("is-in"); io.unobserve(e.target); } }); }, {threshold: 0.08, rootMargin: "0px 0px -6% 0px"}); const observe = () => { document.querySelectorAll(".reveal:not(.is-in)").forEach(n => io.observe(n)); }; // Initial observe, then re-observe periodically to catch React-rendered elements observe(); const interval = setInterval(observe, 400); setTimeout(() => clearInterval(interval), 4000); // Safety fallback: anything still hidden after 6s gets shown (e.g. user has no IO support) const safety = setTimeout(() => { document.querySelectorAll(".reveal:not(.is-in)").forEach(n => n.classList.add("is-in")); }, 6000); return () => { io.disconnect(); clearInterval(interval); clearTimeout(safety); }; }, []); } function App() { useGlobalReveal(); return ( <>