/* ══════════════════════════════════════════════════
   APP — the story, chapter by chapter + WhatsApp CTA + mount
══════════════════════════════════════════════════ */

/* wa.me returns X-Frame-Options: DENY, so the click has to become a
   top-level navigation in a new tab. See js/whatsapp-handler.js for the
   companion handler that catches plain <a href> clicks. */
const openWA = () => {
  const a = document.createElement('a');
  a.href = WA_URL;
  a.target = '_blank';
  a.rel = 'noopener noreferrer';
  a.style.display = 'none';
  document.body.appendChild(a);
  a.click();
  setTimeout(() => a.remove(), 0);
};

function App() {
  return (
    <>
      <FloatingWA/>
      <Navbar onDemo={openWA}/>
      <Hero onDemo={openWA}/>
      <PhoneExperienceSection/>
      <FlowSection/>
      <MovementScene/>
      <GeoSection/>
      <EvidenceSection/>
      <BackgroundSection/>
      <OperationSection/>
      <VideoSection onDemo={openWA}/>
      <EcosystemSection/>
      <BenefitsSection/>
      <FinalCTA onDemo={openWA}/>
      <Footer/>
    </>
  );
}

ReactDOM.createRoot(document.getElementById('root')).render(<App/>);
