"use client" import { useEffect, useRef } from "react" import { useReducedMotion } from "@/hooks/use-parallax" export function BackgroundStrata() { const layerRef = useRef(null) const reducedMotion = useReducedMotion() useEffect(() => { if (reducedMotion) { return } const target = layerRef.current if (!target) { return } let frame = 0 const animate = () => { const offset = window.scrollY * 0.08 target.style.transform = `translate3d(0, ${offset}px, 0)` frame = requestAnimationFrame(animate) } frame = requestAnimationFrame(animate) return () => cancelAnimationFrame(frame) }, [reducedMotion]) return (
) }