/* global React */
const { useState, useEffect } = React;
const { useTweaks, TweaksPanel, TweakSection, TweakRadio, TweakToggle, TweakSelect } = window;
const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
"accent": "orange",
"headlineSize": "huge",
"showSparkles": true,
"heroLayout": "split",
"darkServices": true
}/*EDITMODE-END*/;
function applyTweaks(t) {
const root = document.documentElement;
const accents = {
orange: '#FF6309',
coral: '#E8542B',
amber: '#E8A02B',
forest: '#2B7F4E',
};
root.style.setProperty('--orange', accents[t.accent] || '#FF6309');
root.dataset.headline = t.headlineSize;
root.dataset.sparkles = t.showSparkles ? 'on' : 'off';
root.dataset.heroLayout = t.heroLayout;
}
function App() {
const [tweaks, setTweak] = useTweaks(TWEAK_DEFAULTS);
useEffect(() => { applyTweaks(tweaks); }, [tweaks]);
// Reveal-on-scroll
useEffect(() => {
const obs = new IntersectionObserver((entries) => {
entries.forEach(e => { if (e.isIntersecting) e.target.classList.add('in'); });
}, { threshold: 0.12 });
document.querySelectorAll('.reveal').forEach(el => obs.observe(el));
return () => obs.disconnect();
}, []);
const { Nav, Hero } = window.SiteCommon;
const { Manifesto, Shifts, ValueBridge } = window.SiteMid;
const { Approach, Services } = window.SiteServices;
const { Founders, MarqueeStrip, Contact, Footer } = window.SiteFoot;
return (
<>
setTweak('accent', v)}
options={['orange','coral','amber','forest']}
/>
setTweak('showSparkles', v)}
/>
setTweak('headlineSize', v)}
options={['standard','huge']}
/>
setTweak('darkServices', v)}
/>
>
);
}
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render();