|
| 1 | +'use client'; |
| 2 | + |
| 3 | +import { motion } from 'framer-motion'; |
| 4 | +import { Zap, Users, RefreshCw, ShieldCheck, Layers, Activity, Sparkles, ArrowRight } from 'lucide-react'; |
| 5 | +import { fadeUp, staggerContainer } from '../../components/home/motion-variants'; |
| 6 | +import { TiltCard } from '../../components/ui/TiltCard'; |
| 7 | + |
| 8 | +const featureList = [ |
| 9 | + { |
| 10 | + title: 'Flexible split rules', |
| 11 | + description: 'Split equally, assign exact amounts, or use percentages for total control over group costs.', |
| 12 | + icon: Zap, |
| 13 | + eyebrow: 'Dynamic Logic', |
| 14 | + color: 'from-purple-500 to-indigo-500', |
| 15 | + className: 'md:col-span-8', |
| 16 | + stats: '15+ split modes', |
| 17 | + }, |
| 18 | + { |
| 19 | + title: 'Dedicated group spaces', |
| 20 | + description: 'Separate contexts for roommates, trips, and teams.', |
| 21 | + icon: Users, |
| 22 | + eyebrow: 'Isolated', |
| 23 | + color: 'from-blue-500 to-cyan-500', |
| 24 | + className: 'md:col-span-4', |
| 25 | + }, |
| 26 | + { |
| 27 | + title: 'Instant balance updates', |
| 28 | + description: 'Real-time synchronization across all devices instantly.', |
| 29 | + icon: RefreshCw, |
| 30 | + eyebrow: 'Real-time', |
| 31 | + color: 'from-emerald-500 to-teal-500', |
| 32 | + className: 'md:col-span-4', |
| 33 | + }, |
| 34 | + { |
| 35 | + title: 'Receipt transparency', |
| 36 | + description: 'Attach supporting evidence so the group can confirm details without searching old message threads.', |
| 37 | + icon: ShieldCheck, |
| 38 | + eyebrow: 'Trust Layer', |
| 39 | + color: 'from-amber-500 to-orange-500', |
| 40 | + className: 'md:col-span-8', |
| 41 | + stats: 'Cloud Storage', |
| 42 | + }, |
| 43 | + { |
| 44 | + title: 'Smart settlements', |
| 45 | + description: 'Algorithmically minimizes multiple debts into the fewest practical payments.', |
| 46 | + icon: Layers, |
| 47 | + eyebrow: 'Smart Math', |
| 48 | + color: 'from-rose-500 to-pink-500', |
| 49 | + className: 'md:col-span-6', |
| 50 | + }, |
| 51 | + { |
| 52 | + title: 'Activity audit trail', |
| 53 | + description: 'Keep a comprehensive, searchable history of what changed and when group balances moved.', |
| 54 | + icon: Activity, |
| 55 | + eyebrow: 'Audit Trail', |
| 56 | + color: 'from-violet-500 to-purple-500', |
| 57 | + className: 'md:col-span-6', |
| 58 | + }, |
| 59 | +]; |
| 60 | + |
| 61 | +export function FeatureGrid() { |
| 62 | + return ( |
| 63 | + <div className="py-4"> |
| 64 | + <motion.div |
| 65 | + variants={staggerContainer} |
| 66 | + initial="hidden" |
| 67 | + whileInView="show" |
| 68 | + viewport={{ once: true, margin: '-100px' }} |
| 69 | + className="grid grid-cols-1 gap-6 md:grid-cols-12" |
| 70 | + > |
| 71 | + {featureList.map((feature, i) => ( |
| 72 | + <motion.div key={feature.title} variants={fadeUp} className={feature.className}> |
| 73 | + <TiltCard> |
| 74 | + <div className="group relative flex h-full min-h-[300px] flex-col overflow-hidden rounded-[2.5rem] border border-white/5 bg-white/[0.01] p-8 transition-all hover:border-white/10 hover:bg-white/[0.04] lg:p-12"> |
| 75 | + {/* Immersive Background Glow */} |
| 76 | + <div |
| 77 | + className={`absolute -right-12 -top-12 h-48 w-48 rounded-full bg-gradient-to-br ${feature.color} opacity-0 blur-3xl transition-opacity duration-700 group-hover:opacity-10`} |
| 78 | + /> |
| 79 | + |
| 80 | + {/* Grid Mesh Detail (Inherited from Hero) */} |
| 81 | + <div |
| 82 | + className="absolute inset-0 -z-10 opacity-[0.02]" |
| 83 | + style={{ |
| 84 | + backgroundImage: `linear-gradient(to right, rgba(255,255,255,0.1) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,0.1) 1px, transparent 1px)`, |
| 85 | + backgroundSize: '30px 30px' |
| 86 | + }} |
| 87 | + /> |
| 88 | + |
| 89 | + <div className="relative z-10 flex h-full flex-col justify-between"> |
| 90 | + <div> |
| 91 | + <div className="mb-8 flex items-center justify-between"> |
| 92 | + <div |
| 93 | + className={`flex h-12 w-12 items-center justify-center rounded-2xl bg-gradient-to-br ${feature.color} p-2.5 text-white shadow-xl transition-transform duration-500 group-hover:scale-110 group-hover:rotate-6`} |
| 94 | + > |
| 95 | + <feature.icon size={24} /> |
| 96 | + </div> |
| 97 | + <div className="flex items-center gap-2 rounded-full border border-white/5 bg-white/5 px-3 py-1 text-[10px] font-bold uppercase tracking-widest text-zinc-500"> |
| 98 | + <Sparkles size={10} className="text-white/20" /> |
| 99 | + {feature.eyebrow} |
| 100 | + </div> |
| 101 | + </div> |
| 102 | + |
| 103 | + <h3 className="mb-4 text-2xl font-extrabold tracking-tight text-white lg:text-3xl"> |
| 104 | + {feature.title} |
| 105 | + </h3> |
| 106 | + |
| 107 | + <p className="max-w-md text-base leading-relaxed text-zinc-500 transition-colors group-hover:text-zinc-400"> |
| 108 | + {feature.description} |
| 109 | + </p> |
| 110 | + </div> |
| 111 | + |
| 112 | + {/* High-Fidelity Stats Bar or Action Tag */} |
| 113 | + <div className="mt-12 flex items-center justify-between"> |
| 114 | + {feature.stats ? ( |
| 115 | + <div className="flex items-center gap-4"> |
| 116 | + <div className="h-px w-8 bg-white/10" /> |
| 117 | + <span className="text-[10px] font-black uppercase tracking-[0.3em] text-zinc-600 group-hover:text-purple-400/60 transition-colors"> |
| 118 | + {feature.stats} |
| 119 | + </span> |
| 120 | + </div> |
| 121 | + ) : ( |
| 122 | + <div /> |
| 123 | + )} |
| 124 | + |
| 125 | + <div className="flex h-10 w-10 items-center justify-center rounded-full border border-white/5 bg-white/5 opacity-0 transition-all duration-500 group-hover:translate-x-0 group-hover:opacity-100 -translate-x-2"> |
| 126 | + <ArrowRight size={16} className="text-white" /> |
| 127 | + </div> |
| 128 | + </div> |
| 129 | + </div> |
| 130 | + |
| 131 | + {/* Cinematic Glass Bottom Edge */} |
| 132 | + <div className={`absolute bottom-0 left-0 right-0 h-1 bg-gradient-to-r ${feature.color} opacity-0 transition-opacity duration-500 group-hover:opacity-20`} /> |
| 133 | + </div> |
| 134 | + </TiltCard> |
| 135 | + </motion.div> |
| 136 | + ))} |
| 137 | + </motion.div> |
| 138 | + </div> |
| 139 | + ); |
| 140 | +} |
0 commit comments