// Hero — DARK navy background per the user-provided reference image. // Header sits transparent over this; goes solid-white once user scrolls past. // Exports: Hero function Hero() { const sceneRef = React.useRef(null); const [mouse, setMouse] = React.useState({ x: 0, y: 0 }); const [parallaxOn, setParallaxOn] = React.useState(true); React.useEffect(() => { const mq = window.matchMedia('(prefers-reduced-motion: reduce)'); const update = () => setParallaxOn(!mq.matches); update(); mq.addEventListener('change', update); return () => mq.removeEventListener('change', update); }, []); const handleMouseMove = (e) => { if (!parallaxOn || !sceneRef.current) return; const rect = sceneRef.current.getBoundingClientRect(); const x = ((e.clientX - rect.left) / rect.width - 0.5) * 2; const y = ((e.clientY - rect.top) / rect.height - 0.5) * 2; setMouse({ x: Math.max(-1, Math.min(1, x)), y: Math.max(-1, Math.min(1, y)), }); }; const handleMouseLeave = () => setMouse({ x: 0, y: 0 }); const { x, y } = mouse; const parallax = ({ tx = 10, ty = 8, rot = 0, rotY = 0, rotX = 0, origin = 'center center' } = {}) => ({ transform: [ `translate3d(${x * tx}px, ${y * ty}px, 0)`, rotY ? `perspective(900px) rotateY(${x * rotY}deg)` : '', rotX ? `rotateX(${y * rotX}deg)` : '', rot ? `rotate(${x * rot + y * rot * 0.3}deg)` : '', ].filter(Boolean).join(' '), transformOrigin: origin, }); return (
{/* Left — headline + CTAs */}

Soluciones químicas para limpieza profesional

Productos de alto desempeño para higiene, desinfección y mantenimiento.

Calidad, rendimiento y respaldo para cada necesidad.
{[ { icon: 'shieldCheck', l1: 'Fórmulas de', l2: 'alto desempeño' }, { icon: 'flask', l1: 'Calidad', l2: 'garantizada' }, { icon: 'sparkles', l1: 'Respaldo y soporte', l2: 'especializado' }, ].map(item => (
{item.l1} {item.l2}
))}
{/* Right — layered animated hero scene */}
); } window.Hero = Hero;