// App + Tweaks const { useState, useEffect: useEffect2 } = React; const PALETTES = { taupe: { "--cream": "#FAF7F2", "--sage": "#B7BFAE", "--rose": "#E8C7BD", "--sand": "#E6D7C2", "--taupe": "#8A7A69", "--ink": "#2F2A24", "--accent": "#8A7A69", }, sage: { "--cream": "#F4F6F0", "--sage": "#9DAA8E", "--rose": "#E8C7BD", "--sand": "#E6D7C2", "--taupe": "#6E7A60", "--ink": "#2A2E26", "--accent": "#6E7A60", }, rose: { "--cream": "#FBF4F0", "--sage": "#B7BFAE", "--rose": "#D9A99B", "--sand": "#E6D7C2", "--taupe": "#A87767", "--ink": "#33201A", "--accent": "#A87767", }, }; const DARK = { "--cream": "#1A1612", "--sage": "#5A6353", "--rose": "#A87767", "--sand": "#3A3329", "--taupe": "#D9C9B5", "--ink": "#F2EBE0", "--line": "rgba(217, 201, 181, 0.18)", }; function applyTheme(t) { const root = document.documentElement; const pal = t.darkMode ? DARK : (PALETTES[t.palette] || PALETTES.taupe); Object.entries(pal).forEach(([k, v]) => root.style.setProperty(k, v)); if (!t.darkMode) root.style.setProperty("--line", "rgba(138, 122, 105, 0.22)"); } function App() { const [t, setTweak] = useTweaks(window.TWEAK_DEFAULTS); useEffect2(() => { applyTheme(t); }, [t]); // Global scroll-reveal — added via JS so content stays visible without JS. useEffect2(() => { const prefersReduced = window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches; if (prefersReduced) return; const targets = []; const tag = (sel, stagger) => { document.querySelectorAll(sel).forEach((el) => { if (el.classList.contains("reveal")) return; el.classList.add("reveal"); targets.push(el); }); if (stagger) { // stagger siblings within each parent group const groups = new Set(); document.querySelectorAll(sel).forEach((el) => groups.add(el.parentElement)); groups.forEach((g) => { [...g.children].filter((c) => c.classList.contains("reveal")) .forEach((c, i) => { c.style.transitionDelay = (i * 90) + "ms"; }); }); } }; tag(".section-head"); tag(".manifesto-visual"); tag(".ribbon"); tag(".universe", true); tag(".step", true); tag(".place", true); tag(".faq-item", true); tag(".devis-intro"); tag(".form"); tag(".foot-grid"); const io = new IntersectionObserver((entries) => { entries.forEach((e) => { if (e.isIntersecting) { e.target.classList.add("in"); io.unobserve(e.target); } }); }, { threshold: 0.1, rootMargin: "0px 0px -8% 0px" }); targets.forEach((el) => io.observe(el)); return () => io.disconnect(); }, []); return ( <>