'use client';
import { motion, type Variants } from 'framer-motion';
import { useTranslations } from 'next-intl';
import { Search, LayoutDashboard, PenTool, Rocket, type LucideIcon } from 'lucide-react';
import { cn } from '@/lib/utils';
import {
staggerContainerWide,
revealVariants,
viewportOnce,
} from '@/lib/animations';
import SectionHeader from '@/components/ui/SectionHeader';
// ─── Types ────────────────────────────────────────────────────────────────────
interface Step {
numeral: string;
key: 'discovery' | 'strategy' | 'build' | 'launch';
Icon: LucideIcon;
}
// ─── Data ─────────────────────────────────────────────────────────────────────
const STEPS: Step[] = [
{ numeral: '01', key: 'discovery', Icon: Search },
{ numeral: '02', key: 'strategy', Icon: LayoutDashboard },
{ numeral: '03', key: 'build', Icon: PenTool },
{ numeral: '04', key: 'launch', Icon: Rocket },
];
// ─── Variants ─────────────────────────────────────────────────────────────────
// Numeral scales up from 80% while fading in
const numeralScaleVariants: Variants = {
hidden: { opacity: 0, scale: 0.8 },
visible: {
opacity: 1,
scale: 1,
transition: {
duration: 0.7,
ease: [0.16, 1, 0.3, 1],
},
},
};
// ─── Sub-components ───────────────────────────────────────────────────────────
function StepCard({ numeral, stepKey, Icon }: { numeral: string; stepKey: string; Icon: LucideIcon }) {
const t = useTranslations();
const title = t(`process.steps.${stepKey}.title`);
const description = t(`process.steps.${stepKey}.description`);
return (
{/* Top accent strip — gradient from primary-dark to primary */}
{/* Ghosted numeral — scales up on scroll */}
{numeral}
{/* Icon container */}
{/* Title */}
{title}
{/* Description */}
{description}
);
}
// ─── Main Component ───────────────────────────────────────────────────────────
export default function Process() {
const t = useTranslations();
return (
{/*
Desktop layout:
col 1 (lg:col-span-1) → SectionHeader, flush left
col 2–4 (lg:col-span-3) → 2×2 grid of step cards
Mobile layout:
header on top, steps in single column below
*/}
{/* ── Header column ── */}
{/* Vertical accent bar left of heading */}
{/* ── Steps column ── */}
{/* Dashed connector line — visible on sm+ grid layouts only */}