// FOLGORE — Mechanical hero animation
// Pure SVG/CSS: animated pistons, gears, control cables, oscilloscope readout.
// Black canvas, white linework. Editorial industrial.
const { useEffect, useRef } = React;
function MechanicalHero({ enabled = true }){
const wrapRef = useRef(null);
useEffect(() => {
// Mouse parallax for the whole rig
const onMove = (e) => {
if (!wrapRef.current) return;
const x = (e.clientX / window.innerWidth - 0.5) * 14;
const y = (e.clientY / window.innerHeight - 0.5) * 10;
wrapRef.current.style.setProperty('--px', x + 'px');
wrapRef.current.style.setProperty('--py', y + 'px');
};
window.addEventListener('mousemove', onMove);
return () => window.removeEventListener('mousemove', onMove);
}, []);
if (!enabled){
// Static fallback — still on-brand
return (
);
}
return (
{/* Decorative HUD outside SVG (HTML for crisp text) */}
01 ENGINE OK
02 CALIBRATED
03 LIVE FEED
);
}
window.MechanicalHero = MechanicalHero;