// app.jsx — Instituto Jurídico Juiz Odilon const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "heroVariant": "contemporaneo", "density": "regular", "serifWeight": 500, "monogramaPresence": "destaque", "accentTone": "navyGold" }/*EDITMODE-END*/; function App() { const [t, setTweak] = useTweaks(TWEAK_DEFAULTS); const [page, setPage] = useState(() => { const h = (window.location.hash || "").replace("#", ""); return ["home", "cursos", "publicacoes", "sobre", "contato"].includes(h) ? h : "home"; }); // Apply tweaks to CSS variables useEffect(() => { const root = document.documentElement; root.style.setProperty("--serif-weight-display", t.serifWeight); root.style.setProperty("--section-y", t.density === "compact" ? "80px" : t.density === "espaçoso" ? "160px" : "120px"); // Tone palette if (t.accentTone === "noite") { root.style.setProperty("--navy-900", "#0a0a14"); root.style.setProperty("--navy-800", "#13131e"); root.style.setProperty("--navy-700", "#1f1f2e"); } else if (t.accentTone === "navyVerde") { root.style.setProperty("--navy-900", "#0c2018"); root.style.setProperty("--navy-800", "#102a20"); root.style.setProperty("--navy-700", "#173a2e"); } else { root.style.setProperty("--navy-900", "#0a1a33"); root.style.setProperty("--navy-800", "#0f2444"); root.style.setProperty("--navy-700", "#173258"); } }, [t.serifWeight, t.density, t.accentTone]); // Sync hash + scroll const handleNavigate = (id) => { setPage(id); window.history.replaceState(null, "", `#${id}`); window.scrollTo({ top: 0, behavior: "smooth" }); }; useEffect(() => { const onHash = () => { const h = (window.location.hash || "").replace("#", ""); if (["home", "cursos", "publicacoes", "sobre", "contato"].includes(h)) setPage(h); }; window.addEventListener("hashchange", onHash); return () => window.removeEventListener("hashchange", onHash); }, []); // dark nav on hero/dark page heads const darkNav = page === "home" ? false : true; // page-head is dark on all interior pages, but nav should be light overlay... let's keep light on top. return (