import { motion, useScroll, useTransform } from 'framer-motion'; import { type ReactNode, useRef } from 'react'; import { useReducedMotion } from '@/hooks/useReducedMotion'; interface CTAFooterProps { /** Gradient + glow classes for the footer background */ gradient?: string; /** CTA content */ children: ReactNode; } export function CTAFooter({ gradient = 'bg-gradient-to-br from-primary via-primary/80 to-primary/60', children, }: CTAFooterProps) { const ref = useRef(null); const prefersReducedMotion = useReducedMotion(); const { scrollYProgress } = useScroll({ target: ref, offset: ['start end', 'end end'], }); const opacity = useTransform(scrollYProgress, [0, 1], [0, 1]); const y = useTransform(scrollYProgress, [0, 1], [60, 0]); return ( ); }