/* Maison Silya — the signature digital moment: "The Unveiling". A slow, once-per-session unroll of the hero piece on a dark gallery stage, with a travelling rolling-edge shadow, a drifting key light, progressive text and elegant scroll parallax. The visible end-state is the base style; animation runs only when .is-playing is set and is skipped for reduced-motion / repeat visits / no-JS. */ function HeroCinematic({ onNav, heroImage }) { const rootRef = React.useRef(null); const rugRef = React.useRef(null); const contentRef = React.useRef(null); const cueRef = React.useRef(null); const reduced = typeof window !== 'undefined' && window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches; React.useEffect(() => { const root = rootRef.current; if (!root) return; let seen = false; try { seen = sessionStorage.getItem('ms-hero-seen') === '1'; } catch (e) {} if (reduced || seen) { root.classList.add('is-instant'); } else { const id = requestAnimationFrame(() => requestAnimationFrame(() => root.classList.add('is-playing'))); try { sessionStorage.setItem('ms-hero-seen', '1'); } catch (e) {} return () => cancelAnimationFrame(id); } }, []); React.useEffect(() => { if (reduced) return; const scroller = document.getElementById('ms-scroll'); if (!scroller) return; let raf = 0; const onScroll = () => { if (raf) return; raf = requestAnimationFrame(() => { raf = 0; const vh = window.innerHeight || 800; const f = Math.min(scroller.scrollTop, vh); if (scroller.scrollTop > vh * 1.25) return; if (rugRef.current) rugRef.current.style.transform = `translateY(${f * 0.28}px) scale(${1 + f * 0.00009})`; if (contentRef.current) { contentRef.current.style.transform = `translateY(${f * -0.14}px)`; contentRef.current.style.opacity = String(Math.max(0, 1 - f / (vh * 0.6))); } if (cueRef.current) cueRef.current.style.opacity = String(Math.max(0, 1 - f / (vh * 0.22))); }); }; scroller.addEventListener('scroll', onScroll, { passive: true }); return () => { scroller.removeEventListener('scroll', onScroll); if (raf) cancelAnimationFrame(raf); }; }, []); const mono = !heroImage; return (
{mono &&
} {mono &&
} {mono && {t('hero.plate')}}
{t('hero.eyebrow')}

{t('hero.title1')} {t('hero.title2')}

onNav('signature')}>{t('hero.cta1')} onNav('philosophy')}>{t('hero.cta2')}
{t('hero.scroll')}
Silya
); } Object.assign(window, { HeroCinematic });