"use client"; import { motion, type HTMLMotionProps } from "framer-motion"; import { useEffect, useState, type ReactNode } from "react"; type AnimatedSectionProps = HTMLMotionProps<"section"> & { children: ReactNode; }; export default function AnimatedSection({ children, className = "", ...props }: AnimatedSectionProps) { const [canReveal, setCanReveal] = useState(false); useEffect(() => { const reduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches; const wide = window.matchMedia("(min-width: 1024px)").matches; setCanReveal(wide && !reduced); }, []); return ( {children} ); }