import { Button } from "@/components/ui/button"; import { ArrowRight, Play, Sparkles, Globe, Zap } from "lucide-react"; import { Link } from "react-router-dom"; import { motion, useScroll, useTransform, useMotionValue, useSpring } from "framer-motion"; import { useRef, useEffect } from "react"; const HeroSection = () => { const sectionRef = useRef(null); // Mouse position tracking const mouseX = useMotionValue(0); const mouseY = useMotionValue(0); // Smooth spring physics for mouse follow const springConfig = { damping: 25, stiffness: 150 }; const smoothMouseX = useSpring(mouseX, springConfig); const smoothMouseY = useSpring(mouseY, springConfig); // Different movement intensities for each orb (parallax depth) const orb1X = useTransform(smoothMouseX, [-0.5, 0.5], [-40, 40]); const orb1Y = useTransform(smoothMouseY, [-0.5, 0.5], [-40, 40]); const orb2X = useTransform(smoothMouseX, [-0.5, 0.5], [30, -30]); const orb2Y = useTransform(smoothMouseY, [-0.5, 0.5], [30, -30]); const orb3X = useTransform(smoothMouseX, [-0.5, 0.5], [-20, 20]); const orb3Y = useTransform(smoothMouseY, [-0.5, 0.5], [-25, 25]); useEffect(() => { const handleMouseMove = (e: MouseEvent) => { const { clientX, clientY } = e; const { innerWidth, innerHeight } = window; // Normalize to -0.5 to 0.5 range mouseX.set((clientX / innerWidth) - 0.5); mouseY.set((clientY / innerHeight) - 0.5); }; window.addEventListener("mousemove", handleMouseMove); return () => window.removeEventListener("mousemove", handleMouseMove); }, [mouseX, mouseY]); const { scrollYProgress } = useScroll({ target: sectionRef, offset: ["start start", "end start"] }); const backgroundY = useTransform(scrollYProgress, [0, 1], ["0%", "50%"]); const gradientScale = useTransform(scrollYProgress, [0, 1], [1, 1.5]); const contentY = useTransform(scrollYProgress, [0, 1], ["0%", "25%"]); const floatingY = useTransform(scrollYProgress, [0, 1], ["0%", "100%"]); return (
{/* Radial Gradient Background with Parallax */} {/* Primary radial gradient with mouse follow */}
{/* Secondary radial gradient with mouse follow */}
{/* Accent gradient glow with mouse follow */}
{/* Background Base */}
{/* Grid Pattern with Parallax */} {/* Animated gradient orbs with mouse follow */}
{/* Badge */} AI-Powered No-Code App Builder {/* Heading */} Convert Websites to
Native Mobile Apps
{/* Subheading */} Enter your website URL and create professional native apps in 5 minutes. No coding needed. AI handles everything automatically. {/* CTA Buttons */} {/* Stats */}
50K+
Apps Created
5 Min
Average Build Time
99.9%
Uptime SLA
{/* Floating Elements with Parallax */}
); }; export default HeroSection;