// Me Financially Free — App entry

function App() {
  const [bookingOpen, setBookingOpen] = React.useState(false);
  const openBooking = () => setBookingOpen(true);

  // After React has rendered, honor any #hash in the URL (cross-page links to #tiers etc.)
  React.useEffect(() => {
    if (window.location.hash) {
      const id = window.location.hash.slice(1);
      requestAnimationFrame(() => {
        const el = document.getElementById(id);
        if (el) el.scrollIntoView({ behavior: 'auto', block: 'start' });
      });
    }
  }, []);

  return (
    <>
      <Nav openBooking={openBooking} />
      <Hero openBooking={openBooking} />
      <Marquee />
      <Story />
      <MicSection />
      <StatsBand />
      <Tiers openBooking={openBooking} />
      <Process openBooking={openBooking} />
      <Testimonials />
      <FAQ />
      <FinalCTA openBooking={openBooking} />
      <Footer />
      <BookingModal open={bookingOpen} onClose={() => setBookingOpen(false)} />
    </>
  );
}

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