feat(showcase): replace live benchmarking with dynamic media showcase reel and add multi-layout variations across all tool cards

This commit is contained in:
2026-11-03 18:15:32 +05:30
parent b47b033ab7
commit e7aa732892
5 changed files with 685 additions and 142 deletions
@@ -178,105 +178,253 @@ export function CinematicHorizontalScrollSection({
</div>
</div>
{/* Symmetrical Two-Column Content Grid: Details on Left, Visual on Right */}
<div className="grid grid-cols-1 lg:grid-cols-12 gap-8 lg:gap-14 items-center">
{/* Left Column: Editorial Content, Specs & Actions */}
<div className="lg:col-span-5 space-y-5">
<div>
<span className="text-xs font-mono text-blue-600 font-bold uppercase tracking-wider block mb-1">
{card.tagline}
</span>
<h3 className="text-2xl sm:text-3xl lg:text-4xl font-display font-bold text-slate-900 tracking-tight group-hover:text-blue-600 transition-colors">
{card.title}
</h3>
{/* Dynamic Multi-Layout Variations Across Cards */}
{idx === 1 ? (
/* VARIATION 2: Inverted Zig-Zag Layout (Visual on Left, Editorial on Right) */
<div className="grid grid-cols-1 lg:grid-cols-12 gap-8 lg:gap-14 items-center">
{/* Left Column: Visual Media */}
<div className="lg:col-span-7 order-last lg:order-first">
{isBannerMode ? (
<div className="relative aspect-[16/10] w-full rounded-2xl sm:rounded-3xl overflow-hidden border border-slate-200 bg-slate-950 shadow-md group/banner">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={card.bannerImage || card.beforeUrl || 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=1200&auto=format&fit=crop&q=80'}
alt={card.title}
className="w-full h-full object-cover group-hover/banner:scale-105 transition-transform duration-700"
/>
<div className="absolute inset-0 bg-gradient-to-t from-slate-950/85 via-slate-950/20 to-transparent pointer-events-none" />
<div className="absolute top-4 left-4 z-20">
<span className="px-3.5 py-1.5 rounded-full bg-white/95 backdrop-blur-md text-slate-900 text-xs font-mono font-bold border border-white/40 shadow-md">
{card.bannerBadge || 'DYNAMIC STUDIO BANNER'}
</span>
</div>
<div className="absolute bottom-5 left-5 right-5 z-20 flex items-end justify-between">
<div>
<span className="text-[10px] font-mono text-blue-300 font-bold uppercase tracking-wider block mb-1">
Neural Preset Matrix
</span>
<h4 className="text-xl sm:text-2xl font-display font-bold text-white drop-shadow">
{card.title}
</h4>
</div>
<span className="hidden sm:inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-full bg-blue-600/90 text-white text-xs font-mono font-bold backdrop-blur-md shadow-md">
<Zap className="w-3.5 h-3.5" />
<span>1-Click Deploy</span>
</span>
</div>
</div>
) : (
<div className="rounded-2xl sm:rounded-3xl overflow-hidden border border-slate-200 bg-slate-100 shadow-md">
<Cinematic3DComparison
beforeUrl={card.beforeUrl!}
afterUrl={card.afterUrl!}
beforeLabel="RAW SOURCE"
afterLabel={card.model}
aspectRatio="aspect-[16/10]"
autoSlide={false}
/>
</div>
)}
</div>
<p className="text-sm sm:text-base text-slate-600 leading-relaxed font-normal">
{/* Right Column: Editorial Text & CTAs */}
<div className="lg:col-span-5 space-y-5">
<div>
<span className="text-xs font-mono text-purple-600 font-bold uppercase tracking-wider block mb-1">
{card.tagline}
</span>
<h3 className="text-2xl sm:text-3xl lg:text-4xl font-display font-bold text-slate-900 tracking-tight group-hover:text-blue-600 transition-colors">
{card.title}
</h3>
</div>
<p className="text-sm sm:text-base text-slate-600 leading-relaxed font-normal">
{card.description}
</p>
<div className="space-y-2 pt-1">
{card.specs.map((spec, i) => (
<div key={i} className="flex items-center gap-2.5 text-xs sm:text-sm text-slate-700 font-medium">
<CheckCircle2 className="w-4 h-4 text-purple-600 shrink-0" />
<span>{spec}</span>
</div>
))}
</div>
<div className="pt-4 flex flex-wrap items-center gap-3">
<Link
href={`/tools/${card.toolSlug}`}
className="inline-flex items-center gap-2 px-6 py-3 rounded-full bg-purple-600 hover:bg-purple-700 text-white text-xs font-bold transition-all shadow-sm shadow-purple-500/20 active:scale-95 hover:-translate-y-0.5"
>
<span>Launch Online Studio</span>
<ArrowRight className="w-3.5 h-3.5" />
</Link>
<Link
href={`/apps/${card.appSlug}`}
className="inline-flex items-center gap-1.5 px-5 py-3 rounded-full bg-slate-100 hover:bg-slate-200 text-slate-800 text-xs font-bold transition-colors"
>
<Smartphone className="w-3.5 h-3.5 text-purple-600" />
<span>{card.appName}</span>
</Link>
</div>
</div>
</div>
) : idx === 2 ? (
/* VARIATION 3: Widescreen Bento Spotlight Layout (Header Top, Full-Width Visual Below) */
<div className="space-y-6">
<div className="flex flex-col md:flex-row md:items-end justify-between gap-4">
<div>
<span className="text-xs font-mono text-emerald-600 font-bold uppercase tracking-wider block mb-1">
{card.tagline}
</span>
<h3 className="text-2xl sm:text-3xl lg:text-4xl font-display font-bold text-slate-900 tracking-tight">
{card.title}
</h3>
</div>
<div className="flex flex-wrap items-center gap-3 shrink-0">
<Link
href={`/tools/${card.toolSlug}`}
className="inline-flex items-center gap-2 px-6 py-2.5 rounded-full bg-blue-600 hover:bg-blue-700 text-white text-xs font-bold transition-all shadow-sm shadow-blue-500/20 active:scale-95"
>
<span>Launch Online Studio</span>
<ArrowRight className="w-3.5 h-3.5" />
</Link>
<Link
href={`/apps/${card.appSlug}`}
className="inline-flex items-center gap-1.5 px-5 py-2.5 rounded-full bg-slate-100 hover:bg-slate-200 text-slate-800 text-xs font-bold transition-colors"
>
<Smartphone className="w-3.5 h-3.5 text-blue-600" />
<span>{card.appName}</span>
</Link>
</div>
</div>
<p className="text-sm sm:text-base text-slate-600 max-w-3xl font-normal">
{card.description}
</p>
{/* Specs Checklist Chips */}
<div className="space-y-2 pt-1">
{/* Wide 21:9 / 16:9 Widescreen Comparison Viewport */}
<div className="rounded-2xl sm:rounded-3xl overflow-hidden border border-slate-200 bg-slate-100 shadow-md">
<Cinematic3DComparison
beforeUrl={card.beforeUrl!}
afterUrl={card.afterUrl!}
beforeLabel="LOW-RES SOURCE"
afterLabel={card.model}
aspectRatio="aspect-[21/9] min-h-[360px]"
autoSlide={false}
/>
</div>
{/* Horizontal Specs Chips */}
<div className="flex flex-wrap items-center gap-3 pt-1">
{card.specs.map((spec, i) => (
<div key={i} className="flex items-center gap-2.5 text-xs sm:text-sm text-slate-700 font-medium">
<CheckCircle2 className="w-4 h-4 text-blue-600 shrink-0" />
<span
key={i}
className="px-3.5 py-1.5 rounded-xl bg-slate-50 text-slate-700 text-xs font-mono font-medium border border-slate-200 flex items-center gap-2"
>
<CheckCircle2 className="w-3.5 h-3.5 text-emerald-600" />
<span>{spec}</span>
</div>
</span>
))}
</div>
</div>
) : (
/* VARIATION 1: Standard Symmetrical Layout (Text Left, Visual Right) */
<div className="grid grid-cols-1 lg:grid-cols-12 gap-8 lg:gap-14 items-center">
{/* Left Column: Editorial Content, Specs & Actions */}
<div className="lg:col-span-5 space-y-5">
<div>
<span className="text-xs font-mono text-blue-600 font-bold uppercase tracking-wider block mb-1">
{card.tagline}
</span>
<h3 className="text-2xl sm:text-3xl lg:text-4xl font-display font-bold text-slate-900 tracking-tight group-hover:text-blue-600 transition-colors">
{card.title}
</h3>
</div>
{/* Action Links */}
<div className="pt-4 flex flex-wrap items-center gap-3">
<Link
href={`/tools/${card.toolSlug}`}
className="inline-flex items-center gap-2 px-6 py-3 rounded-full bg-blue-600 hover:bg-blue-700 text-white text-xs font-bold transition-all shadow-sm shadow-blue-500/20 active:scale-95 hover:-translate-y-0.5"
>
<span>Launch Online Studio</span>
<ArrowRight className="w-3.5 h-3.5" />
</Link>
<p className="text-sm sm:text-base text-slate-600 leading-relaxed font-normal">
{card.description}
</p>
<Link
href={`/apps/${card.appSlug}`}
className="inline-flex items-center gap-1.5 px-5 py-3 rounded-full bg-slate-100 hover:bg-slate-200 text-slate-800 text-xs font-bold transition-colors"
>
<Smartphone className="w-3.5 h-3.5 text-blue-600" />
<span>{card.appName}</span>
</Link>
{/* Specs Checklist Chips */}
<div className="space-y-2 pt-1">
{card.specs.map((spec, i) => (
<div key={i} className="flex items-center gap-2.5 text-xs sm:text-sm text-slate-700 font-medium">
<CheckCircle2 className="w-4 h-4 text-blue-600 shrink-0" />
<span>{spec}</span>
</div>
))}
</div>
{/* Action Links */}
<div className="pt-4 flex flex-wrap items-center gap-3">
<Link
href={`/tools/${card.toolSlug}`}
className="inline-flex items-center gap-2 px-6 py-3 rounded-full bg-blue-600 hover:bg-blue-700 text-white text-xs font-bold transition-all shadow-sm shadow-blue-500/20 active:scale-95 hover:-translate-y-0.5"
>
<span>Launch Online Studio</span>
<ArrowRight className="w-3.5 h-3.5" />
</Link>
<Link
href={`/apps/${card.appSlug}`}
className="inline-flex items-center gap-1.5 px-5 py-3 rounded-full bg-slate-100 hover:bg-slate-200 text-slate-800 text-xs font-bold transition-colors"
>
<Smartphone className="w-3.5 h-3.5 text-blue-600" />
<span>{card.appName}</span>
</Link>
</div>
</div>
{/* Right Column: Dynamic Simple Banner OR Interactive 3D Comparison Slider */}
<div className="lg:col-span-7">
{isBannerMode ? (
<div className="relative aspect-[16/10] w-full rounded-2xl sm:rounded-3xl overflow-hidden border border-slate-200 bg-slate-950 shadow-md group/banner">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={card.bannerImage || card.beforeUrl || 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=1200&auto=format&fit=crop&q=80'}
alt={card.title}
className="w-full h-full object-cover group-hover/banner:scale-105 transition-transform duration-700"
/>
<div className="absolute inset-0 bg-gradient-to-t from-slate-950/85 via-slate-950/20 to-transparent pointer-events-none" />
<div className="absolute top-4 left-4 z-20">
<span className="px-3.5 py-1.5 rounded-full bg-white/95 backdrop-blur-md text-slate-900 text-xs font-mono font-bold border border-white/40 shadow-md">
{card.bannerBadge || 'DYNAMIC STUDIO BANNER'}
</span>
</div>
<div className="absolute bottom-5 left-5 right-5 z-20 flex items-end justify-between">
<div>
<span className="text-[10px] font-mono text-blue-300 font-bold uppercase tracking-wider block mb-1">
Neural Preset Matrix
</span>
<h4 className="text-xl sm:text-2xl font-display font-bold text-white drop-shadow">
{card.title}
</h4>
</div>
<span className="hidden sm:inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-full bg-blue-600/90 text-white text-xs font-mono font-bold backdrop-blur-md shadow-md">
<Zap className="w-3.5 h-3.5" />
<span>1-Click Deploy</span>
</span>
</div>
</div>
) : (
<div className="rounded-2xl sm:rounded-3xl overflow-hidden border border-slate-200 bg-slate-100 shadow-md">
<Cinematic3DComparison
beforeUrl={card.beforeUrl!}
afterUrl={card.afterUrl!}
beforeLabel="RAW SOURCE"
afterLabel={card.model}
aspectRatio="aspect-[16/10]"
autoSlide={false}
/>
</div>
)}
</div>
</div>
{/* Right Column: Dynamic Simple Banner OR Interactive 3D Comparison Slider */}
<div className="lg:col-span-7">
{isBannerMode ? (
/* DYNAMIC SIMPLE BANNER (100% Configurable from JSON, Zero Comparison) */
<div className="relative aspect-[16/10] w-full rounded-2xl sm:rounded-3xl overflow-hidden border border-slate-200 bg-slate-950 shadow-md group/banner">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={card.bannerImage || card.beforeUrl || 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=1200&auto=format&fit=crop&q=80'}
alt={card.title}
className="w-full h-full object-cover group-hover/banner:scale-105 transition-transform duration-700"
/>
{/* Atmospheric Vignette Gradient */}
<div className="absolute inset-0 bg-gradient-to-t from-slate-950/85 via-slate-950/20 to-transparent pointer-events-none" />
{/* Top Dynamic Tag */}
<div className="absolute top-4 left-4 z-20">
<span className="px-3.5 py-1.5 rounded-full bg-white/95 backdrop-blur-md text-slate-900 text-xs font-mono font-bold border border-white/40 shadow-md">
{card.bannerBadge || 'DYNAMIC STUDIO BANNER'}
</span>
</div>
{/* Bottom Banner Content */}
<div className="absolute bottom-5 left-5 right-5 z-20 flex items-end justify-between">
<div>
<span className="text-[10px] font-mono text-blue-300 font-bold uppercase tracking-wider block mb-1">
Neural Preset Matrix
</span>
<h4 className="text-xl sm:text-2xl font-display font-bold text-white drop-shadow">
{card.title}
</h4>
</div>
<span className="hidden sm:inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-full bg-blue-600/90 text-white text-xs font-mono font-bold backdrop-blur-md shadow-md">
<Zap className="w-3.5 h-3.5" />
<span>1-Click Deploy</span>
</span>
</div>
</div>
) : (
/* INTERACTIVE 3D COMPARISON SLIDER */
<div className="rounded-2xl sm:rounded-3xl overflow-hidden border border-slate-200 bg-slate-100 shadow-md">
<Cinematic3DComparison
beforeUrl={card.beforeUrl!}
afterUrl={card.afterUrl!}
beforeLabel="RAW SOURCE"
afterLabel={card.model}
aspectRatio="aspect-[16/10]"
autoSlide={false}
/>
</div>
)}
</div>
</div>
)}
</SpotlightCard>
);
})}
@@ -0,0 +1,284 @@
'use client';
import React, { useRef, useState } from 'react';
import Link from 'next/link';
import {
Play,
Pause,
Volume2,
VolumeX,
ArrowRight,
Sparkles,
Image as ImageIcon,
Video as VideoIcon,
Layers,
CheckCircle2
} from 'lucide-react';
import { ShimmerBadge } from '@/components/animate-ui/ShimmerBadge';
import { SpotlightCard } from '@/components/animate-ui/SpotlightCard';
import { BorderBeam } from '@/components/animate-ui/BorderBeam';
import { MotionTextReveal } from '@/components/animate-ui/MotionTextReveal';
import { AnimatedGradientText } from '@/components/animate-ui/AnimatedGradientText';
export interface MediaItem {
id: string;
type: 'video' | 'photo' | 'comparison' | 'banner';
title: string;
category: string;
badge?: string;
description: string;
videoUrl?: string;
poster?: string;
image?: string;
beforeUrl?: string;
afterUrl?: string;
link: string;
tag?: string;
}
interface MediaShowcaseProps {
title?: string;
badge?: string;
subtitle?: string;
items?: MediaItem[];
}
const DEFAULT_MEDIA_ITEMS: MediaItem[] = [
{
id: 'video-retouch-reel',
type: 'video',
title: '4K Studio Model Portrait Session',
category: 'VIDEO ENHANCEMENT',
badge: '4K 60FPS VIDEO',
description: 'Continuous temporal facial neural retouching across dynamic video frames with zero flicker.',
videoUrl: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4',
poster: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=800&auto=format&fit=crop&q=80',
link: '/tools/blemish-remover',
tag: 'Temporal Retouching',
},
{
id: 'hair-alpha-photo',
type: 'photo',
title: 'Fine Flyaway Strand Alpha Extraction',
category: 'HAIR CUTOUT',
badge: 'ULTRA HD PHOTO',
description: 'Microscopic hair fiber separation preserving semi-transparent boundary details for editorial covers.',
image: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=800&auto=format&fit=crop&q=80',
link: '/tools/background-remover',
tag: '0.02px Edge Trim',
},
{
id: 'restoration-comparison',
type: 'comparison',
title: '4K Generative Facial Restoration',
category: 'SUPER-RESOLUTION',
badge: 'SIDE-BY-SIDE',
description: 'Deep neural priors reconstruct iris sharpness and realistic skin pores from compressed source photos.',
beforeUrl: 'https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=800&auto=format&fit=crop&q=80',
afterUrl: 'https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=800&auto=format&fit=crop&q=80',
link: '/tools/photo-enhancer',
tag: 'Iris Sharpness',
},
];
export function MediaShowcaseSection({
title = 'Visual Media & Transformation Reel',
badge = 'CURATED CREATIVE GALLERY',
subtitle = 'Explore high-resolution photography, 4K video clips, and creative transformations produced by CRE neural tools.',
items = DEFAULT_MEDIA_ITEMS,
}: MediaShowcaseProps) {
const mediaItems = items && items.length > 0 ? items : DEFAULT_MEDIA_ITEMS;
return (
<section className="py-20 sm:py-24 bg-[#F5F2EB] border-y border-slate-900/[0.08] relative overflow-hidden">
{/* Ambient background glow */}
<div className="absolute top-1/4 right-1/4 w-96 h-96 bg-blue-500/[0.03] rounded-full blur-3xl pointer-events-none" />
<div className="w-full max-w-[1640px] 2xl:max-w-[1720px] mx-auto px-4 sm:px-6 lg:px-8 xl:px-10 relative z-10">
{/* Section Header */}
<div className="flex flex-col md:flex-row md:items-end justify-between gap-4 mb-12 pb-6 border-b border-slate-900/[0.08]">
<div>
<div className="mb-2.5">
<ShimmerBadge>
<Sparkles className="w-3.5 h-3.5 text-blue-600" />
<span>{badge}</span>
</ShimmerBadge>
</div>
<h3 className="text-2xl sm:text-3xl lg:text-4xl font-display font-black text-slate-900 tracking-tight">
<MotionTextReveal text="Visual Media &" className="text-slate-900 inline" />{' '}
<AnimatedGradientText className="font-black">
Transformation Reel
</AnimatedGradientText>
</h3>
<p className="text-xs sm:text-sm text-slate-600 mt-1 max-w-2xl font-normal">
{subtitle}
</p>
</div>
<div className="flex items-center gap-3 self-start md:self-end">
<Link
href="/#studio-suite"
className="text-xs font-mono font-bold text-blue-700 bg-white hover:bg-blue-50 border border-slate-200 px-4 py-2 rounded-full flex items-center gap-1.5 shadow-sm transition-all duration-200 hover:-translate-y-0.5"
>
<span>Explore The Suite</span>
<ArrowRight className="w-3.5 h-3.5" />
</Link>
</div>
</div>
{/* Dynamic Media Grid: Video Cards, Photo Showcases & Side-by-Side Frames */}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 sm:gap-8">
{mediaItems.map((item) => (
<MediaCard key={item.id} item={item} />
))}
</div>
</div>
</section>
);
}
function MediaCard({ item }: { item: MediaItem }) {
const videoRef = useRef<HTMLVideoElement>(null);
const [isPlaying, setIsPlaying] = useState(false);
const [isMuted, setIsMuted] = useState(true);
const togglePlay = () => {
if (!videoRef.current) return;
if (isPlaying) {
videoRef.current.pause();
setIsPlaying(false);
} else {
videoRef.current.play().catch(() => {});
setIsPlaying(true);
}
};
const toggleMute = () => {
if (!videoRef.current) return;
videoRef.current.muted = !isMuted;
setIsMuted(!isMuted);
};
return (
<SpotlightCard className="group bg-white rounded-3xl p-5 sm:p-6 border border-slate-900/[0.08] shadow-sm hover:shadow-2xl hover:border-blue-400/80 hover:-translate-y-1.5 transition-all duration-300 flex flex-col justify-between relative">
<BorderBeam duration={12} size={250} borderWidth={1.5} colorFrom="#3b82f6" colorTo="#a855f7" />
<div>
{/* Card Header Tag */}
<div className="flex items-center justify-between gap-2 mb-4 pb-3 border-b border-slate-100">
<div className="flex items-center gap-2">
<span className="text-[10px] font-mono font-bold uppercase tracking-wider text-blue-700 bg-blue-50 border border-blue-200/80 px-2.5 py-0.5 rounded-full flex items-center gap-1">
{item.type === 'video' ? <VideoIcon className="w-3 h-3 text-blue-600" /> : <ImageIcon className="w-3 h-3 text-blue-600" />}
<span>{item.category}</span>
</span>
</div>
{item.badge && (
<span className="text-[10px] font-mono font-bold text-slate-700 bg-slate-100 border border-slate-200 px-2.5 py-0.5 rounded-full">
{item.badge}
</span>
)}
</div>
{/* Media Viewport Container */}
<div className="relative aspect-[16/10] rounded-2xl overflow-hidden mb-5 bg-slate-950 border border-slate-200 shadow-inner group/media">
{item.type === 'video' && item.videoUrl ? (
/* HTML5 Video Player Viewport */
<div className="relative w-full h-full">
<video
ref={videoRef}
src={item.videoUrl}
poster={item.poster}
loop
muted={isMuted}
playsInline
className="w-full h-full object-cover"
onPlay={() => setIsPlaying(true)}
onPause={() => setIsPlaying(false)}
/>
{/* Video Controls Overlay */}
<div className="absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent flex items-end justify-between p-3.5 pointer-events-none">
<button
onClick={togglePlay}
aria-label={isPlaying ? 'Pause video' : 'Play video'}
className="pointer-events-auto w-9 h-9 rounded-full bg-white/95 text-slate-900 shadow-lg flex items-center justify-center hover:scale-110 active:scale-95 transition-all"
>
{isPlaying ? <Pause className="w-4 h-4 fill-slate-900" /> : <Play className="w-4 h-4 fill-slate-900 ml-0.5" />}
</button>
<div className="flex items-center gap-2 pointer-events-auto">
<button
onClick={toggleMute}
aria-label={isMuted ? 'Unmute' : 'Mute'}
className="w-8 h-8 rounded-full bg-black/60 text-white backdrop-blur-md flex items-center justify-center hover:bg-black/80 transition-colors"
>
{isMuted ? <VolumeX className="w-3.5 h-3.5" /> : <Volume2 className="w-3.5 h-3.5" />}
</button>
<span className="px-2 py-0.5 rounded bg-black/70 backdrop-blur-md text-[9px] font-mono font-bold text-white">
4K VIDEO
</span>
</div>
</div>
</div>
) : item.type === 'comparison' && item.beforeUrl && item.afterUrl ? (
/* Clean Side-by-Side Dual Split Frame */
<div className="grid grid-cols-2 h-full w-full">
<div className="relative h-full overflow-hidden border-r border-white/20">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src={item.beforeUrl} alt="Original source" className="h-full w-full object-cover" />
<span className="absolute bottom-2 left-2 bg-black/80 backdrop-blur-md px-2 py-0.5 rounded text-[9px] font-mono font-bold text-white shadow-sm">
RAW INPUT
</span>
</div>
<div className="relative h-full overflow-hidden">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src={item.afterUrl} alt="CRE Reconstructed result" className="h-full w-full object-cover group-hover/media:scale-105 transition-transform duration-700" />
<span className="absolute bottom-2 right-2 bg-blue-600/90 backdrop-blur-md px-2 py-0.5 rounded text-[9px] font-mono font-bold text-white shadow-sm">
CRE AI
</span>
</div>
</div>
) : (
/* High-Res Photo Showcase Viewport */
<div className="relative w-full h-full">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={item.image || item.poster || item.beforeUrl || 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=800&auto=format&fit=crop&q=80'}
alt={item.title}
className="w-full h-full object-cover group-hover/media:scale-105 transition-transform duration-700"
/>
<div className="absolute inset-0 bg-gradient-to-t from-slate-950/60 via-transparent to-transparent pointer-events-none" />
{item.tag && (
<span className="absolute bottom-3 left-3 bg-white/90 backdrop-blur-md px-2.5 py-1 rounded-lg text-[10px] font-mono font-bold text-slate-800 shadow-sm">
{item.tag}
</span>
)}
</div>
)}
</div>
{/* Card Copy */}
<h4 className="text-lg sm:text-xl font-display font-bold text-slate-900 group-hover:text-blue-600 transition-colors tracking-tight mb-2">
{item.title}
</h4>
<p className="text-xs sm:text-sm text-slate-600 font-normal leading-relaxed mb-4">
{item.description}
</p>
</div>
{/* Action Link */}
<div className="pt-3 border-t border-slate-100 flex items-center justify-between">
<span className="text-[11px] font-mono text-slate-400">
Studio Preset
</span>
<Link
href={item.link}
className="inline-flex items-center gap-1.5 text-xs font-mono font-bold text-blue-600 group-hover:text-blue-700 group-hover:translate-x-0.5 transition-all"
>
<span>Open Tool</span>
<ArrowRight className="w-3.5 h-3.5" />
</Link>
</div>
</SpotlightCard>
);
}
+4 -1
View File
@@ -20,6 +20,7 @@ import { RichTextSection } from './RichTextSection';
import { CtaBannerSection } from './CtaBannerSection';
import { NoticeSection } from './NoticeSection';
import { TransformationReelSection } from './TransformationReelSection';
import { MediaShowcaseSection } from './MediaShowcaseSection';
import { VisualUseCasesSection } from './VisualUseCasesSection';
import { WorkflowVisualizerSection } from './WorkflowVisualizerSection';
import { VerticalToolStackSection } from './VerticalToolStackSection';
@@ -69,7 +70,9 @@ export function SectionRenderer({ section, context }: SectionRendererProps) {
);
case 'transformationReel':
return <TransformationReelSection {...resolvedProps} />;
case 'mediaShowcase':
case 'mediaReel':
return <MediaShowcaseSection {...resolvedProps} />;
case 'majorToolBanners':
case 'cinematicHorizontal':
@@ -41,13 +41,32 @@ const ICON_MAP: Record<string, React.ElementType> = {
// Architecture badges mapped by tool id
const MODEL_BADGES: Record<string, { model: string; latency: string; chip: string }> = {
'face.blemish.remove': { model: 'RetouchGAN v2.1', latency: '< 380ms', chip: 'Sub-Pore Texture' },
'face.teeth.whiten': { model: 'DentiClear AI', latency: '< 290ms', chip: 'Enamel Lustre Preservation' },
'bg.p3m.matting': { model: 'P3M-Net Alpha', latency: '< 520ms', chip: 'Hair-Strand Precision' },
'restore.photo.enhance': { model: 'GFPGAN + RealESRGAN', latency: '< 460ms', chip: '4K Super-Resolution' },
'restore.photo.old': { model: 'ScratchDeNet Pro', latency: '< 490ms', chip: 'Crack & Tear Inpainting' },
'restore.photo.colorize': { model: 'DeOldify Chroma', latency: '< 420ms', chip: 'Historical Palette AI' },
'art.cartoon.caricature': { model: 'AnimeGAN v3 Core', latency: '< 350ms', chip: 'Vector Line Art' },
'art.polaroid.fx': { model: 'AnalogFilm Studio', latency: '< 240ms', chip: 'Halide Grain Synthesis' },
'face.teeth.whitener': { model: 'DentiClear AI', latency: '< 290ms', chip: 'Enamel Lustre Preservation' },
'cutout.p3m.bg': { model: 'P3M-Net Alpha', latency: '< 520ms', chip: 'Hair-Strand Precision' },
'restore.enhancer': { model: 'GFPGAN + RealESRGAN', latency: '< 460ms', chip: '4K Super-Resolution' },
'restore.oldphoto': { model: 'ScratchDeNet Pro', latency: '< 490ms', chip: 'Crack & Tear Inpainting' },
'restore.colorization': { model: 'DeOldify Chroma', latency: '< 420ms', chip: 'Historical Palette AI' },
'art.cartoon.gan': { model: 'AnimeGAN v3 Core', latency: '< 350ms', chip: 'Vector Line Art' },
'art.polaroid.film': { model: 'AnalogFilm Studio', latency: '< 240ms', chip: 'Halide Grain Synthesis' },
};
const ACCENT_STYLES: Record<string, { badge: string; text: string }> = {
'background-cutout': {
badge: 'bg-blue-50 border-blue-200 text-blue-700',
text: 'text-blue-600',
},
'restoration': {
badge: 'bg-emerald-50 border-emerald-200 text-emerald-700',
text: 'text-emerald-600',
},
'creative-art': {
badge: 'bg-purple-50 border-purple-200 text-purple-700',
text: 'text-purple-600',
},
'portrait-retouch': {
badge: 'bg-amber-50 border-amber-200 text-amber-700',
text: 'text-amber-600',
},
};
export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
@@ -163,9 +182,9 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
</span>
</div>
{/* Symmetrical Full-Width Tool Cards */}
<div className="space-y-8">
{catTools.map((tool) => {
{/* Dynamic Multi-Format Tool Cards with Alternating Layouts */}
<div className="space-y-10 sm:space-y-12">
{catTools.map((tool, toolIdx) => {
const badgeInfo = MODEL_BADGES[tool.id] || {
model: 'Neural Vision v2.0',
latency: '< 450ms',
@@ -177,47 +196,124 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
caption: 'Interactive Before/After Preview',
};
const isBanner = (tool as any).variant === 'banner' || (tool as any).previewType === 'banner' || !example.after;
const isZigZag = toolIdx % 2 === 1;
const isMattingTool = tool.id === 'cutout.p3m.bg';
const isTeethTool = tool.id === 'face.teeth.whitener';
const isArtTool = tool.category === 'creative-art' || tool.id === 'art.cartoon.gan';
const isBanner = (tool as any).variant === 'banner' || (tool as any).previewType === 'banner' || isTeethTool || !example.after;
// Category accent styles
const accent = ACCENT_STYLES[tool.category] || ACCENT_STYLES['portrait-retouch'];
return (
<SpotlightCard
key={tool.id}
className="bg-white rounded-3xl p-6 sm:p-8 lg:p-10 border border-slate-900/[0.08] hover:border-blue-400/80 shadow-sm hover:shadow-xl hover:-translate-y-1 transition-all duration-300 relative group"
className="bg-white rounded-3xl p-6 sm:p-8 lg:p-10 border border-slate-900/[0.08] hover:border-blue-400/80 shadow-sm hover:shadow-2xl hover:-translate-y-1 transition-all duration-300 relative group"
>
{/* Top Metadata Row */}
<div className="flex flex-wrap items-center justify-between gap-3 mb-6 pb-4 border-b border-slate-100">
<div className="flex flex-wrap items-center gap-2">
{/* Neural Model Tag */}
<span className="inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-blue-50 border border-blue-200 text-blue-700 font-mono text-[11px] font-semibold">
<Cpu className="w-3 h-3 text-blue-600" />
<span className={`inline-flex items-center gap-1.5 px-3 py-1 rounded-full border font-mono text-[11px] font-semibold ${accent.badge}`}>
<Cpu className="w-3 h-3" />
<span>{badgeInfo.model}</span>
</span>
{/* Specific Capability Chip */}
<span className="px-2.5 py-1 rounded-full bg-slate-100 border border-slate-200 text-slate-700 text-[11px] font-mono font-medium">
{badgeInfo.chip}
</span>
</div>
{/* Latency Metric */}
<div className="flex items-center gap-1.5 text-[11px] font-mono text-emerald-700 bg-emerald-50 border border-emerald-200 px-3 py-1 rounded-full font-semibold">
<span className="w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse" />
<span>{badgeInfo.latency} Stream</span>
</div>
</div>
{/* Card Content Grid: 2 Balanced Columns with Wide Preview */}
{/* Symmetrical Two-Column Content Grid with Alternating Zig-Zag Flow */}
<div className="grid grid-cols-1 lg:grid-cols-12 gap-8 lg:gap-12 items-center">
{/* Left Details Column */}
{/* Visual Media Viewport */}
<div className={`lg:col-span-7 ${isZigZag ? 'order-last lg:order-first' : ''}`}>
{isMattingTool ? (
/* VARIATION B: Side-by-Side Transparent Alpha Cutout Frame with Checkerboard */
<div className="grid grid-cols-2 gap-3 aspect-[16/10] w-full rounded-2xl overflow-hidden p-2.5 bg-slate-900 border border-slate-200 shadow-md">
<div className="relative rounded-xl overflow-hidden border border-white/10 bg-slate-950">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src={example.before} alt="Source Portrait" className="w-full h-full object-cover" />
<span className="absolute bottom-2 left-2 bg-black/80 backdrop-blur-md px-2 py-0.5 rounded text-[9px] font-mono font-bold text-white border border-white/10">
RAW PORTRAIT
</span>
</div>
<div
className="relative rounded-xl overflow-hidden border border-white/20 bg-slate-950 flex items-center justify-center group/cutout"
style={{
backgroundImage: `
linear-gradient(45deg, #1e293b 25%, transparent 25%),
linear-gradient(-45deg, #1e293b 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #1e293b 75%),
linear-gradient(-45deg, transparent 75%, #1e293b 75%)
`,
backgroundSize: '16px 16px',
backgroundPosition: '0 0, 0 8px, 8px -8px, -8px 0px'
}}
>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src={example.after} alt="P3M Cutout" className="w-full h-full object-cover group-hover/cutout:scale-105 transition-transform duration-700" />
<span className="absolute bottom-2 right-2 bg-blue-600/90 backdrop-blur-md px-2 py-0.5 rounded text-[9px] font-mono font-bold text-white shadow-sm">
ALPHA PNG STREAM
</span>
</div>
</div>
) : isBanner ? (
/* VARIATION C: Editorial Studio Luminescence Banner */
<div className="relative aspect-[16/10] rounded-2xl overflow-hidden border border-slate-200 bg-slate-950 shadow-md group/vbanner">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={example.before || 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=800&auto=format&fit=crop&q=80'}
alt={resolveLocalised(tool.name, locale)}
className="w-full h-full object-cover group-hover/vbanner:scale-105 transition-transform duration-700"
/>
<div className="absolute inset-0 bg-gradient-to-t from-slate-950/80 via-transparent to-transparent pointer-events-none" />
<div className="absolute top-4 left-4">
<span className="px-3 py-1 rounded-full bg-white/90 backdrop-blur-md text-slate-900 text-xs font-mono font-bold shadow-md">
STUDIO PRESET • {badgeInfo.model}
</span>
</div>
<div className="absolute bottom-4 left-4 right-4 flex items-center justify-between text-white">
<span className="text-xs font-mono font-semibold text-slate-200">Enamel Lustre Preservation</span>
<span className="px-2.5 py-1 rounded-full bg-blue-600/90 text-[10px] font-mono font-bold">Lossless Output</span>
</div>
</div>
) : (
/* VARIATION A: Interactive 3D Before/After Slider */
<div className="rounded-2xl overflow-hidden border border-slate-200 shadow-md">
<BeforeAfterSlider
beforeUrl={example.before}
afterUrl={example.after}
beforeLabel="Raw Input"
afterLabel="CRE Result"
aspectRatio="aspect-[16/10]"
autoSlide={false}
/>
</div>
)}
</div>
{/* Editorial Details Column */}
<div className="lg:col-span-5 space-y-5">
<h4 className="text-2xl sm:text-3xl font-display font-bold text-slate-900 group-hover:text-blue-600 transition-colors text-3d-chiseled">
{resolveLocalised(tool.name, locale)}
</h4>
<div>
<span className="text-xs font-mono text-blue-600 font-bold uppercase tracking-wider block mb-1">
{badgeInfo.chip}
</span>
<h4 className="text-2xl sm:text-3xl font-display font-bold text-slate-900 group-hover:text-blue-600 transition-colors">
{resolveLocalised(tool.name, locale)}
</h4>
</div>
<p className="text-xs sm:text-sm text-slate-600 leading-relaxed font-normal">
{resolveLocalised(tool.summary, locale)}
</p>
{/* Features Checklist */}
<div className="space-y-2.5 pt-2">
<div className="space-y-2.5 pt-1">
<div className="flex items-center gap-2.5 text-xs text-slate-700 font-medium">
<CheckCircle2 className="w-4 h-4 text-blue-600 shrink-0" />
<span>Sub-pixel edge and realistic texture preservation</span>
@@ -233,7 +329,7 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
</div>
{/* Action Buttons */}
<div className="pt-4 flex flex-wrap items-center gap-3">
<div className="pt-3 flex flex-wrap items-center gap-3">
<Link
href={`/tools/${tool.slug}`}
className="inline-flex items-center gap-2 px-6 py-3 rounded-full text-xs font-bold text-white bg-blue-600 hover:bg-blue-700 shadow-sm shadow-blue-500/20 transition-all duration-200 hover:-translate-y-0.5 active:translate-y-0"
@@ -251,35 +347,6 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
</Link>
</div>
</div>
{/* Right Interactive Viewport: Simple Banner vs Comparison Slider */}
<div className="lg:col-span-7">
{isBanner ? (
<div className="relative aspect-[16/10] rounded-2xl overflow-hidden border border-slate-200 bg-slate-950 shadow-md group/vbanner">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={example.before || 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=800&auto=format&fit=crop&q=80'}
alt={resolveLocalised(tool.name, locale)}
className="w-full h-full object-cover group-hover/vbanner:scale-105 transition-transform duration-700"
/>
<div className="absolute inset-0 bg-gradient-to-t from-slate-950/80 via-transparent to-transparent pointer-events-none" />
<div className="absolute top-4 left-4">
<span className="px-3 py-1 rounded-full bg-white/90 backdrop-blur-md text-slate-900 text-xs font-mono font-bold shadow-md">
STUDIO BANNER • {badgeInfo.model}
</span>
</div>
</div>
) : (
<BeforeAfterSlider
beforeUrl={example.before}
afterUrl={example.after}
beforeLabel="Raw Input"
afterLabel="CRE Result"
aspectRatio="aspect-[16/10]"
autoSlide={false}
/>
)}
</div>
</div>
</SpotlightCard>
);