"use client"; import { Fragment } from "react"; import Image from "next/image"; import { motion, useReducedMotion } from "framer-motion"; import { MaterialIcon } from "@/components/ui/MaterialIcon"; import { viewport } from "@/lib/animations"; const EASE = [0.22, 1, 0.36, 1] as [number, number, number, number]; const PROOF_ITEMS = [ { label: "Verified", text: "Local Stores", icon: "store" }, { label: "2km", text: "Neighbourhood Coverage", icon: "location_on" }, { label: "Growing", text: "Customer Community", icon: "mood" }, { label: "Trusted", text: "Local Platform", icon: "star" }, ]; const heroStagger = { hidden: {}, visible: { transition: { staggerChildren: 0.12, delayChildren: 0.05 } }, }; const badgeVariant = { hidden: { opacity: 0, y: 10, scale: 0.95 }, visible: { opacity: 1, y: 0, scale: 1, transition: { duration: 0.38, ease: EASE } }, }; // Lines stagger internally const lineStagger = { hidden: {}, visible: { transition: { staggerChildren: 0.09 } }, }; // True mask reveal: text slides up from below a clipping parent const lineReveal = { hidden: { y: "110%" }, visible: { y: 0, transition: { duration: 0.72, ease: EASE } }, }; const descVariant = { hidden: { opacity: 0, y: 18 }, visible: { opacity: 1, y: 0, transition: { duration: 0.55, ease: EASE } }, }; const statStagger = { hidden: {}, visible: { transition: { staggerChildren: 0.08 } }, }; const statItem = { hidden: { opacity: 0, y: 14 }, visible: { opacity: 1, y: 0, transition: { duration: 0.45, ease: EASE } }, }; export function Hero() { const shouldReduce = useReducedMotion(); return (
{/* Badge */} Welcome to Nearle {/* H1: line-by-line mask reveal */}
Everything Local.
Everything Near.
{/* Description */} Discover verified local stores, exclusive offers, fast delivery, and a better way to shop within your neighbourhood.
{/* ─── BOTTOM PROOF STATS ROW ─── */}
{PROOF_ITEMS.map((item, idx) => (
{item.label}
{item.text}
{idx < PROOF_ITEMS.length - 1 && (
); }