Files
webb/src/components/sections/HowItWorks3DSection.tsx
T

646 lines
30 KiB
TypeScript
Raw Normal View History

'use client';
import React, { useState, useEffect, useRef } from 'react';
import {
Sparkles,
Wand2,
Download,
Heart,
Smile,
Image as ImageIcon,
ArrowRight,
PartyPopper,
Camera,
Star,
CheckCircle2,
Play,
Pause,
RotateCcw
} from 'lucide-react';
import { TextAnimate } from '@/components/magicui/text-animate';
interface HowItWorksSectionProps {
title?: string;
badge?: string;
subtitle?: string;
}
export function HowItWorks3DSection({
title = 'Making Photo Magic is Super Simple',
badge = 'SUPER EASY AS 1-2-3',
subtitle = 'No complicated buttons or confusing settings. Just three friendly steps from your photo to pure magic!',
}: HowItWorksSectionProps) {
const [activeStep, setActiveStep] = useState<1 | 2 | 3>(1);
const [isPaused, setIsPaused] = useState(false);
const sectionRef = useRef<HTMLDivElement>(null);
// Auto-advance travelling image through steps with smart offscreen pause
useEffect(() => {
if (isPaused) return;
const section = sectionRef.current;
let isVisible = true;
let timer: any = null;
const runTimer = () => {
if (timer) clearInterval(timer);
timer = setInterval(() => {
if (isVisible && !document.hidden && !isPaused) {
setActiveStep((prev) => (prev === 3 ? 1 : ((prev + 1) as 1 | 2 | 3)));
}
}, 3400);
};
const observer = new IntersectionObserver(
([entry]) => {
isVisible = entry.isIntersecting;
if (isVisible) {
runTimer();
} else if (timer) {
clearInterval(timer);
timer = null;
}
},
{ threshold: 0.1 }
);
if (section) observer.observe(section);
runTimer();
const handleVisibility = () => {
if (document.hidden && timer) {
clearInterval(timer);
timer = null;
} else if (isVisible && !isPaused) {
runTimer();
}
};
document.addEventListener('visibilitychange', handleVisibility);
return () => {
if (timer) clearInterval(timer);
observer.disconnect();
document.removeEventListener('visibilitychange', handleVisibility);
};
}, [isPaused]);
return (
<section
id="how-it-works"
ref={sectionRef}
className="py-20 sm:py-28 px-4 sm:px-6 md:px-8 lg:px-10 bg-[#FAF8F5] relative overflow-hidden border-t border-slate-900/[0.06]"
>
{/* Playful Ambient Background Glows */}
<div
className="absolute inset-0 pointer-events-none -z-10"
style={{
background: 'radial-gradient(circle at 50% 30%, rgba(254,240,138,0.15) 0%, rgba(199,210,254,0.12) 40%, transparent 70%)',
}}
/>
<div className="max-w-[1640px] mx-auto space-y-12 sm:space-y-14">
{/* Playful & Warm Section Header */}
<div className="text-center max-w-3xl mx-auto space-y-4">
<div className="inline-flex items-center gap-2 px-4 py-1.5 rounded-full text-xs font-display font-bold tracking-wider uppercase text-amber-900 bg-amber-100/80 border border-amber-300 shadow-sm">
<Sparkles className="w-4 h-4 text-amber-600 animate-spin" style={{ animationDuration: '6s' }} />
<span>{badge}</span>
</div>
<h2 className="text-3xl sm:text-5xl font-display font-black text-slate-900 tracking-tight text-balance">
<TextAnimate animation="slideLeft" by="word">
{title}
</TextAnimate>
</h2>
<p className="text-base sm:text-lg text-slate-600 font-sans text-pretty">
<TextAnimate animation="fadeIn" by="word" delay={0.08}>
{subtitle}
</TextAnimate>
</p>
</div>
{/* 1. Dynamic Travelling Image Pipeline Animation */}
<TravellingTransformationPipeline
activeStep={activeStep}
onSelectStep={setActiveStep}
isPaused={isPaused}
onTogglePause={() => setIsPaused(!isPaused)}
/>
{/* 2. Three Childhood & Friendly Horizontal Story Cards */}
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6 sm:gap-8 items-stretch">
{/* Step 1: Upload Your Picture */}
<StepUploadCard isActive={activeStep === 1} />
{/* Step 2: The Magic Happens */}
<StepMagicCard isActive={activeStep === 2} />
{/* Step 3: Tada! Download & Enjoy */}
<StepTadaCard isActive={activeStep === 3} />
</div>
{/* Cheerful Bottom Reassurance Banner */}
<div className="rounded-3xl bg-gradient-to-r from-amber-50 via-white to-blue-50 border border-amber-200/80 p-6 shadow-sm flex flex-col md:flex-row items-center justify-between gap-4 text-center md:text-left">
<div className="flex items-center gap-3">
<div className="w-10 h-10 rounded-2xl bg-amber-400 text-amber-950 flex items-center justify-center font-bold text-lg shadow-sm">
🎈
</div>
<div>
<h4 className="font-display font-bold text-slate-900 text-sm">
100% Free Trial • No Credit Card • No Sign-Up Needed
</h4>
<p className="text-xs text-slate-600 mt-0.5 font-sans">
Anyone can do it in seconds. Your photos stay completely private and are never saved.
</p>
</div>
</div>
<a
href="#our-tools"
className="inline-flex items-center gap-2 px-6 py-3 rounded-full text-xs font-bold text-slate-900 bg-amber-400 hover:bg-amber-300 shadow-md transition-all hover:scale-105 active:scale-95"
>
<span>Try It Yourself Now</span>
<ArrowRight className="w-4 h-4" />
</a>
</div>
</div>
</section>
);
}
// -------------------------------------------------------------
// Travelling Image Transformation Pipeline
// -------------------------------------------------------------
function TravellingTransformationPipeline({
activeStep,
onSelectStep,
isPaused,
onTogglePause,
}: {
activeStep: 1 | 2 | 3;
onSelectStep: (step: 1 | 2 | 3) => void;
isPaused: boolean;
onTogglePause: () => void;
}) {
return (
<div className="rounded-[32px] sm:rounded-[40px] bg-white border border-slate-200/90 p-5 sm:p-8 shadow-cream-sm overflow-hidden relative isolate">
{/* Dynamic ambient background glow that shifts with active step */}
<div
className="absolute inset-0 pointer-events-none transition-all duration-1000 -z-10"
style={{
background: activeStep === 1
? 'radial-gradient(circle at 18% 50%, rgba(59,130,246,0.1) 0%, transparent 60%)'
: activeStep === 2
? 'radial-gradient(circle at 50% 50%, rgba(245,158,11,0.12) 0%, rgba(168,85,247,0.08) 40%, transparent 70%)'
: 'radial-gradient(circle at 82% 50%, rgba(16,185,129,0.1) 0%, transparent 60%)'
}}
/>
{/* Pipeline Header: Progress Title & Interactive Step Selectors */}
<div className="flex flex-col md:flex-row md:items-center justify-between gap-4 pb-6 border-b border-slate-100">
<div>
<div className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-slate-100 text-slate-800 text-[11px] font-mono font-bold tracking-wider uppercase mb-1">
<span className={`w-2 h-2 rounded-full animate-ping ${
activeStep === 1 ? 'bg-blue-600' : activeStep === 2 ? 'bg-amber-500' : 'bg-emerald-500'
}`} />
<span>Live Photo Journey Pipeline</span>
</div>
<h3 className="text-base sm:text-lg font-display font-extrabold text-slate-900 transition-colors">
{activeStep === 1 && 'Step 1: Your original picture drops onto the conveyor'}
{activeStep === 2 && 'Step 2: AI Neural magic analyzes & transforms pixels'}
{activeStep === 3 && 'Step 3: Flawless 4K masterpiece is instantly ready!'}
</h3>
</div>
{/* Controls: Step Switchers & Play/Pause */}
<div className="flex items-center gap-2 flex-wrap">
<button
type="button"
onClick={() => onSelectStep(1)}
className={`px-3 py-1.5 rounded-full text-xs font-display font-bold transition-all duration-300 ${
activeStep === 1
? 'bg-blue-600 text-white shadow-md shadow-blue-500/20 scale-105'
: 'bg-slate-100 text-slate-600 hover:bg-slate-200'
}`}
>
📸 1. Pick Photo
</button>
<button
type="button"
onClick={() => onSelectStep(2)}
className={`px-3 py-1.5 rounded-full text-xs font-display font-bold transition-all duration-300 ${
activeStep === 2
? 'bg-amber-500 text-white shadow-md shadow-amber-500/20 scale-105'
: 'bg-slate-100 text-slate-600 hover:bg-slate-200'
}`}
>
🪄 2. AI Magic
</button>
<button
type="button"
onClick={() => onSelectStep(3)}
className={`px-3 py-1.5 rounded-full text-xs font-display font-bold transition-all duration-300 ${
activeStep === 3
? 'bg-emerald-600 text-white shadow-md shadow-emerald-500/20 scale-105'
: 'bg-slate-100 text-slate-600 hover:bg-slate-200'
}`}
>
🎉 3. Masterpiece
</button>
<button
type="button"
onClick={onTogglePause}
className="p-2 rounded-full bg-slate-100 hover:bg-slate-200 text-slate-700 transition-colors ml-1"
title={isPaused ? 'Resume auto-play' : 'Pause auto-play'}
aria-label={isPaused ? 'Resume auto-play' : 'Pause auto-play'}
>
{isPaused ? <Play className="w-3.5 h-3.5" /> : <Pause className="w-3.5 h-3.5" />}
</button>
</div>
</div>
{/* DESKTOP PIPELINE TRACK (hidden on small mobile, visible sm+) */}
<div className="hidden sm:block relative pt-6 pb-2 h-[240px] overflow-hidden">
{/* Conveyor Base Track Line */}
<div className="absolute top-[120px] inset-x-12 h-1.5 bg-slate-200/80 rounded-full" />
{/* Animated Active Glowing Energy Beam */}
<div
className="absolute top-[120px] left-12 h-1.5 bg-gradient-to-r from-blue-500 via-amber-400 to-emerald-500 rounded-full transition-all duration-700 ease-[cubic-bezier(0.16,1,0.3,1)] shadow-[0_0_12px_rgba(59,130,246,0.6)]"
style={{
width: activeStep === 1 ? '0%' : activeStep === 2 ? 'calc(50% - 3rem)' : 'calc(100% - 6rem)'
}}
/>
{/* Station 1 Anchor Ring */}
<div className="absolute top-[120px] left-12 -translate-x-1/2 -translate-y-1/2 flex flex-col items-center">
<div className={`w-9 h-9 rounded-full border-2 flex items-center justify-center transition-all duration-300 ${
activeStep === 1 ? 'bg-blue-600 border-blue-300 text-white shadow-lg scale-110' : 'bg-white border-slate-300 text-slate-500'
}`}>
<span className="text-sm">📸</span>
</div>
<span className="mt-2 text-[10px] font-mono font-bold uppercase text-slate-600">1. Pick</span>
</div>
{/* Station 2 Anchor Ring */}
<div className="absolute top-[120px] left-1/2 -translate-x-1/2 -translate-y-1/2 flex flex-col items-center">
<div className={`w-9 h-9 rounded-full border-2 flex items-center justify-center transition-all duration-300 ${
activeStep === 2 ? 'bg-amber-500 border-amber-300 text-white shadow-lg scale-110' : 'bg-white border-slate-300 text-slate-500'
}`}>
<span className="text-sm">🪄</span>
</div>
<span className="mt-2 text-[10px] font-mono font-bold uppercase text-slate-600">2. Neural Magic</span>
</div>
{/* Station 3 Anchor Ring */}
<div className="absolute top-[120px] right-12 translate-x-1/2 -translate-y-1/2 flex flex-col items-center">
<div className={`w-9 h-9 rounded-full border-2 flex items-center justify-center transition-all duration-300 ${
activeStep === 3 ? 'bg-emerald-600 border-emerald-300 text-white shadow-lg scale-110' : 'bg-white border-slate-300 text-slate-500'
}`}>
<span className="text-sm">🎉</span>
</div>
<span className="mt-2 text-[10px] font-mono font-bold uppercase text-slate-600">3. Download</span>
</div>
{/* THE TRAVELLING PHOTO CARD */}
<div
className="absolute top-1/2 z-20 transition-all duration-700 ease-[cubic-bezier(0.16,1,0.3,1)] transform-gpu will-change-[left,transform]"
style={{
left: activeStep === 1 ? 'calc(3rem + 30px)' : activeStep === 2 ? '50%' : 'calc(100% - 3rem - 30px)',
transform: 'translate(-50%, -50%)',
}}
>
<div className={`relative w-44 h-32 rounded-2xl bg-white p-1.5 shadow-2xl border-2 transition-all duration-500 overflow-hidden ${
activeStep === 1
? 'border-blue-400 shadow-blue-500/25 rotate-[-2deg]'
: activeStep === 2
? 'border-amber-400 shadow-amber-500/35 scale-110 rotate-[0deg]'
: 'border-emerald-400 shadow-emerald-500/30 rotate-[2deg] scale-105'
}`}>
{/* Raw Source Photo (active in step 1, crossfades out) */}
<img
src="/management/pages/home/sections/how-it-works/media/before.jpg"
alt="Source Raw Photo"
className={`absolute inset-1.5 w-[calc(100%-12px)] h-[calc(100%-12px)] object-cover rounded-xl transition-opacity duration-700 ${
activeStep === 1 ? 'opacity-100' : 'opacity-0'
}`}
/>
{/* AI Transformed Masterpiece Photo (fades in step 2 & 3) */}
<img
src="/management/pages/home/sections/how-it-works/media/after.jpg"
alt="Transformed Masterpiece"
className={`absolute inset-1.5 w-[calc(100%-12px)] h-[calc(100%-12px)] object-cover rounded-xl transition-opacity duration-700 ${
activeStep >= 2 ? 'opacity-100' : 'opacity-0'
}`}
/>
{/* Step 2 Neural Laser Scanner Beam */}
{activeStep === 2 && (
<div
className="absolute inset-y-1.5 w-10 bg-gradient-to-r from-transparent via-cyan-400/90 to-transparent animate-laser-scan pointer-events-none z-20 rounded-xl"
/>
)}
{/* Badges on Travelling Card */}
<div className="absolute bottom-2.5 left-2.5 right-2.5 z-30 flex items-center justify-between">
<span className={`px-2 py-0.5 rounded-full text-[9px] font-mono font-bold uppercase tracking-wider backdrop-blur-md shadow-xs text-white ${
activeStep === 1 ? 'bg-blue-600/95' : activeStep === 2 ? 'bg-amber-600/95' : 'bg-emerald-600/95'
}`}>
{activeStep === 1 && 'Raw Photo'}
{activeStep === 2 && 'AI Magic...'}
{activeStep === 3 && '4K Masterpiece'}
</span>
{activeStep === 2 && (
<span className="text-xs animate-spin" style={{ animationDuration: '3s' }}>✨</span>
)}
{activeStep === 3 && (
<span className="text-xs">🎉</span>
)}
</div>
</div>
</div>
</div>
{/* MOBILE PIPELINE TRACK (sm:hidden) */}
<div className="sm:hidden pt-3 pb-1 space-y-4">
{/* Mobile Animated Travelling Card Stage */}
<div className="relative w-full h-[180px] rounded-2xl bg-gradient-to-b from-slate-900 to-slate-950 p-3 overflow-hidden flex flex-col items-center justify-center">
<div className="relative w-48 h-32 rounded-xl bg-white p-1 shadow-xl overflow-hidden border-2 border-white/20">
{/* Raw Photo */}
<img
src="/management/pages/home/sections/how-it-works/media/before.jpg"
alt="Source Photo"
className={`absolute inset-1 w-[calc(100%-8px)] h-[calc(100%-8px)] object-cover rounded-lg transition-opacity duration-700 ${
activeStep === 1 ? 'opacity-100' : 'opacity-0'
}`}
/>
{/* Transformed Photo */}
<img
src="/management/pages/home/sections/how-it-works/media/after.jpg"
alt="Transformed Photo"
className={`absolute inset-1 w-[calc(100%-8px)] h-[calc(100%-8px)] object-cover rounded-lg transition-opacity duration-700 ${
activeStep >= 2 ? 'opacity-100' : 'opacity-0'
}`}
/>
{/* Laser Beam during magic step */}
{activeStep === 2 && (
<div className="absolute inset-y-1 w-8 bg-gradient-to-r from-transparent via-cyan-400 to-transparent animate-laser-scan pointer-events-none z-20" />
)}
<div className="absolute bottom-2 left-2 right-2 z-30 flex items-center justify-between">
<span className={`px-2 py-0.5 rounded-full text-[9px] font-mono font-bold uppercase tracking-wider text-white ${
activeStep === 1 ? 'bg-blue-600' : activeStep === 2 ? 'bg-amber-600' : 'bg-emerald-600'
}`}>
{activeStep === 1 && 'Step 1: Raw Photo'}
{activeStep === 2 && 'Step 2: AI Magic'}
{activeStep === 3 && 'Step 3: 4K Finished'}
</span>
</div>
</div>
{/* Dotted Step Bar on Mobile */}
<div className="mt-3 flex items-center justify-center gap-2">
{[1, 2, 3].map((s) => (
<button
key={s}
onClick={() => onSelectStep(s as 1 | 2 | 3)}
className={`h-2 rounded-full transition-all duration-300 ${
activeStep === s ? 'w-8 bg-amber-400' : 'w-2 bg-slate-700'
}`}
aria-label={`Go to step ${s}`}
/>
))}
</div>
</div>
</div>
</div>
);
}
// -------------------------------------------------------------
// Card 1: Upload Your Picture (Super Warm & Visual)
// -------------------------------------------------------------
function StepUploadCard({ isActive = false }: { isActive?: boolean }) {
return (
<div className={`group relative flex flex-col justify-between rounded-[36px] bg-white border p-7 shadow-cream-sm transition-all duration-500 ${
isActive
? 'border-blue-400 ring-4 ring-blue-500/20 shadow-cream-lg -translate-y-2'
: 'border-slate-200/90 hover:shadow-cream-lg hover:-translate-y-1.5 hover:border-blue-400/60'
}`}>
<div>
{/* Step Badge */}
<div className="flex items-center justify-between mb-5">
<div className="inline-flex items-center gap-2 px-3.5 py-1 rounded-full bg-blue-50 border border-blue-200 text-blue-700 text-xs font-display font-bold uppercase tracking-wider">
{isActive && <span className="w-2 h-2 rounded-full bg-blue-600 animate-ping" />}
<span>STEP 01</span>
</div>
<span className="text-xl">📸</span>
</div>
{/* Visual Animation: Friendly Photo Drop-In */}
<div className="relative w-full h-[230px] rounded-3xl bg-gradient-to-b from-blue-50/70 to-indigo-50/40 border border-blue-100 overflow-hidden flex flex-col items-center justify-center p-4 select-none">
{/* Animated floating dashed dropzone */}
<div className="w-full h-full border-2 border-dashed border-blue-300/80 rounded-2xl flex flex-col items-center justify-center p-4 relative">
{/* Playful Floating Photo Frame (GPU-composited CSS float, 0% JS overhead) */}
<div className="w-36 h-28 rounded-2xl bg-white shadow-xl border-2 border-white overflow-hidden p-1.5 animate-float-slow transform-gpu">
<img
src="/management/pages/home/sections/how-it-works/media/before.jpg"
alt="Your Photo"
className="w-full h-full object-cover rounded-xl"
/>
</div>
{/* Little Cheerful Badges */}
<div className="absolute top-2 left-2 px-2.5 py-1 rounded-full bg-white shadow-sm border border-blue-100 text-[10px] font-bold text-blue-700 flex items-center gap-1">
<span>Drop Any Photo</span>
<span>👇</span>
</div>
<div className="absolute bottom-2 right-2 px-2.5 py-1 rounded-full bg-blue-600 text-white shadow-sm text-[10px] font-bold flex items-center gap-1">
<span>Phone or Laptop</span>
<Heart className="w-3 h-3 fill-rose-300 text-rose-300" />
</div>
</div>
</div>
{/* Text */}
<h3 className="mt-6 text-2xl font-display font-black text-slate-900 group-hover:text-blue-600 transition-colors">
1. Pick Any Picture
</h3>
<p className="mt-2 text-sm text-slate-600 leading-relaxed font-sans">
Grab any photo from your phone or computer. Selfies, family memories, portraits, or old albums—anything works like a charm!
</p>
{/* Simple bullet points */}
<ul className="mt-5 space-y-2 text-xs font-medium text-slate-600 border-t border-slate-100 pt-4">
<li className="flex items-center gap-2">
<CheckCircle2 className="w-4 h-4 text-emerald-500 shrink-0" />
<span>Just tap or drag and drop</span>
</li>
<li className="flex items-center gap-2">
<CheckCircle2 className="w-4 h-4 text-emerald-500 shrink-0" />
<span>No account or sign-up needed</span>
</li>
</ul>
</div>
<div className="mt-6 pt-4 border-t border-slate-100 text-xs font-display font-bold text-blue-600 flex items-center justify-between">
<span>Ready in 1 second</span>
<span>⚡ Quick & Easy</span>
</div>
</div>
);
}
// -------------------------------------------------------------
// Card 2: The Magic Happens (Playful & Magical)
// -------------------------------------------------------------
function StepMagicCard({ isActive = false }: { isActive?: boolean }) {
return (
<div className={`group relative flex flex-col justify-between rounded-[36px] bg-white border p-7 shadow-cream-sm transition-all duration-500 ${
isActive
? 'border-amber-400 ring-4 ring-amber-500/20 shadow-cream-lg -translate-y-2'
: 'border-slate-200/90 hover:shadow-cream-lg hover:-translate-y-1.5 hover:border-amber-400/60'
}`}>
<div>
{/* Step Badge */}
<div className="flex items-center justify-between mb-5">
<div className="inline-flex items-center gap-2 px-3.5 py-1 rounded-full bg-amber-50 border border-amber-200 text-amber-800 text-xs font-display font-bold uppercase tracking-wider">
{isActive && <span className="w-2 h-2 rounded-full bg-amber-500 animate-ping" />}
<span>STEP 02</span>
</div>
<span className="text-xl">🪄</span>
</div>
{/* Visual Animation: Swirling Magical Portal */}
<div className="relative w-full h-[230px] rounded-3xl bg-gradient-to-b from-amber-50/80 via-purple-50/50 to-pink-50/60 border border-amber-200/80 overflow-hidden flex flex-col items-center justify-center p-4 select-none">
{/* Glowing Aura Ring */}
<div className="absolute w-36 h-36 rounded-full bg-gradient-to-tr from-amber-300/40 via-purple-300/40 to-pink-300/40 blur-xl animate-pulse" />
{/* Central Wand and Sparkling Swirl */}
<div className="relative z-10 flex flex-col items-center justify-center">
<div className="w-20 h-20 rounded-3xl bg-white shadow-xl border border-amber-200 flex items-center justify-center transform group-hover:scale-110 transition-transform duration-300">
<Wand2 className="w-10 h-10 text-amber-500 animate-bounce" />
</div>
{/* Orbiting Stars & Sparkles (Pure CSS 60/120fps hardware rotation - 0% JS intervals!) */}
<div
className="absolute inset-[-20px] pointer-events-none animate-spin"
style={{ animationDuration: '8s' }}
>
<span className="absolute top-0 left-1/2 -translate-x-1/2 text-amber-400 text-base">✨</span>
<span className="absolute bottom-0 left-1/2 -translate-x-1/2 text-purple-400 text-sm">⭐</span>
<span className="absolute left-0 top-1/2 -translate-y-1/2 text-pink-400 text-sm">💫</span>
<span className="absolute right-0 top-1/2 -translate-y-1/2 text-cyan-400 text-sm">✨</span>
</div>
<div className="mt-3 px-3.5 py-1 rounded-full bg-white/95 shadow-md border border-amber-200 text-xs font-display font-bold text-amber-900 flex items-center gap-1.5">
<span>Mixing Magic Pixels...</span>
<span>🪄</span>
</div>
</div>
</div>
{/* Text */}
<h3 className="mt-6 text-2xl font-display font-black text-slate-900 group-hover:text-amber-600 transition-colors">
2. Some Magic Happens!
</h3>
<p className="mt-2 text-sm text-slate-600 leading-relaxed font-sans">
Our friendly AI waves its magic wand—dusting away marks, cleaning backgrounds, brightening smiles, and restoring crisp details instantly!
</p>
{/* Simple bullet points */}
<ul className="mt-5 space-y-2 text-xs font-medium text-slate-600 border-t border-slate-100 pt-4">
<li className="flex items-center gap-2">
<CheckCircle2 className="w-4 h-4 text-amber-500 shrink-0" />
<span>Cleans blemishes & background gently</span>
</li>
<li className="flex items-center gap-2">
<CheckCircle2 className="w-4 h-4 text-amber-500 shrink-0" />
<span>Keeps your real smile & face natural</span>
</li>
</ul>
</div>
<div className="mt-6 pt-4 border-t border-slate-100 text-xs font-display font-bold text-amber-700 flex items-center justify-between">
<span>Takes under a second</span>
<span>✨ Pure Wonder</span>
</div>
</div>
);
}
// -------------------------------------------------------------
// Card 3: Tada! Your Picture is Ready (Celebration & Joy)
// -------------------------------------------------------------
function StepTadaCard({ isActive = false }: { isActive?: boolean }) {
return (
<div className={`group relative flex flex-col justify-between rounded-[36px] bg-white border p-7 shadow-cream-sm transition-all duration-500 ${
isActive
? 'border-emerald-400 ring-4 ring-emerald-500/20 shadow-cream-lg -translate-y-2'
: 'border-slate-200/90 hover:shadow-cream-lg hover:-translate-y-1.5 hover:border-emerald-400/60'
}`}>
<div>
{/* Step Badge */}
<div className="flex items-center justify-between mb-5">
<div className="inline-flex items-center gap-2 px-3.5 py-1 rounded-full bg-emerald-50 border border-emerald-200 text-emerald-800 text-xs font-display font-bold uppercase tracking-wider">
{isActive && <span className="w-2 h-2 rounded-full bg-emerald-500 animate-ping" />}
<span>STEP 03</span>
</div>
<span className="text-xl">🎉</span>
</div>
{/* Visual Animation: Sparking Gorgeous Final Output */}
<div className="relative w-full h-[230px] rounded-3xl bg-gradient-to-b from-emerald-50/80 via-teal-50/50 to-cyan-50/60 border border-emerald-200/80 overflow-hidden flex flex-col items-center justify-center p-3 select-none">
{/* Finished Masterpiece Preview */}
<div className="relative w-full h-full rounded-2xl overflow-hidden shadow-xl border-2 border-white">
<img
src="/management/pages/home/sections/how-it-works/media/after.jpg"
alt="Finished Photo"
className="w-full h-full object-cover transform group-hover:scale-105 transition-transform duration-500"
/>
{/* Tada Ribbon / Celebration Badge */}
<div className="absolute top-2 left-2 px-3 py-1 rounded-full bg-emerald-500 text-white shadow-lg text-xs font-display font-bold flex items-center gap-1.5">
<PartyPopper className="w-3.5 h-3.5" />
<span>Tada! Masterpiece</span>
</div>
<div className="absolute bottom-2 right-2 px-3 py-1 rounded-full bg-white/95 text-slate-900 shadow-md border border-slate-200 text-[10px] font-display font-bold flex items-center gap-1">
<Download className="w-3 h-3 text-emerald-600" />
<span>Crystal 4K Ready</span>
</div>
</div>
</div>
{/* Text */}
<h3 className="mt-6 text-2xl font-display font-black text-slate-900 group-hover:text-emerald-600 transition-colors">
3. Tada! Ready to Love
</h3>
<p className="mt-2 text-sm text-slate-600 leading-relaxed font-sans">
One tap to download your gorgeous new picture in ultra-clear quality! No annoying watermarks, no limits, ready to share with family and friends.
</p>
{/* Simple bullet points */}
<ul className="mt-5 space-y-2 text-xs font-medium text-slate-600 border-t border-slate-100 pt-4">
<li className="flex items-center gap-2">
<CheckCircle2 className="w-4 h-4 text-emerald-500 shrink-0" />
<span>Crisp high-definition download</span>
</li>
<li className="flex items-center gap-2">
<CheckCircle2 className="w-4 h-4 text-emerald-500 shrink-0" />
<span>Zero watermarks or hidden charges</span>
</li>
</ul>
</div>
<div className="mt-6 pt-4 border-t border-slate-100 text-xs font-display font-bold text-emerald-700 flex items-center justify-between">
<span>Instant Download</span>
<span>🎉 All Yours</span>
</div>
</div>
);
}