/* ============================================
H-Arch — App shell, routing, tweaks
============================================ */
const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
"brand": "#682E92",
"hero": "copper",
"display": "fraunces"
}/*EDITMODE-END*/;
function App() {
const [route, setRoute] = useState('home');
const [openFinish, setOpenFinish] = useState(null);
const [toast, setToast] = useState('');
const [t, setTweak] = useTweaks(TWEAK_DEFAULTS);
// Apply tweak side-effects (palette / display family)
useEffect(() => {
document.documentElement.style.setProperty('--brand', t.brand);
document.documentElement.style.setProperty('--brand-deep', darken(t.brand, 0.18));
document.documentElement.style.setProperty('--brand-tint', mix(t.brand, '#FFFFFF', 0.92));
const display = {
fraunces: "'Fraunces', 'Cormorant Garamond', Georgia, serif",
cormorant: "'Cormorant Garamond', 'Fraunces', Georgia, serif",
tight: "'Inter Tight', 'Inter', sans-serif",
}[t.display] || "'Fraunces', Georgia, serif";
document.documentElement.style.setProperty('--display', display);
}, [t.brand, t.display]);
// Route → top of page
useEffect(() => { window.scrollTo({ top: 0, behavior: 'instant' }); }, [route]);
useReveal();
const handleSample = useCallback(() => {
// Pick a hero finish as a default sample request
const f = window.HARCH_DATA.FINISHES.find((x) => x.slug === 'hairline-ss');
setOpenFinish(f);
}, []);
const handleOpen = useCallback((f) => setOpenFinish(f), []);
const handleClose = useCallback(() => setOpenFinish(null), []);
// Pages render
let page;
if (route === 'home') page =
Verified brand is purple #682E92.
Alternates explore a charcoal-noir or metallic-led identity.