// site.jsx — Mount the full website + global behaviours
function R24Site() {
  // Scroll-reveal: any element with .reveal toggles .is-in once visible.
  React.useEffect(() => {
    if (typeof IntersectionObserver === "undefined") {
      document.querySelectorAll(".reveal").forEach(n => n.classList.add("is-in"));
      return;
    }
    const io = new IntersectionObserver((entries) => {
      entries.forEach(e => {
        if (e.isIntersecting) {
          e.target.classList.add("is-in");
          io.unobserve(e.target);
        }
      });
    }, { threshold: 0.12, rootMargin: "0px 0px -40px 0px" });

    const scan = () => document.querySelectorAll(".reveal:not(.is-in)").forEach(n => io.observe(n));
    scan();
    // Re-scan on layout shifts (React renders + open/close of deep-dives)
    const mo = new MutationObserver(() => scan());
    mo.observe(document.body, { subtree: true, childList: true });
    return () => { io.disconnect(); mo.disconnect(); };
  }, []);

  return (
    <>
      <R24Nav/>
      <R24Hero/>
      <TrustBand/>
      <AwardsBar/>
      <ModulesSection/>
      <PainSections/>
      <ProductSections/>
      <RoiSection/>
      <CtaBanner/>
      <ClosingSections/>
    </>
  );
}

// NOTE: render() moved to site-arch.jsx — that file owns the mount call and
// composes the new Option-A architecture. R24Site here is kept as a reference /
// fallback definition; it is no longer rendered.
window.R24Site = R24Site;
