feat(how-it-works): embed travelling photo pipeline directly within cards with ultra-lightweight thermal-safe transitions
This commit is contained in:
Binary file not shown.
@@ -1 +0,0 @@
|
|||||||
sample_video.mp4
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -6,16 +6,14 @@ import {
|
|||||||
Wand2,
|
Wand2,
|
||||||
Download,
|
Download,
|
||||||
Heart,
|
Heart,
|
||||||
Smile,
|
|
||||||
Image as ImageIcon,
|
|
||||||
ArrowRight,
|
ArrowRight,
|
||||||
PartyPopper,
|
PartyPopper,
|
||||||
Camera,
|
|
||||||
Star,
|
|
||||||
CheckCircle2,
|
CheckCircle2,
|
||||||
Play,
|
Play,
|
||||||
Pause,
|
Pause,
|
||||||
RotateCcw
|
ArrowDown,
|
||||||
|
Camera,
|
||||||
|
Check
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import { TextAnimate } from '@/components/magicui/text-animate';
|
import { TextAnimate } from '@/components/magicui/text-animate';
|
||||||
|
|
||||||
@@ -34,11 +32,12 @@ export function HowItWorks3DSection({
|
|||||||
const [isPaused, setIsPaused] = useState(false);
|
const [isPaused, setIsPaused] = useState(false);
|
||||||
const sectionRef = useRef<HTMLDivElement>(null);
|
const sectionRef = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
// Auto-advance travelling image through steps with smart offscreen pause
|
// Auto-advance travelling image through cards with smart offscreen pause
|
||||||
|
// 100% safe on device battery and thermals: zero work when offscreen or tab hidden
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isPaused) return;
|
if (isPaused) return;
|
||||||
const section = sectionRef.current;
|
const section = sectionRef.current;
|
||||||
let isVisible = false; // Must be false until IntersectionObserver confirms visibility
|
let isVisible = false;
|
||||||
let timer: any = null;
|
let timer: any = null;
|
||||||
|
|
||||||
const runTimer = () => {
|
const runTimer = () => {
|
||||||
@@ -86,18 +85,18 @@ export function HowItWorks3DSection({
|
|||||||
<section
|
<section
|
||||||
id="how-it-works"
|
id="how-it-works"
|
||||||
ref={sectionRef}
|
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]"
|
className="py-16 sm:py-24 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 */}
|
{/* Playful Ambient Background Highlights */}
|
||||||
<div
|
<div
|
||||||
className="absolute inset-0 pointer-events-none -z-10"
|
className="absolute inset-0 pointer-events-none -z-10"
|
||||||
style={{
|
style={{
|
||||||
background: 'radial-gradient(circle at 50% 30%, rgba(254,240,138,0.15) 0%, rgba(199,210,254,0.12) 40%, transparent 70%)',
|
background: 'radial-gradient(circle at 50% 30%, rgba(254,240,138,0.12) 0%, rgba(199,210,254,0.1) 40%, transparent 70%)',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="max-w-[1640px] mx-auto space-y-12 sm:space-y-14">
|
<div className="max-w-[1640px] mx-auto space-y-10 sm:space-y-12">
|
||||||
{/* Playful & Warm Section Header */}
|
{/* Playful & Warm Section Header with Quick Controls */}
|
||||||
<div className="text-center max-w-3xl mx-auto space-y-4">
|
<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">
|
<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" />
|
<Sparkles className="w-4 h-4 text-amber-600" />
|
||||||
@@ -115,32 +114,406 @@ export function HowItWorks3DSection({
|
|||||||
{subtitle}
|
{subtitle}
|
||||||
</TextAnimate>
|
</TextAnimate>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
{/* Step Selector Pills & Auto-Play Toggle */}
|
||||||
|
<div className="pt-2 flex items-center justify-center flex-wrap gap-2 text-xs font-display font-bold">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => setActiveStep(1)}
|
||||||
|
className={`flex items-center gap-1.5 px-4 py-2 rounded-full transition-all duration-300 ${
|
||||||
|
activeStep === 1
|
||||||
|
? 'bg-blue-600 text-white shadow-md shadow-blue-500/25 scale-105'
|
||||||
|
: 'bg-white text-slate-700 hover:bg-slate-100 border border-slate-200 shadow-xs'
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<span>📸 1. Pick Photo</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => setActiveStep(2)}
|
||||||
|
className={`flex items-center gap-1.5 px-4 py-2 rounded-full transition-all duration-300 ${
|
||||||
|
activeStep === 2
|
||||||
|
? 'bg-amber-500 text-white shadow-md shadow-amber-500/25 scale-105'
|
||||||
|
: 'bg-white text-slate-700 hover:bg-slate-100 border border-slate-200 shadow-xs'
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<span>🪄 2. AI Magic</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => setActiveStep(3)}
|
||||||
|
className={`flex items-center gap-1.5 px-4 py-2 rounded-full transition-all duration-300 ${
|
||||||
|
activeStep === 3
|
||||||
|
? 'bg-emerald-600 text-white shadow-md shadow-emerald-500/25 scale-105'
|
||||||
|
: 'bg-white text-slate-700 hover:bg-slate-100 border border-slate-200 shadow-xs'
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<span>🎉 3. Masterpiece</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => setIsPaused(!isPaused)}
|
||||||
|
className="p-2 rounded-full bg-white hover:bg-slate-100 border border-slate-200 text-slate-700 transition-colors shadow-xs ml-1"
|
||||||
|
title={isPaused ? 'Resume auto-advance' : 'Pause auto-advance'}
|
||||||
|
aria-label={isPaused ? 'Resume auto-advance' : 'Pause auto-advance'}
|
||||||
|
>
|
||||||
|
{isPaused ? <Play className="w-3.5 h-3.5" /> : <Pause className="w-3.5 h-3.5" />}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 1. Dynamic Travelling Image Pipeline Animation */}
|
{/* -------------------------------------------------------------
|
||||||
<TravellingTransformationPipeline
|
Three Connected Cards with Travelling Photo Journey Integrated Directly Within
|
||||||
activeStep={activeStep}
|
------------------------------------------------------------- */}
|
||||||
onSelectStep={setActiveStep}
|
<div className="relative">
|
||||||
isPaused={isPaused}
|
{/* Desktop Connecting Conveyor Tracks Between the Cards */}
|
||||||
onTogglePause={() => setIsPaused(!isPaused)}
|
<div className="hidden lg:block absolute top-[138px] inset-x-[15%] h-1 bg-slate-200/80 rounded-full pointer-events-none -z-0">
|
||||||
|
{/* Travelling Active Pulse Energy Beam */}
|
||||||
|
<div
|
||||||
|
className="h-full 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_8px_rgba(59,130,246,0.5)]"
|
||||||
|
style={{
|
||||||
|
width: activeStep === 1 ? '0%' : activeStep === 2 ? '50%' : '100%'
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Desktop Floating Transfer Arrow Cues */}
|
||||||
|
<div className="hidden lg:flex absolute top-[138px] left-[33.33%] -translate-x-1/2 -translate-y-1/2 z-20 pointer-events-none">
|
||||||
|
<div className={`w-8 h-8 rounded-full border flex items-center justify-center transition-all duration-500 ${
|
||||||
|
activeStep >= 2
|
||||||
|
? 'bg-amber-500 border-amber-300 text-white shadow-md scale-110'
|
||||||
|
: 'bg-white border-slate-200 text-slate-400'
|
||||||
|
}`}>
|
||||||
|
<ArrowRight className="w-4 h-4" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="hidden lg:flex absolute top-[138px] left-[66.66%] -translate-x-1/2 -translate-y-1/2 z-20 pointer-events-none">
|
||||||
|
<div className={`w-8 h-8 rounded-full border flex items-center justify-center transition-all duration-500 ${
|
||||||
|
activeStep === 3
|
||||||
|
? 'bg-emerald-600 border-emerald-300 text-white shadow-md scale-110'
|
||||||
|
: 'bg-white border-slate-200 text-slate-400'
|
||||||
|
}`}>
|
||||||
|
<ArrowRight className="w-4 h-4" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* 3 Step Cards Grid */}
|
||||||
|
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6 sm:gap-8 items-stretch relative z-10">
|
||||||
|
|
||||||
|
{/* =========================================================
|
||||||
|
CARD 1: Pick Any Picture (Origin Dock)
|
||||||
|
========================================================= */}
|
||||||
|
<div
|
||||||
|
onClick={() => setActiveStep(1)}
|
||||||
|
className={`group relative flex flex-col justify-between rounded-[36px] bg-white border p-6 sm:p-7 shadow-cream-sm transition-all duration-500 cursor-pointer ${
|
||||||
|
activeStep === 1
|
||||||
|
? 'border-blue-500 ring-4 ring-blue-500/20 shadow-cream-lg -translate-y-1.5'
|
||||||
|
: 'border-slate-200/90 hover:border-blue-300 hover:shadow-cream-md'
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
{/* Step Badge */}
|
||||||
|
<div className="flex items-center justify-between mb-4">
|
||||||
|
<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">
|
||||||
|
{activeStep === 1 && <span className="w-2 h-2 rounded-full bg-blue-600 inline-block animate-ping" />}
|
||||||
|
<span>STEP 01</span>
|
||||||
|
</div>
|
||||||
|
<span className="text-xl">📸</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* VISUAL DOCK 1: Raw Photo Drop & Origin Departure */}
|
||||||
|
<div className="relative w-full h-[220px] 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-3 select-none">
|
||||||
|
|
||||||
|
{/* Photo Frame with Transition */}
|
||||||
|
<div className={`relative w-44 h-32 rounded-2xl bg-white shadow-xl border-2 border-white overflow-hidden p-1.5 transition-all duration-700 ease-[cubic-bezier(0.16,1,0.3,1)] transform-gpu ${
|
||||||
|
activeStep === 1
|
||||||
|
? 'scale-100 rotate-[-1deg] opacity-100'
|
||||||
|
: 'scale-90 rotate-[0deg] opacity-40 translate-x-4'
|
||||||
|
}`}>
|
||||||
|
<img
|
||||||
|
src="/management/pages/home/sections/how-it-works/media/before.jpg"
|
||||||
|
alt="Your Photo"
|
||||||
|
className="w-full h-full object-cover rounded-xl"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* 2. Three Childhood & Friendly Horizontal Story Cards */}
|
{/* Tag badge */}
|
||||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6 sm:gap-8 items-stretch">
|
<div className="absolute bottom-2 left-2 right-2 flex items-center justify-between pointer-events-none">
|
||||||
{/* Step 1: Upload Your Picture */}
|
<span className="px-2 py-0.5 rounded-full text-[9px] font-mono font-bold uppercase tracking-wider bg-blue-600/90 text-white shadow-xs">
|
||||||
<StepUploadCard isActive={activeStep === 1} />
|
Raw Photo
|
||||||
|
</span>
|
||||||
|
{activeStep === 1 && (
|
||||||
|
<span className="text-xs">👇</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Step 2: The Magic Happens */}
|
{/* Flow cues */}
|
||||||
<StepMagicCard isActive={activeStep === 2} />
|
<div className="absolute top-2.5 left-3 px-2.5 py-0.5 rounded-full bg-white/95 shadow-xs border border-blue-100 text-[10px] font-bold text-blue-700 flex items-center gap-1">
|
||||||
|
<span>{activeStep === 1 ? 'Photo Loaded' : 'Sent to Step 2'}</span>
|
||||||
|
{activeStep > 1 && <Check className="w-3 h-3 text-emerald-600" />}
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Step 3: Tada! Download & Enjoy */}
|
{activeStep === 1 && (
|
||||||
<StepTadaCard isActive={activeStep === 3} />
|
<div className="absolute bottom-2.5 right-3 px-2.5 py-0.5 rounded-full bg-blue-600 text-white shadow-xs text-[10px] font-bold flex items-center gap-1 animate-pulse">
|
||||||
|
<span>Travelling Next</span>
|
||||||
|
<ArrowRight className="w-3 h-3" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Text Content */}
|
||||||
|
<h3 className="mt-5 text-xl sm: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-xs sm:text-sm text-slate-600 leading-relaxed font-sans">
|
||||||
|
Grab any photo from your phone or laptop. Selfies, family portraits, vintage prints, or vacation snaps—everything transforms in seconds!
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{/* Feature checkmarks */}
|
||||||
|
<ul className="mt-4 space-y-1.5 text-xs font-medium text-slate-600 border-t border-slate-100 pt-3">
|
||||||
|
<li className="flex items-center gap-2">
|
||||||
|
<CheckCircle2 className="w-3.5 h-3.5 text-emerald-500 shrink-0" />
|
||||||
|
<span>One-tap upload or drag & drop</span>
|
||||||
|
</li>
|
||||||
|
<li className="flex items-center gap-2">
|
||||||
|
<CheckCircle2 className="w-3.5 h-3.5 text-emerald-500 shrink-0" />
|
||||||
|
<span>No sign-up or credit card required</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="mt-5 pt-3 border-t border-slate-100 text-xs font-display font-bold text-blue-600 flex items-center justify-between">
|
||||||
|
<span>Instant upload</span>
|
||||||
|
<span>⚡ Easy & Private</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Mobile Vertical Flow Arrow 1 -> 2 */}
|
||||||
|
<div className="flex lg:hidden justify-center -my-3 z-20 pointer-events-none">
|
||||||
|
<div className={`w-8 h-8 rounded-full border flex items-center justify-center transition-all ${
|
||||||
|
activeStep >= 2 ? 'bg-amber-500 border-amber-300 text-white shadow-md' : 'bg-white border-slate-200 text-slate-400'
|
||||||
|
}`}>
|
||||||
|
<ArrowDown className="w-4 h-4" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* =========================================================
|
||||||
|
CARD 2: Some Magic Happens! (Transformation Dock)
|
||||||
|
========================================================= */}
|
||||||
|
<div
|
||||||
|
onClick={() => setActiveStep(2)}
|
||||||
|
className={`group relative flex flex-col justify-between rounded-[36px] bg-white border p-6 sm:p-7 shadow-cream-sm transition-all duration-500 cursor-pointer ${
|
||||||
|
activeStep === 2
|
||||||
|
? 'border-amber-500 ring-4 ring-amber-500/20 shadow-cream-lg -translate-y-1.5'
|
||||||
|
: 'border-slate-200/90 hover:border-amber-300 hover:shadow-cream-md'
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
{/* Step Badge */}
|
||||||
|
<div className="flex items-center justify-between mb-4">
|
||||||
|
<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">
|
||||||
|
{activeStep === 2 && <span className="w-2 h-2 rounded-full bg-amber-500 inline-block animate-ping" />}
|
||||||
|
<span>STEP 02</span>
|
||||||
|
</div>
|
||||||
|
<span className="text-xl">🪄</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* VISUAL DOCK 2: In-Card Arrival, Laser Scan & Neural Crossfade */}
|
||||||
|
<div className="relative w-full h-[220px] rounded-3xl bg-gradient-to-b from-amber-50/80 via-purple-50/40 to-pink-50/50 border border-amber-200/80 overflow-hidden flex flex-col items-center justify-center p-3 select-none">
|
||||||
|
|
||||||
|
{/* Photo Frame Docked in Card 2 with Real-Time Crossfade */}
|
||||||
|
<div className={`relative w-44 h-32 rounded-2xl bg-white shadow-xl border-2 transition-all duration-700 ease-[cubic-bezier(0.16,1,0.3,1)] overflow-hidden p-1.5 transform-gpu ${
|
||||||
|
activeStep === 2
|
||||||
|
? 'scale-105 border-amber-400 shadow-amber-500/25 rotate-[0deg] opacity-100'
|
||||||
|
: activeStep === 3
|
||||||
|
? 'scale-90 border-slate-200 opacity-40 translate-x-4'
|
||||||
|
: 'scale-90 border-slate-200 opacity-30 -translate-x-4'
|
||||||
|
}`}>
|
||||||
|
{/* Before Image */}
|
||||||
|
<img
|
||||||
|
src="/management/pages/home/sections/how-it-works/media/before.jpg"
|
||||||
|
alt="Raw Photo Transforming"
|
||||||
|
className={`absolute inset-1.5 w-[calc(100%-12px)] h-[calc(100%-12px)] object-cover rounded-xl transition-opacity duration-700 ${
|
||||||
|
activeStep === 2 ? 'opacity-0' : 'opacity-100'
|
||||||
|
}`}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/* Transformed After Image */}
|
||||||
|
<img
|
||||||
|
src="/management/pages/home/sections/how-it-works/media/after.jpg"
|
||||||
|
alt="Transformed AI Image"
|
||||||
|
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'
|
||||||
|
}`}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/* Neural Laser Scanner Beam during Step 2 */}
|
||||||
|
{activeStep === 2 && (
|
||||||
|
<div className="absolute inset-y-1.5 w-8 bg-gradient-to-r from-transparent via-cyan-400 to-transparent animate-laser-scan pointer-events-none z-20" />
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Tag badge */}
|
||||||
|
<div className="absolute bottom-2 left-2 right-2 flex items-center justify-between pointer-events-none z-30">
|
||||||
|
<span className={`px-2 py-0.5 rounded-full text-[9px] font-mono font-bold uppercase tracking-wider text-white shadow-xs ${
|
||||||
|
activeStep === 2 ? 'bg-amber-600/95' : 'bg-slate-700/80'
|
||||||
|
}`}>
|
||||||
|
{activeStep === 2 ? 'AI Magic...' : activeStep === 3 ? 'Enhanced' : 'Awaiting'}
|
||||||
|
</span>
|
||||||
|
{activeStep === 2 && <span className="text-xs">✨</span>}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Flow cues */}
|
||||||
|
<div className="absolute top-2.5 left-3 px-2.5 py-0.5 rounded-full bg-white/95 shadow-xs border border-amber-200 text-[10px] font-bold text-amber-900 flex items-center gap-1">
|
||||||
|
<span>{activeStep === 2 ? 'Pixels Processing' : activeStep === 3 ? 'Magic Applied' : 'Dock Ready'}</span>
|
||||||
|
{activeStep === 3 && <Check className="w-3 h-3 text-emerald-600" />}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{activeStep === 2 && (
|
||||||
|
<div className="absolute bottom-2.5 right-3 px-2.5 py-0.5 rounded-full bg-amber-500 text-white shadow-xs text-[10px] font-bold flex items-center gap-1 animate-pulse">
|
||||||
|
<span>Moving to 4K</span>
|
||||||
|
<ArrowRight className="w-3 h-3" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Text Content */}
|
||||||
|
<h3 className="mt-5 text-xl sm: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-xs sm:text-sm text-slate-600 leading-relaxed font-sans">
|
||||||
|
Our neural AI waves its magic wand—dusting away marks, clarifying pupils, restoring crisp textures, and balancing vibrant colors in under a second!
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{/* Feature checkmarks */}
|
||||||
|
<ul className="mt-4 space-y-1.5 text-xs font-medium text-slate-600 border-t border-slate-100 pt-3">
|
||||||
|
<li className="flex items-center gap-2">
|
||||||
|
<CheckCircle2 className="w-3.5 h-3.5 text-amber-500 shrink-0" />
|
||||||
|
<span>Preserves real pores & authentic facial features</span>
|
||||||
|
</li>
|
||||||
|
<li className="flex items-center gap-2">
|
||||||
|
<CheckCircle2 className="w-3.5 h-3.5 text-amber-500 shrink-0" />
|
||||||
|
<span>Automated neural enhancement with zero guesswork</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="mt-5 pt-3 border-t border-slate-100 text-xs font-display font-bold text-amber-700 flex items-center justify-between">
|
||||||
|
<span>Under 0.8 seconds</span>
|
||||||
|
<span>🪄 Neural Engine</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Mobile Vertical Flow Arrow 2 -> 3 */}
|
||||||
|
<div className="flex lg:hidden justify-center -my-3 z-20 pointer-events-none">
|
||||||
|
<div className={`w-8 h-8 rounded-full border flex items-center justify-center transition-all ${
|
||||||
|
activeStep === 3 ? 'bg-emerald-600 border-emerald-300 text-white shadow-md' : 'bg-white border-slate-200 text-slate-400'
|
||||||
|
}`}>
|
||||||
|
<ArrowDown className="w-4 h-4" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* =========================================================
|
||||||
|
CARD 3: Tada! Ready to Love (Arrival Masterpiece Dock)
|
||||||
|
========================================================= */}
|
||||||
|
<div
|
||||||
|
onClick={() => setActiveStep(3)}
|
||||||
|
className={`group relative flex flex-col justify-between rounded-[36px] bg-white border p-6 sm:p-7 shadow-cream-sm transition-all duration-500 cursor-pointer ${
|
||||||
|
activeStep === 3
|
||||||
|
? 'border-emerald-500 ring-4 ring-emerald-500/20 shadow-cream-lg -translate-y-1.5'
|
||||||
|
: 'border-slate-200/90 hover:border-emerald-300 hover:shadow-cream-md'
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
{/* Step Badge */}
|
||||||
|
<div className="flex items-center justify-between mb-4">
|
||||||
|
<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">
|
||||||
|
{activeStep === 3 && <span className="w-2 h-2 rounded-full bg-emerald-500 inline-block animate-ping" />}
|
||||||
|
<span>STEP 03</span>
|
||||||
|
</div>
|
||||||
|
<span className="text-xl">🎉</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* VISUAL DOCK 3: Finished 4K Arrival & Download State */}
|
||||||
|
<div className="relative w-full h-[220px] rounded-3xl bg-gradient-to-b from-emerald-50/80 via-teal-50/40 to-cyan-50/50 border border-emerald-200/80 overflow-hidden flex flex-col items-center justify-center p-3 select-none">
|
||||||
|
|
||||||
|
{/* Masterpiece Photo Frame in Card 3 */}
|
||||||
|
<div className={`relative w-44 h-32 rounded-2xl bg-white shadow-xl border-2 transition-all duration-700 ease-[cubic-bezier(0.16,1,0.3,1)] overflow-hidden p-1.5 transform-gpu ${
|
||||||
|
activeStep === 3
|
||||||
|
? 'scale-105 border-emerald-400 shadow-emerald-500/25 rotate-[1deg] opacity-100'
|
||||||
|
: 'scale-90 border-slate-200 opacity-30 -translate-x-4'
|
||||||
|
}`}>
|
||||||
|
<img
|
||||||
|
src="/management/pages/home/sections/how-it-works/media/after.jpg"
|
||||||
|
alt="Finished 4K Masterpiece"
|
||||||
|
className="w-full h-full object-cover rounded-xl"
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/* Celebration badges */}
|
||||||
|
<div className="absolute top-2 left-2 z-20">
|
||||||
|
<span className="px-2 py-0.5 rounded-full bg-emerald-600 text-white text-[9px] font-mono font-bold uppercase tracking-wider shadow-sm flex items-center gap-1">
|
||||||
|
<PartyPopper className="w-2.5 h-2.5" />
|
||||||
|
<span>Tada! Masterpiece</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="absolute bottom-2 right-2 z-20">
|
||||||
|
<span className="px-2 py-0.5 rounded-full bg-white/95 text-slate-900 text-[9px] font-mono font-bold shadow-xs border border-slate-200 flex items-center gap-1">
|
||||||
|
<Download className="w-2.5 h-2.5 text-emerald-600" />
|
||||||
|
<span>4K Ready</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Flow cues */}
|
||||||
|
<div className="absolute top-2.5 left-3 px-2.5 py-0.5 rounded-full bg-white/95 shadow-xs border border-emerald-200 text-[10px] font-bold text-emerald-900 flex items-center gap-1">
|
||||||
|
<span>{activeStep === 3 ? 'Masterpiece Ready!' : 'Waiting for Arrival'}</span>
|
||||||
|
{activeStep === 3 && <PartyPopper className="w-3 h-3 text-emerald-600" />}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{activeStep === 3 && (
|
||||||
|
<div className="absolute bottom-2.5 right-3 px-2.5 py-0.5 rounded-full bg-emerald-600 text-white shadow-xs text-[10px] font-bold flex items-center gap-1">
|
||||||
|
<span>Ready to Save</span>
|
||||||
|
<span>🎉</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Text Content */}
|
||||||
|
<h3 className="mt-5 text-xl sm: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-xs sm:text-sm text-slate-600 leading-relaxed font-sans">
|
||||||
|
One tap to download your gorgeous new picture in crystal 4K resolution! No annoying watermarks, no compression artifacts, ready to share proudly.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{/* Feature checkmarks */}
|
||||||
|
<ul className="mt-4 space-y-1.5 text-xs font-medium text-slate-600 border-t border-slate-100 pt-3">
|
||||||
|
<li className="flex items-center gap-2">
|
||||||
|
<CheckCircle2 className="w-3.5 h-3.5 text-emerald-500 shrink-0" />
|
||||||
|
<span>Crisp high-definition 4K image export</span>
|
||||||
|
</li>
|
||||||
|
<li className="flex items-center gap-2">
|
||||||
|
<CheckCircle2 className="w-3.5 h-3.5 text-emerald-500 shrink-0" />
|
||||||
|
<span>Zero watermarks or hidden payment traps</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="mt-5 pt-3 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>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Cheerful Bottom Reassurance Banner */}
|
{/* 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="rounded-3xl bg-gradient-to-r from-amber-50 via-white to-blue-50 border border-amber-200/80 p-5 sm: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="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 className="w-10 h-10 rounded-2xl bg-amber-400 text-amber-950 flex items-center justify-center font-bold text-lg shadow-sm shrink-0">
|
||||||
🎈
|
🎈
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -148,14 +521,14 @@ export function HowItWorks3DSection({
|
|||||||
100% Free Trial • No Credit Card • No Sign-Up Needed
|
100% Free Trial • No Credit Card • No Sign-Up Needed
|
||||||
</h4>
|
</h4>
|
||||||
<p className="text-xs text-slate-600 mt-0.5 font-sans">
|
<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.
|
Anyone can do it in seconds. Your photos stay completely private on your own device and are never stored.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
href="#our-tools"
|
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"
|
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 shrink-0"
|
||||||
>
|
>
|
||||||
<span>Try It Yourself Now</span>
|
<span>Try It Yourself Now</span>
|
||||||
<ArrowRight className="w-4 h-4" />
|
<ArrowRight className="w-4 h-4" />
|
||||||
@@ -165,477 +538,3 @@ export function HowItWorks3DSection({
|
|||||||
</section>
|
</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 ${
|
|
||||||
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 inline-block" />}
|
|
||||||
<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 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 inline-block" />}
|
|
||||||
<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 — static, no animation to prevent thermal issues */}
|
|
||||||
<div className="absolute w-36 h-36 rounded-full bg-gradient-to-tr from-amber-300/30 via-purple-300/30 to-pink-300/30 blur-xl" />
|
|
||||||
|
|
||||||
{/* 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" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Stars — static, no spin to avoid continuous GPU paint */}
|
|
||||||
<div className="absolute inset-[-20px] pointer-events-none">
|
|
||||||
<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 inline-block" />}
|
|
||||||
<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>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user