// main.jsx — 페이지 조립 + 렌더 (window.__PAGE__ 기준)

function HomePage() {
  return (
    <React.Fragment>
      <RealtimeCounter />
      <Header />
      <Hero />
      <RealtimeDataSection />
      <DifferenceSection />
      <TrustSection />
      <FinalCta />
      <Footer />
      <SignupNotification />
    </React.Fragment>
  );
}

function SolutionPage() {
  return (
    <React.Fragment>
      <RealtimeCounter />
      <Header />
      <ProblemSection />
      <SolutionSection />
      <FinalCta />
      <Footer />
    </React.Fragment>
  );
}

function FaqPage() {
  return (
    <React.Fragment>
      <RealtimeCounter />
      <Header />
      <FaqSection />
      <FinalCta />
      <Footer />
    </React.Fragment>
  );
}

const PAGES = { home: HomePage, solution: SolutionPage, faq: FaqPage };

function App() {
  const p = window.__PAGE__;
  let Page;
  if (p === "solution") Page = SolutionPage;
  else if (p === "faq") Page = FaqPage;
  else if (p === "features") Page = window.FeaturesPage || HomePage;
  else Page = HomePage;
  return (
    <div style={{ minHeight: "100vh", background: "#fff" }}>
      <Page />
    </div>
  );
}

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