/* MAISON ALMA — main mount + tweaks Persistent tweak defaults below survive direct-manipulation edits. */ const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "palette": "paper", "accent": "#1A2A4A", "serif": "cormorant", "showFab": true }/*EDITMODE-END*/; const PALETTES = { paper: { paper: '#F4F1EB', stone: '#E7E1D4', line: '#D8D1C0', muted: '#6B6760', ink: '#16181B' }, sand: { paper: '#EFE6D5', stone: '#E0D4BB', line: '#CFC1A2', muted: '#6F664F', ink: '#1A1815' }, noir: { paper: '#15171A', stone: '#1F2226', line: '#2A2D31', muted: '#8A8780', ink: '#F0EDE7' }, pearl: { paper: '#F5F4F1', stone: '#E9E7E2', line: '#D5D2CB', muted: '#73706A', ink: '#16181B' }, }; const ACCENTS = { '#1A2A4A': { val: 'oklch(0.35 0.06 250)', soft: 'oklch(0.86 0.02 250)', focus: 'oklch(0.55 0.13 250)' }, '#7A5A2E': { val: 'oklch(0.46 0.06 65)', soft: 'oklch(0.88 0.025 65)', focus: 'oklch(0.6 0.13 65)' }, '#2A4A38': { val: 'oklch(0.38 0.06 155)', soft: 'oklch(0.87 0.025 155)', focus: 'oklch(0.55 0.13 155)' }, '#7A2A2E': { val: 'oklch(0.42 0.08 22)', soft: 'oklch(0.88 0.025 22)', focus: 'oklch(0.55 0.15 22)' }, }; const SERIFS = { cormorant: '"Cormorant Garamond", "EB Garamond", Georgia, serif', playfair: '"Playfair Display", Georgia, serif', bodoni: '"Bodoni Moda", "Didot", Georgia, serif', fraunces: '"Fraunces", Georgia, serif', }; function applyTweaks(t) { const root = document.documentElement.style; const pal = PALETTES[t.palette] || PALETTES.paper; const acc = ACCENTS[t.accent] || ACCENTS['#1A2A4A']; root.setProperty('--paper', pal.paper); root.setProperty('--stone', pal.stone); root.setProperty('--line', pal.line); root.setProperty('--muted', pal.muted); root.setProperty('--ink', pal.ink); root.setProperty('--ink-2', pal.line); root.setProperty('--accent', acc.val); root.setProperty('--accent-soft', acc.soft); root.setProperty('--focus', acc.focus); root.setProperty('--serif', SERIFS[t.serif] || SERIFS.cormorant); const fab = document.querySelector('.fab'); if (fab) fab.style.display = t.showFab ? '' : 'none'; } // extra font preloads for tweak options (function preloadExtras() { const link = document.createElement('link'); link.rel = 'stylesheet'; link.href = 'https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;1,400&family=Bodoni+Moda:ital,wght@0,400;0,500;1,400&family=Fraunces:ital,wght@0,300;0,400;1,300;1,400&display=swap'; document.head.appendChild(link); })(); function App() { const [route, setRoute] = React.useState('home'); const [tweaks, setTweak] = useTweaks(TWEAK_DEFAULTS); React.useEffect(() => { applyTweaks(tweaks); }, [tweaks]); React.useEffect(() => { window.scrollTo({ top: 0, behavior: 'instant' }); }, [route]); const view = (() => { switch (route) { case 'home': return ; case 'development': return ; case 'area': return ; case 'listing': return ; case 'valuation': return ; case 'journal': return ; case 'about': return ; default: return ; } })(); return (