import { useRef, useState, type WheelEvent } from "react" import { AnimatePresence, motion } from "framer-motion" import { BadgeCheck, Building2, Code2, PanelsTopLeft, Ship, ShoppingBag, Sparkles, type LucideIcon, } from "lucide-react" type FeatureItem = { id: string label: string eyebrow: string title: string description: string icon: LucideIcon image: string imagePosition?: string backdrop: string } const featureItems: FeatureItem[] = [ { id: "editorial", label: "Editorial", eyebrow: "PERSONAL STORIES", title: "Make every point of view feel cinematic.", description: "Shape thoughtful portfolios, journals, and personal sites around your strongest visual narrative.", icon: Sparkles, image: "https://images.unsplash.com/photo-1498050108023-c5249f4df085?auto=format&fit=crop&w=2200&q=86", backdrop: "bg-[radial-gradient(circle_at_18%_44%,rgba(78,92,126,0.42),transparent_30%),radial-gradient(circle_at_76%_24%,rgba(71,112,126,0.3),transparent_34%),linear-gradient(135deg,#090b12_0%,#141824_50%,#0b0d13_100%)]", }, { id: "brand", label: "Brand sites", eyebrow: "BRAND EXPERIENCES", title: "Turn a bold identity into a memorable world.", description: "Pair expressive art direction with clear storytelling for launches, campaigns, and brand moments.", icon: BadgeCheck, image: "https://images.unsplash.com/photo-1557683316-973673baf926?auto=format&fit=crop&w=2200&q=86", backdrop: "bg-[radial-gradient(circle_at_22%_45%,rgba(112,76,154,0.4),transparent_32%),radial-gradient(circle_at_78%_24%,rgba(195,104,85,0.28),transparent_35%),linear-gradient(135deg,#100b17_0%,#21172a_52%,#0c0b10_100%)]", }, { id: "corporate", label: "Company", eyebrow: "COMPANY WEBSITES", title: "Build trust before the first conversation.", description: "Present your team, work, and expertise through an editorial experience designed for credibility.", icon: Building2, image: "https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=2200&q=86", backdrop: "bg-[radial-gradient(circle_at_18%_45%,rgba(48,66,96,0.5),transparent_34%),radial-gradient(circle_at_76%_28%,rgba(200,158,76,0.2),transparent_33%),linear-gradient(135deg,#08111f_0%,#182339_54%,#090d16_100%)]", }, { id: "global", label: "Global", eyebrow: "GLOBAL LAUNCHES", title: "Speak clearly to audiences everywhere.", description: "Create focused multilingual experiences that carry your story confidently across markets.", icon: Ship, image: "https://images.unsplash.com/photo-1461749280684-dccba630e2f6?auto=format&fit=crop&w=2200&q=86", backdrop: "bg-[radial-gradient(circle_at_21%_42%,rgba(42,125,136,0.38),transparent_32%),radial-gradient(circle_at_78%_31%,rgba(199,88,48,0.24),transparent_34%),linear-gradient(135deg,#071117_0%,#142931_50%,#0b0d10_100%)]", }, { id: "commerce", label: "Commerce", eyebrow: "COMMERCE EXPERIENCES", title: "Give every product room to be desired.", description: "Blend tactile imagery, considered details, and frictionless discovery into a modern storefront.", icon: ShoppingBag, image: "https://images.unsplash.com/photo-1441986300917-64674bd600d8?auto=format&fit=crop&w=2200&q=86", imagePosition: "object-center", backdrop: "bg-[radial-gradient(circle_at_20%_46%,rgba(186,112,62,0.38),transparent_31%),radial-gradient(circle_at_78%_26%,rgba(229,184,114,0.22),transparent_34%),linear-gradient(135deg,#130d0b_0%,#271815_52%,#0d0c0b_100%)]", }, { id: "tools", label: "Digital tools", eyebrow: "DIGITAL PRODUCTS", title: "Make powerful software feel effortless.", description: "Explain complex products with simple flows, sharp hierarchy, and just enough personality.", icon: Code2, image: "https://images.unsplash.com/photo-1555066931-4365d14bab8c?auto=format&fit=crop&w=2200&q=86", backdrop: "bg-[radial-gradient(circle_at_20%_44%,rgba(41,133,119,0.38),transparent_31%),radial-gradient(circle_at_78%_26%,rgba(70,97,145,0.26),transparent_34%),linear-gradient(135deg,#061114_0%,#112526_52%,#080d11_100%)]", }, { id: "platforms", label: "Platforms", eyebrow: "CONNECTED PLATFORMS", title: "Bring every workflow into one clear view.", description: "Design focused dashboards and internal platforms that help teams move with confidence.", icon: PanelsTopLeft, image: "https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=2200&q=86", backdrop: "bg-[radial-gradient(circle_at_20%_44%,rgba(55,91,142,0.4),transparent_33%),radial-gradient(circle_at_78%_25%,rgba(91,118,151,0.24),transparent_34%),linear-gradient(135deg,#08101b_0%,#14233b_52%,#080b10_100%)]", }, ] const visibleOffsets = [-2, -1, 0, 1, 2] const offsetY = [-196, -98, 0, 98, 196] function getWrappedIndex(step: number) { return (step % featureItems.length + featureItems.length) % featureItems.length } export default function Features03({ className = "" }: { className?: string }) { const [activeStep, setActiveStep] = useState(2) const wheelLock = useRef | null>(null) const activeItem = featureItems[getWrappedIndex(activeStep)] const handleWheel = (event: WheelEvent) => { if (Math.abs(event.deltaY) < 18 || wheelLock.current) return setActiveStep((current) => current + (event.deltaY > 0 ? 1 : -1)) wheelLock.current = setTimeout(() => { wheelLock.current = null }, 420) } return (
{ if (event.key === "ArrowDown" || event.key === "ArrowRight") { event.preventDefault() setActiveStep((current) => current + 1) } if (event.key === "ArrowUp" || event.key === "ArrowLeft") { event.preventDefault() setActiveStep((current) => current - 1) } }} tabIndex={0} >
) }