diff --git a/apps/portal/src/features/landing-page/components/HeroSection.tsx b/apps/portal/src/features/landing-page/components/HeroSection.tsx index cf54f505..886e70ad 100644 --- a/apps/portal/src/features/landing-page/components/HeroSection.tsx +++ b/apps/portal/src/features/landing-page/components/HeroSection.tsx @@ -1,242 +1,116 @@ "use client"; -import { useRef } from "react"; -import { LayoutGroup, motion, useInView, useScroll, useTransform } from "framer-motion"; +import { useRef, useState } from "react"; +import Link from "next/link"; +import { AnimatePresence, LayoutGroup, motion, useInView } from "framer-motion"; import { ArrowRight } from "lucide-react"; import { Button } from "@/components/atoms/button"; import TextRotate from "@/components/fancy/text/text-rotate"; +import { cn } from "@/shared/utils"; +import { SERVICE_COLORS } from "@/shared/constants/service-colors"; +import { personalServices, businessServices } from "@/features/landing-page/data"; const SERVICE_WORDS = ["Internet", "Phone Plans", "VPN", "IT Support", "Business"]; -/* ------------------------------------------------------------------ */ -/* Placeholder silhouettes — replace with final illustrations later */ -/* ------------------------------------------------------------------ */ +type Tab = "personal" | "business"; + +/* ─── Service icon color lookup ─── */ + +const SERVICE_ICON_COLORS: Record = { + "/services/internet": `${SERVICE_COLORS.internet.iconBg} ${SERVICE_COLORS.internet.iconText}`, + "/services/sim": `${SERVICE_COLORS.sim.iconBg} ${SERVICE_COLORS.sim.iconText}`, + "/services/vpn": `${SERVICE_COLORS.vpn.iconBg} ${SERVICE_COLORS.vpn.iconText}`, + "/services/onsite": `${SERVICE_COLORS.onsite.iconBg} ${SERVICE_COLORS.onsite.iconText}`, + "/services/business": `${SERVICE_COLORS.business.iconBg} ${SERVICE_COLORS.business.iconText}`, +}; + +function getIconColor(href: string) { + return SERVICE_ICON_COLORS[href] ?? "bg-primary/10 text-primary"; +} + +/* ─── Services Showcase Card ─── */ + +function ServicesShowcase() { + const [activeTab, setActiveTab] = useState("personal"); + const items = activeTab === "personal" ? personalServices : businessServices; -function HouseSilhouette({ className }: { className?: string }) { return ( - +
+ {/* Glass card container */} +
+ {/* Tab bar */} +
+ {(["personal", "business"] as const).map(tab => ( + + ))} +
+ + {/* Service grid */} +
+ + + {items.map((service, i) => ( + + +
+ {service.icon} +
+ + {service.title} + + +
+ ))} +
+
+
+
+
); } -function PersonWithPhoneSilhouette({ className }: { className?: string }) { - return ( - - ); -} - -function PersonWithRouterSilhouette({ className }: { className?: string }) { - return ( - - ); -} - -/* ------------------------------------------------------------------ */ -/* Floating wrapper — ambient bob + scroll parallax */ -/* ------------------------------------------------------------------ */ - -function FloatingIllustration({ - children, - floatDelay, - floatDuration, - floatDistance, - parallaxRange, - scrollProgress, - className, -}: { - children: React.ReactNode; - floatDelay: number; - floatDuration: number; - floatDistance: number; - parallaxRange: [number, number]; - scrollProgress: import("framer-motion").MotionValue; - className?: string; -}) { - const parallaxY = useTransform(scrollProgress, [0, 1], parallaxRange); - - return ( - - {children} - - ); -} - -/* ------------------------------------------------------------------ */ -/* Hero Section */ -/* ------------------------------------------------------------------ */ +/* ─── Hero Section ─── */ interface HeroSectionProps { heroCTARef: React.RefObject; @@ -246,11 +120,6 @@ export function HeroSection({ heroCTARef }: HeroSectionProps) { const heroRef = useRef(null); const heroInView = useInView(heroRef, { once: true, amount: 0.1 }); - const { scrollYProgress } = useScroll({ - target: heroRef, - offset: ["start start", "end start"], - }); - return ( - {/* Right — Floating Illustrations */} -
- {/* House — center back, largest */} - - - - - {/* Person with phone — left front */} - - - - - {/* Person with router — right front */} - - - - - {/* Decorative floating dots */} - - - + {/* Right — Services Showcase */} +
+
diff --git a/image.png b/image.png index afd5e0c5..a7dc2b81 100644 Binary files a/image.png and b/image.png differ