/* app.jsx — assembles sections */
const { useRef: useRefApp } = React;

function App() {
  const formRef = useRefApp(null);
  useReveal();

  const goRegister = () => {
    const el = document.getElementById("register");
    if (el) window.scrollTo({ top: el.getBoundingClientRect().top + window.scrollY - 20, behavior: "smooth" });
  };

  return (
    <React.Fragment>
      <Nav onRegister={goRegister} />
      <Hero variant="cinematic" onRegister={goRegister} />
      <Gallery />
      <Stats />
      <Program />
      <Houses />
      <Advantages />
      <Location />
      <Faq />
      <RegForm formRef={formRef} />
      <Footer onRegister={goRegister} />
    </React.Fragment>
  );
}

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