// app.jsx — root App with Tweaks wiring.

const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
  "headline": "A",
  "ctaVariant": "2",
  "accent": "#02a2ff",
  "flourish": true,
  "density": "regular"
}/*EDITMODE-END*/;

function App() {
  const [t, setTweak] = useTweaks(TWEAK_DEFAULTS);

  // Apply accent globally
  React.useEffect(() => {
    const r = document.documentElement;
    r.style.setProperty("--accent", t.accent);
    // derive soft / glow from accent
    r.style.setProperty("--accent-soft", t.accent + "24");
    r.style.setProperty("--accent-glow", t.accent + "73");
  }, [t.accent]);

  return (
    <div>
      <Nav t={t} />
      <Hero t={t} setTweak={setTweak} />
      <PainSection />
      <SolutionSection />
      <ProcessSection />
      <BenefitsSection />
      <SocialProofSection />
      <OfferSection />
      <ObjectionsSection />
      <GuaranteeSection />
      <UrgencySection />
      <FAQSection />
      <FinalCTASection t={t} />
      <Footer />
      <ApplyModal />
    </div>
  );
}

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