feat(ui): complete vertical layout overhaul, dynamic JSON banners, and animate-ui text motion graphics

This commit is contained in:
2026-11-03 18:06:20 +05:30
parent 8cec9692dc
commit b47b033ab7
24 changed files with 1419 additions and 608 deletions
+38
View File
@@ -214,6 +214,44 @@
animation: shimmer 3s infinite;
}
@keyframes gradient-flow {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
@keyframes shimmer-slide {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(100%);
}
}
@keyframes border-beam {
100% {
offset-distance: 100%;
}
}
.animate-border-beam {
animation: border-beam var(--duration) infinite linear;
}
/* Pixelcut Typography & Sub-Pixel Crisp Font Rendering */
body, h1, h2, h3, h4, p, span, button {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
}
/* Clean Minimalist Warm Scrollbar */
::-webkit-scrollbar {
width: 7px;
@@ -0,0 +1,38 @@
'use client';
import React from 'react';
import { motion } from 'framer-motion';
interface AnimatedGradientTextProps {
children: React.ReactNode;
className?: string;
gradientColors?: string;
duration?: number;
}
/**
* Animate UI - Animated Gradient Text
* Liquid animated flowing color gradient text.
* Reference: https://animate-ui.com/docs
*/
export function AnimatedGradientText({
children,
className = '',
gradientColors = 'linear-gradient(90deg, #1d4ed8 0%, #4338ca 25%, #7c3aed 50%, #d97706 75%, #1d4ed8 100%)',
duration = 6,
}: AnimatedGradientTextProps) {
return (
<span
className={`relative inline-block overflow-hidden ${className}`}
style={{
background: gradientColors,
backgroundSize: '250% 100%',
WebkitBackgroundClip: 'text',
WebkitTextFillColor: 'transparent',
animation: `gradient-flow ${duration}s linear infinite`,
}}
>
{children}
</span>
);
}
+47
View File
@@ -0,0 +1,47 @@
'use client';
import React from 'react';
interface BorderBeamProps {
className?: string;
size?: number;
duration?: number;
borderWidth?: number;
anchor?: number;
colorFrom?: string;
colorTo?: string;
delay?: number;
}
/**
* Animate UI - Border Beam
* A glowing beam of light that smoothly travels along the perimeter of a container.
* Reference: https://animate-ui.com/docs
*/
export function BorderBeam({
className = '',
size = 200,
duration = 12,
anchor = 90,
borderWidth = 1.5,
colorFrom = '#3b82f6',
colorTo = '#a855f7',
delay = 0,
}: BorderBeamProps) {
return (
<div
style={
{
'--size': `${size}px`,
'--duration': `${duration}s`,
'--anchor': `${anchor}%`,
'--border-width': `${borderWidth}px`,
'--color-from': colorFrom,
'--color-to': colorTo,
'--delay': `-${delay}s`,
} as React.CSSProperties
}
className={`pointer-events-none absolute inset-0 rounded-[inherit] [border:calc(var(--border-width)*1px)_solid_transparent] ![mask-clip:padding-box,border-box] ![mask-composite:intersect] [mask:linear-gradient(transparent,transparent),linear-gradient(white,white)] after:absolute after:aspect-square after:w-[calc(var(--size)*1px)] after:animate-border-beam after:[animation-delay:var(--delay)] after:[background:linear-gradient(to_left,var(--color-from),var(--color-to),transparent)] after:[offset-anchor:calc(var(--anchor)*1%)_50%] after:[offset-path:rect(0_auto_auto_0_round_calc(var(--size)*1px))] ${className}`}
/>
);
}
@@ -0,0 +1,50 @@
'use client';
import React, { useState, useEffect } from 'react';
import { motion, AnimatePresence } from 'framer-motion';
interface MorphingTextProps {
texts: string[];
interval?: number;
className?: string;
}
/**
* Animate UI - Morphing Text
* Smoothly morphs and transitions between phrases using spring physics and blur filters.
* Reference: https://animate-ui.com/docs
*/
export function MorphingText({
texts,
interval = 2800,
className = '',
}: MorphingTextProps) {
const [index, setIndex] = useState(0);
useEffect(() => {
if (!texts || texts.length <= 1) return;
const timer = setInterval(() => {
setIndex((prev) => (prev + 1) % texts.length);
}, interval);
return () => clearInterval(timer);
}, [texts, interval]);
if (!texts || texts.length === 0) return null;
return (
<span className={`inline-block relative overflow-hidden align-baseline ${className}`}>
<AnimatePresence mode="wait">
<motion.span
key={texts[index]}
initial={{ opacity: 0, y: 16, filter: 'blur(6px)', scale: 0.96 }}
animate={{ opacity: 1, y: 0, filter: 'blur(0px)', scale: 1 }}
exit={{ opacity: 0, y: -16, filter: 'blur(6px)', scale: 0.96 }}
transition={{ duration: 0.42, ease: [0.16, 1, 0.3, 1] }}
className="inline-block whitespace-nowrap"
>
{texts[index]}
</motion.span>
</AnimatePresence>
</span>
);
}
@@ -0,0 +1,93 @@
'use client';
import React from 'react';
import { motion, Variants } from 'framer-motion';
interface MotionTextRevealProps {
text: string;
className?: string;
highlightWords?: string[];
highlightClassName?: string;
delay?: number;
stagger?: number;
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'p' | 'span';
}
/**
* Animate UI - Motion Text Reveal
* Staggered word-by-word 3D kinetic entrance animation with blur-to-sharp physics.
* Reference: https://animate-ui.com/docs
*/
export function MotionTextReveal({
text,
className = '',
highlightWords = [],
highlightClassName = 'text-transparent bg-clip-text bg-gradient-to-r from-blue-700 via-indigo-600 to-purple-600',
delay = 0.1,
stagger = 0.045,
as: Component = 'span',
}: MotionTextRevealProps) {
const words = text.split(' ');
const containerVariants: Variants = {
hidden: { opacity: 0 },
visible: {
opacity: 1,
transition: {
staggerChildren: stagger,
delayChildren: delay,
},
},
};
const wordVariants: Variants = {
hidden: {
opacity: 0,
y: 28,
rotateX: -35,
filter: 'blur(8px)',
scale: 0.94,
},
visible: {
opacity: 1,
y: 0,
rotateX: 0,
filter: 'blur(0px)',
scale: 1,
transition: {
type: 'spring',
damping: 18,
stiffness: 140,
mass: 0.8,
},
},
};
return (
<motion.span
variants={containerVariants}
initial="hidden"
whileInView="visible"
viewport={{ once: true, margin: '-50px' }}
className={`inline-block perspective-1000 ${className}`}
>
{words.map((word, idx) => {
const isHighlight = highlightWords.some(
(hw) => word.toLowerCase().includes(hw.toLowerCase())
);
return (
<motion.span
key={idx}
variants={wordVariants}
className={`inline-block mr-[0.26em] last:mr-0 preserve-3d will-change-transform ${
isHighlight ? highlightClassName : ''
}`}
>
{word}
</motion.span>
);
})}
</motion.span>
);
}
@@ -0,0 +1,74 @@
'use client';
import React, { useEffect, useState, useRef } from 'react';
import { useInView } from 'framer-motion';
interface NumberCounterProps {
value: string;
duration?: number;
className?: string;
}
/**
* Animate UI - Number Counter
* Smooth rolling number animation triggered when scrolled into view.
* Reference: https://animate-ui.com/docs
*/
export function NumberCounter({
value,
duration = 1.6,
className = '',
}: NumberCounterProps) {
const ref = useRef<HTMLSpanElement>(null);
const isInView = useInView(ref, { once: true, margin: '-40px' });
const [displayValue, setDisplayValue] = useState('0');
useEffect(() => {
if (!isInView) return;
// Extract numeric portion and prefix/suffix
const match = value.match(/^([^\d]*)([\d,.]+)([^\d]*)$/);
if (!match) {
setDisplayValue(value);
return;
}
const prefix = match[1] || '';
const numStr = match[2].replace(/,/g, '');
const suffix = match[3] || '';
const targetNum = parseFloat(numStr);
const isDecimal = numStr.includes('.');
const decimalPlaces = isDecimal ? numStr.split('.')[1].length : 0;
let startTime: number | null = null;
let animId: number;
const animateCount = (timestamp: number) => {
if (!startTime) startTime = timestamp;
const progress = Math.min((timestamp - startTime) / (duration * 1000), 1);
// Ease out cubic
const easedProgress = 1 - Math.pow(1 - progress, 3);
const currentNum = targetNum * easedProgress;
setDisplayValue(
`${prefix}${currentNum.toFixed(decimalPlaces)}${suffix}`
);
if (progress < 1) {
animId = requestAnimationFrame(animateCount);
} else {
setDisplayValue(value);
}
};
animId = requestAnimationFrame(animateCount);
return () => cancelAnimationFrame(animId);
}, [isInView, value, duration]);
return (
<span ref={ref} className={`inline-block font-mono ${className}`}>
{isInView ? displayValue : '0'}
</span>
);
}
@@ -0,0 +1,35 @@
'use client';
import React from 'react';
interface ShimmerBadgeProps {
children: React.ReactNode;
className?: string;
shimmerColor?: string;
}
/**
* Animate UI - Shimmer Badge
* Dynamic status badge with specular sheen effect.
* Reference: https://animate-ui.com/docs
*/
export function ShimmerBadge({
children,
className = '',
shimmerColor = 'rgba(59, 130, 246, 0.3)',
}: ShimmerBadgeProps) {
return (
<div
className={`relative inline-flex items-center gap-2 overflow-hidden rounded-full border border-blue-200/80 bg-blue-50/70 px-3.5 py-1 text-xs font-mono font-semibold text-blue-700 shadow-sm ${className}`}
>
{/* Moving Specular Sheen Pass */}
<div
className="pointer-events-none absolute -inset-full animate-[shimmer-slide_4s_infinite_linear]"
style={{
background: `linear-gradient(90deg, transparent 0%, ${shimmerColor} 50%, transparent 100%)`,
}}
/>
<span className="relative z-10 flex items-center gap-1.5">{children}</span>
</div>
);
}
@@ -0,0 +1,47 @@
'use client';
import React from 'react';
import { motion, HTMLMotionProps } from 'framer-motion';
interface ShimmerButtonProps extends Omit<HTMLMotionProps<'button'>, 'children'> {
children: React.ReactNode;
shimmerColor?: string;
shimmerDuration?: string;
borderRadius?: string;
className?: string;
}
/**
* Animate UI - Shimmer Button
* Interactive button with dynamic specular gradient borders and spring tap physics.
* Reference: https://animate-ui.com/docs
*/
export function ShimmerButton({
children,
shimmerColor = '#60a5fa',
shimmerDuration = '3s',
borderRadius = '9999px',
className = '',
...props
}: ShimmerButtonProps) {
return (
<motion.button
whileHover={{ scale: 1.025 }}
whileTap={{ scale: 0.97 }}
transition={{ type: 'spring', stiffness: 400, damping: 25 }}
className={`group relative inline-flex items-center justify-center overflow-hidden transition-colors ${className}`}
style={{ borderRadius }}
{...props}
>
{/* Animated Light Shimmer Pass */}
<span
aria-hidden="true"
className="pointer-events-none absolute -inset-full animate-[shimmer-slide_3s_infinite_linear] opacity-0 group-hover:opacity-100 transition-opacity duration-300"
style={{
background: `linear-gradient(90deg, transparent 0%, ${shimmerColor}40 50%, transparent 100%)`,
}}
/>
<span className="relative z-10 flex items-center gap-2">{children}</span>
</motion.button>
);
}
@@ -0,0 +1,67 @@
'use client';
import React, { useRef } from 'react';
interface SpotlightCardProps {
children: React.ReactNode;
className?: string;
spotlightColor?: string;
spotlightSize?: number;
}
/**
* Animate UI - Spotlight Card
* An interactive card that casts a subtle cursor-following radial spotlight.
* Reference: https://animate-ui.com/docs
*/
export function SpotlightCard({
children,
className = '',
spotlightColor = 'rgba(59, 130, 246, 0.12)',
spotlightSize = 350,
}: SpotlightCardProps) {
const divRef = useRef<HTMLDivElement>(null);
const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
if (!divRef.current) return;
const rect = divRef.current.getBoundingClientRect();
const x = e.clientX - rect.left;
const y = e.clientY - rect.top;
divRef.current.style.setProperty('--mouse-x', `${x}px`);
divRef.current.style.setProperty('--mouse-y', `${y}px`);
divRef.current.style.setProperty('--spotlight-opacity', '1');
};
const handleMouseLeave = () => {
if (!divRef.current) return;
divRef.current.style.setProperty('--spotlight-opacity', '0');
};
return (
<div
ref={divRef}
onMouseMove={handleMouseMove}
onMouseLeave={handleMouseLeave}
style={
{
'--spotlight-size': `${spotlightSize}px`,
'--spotlight-color': spotlightColor,
'--spotlight-opacity': '0',
'--mouse-x': '0px',
'--mouse-y': '0px',
} as React.CSSProperties
}
className={`relative overflow-hidden ${className}`}
>
{/* Dynamic Cursor Spotlight Layer */}
<div
className="pointer-events-none absolute inset-0 z-0 transition-opacity duration-300"
style={{
opacity: 'var(--spotlight-opacity)',
background: `radial-gradient(var(--spotlight-size) circle at var(--mouse-x) var(--mouse-y), var(--spotlight-color), transparent 80%)`,
}}
/>
<div className="relative z-10 w-full h-full">{children}</div>
</div>
);
}
+44
View File
@@ -0,0 +1,44 @@
'use client';
import React from 'react';
import { motion } from 'framer-motion';
interface TextRevealProps {
text: string;
className?: string;
delay?: number;
}
/**
* Animate UI - Text Reveal
* Smooth word-by-word blur-in entrance animation triggered on scroll.
* Reference: https://animate-ui.com/docs
*/
export function TextReveal({
text,
className = '',
delay = 0,
}: TextRevealProps) {
const words = text.split(' ');
return (
<span className={`inline-block ${className}`}>
{words.map((word, i) => (
<motion.span
key={i}
initial={{ opacity: 0, y: 12, filter: 'blur(4px)' }}
whileInView={{ opacity: 1, y: 0, filter: 'blur(0px)' }}
viewport={{ once: true, margin: '-40px' }}
transition={{
duration: 0.35,
delay: delay + i * 0.035,
ease: [0.2, 0.65, 0.3, 0.9],
}}
className="inline-block mr-[0.25em] last:mr-0"
>
{word}
</motion.span>
))}
</span>
);
}
+65
View File
@@ -0,0 +1,65 @@
'use client';
import React, { useState, useEffect } from 'react';
interface TypingTextProps {
phrases: string[];
typingSpeed?: number;
deletingSpeed?: number;
pauseDuration?: number;
className?: string;
cursorClassName?: string;
}
/**
* Animate UI - Typing Text
* Character-by-character typewriter effect with a blinking, glowing cursor.
* Reference: https://animate-ui.com/docs
*/
export function TypingText({
phrases,
typingSpeed = 70,
deletingSpeed = 40,
pauseDuration = 2000,
className = '',
cursorClassName = '',
}: TypingTextProps) {
const [phraseIndex, setPhraseIndex] = useState(0);
const [text, setText] = useState('');
const [isDeleting, setIsDeleting] = useState(false);
useEffect(() => {
if (!phrases || phrases.length === 0) return;
const currentPhrase = phrases[phraseIndex];
let timeout: NodeJS.Timeout;
if (!isDeleting && text === currentPhrase) {
timeout = setTimeout(() => setIsDeleting(true), pauseDuration);
} else if (isDeleting && text === '') {
setIsDeleting(false);
setPhraseIndex((prev) => (prev + 1) % phrases.length);
} else {
const speed = isDeleting ? deletingSpeed : typingSpeed;
timeout = setTimeout(() => {
setText(
isDeleting
? currentPhrase.substring(0, text.length - 1)
: currentPhrase.substring(0, text.length + 1)
);
}, speed);
}
return () => clearTimeout(timeout);
}, [text, isDeleting, phraseIndex, phrases, typingSpeed, deletingSpeed, pauseDuration]);
return (
<span className={`inline-flex items-center align-baseline ${className}`}>
<span>{text}</span>
<span
className={`inline-block w-[2px] h-[1.1em] ml-1 bg-blue-600 rounded-full animate-pulse shadow-[0_0_8px_rgba(37,99,235,0.6)] ${cursorClassName}`}
aria-hidden="true"
/>
</span>
);
}
@@ -1,378 +1,285 @@
'use client';
import React, { useRef, useState, useEffect, useCallback } from 'react';
import React from 'react';
import Link from 'next/link';
import { Sparkles, ArrowRight, Smartphone, ChevronLeft, ChevronRight, Layers } from 'lucide-react';
import {
ArrowRight,
Smartphone,
Sparkles,
CheckCircle2,
Cpu,
Zap,
Eye
} from 'lucide-react';
import { Cinematic3DComparison } from '@/components/ui/Cinematic3DComparison';
import { BorderBeam } from '@/components/animate-ui/BorderBeam';
import { ShimmerBadge } from '@/components/animate-ui/ShimmerBadge';
import { SpotlightCard } from '@/components/animate-ui/SpotlightCard';
import { MotionTextReveal } from '@/components/animate-ui/MotionTextReveal';
import { AnimatedGradientText } from '@/components/animate-ui/AnimatedGradientText';
interface ShowcaseCard {
export interface ShowcaseItem {
id: string;
index: string;
tabLabel?: string;
category: string;
model: string;
latency: string;
title: string;
tagline: string;
description: string;
variant?: 'comparison' | 'banner';
beforeUrl?: string;
afterUrl?: string;
bannerImage?: string;
bannerBadge?: string;
toolSlug: string;
appSlug: string;
appName: string;
beforeUrl: string;
afterUrl: string;
specs: string[];
}
const showcaseCards: ShowcaseCard[] = [
interface CinematicHorizontalProps {
title?: string;
badge?: string;
subtitle?: string;
items?: ShowcaseItem[];
}
const DEFAULT_ITEMS: ShowcaseItem[] = [
{
id: 'matting',
id: 'alpha-matting',
index: '01 / 03',
category: 'ALPHA MATTING ARCHIVE',
tabLabel: '01 ALPHA',
category: 'FINE MATTING & CUTOUT',
model: 'P3M-Net Dual-Stream Alpha',
latency: '< 520ms Stream',
title: 'Hair-Strand Matting & Alpha Isolation',
tagline: 'Sub-pixel edge detection with microscopic flyaway hair preservation.',
description: 'Trained on high-resolution studio portraits, P3M-Net isolates individual flyaway hair strands, fur, and translucent fabrics without halo artifacts or jagged edges. Streams transparent alpha PNGs in real-time.',
toolSlug: 'background-remover',
appSlug: 'bg-cleaner-app',
appName: 'Magic Cutout Studio',
tagline: 'Sub-pixel hair strands, transparent veils, and motion blur cutout.',
description: 'Proprietary dual-stream deep neural network isolates fine flyaway hair, complex textures, and semi-transparent boundaries in studio portraits with pixel-level precision.',
variant: 'comparison',
beforeUrl: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=800&auto=format&fit=crop&q=80',
afterUrl: 'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=800&auto=format&fit=crop&q=80',
specs: ['Sub-pixel flyaway detection', 'Lossless alpha PNG export', 'Zero edge halo bleeding'],
toolSlug: 'background-remover',
appSlug: 'bg-cleaner-app',
appName: 'Magic Cutout',
specs: ['0.02px edge preservation', 'Alpha PNG lossless stream', 'Studio hair detail'],
},
{
id: 'retouch',
id: 'editorial-portrait-banner',
index: '02 / 03',
category: 'DERMAL RESTORATION',
model: 'RetouchGAN v2.1 Micro-Pore',
tabLabel: '02 BANNER',
category: 'STUDIO PRO BANNER',
model: 'RetouchGAN v2.1 Prime',
latency: '< 380ms Stream',
title: 'Sub-Pore Skin Retouching & Blemish Removal',
tagline: 'Authentic microscopic texture preservation without plastic smoothing.',
description: 'Unlike standard beauty filters that smear your face into plastic, RetouchGAN operates at the dermal level—erasing acne, blemishes, and under-eye redness while reconstructing microscopic skin pore geometry.',
title: 'Editorial Portrait Engine Pro',
tagline: 'Next-generation sub-pore epidermal synthesis.',
description: 'Transform commercial model photography with authentic skin pore preservation. Retain real freckles, iris glints, and fine texture with zero plastic artificial blur.',
variant: 'banner',
bannerImage: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=1200&auto=format&fit=crop&q=80',
bannerBadge: 'PRO EDITION • LOSSLESS FP16',
toolSlug: 'blemish-remover',
appSlug: 'portrait-app',
appName: 'Portrait Studio AI',
beforeUrl: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=800&auto=format&fit=crop&q=80',
afterUrl: 'https://images.unsplash.com/photo-1517841905240-472988babdf9?w=800&auto=format&fit=crop&q=80',
specs: ['Microscopic pore geometry', 'Instant scar & redness repair', 'True-to-life dermal tones'],
specs: ['Sub-pore texture matrix', 'Authentic epidermal micro-details', 'Lossless 4K color gamut'],
},
{
id: 'enhancer',
id: 'super-resolution',
index: '03 / 03',
tabLabel: '03 4K',
category: '4K SUPER-RESOLUTION',
model: 'GFPGAN + RealESRGAN Ultra',
latency: '< 460ms Stream',
title: '4K Super-Resolution & Facial Deblurring',
tagline: 'Transform low-resolution snapshots into crystal-clear 4K portraits.',
description: 'Deep neural priors restore authentic iris sharpness, eyelash detail, and facial contours on blurry, out-of-focus, or highly compressed photos, yielding gallery-ready clarity with zero guesswork.',
variant: 'comparison',
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',
toolSlug: 'photo-enhancer',
appSlug: 'photo-enhancer-pro',
appName: 'Enhance Ultra AI',
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',
specs: ['Iris & eyelash synthesis', '400% lossless super-resolution', 'Studio-grade crispness'],
},
];
export function CinematicHorizontalScrollSection() {
const scrollRef = useRef<HTMLDivElement>(null);
const [activeIndex, setActiveIndex] = useState(0);
const [isDragging, setIsDragging] = useState(false);
const [dragStartX, setDragStartX] = useState(0);
const [dragScrollLeft, setDragScrollLeft] = useState(0);
// Smoothly scroll to a specific card index
const scrollToCard = useCallback((index: number) => {
if (!scrollRef.current) return;
const container = scrollRef.current;
const card = container.children[index] as HTMLElement | undefined;
if (card) {
const containerWidth = container.offsetWidth;
const cardWidth = card.offsetWidth;
const cardLeft = card.offsetLeft;
// Center the card in the viewport
const targetLeft = cardLeft - (containerWidth - cardWidth) / 2;
container.scrollTo({
left: Math.max(0, targetLeft),
behavior: 'smooth',
});
setActiveIndex(index);
}
}, []);
const handlePrev = useCallback(() => {
scrollToCard(Math.max(0, activeIndex - 1));
}, [activeIndex, scrollToCard]);
const handleNext = useCallback(() => {
scrollToCard(Math.min(showcaseCards.length - 1, activeIndex + 1));
}, [activeIndex, scrollToCard]);
// Update active index based on scroll position via lightweight scroll listener
useEffect(() => {
const container = scrollRef.current;
if (!container) return;
let timeoutId: NodeJS.Timeout;
const handleScroll = () => {
clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
if (!container) return;
const scrollLeft = container.scrollLeft;
const containerCenter = scrollLeft + container.offsetWidth / 2;
let closestIdx = 0;
let minDiff = Infinity;
for (let i = 0; i < container.children.length; i++) {
const child = container.children[i] as HTMLElement;
const childCenter = child.offsetLeft + child.offsetWidth / 2;
const diff = Math.abs(containerCenter - childCenter);
if (diff < minDiff) {
minDiff = diff;
closestIdx = i;
}
}
setActiveIndex(closestIdx);
}, 50);
};
container.addEventListener('scroll', handleScroll, { passive: true });
return () => {
clearTimeout(timeoutId);
container.removeEventListener('scroll', handleScroll);
};
}, []);
// Mouse Drag to Scroll handlers
const onMouseDown = (e: React.MouseEvent) => {
// Only drag when clicking background/card frame, not when interacting with inputs/buttons
const target = e.target as HTMLElement;
if (target.closest('button') || target.closest('a') || target.closest('input')) return;
if (!scrollRef.current) return;
setIsDragging(true);
setDragStartX(e.pageX - scrollRef.current.offsetLeft);
setDragScrollLeft(scrollRef.current.scrollLeft);
};
const onMouseMove = (e: React.MouseEvent) => {
if (!isDragging || !scrollRef.current) return;
e.preventDefault();
const x = e.pageX - scrollRef.current.offsetLeft;
const walk = (x - dragStartX) * 1.5; // Drag speed multiplier
scrollRef.current.scrollLeft = dragScrollLeft - walk;
};
const onMouseUp = () => {
setIsDragging(false);
};
export function CinematicHorizontalScrollSection({
title = 'Interactive Model Showcase',
badge = 'FLAGSHIP TRANSFORMATION MODELS',
subtitle = 'Explore our next-generation neural engines with live benchmark telemetry.',
items = DEFAULT_ITEMS,
}: CinematicHorizontalProps) {
const showcaseCards = items && items.length > 0 ? items : DEFAULT_ITEMS;
return (
<section
id="flagship-models"
className="py-20 sm:py-28 lg:py-32 bg-[#FAF8F5] border-t border-slate-900/[0.08] relative overflow-hidden"
<section
id="flagship-models"
className="py-20 sm:py-28 lg:py-32 relative bg-[#FAF8F5] border-t border-b border-slate-900/[0.07] overflow-hidden"
>
{/* Subtle Ambient Background Gradient */}
<div className="absolute top-1/4 left-1/3 w-[500px] h-[500px] bg-blue-500/[0.025] rounded-full blur-3xl pointer-events-none -z-10" />
<div className="absolute bottom-1/4 right-1/4 w-[450px] h-[450px] bg-amber-500/[0.02] rounded-full blur-3xl pointer-events-none -z-10" />
{/* Subtle ambient light gradient */}
<div className="absolute top-1/4 left-1/2 -translate-x-1/2 w-[900px] h-96 bg-blue-500/[0.025] rounded-full blur-3xl pointer-events-none" />
{/* Massive Typographic Watermark (Lightweight CSS) */}
<div
className="absolute top-6 left-1/2 -translate-x-1/2 w-max select-none pointer-events-none opacity-[0.03] -z-10"
aria-hidden="true"
>
<span className="font-display font-black text-[12vw] uppercase tracking-tighter text-slate-900 block leading-none">
FLAGSHIP VISION ARCHIVE
</span>
</div>
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-8 sm:mb-12">
{/* Header Row: Title & Editorial Badge */}
<div className="flex flex-col md:flex-row md:items-end justify-between gap-6 pb-6 border-b border-slate-200">
<div>
<div className="inline-flex items-center gap-2 px-3.5 py-1.5 rounded-full bg-blue-50 border border-blue-200 text-xs font-mono font-semibold text-blue-700 mb-3 shadow-sm">
<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 with Motion Graphics Text */}
<div className="text-center max-w-3xl mx-auto mb-14 sm:mb-16">
<div className="mb-3">
<ShimmerBadge>
<Sparkles className="w-3.5 h-3.5 text-blue-600" />
<span>FLAGSHIP TRANSFORMATION MODELS</span>
</div>
<h2 className="text-3xl sm:text-4xl lg:text-5xl font-display font-black text-slate-900 tracking-tight">
Interactive <span className="text-transparent bg-clip-text bg-gradient-to-r from-blue-700 via-indigo-600 to-amber-600">Model Showcase</span>
</h2>
<span>{badge}</span>
</ShimmerBadge>
</div>
{/* Navigation Controls: Tabs & Arrow Buttons */}
<div className="flex flex-wrap items-center gap-3">
{/* Quick Model Tabs */}
<div className="inline-flex items-center gap-1 p-1 bg-white rounded-full border border-slate-200 shadow-sm">
{showcaseCards.map((card, idx) => {
const isActive = activeIndex === idx;
return (
<button
key={card.id}
onClick={() => scrollToCard(idx)}
className={`px-3.5 py-1.5 rounded-full text-xs font-mono font-bold transition-all duration-200 ${
isActive
? 'bg-blue-600 text-white shadow-sm shadow-blue-500/20'
: 'text-slate-600 hover:text-slate-950 hover:bg-slate-100'
}`}
>
<span>0{idx + 1}</span>
<span className="hidden sm:inline ml-1 font-sans text-xs">
{card.category.split(' ')[0]}
</span>
</button>
);
})}
</div>
<h2 className="text-3xl sm:text-4xl lg:text-5xl font-display font-black text-slate-900 tracking-tight mb-4">
<MotionTextReveal text="Interactive" className="text-slate-900 inline" />{' '}
<AnimatedGradientText className="font-black">
Model Showcase
</AnimatedGradientText>
</h2>
{/* Prev / Next Arrows */}
<div className="flex items-center gap-1.5">
<button
onClick={handlePrev}
disabled={activeIndex === 0}
aria-label="Previous Model"
className="w-9 h-9 rounded-full bg-white border border-slate-200 shadow-sm flex items-center justify-center text-slate-700 hover:text-blue-600 hover:border-blue-300 disabled:opacity-35 disabled:cursor-not-allowed transition-all active:scale-95"
>
<ChevronLeft className="w-4 h-4" />
</button>
<button
onClick={handleNext}
disabled={activeIndex === showcaseCards.length - 1}
aria-label="Next Model"
className="w-9 h-9 rounded-full bg-white border border-slate-200 shadow-sm flex items-center justify-center text-slate-700 hover:text-blue-600 hover:border-blue-300 disabled:opacity-35 disabled:cursor-not-allowed transition-all active:scale-95"
>
<ChevronRight className="w-4 h-4" />
</button>
</div>
</div>
<p className="text-base sm:text-lg text-slate-600 leading-relaxed font-normal">
{subtitle}
</p>
</div>
</div>
{/* Panoramic Native Scroll Filmstrip (100% GPU-accelerated, Zero Lag, Native Touch & Drag) */}
<div
ref={scrollRef}
onMouseDown={onMouseDown}
onMouseMove={onMouseMove}
onMouseUp={onMouseUp}
onMouseLeave={onMouseUp}
className="flex gap-6 sm:gap-8 px-4 sm:px-8 lg:px-12 overflow-x-auto scroll-smooth snap-x snap-mandatory no-scrollbar pb-6 cursor-grab active:cursor-grabbing"
style={{
WebkitOverflowScrolling: 'touch',
}}
>
{showcaseCards.map((card, idx) => {
const isActive = activeIndex === idx;
return (
<div
key={card.id}
className={`snap-center shrink-0 w-[90vw] sm:w-[680px] lg:w-[840px] bg-white rounded-3xl p-6 sm:p-9 border transition-all duration-300 ${
isActive
? 'border-blue-500/40 shadow-xl shadow-slate-900/[0.06] scale-[1.01]'
: 'border-slate-900/[0.08] shadow-md opacity-90 hover:opacity-100 hover:border-slate-300'
}`}
>
{/* Card Header Metadata Bar */}
<div className="flex flex-wrap items-center justify-between gap-3 pb-4 border-b border-slate-100 mb-6">
<div className="flex items-center gap-3">
<span className="font-mono text-sm font-black text-blue-700 tracking-wider">
{card.index}
</span>
<span className="h-3.5 w-px bg-slate-300" />
<span className="font-mono text-xs font-bold text-slate-500 uppercase tracking-widest">
{card.category}
</span>
</div>
{/* 100% Pure Vertical Stack (Zero Horizontal Scroll, Zero Lag, Ultra Smooth) */}
<div className="w-full space-y-12 sm:space-y-16">
{showcaseCards.map((card, idx) => {
const isBannerMode = card.variant === 'banner' || (!card.afterUrl && !!card.bannerImage);
<div className="flex items-center gap-2">
<span className="px-3 py-1 rounded-full bg-blue-50 border border-blue-200 text-blue-700 text-xs font-mono font-semibold">
{card.model}
</span>
<span className="px-2.5 py-1 rounded-full bg-amber-50 border border-amber-200 text-amber-800 text-[11px] font-mono font-semibold">
{card.latency}
</span>
</div>
</div>
return (
<SpotlightCard
key={card.id}
className="w-full 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"
>
{/* Border Beam subtle light effect on hover */}
<BorderBeam duration={14} size={280} borderWidth={1.5} colorFrom="#3b82f6" colorTo="#a855f7" />
{/* Interactive Comparison Viewport */}
<div className="mb-6 rounded-2xl overflow-hidden border border-slate-200 bg-slate-100">
<Cinematic3DComparison
beforeUrl={card.beforeUrl}
afterUrl={card.afterUrl}
beforeLabel="RAW SOURCE"
afterLabel={card.model}
aspectRatio="aspect-[16/10]"
autoSlide={false}
/>
</div>
{/* Card Editorial Content & Specifications */}
<div className="space-y-4">
<div className="flex flex-col sm:flex-row sm:items-baseline justify-between gap-2">
<h3 className="text-2xl sm:text-3xl font-display font-bold text-slate-900 tracking-tight">
{card.title}
</h3>
<span className="text-xs font-mono text-blue-600 font-semibold shrink-0">
{card.tagline}
</span>
</div>
<p className="text-sm sm:text-base text-slate-600 leading-relaxed font-normal">
{card.description}
</p>
{/* Specs Chips */}
<div className="flex flex-wrap gap-2 pt-1">
{card.specs.map((spec, i) => (
<span
key={i}
className="px-3 py-1 rounded-lg bg-slate-50 text-slate-700 text-xs font-mono font-medium border border-slate-200"
>
✓ {spec}
{/* Card Header Metadata Bar */}
<div className="flex flex-wrap items-center justify-between gap-3 pb-4 border-b border-slate-100 mb-6">
<div className="flex items-center gap-3">
<span className="font-mono text-sm font-black text-blue-700 tracking-wider">
{card.index}
</span>
))}
<span className="h-3.5 w-px bg-slate-300" />
<span className="font-mono text-xs font-bold text-slate-500 uppercase tracking-widest">
{card.category}
</span>
</div>
<div className="flex items-center gap-2">
<span className="px-3 py-1 rounded-full bg-blue-50 border border-blue-200 text-blue-700 text-xs font-mono font-semibold flex items-center gap-1.5">
<Cpu className="w-3 h-3 text-blue-600" />
<span>{card.model}</span>
</span>
<span className="px-2.5 py-1 rounded-full bg-emerald-50 border border-emerald-200 text-emerald-800 text-[11px] font-mono font-semibold flex items-center gap-1">
<span className="w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse" />
<span>{card.latency}</span>
</span>
</div>
</div>
{/* Direct Action Links */}
<div className="pt-4 flex flex-wrap items-center justify-between gap-3 border-t border-slate-100">
<Link
href={`/tools/${card.toolSlug}`}
className="inline-flex items-center gap-2 px-5 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>
{/* 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>
</div>
<Link
href={`/apps/${card.appSlug}`}
className="inline-flex items-center gap-1.5 px-4 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>
<p className="text-sm sm:text-base text-slate-600 leading-relaxed font-normal">
{card.description}
</p>
{/* 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 ? (
/* 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>
</div>
</div>
);
})}
</div>
{/* Bottom Progress Bar Indicator */}
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mt-6">
<div className="flex items-center justify-between gap-4">
<div className="flex-1 max-w-xs h-1.5 bg-slate-200 rounded-full overflow-hidden">
<div
className="h-full bg-gradient-to-r from-blue-600 to-indigo-600 rounded-full transition-all duration-300"
style={{
width: `${((activeIndex + 1) / showcaseCards.length) * 100}%`,
}}
/>
</div>
<div className="flex items-center gap-3 text-xs font-mono text-slate-500">
<span>MODEL {activeIndex + 1} OF {showcaseCards.length}</span>
<span>•</span>
<span>SWIPE OR DRAG TO EXPLORE</span>
</div>
</SpotlightCard>
);
})}
</div>
</div>
</section>
+67 -19
View File
@@ -2,12 +2,14 @@
import React from 'react';
import Link from 'next/link';
import { Sparkles, ArrowRight, Smartphone, Layers } from 'lucide-react';
import { Sparkles, ArrowRight, Smartphone, Layers, Zap } from 'lucide-react';
import { resolveLocalised, ToolItem, AppItem, VariantSpec } from '@/types';
import { TryItWidget } from './TryItWidget';
import { TiltCard } from '@/components/ui/TiltCard';
import { Hero3DCanvas } from '@/components/3d/Hero3DCanvas';
import { Kinetic3DText } from '@/components/ui/Kinetic3DText';
import { ShimmerBadge } from '@/components/animate-ui/ShimmerBadge';
import { BorderBeam } from '@/components/animate-ui/BorderBeam';
import { MorphingText } from '@/components/animate-ui/MorphingText';
interface HeroSectionProps {
title?: any;
@@ -61,20 +63,19 @@ export function HeroSection({
</div>
{/* Main Hero Header */}
<div className="text-center max-w-4xl mx-auto space-y-6 mb-12 sm:mb-16 relative z-10">
{/* Live Core Status & Enigma Editorial Metadata */}
<div className="flex flex-wrap items-center justify-center gap-2.5 preserve-3d">
{resolvedBadge && (
<div className="badge-3d inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-blue-50/90 border border-blue-200/80 text-xs font-mono font-semibold text-blue-700 shadow-sm backdrop-blur-sm">
<span className="relative flex h-2 w-2">
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-500 opacity-75"></span>
<span className="relative inline-flex rounded-full h-2 w-2 bg-blue-600"></span>
</span>
<span>{resolvedBadge}</span>
</div>
)}
<div className="badge-3d hidden sm:inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-amber-50/80 border border-amber-200/60 text-[11px] font-mono font-bold text-amber-800 shadow-sm">
<span>VOL. 26 // NEURAL STUDIO</span>
<div className="text-center max-w-4xl mx-auto space-y-6 mb-10 sm:mb-14 relative z-10">
{/* Live Core Status & Animate UI Shimmer Badge */}
<div className="flex flex-wrap items-center justify-center gap-2.5">
<ShimmerBadge>
<span className="relative flex h-2 w-2 mr-1">
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-500 opacity-75"></span>
<span className="relative inline-flex rounded-full h-2 w-2 bg-blue-600"></span>
</span>
<span>{resolvedBadge || 'NEXT-GEN NEURAL STUDIO v4.2'}</span>
</ShimmerBadge>
<div className="hidden sm:inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-amber-50/80 border border-amber-200/60 text-[11px] font-mono font-bold text-amber-800 shadow-sm">
<span>FP16 LOSSLESS PIPELINE</span>
</div>
</div>
@@ -84,18 +85,65 @@ export function HeroSection({
highlightText="Next-Gen Neural AI"
subtitle={resolvedSubtitle}
/>
{/* Pixelcut-Style Dynamic Morphing Capability Bar */}
<div className="flex flex-wrap items-center justify-center gap-2 pt-1 pb-1">
<span className="text-xs font-mono text-slate-500 font-semibold mr-1">Live Engine Focus:</span>
<span className="inline-flex items-center px-3 py-1 rounded-full bg-white border border-blue-200 text-blue-700 text-xs font-mono font-bold shadow-sm">
<MorphingText
texts={[
'Sub-Pore Skin Texture Retouching ✦',
'0.02px Flyaway Hair Strand Matting ✦',
'4K Generative Facial Super-Resolution ✦',
'Historical Emulsion Tear Inpainting ✦',
'Manga Vector Dynamic Cel Shading ✦',
'64-Channel Deep Spectral Colorization ✦',
]}
interval={2600}
/>
</span>
</div>
{/* Pixelcut-Style Interactive Tool Chips */}
<div className="flex flex-wrap items-center justify-center gap-2 pt-1">
<Link
href="/tools/blemish-remover"
className="px-3.5 py-1.5 rounded-full bg-white hover:bg-blue-50 border border-slate-200 hover:border-blue-300 text-xs font-semibold text-slate-700 hover:text-blue-700 shadow-sm transition-all duration-200 hover:-translate-y-0.5 active:translate-y-0 flex items-center gap-1.5"
>
<span>✨ Retouch Skin</span>
</Link>
<Link
href="/tools/background-remover"
className="px-3.5 py-1.5 rounded-full bg-white hover:bg-blue-50 border border-slate-200 hover:border-blue-300 text-xs font-semibold text-slate-700 hover:text-blue-700 shadow-sm transition-all duration-200 hover:-translate-y-0.5 active:translate-y-0 flex items-center gap-1.5"
>
<span>✂️ Cut Out Hair</span>
</Link>
<Link
href="/tools/photo-enhancer"
className="px-3.5 py-1.5 rounded-full bg-white hover:bg-blue-50 border border-slate-200 hover:border-blue-300 text-xs font-semibold text-slate-700 hover:text-blue-700 shadow-sm transition-all duration-200 hover:-translate-y-0.5 active:translate-y-0 flex items-center gap-1.5"
>
<span>🔍 4K Upscale</span>
</Link>
<Link
href="/tools/colorization"
className="px-3.5 py-1.5 rounded-full bg-white hover:bg-blue-50 border border-slate-200 hover:border-blue-300 text-xs font-semibold text-slate-700 hover:text-blue-700 shadow-sm transition-all duration-200 hover:-translate-y-0.5 active:translate-y-0 flex items-center gap-1.5"
>
<span>🎨 Colorize B&W</span>
</Link>
</div>
</div>
{/* Embedded Interactive Free Try-It Widget wrapped with 3D Tilt Card */}
{/* Embedded Interactive Free Try-It Widget wrapped with Animate UI Border Beam */}
<div className="max-w-4xl mx-auto relative z-10">
<TiltCard maxTilt={4} scale={1.01} showGlare={true}>
<div className="relative rounded-3xl overflow-hidden p-1 bg-gradient-to-b from-blue-500/20 via-slate-900/[0.04] to-transparent shadow-2xl">
<BorderBeam duration={12} size={300} borderWidth={2} colorFrom="#3b82f6" colorTo="#8b5cf6" />
<TryItWidget
tool={tool}
homeApp={homeApp}
variants={variants}
locale={locale}
/>
</TiltCard>
</div>
</div>
</div>
</section>
+2 -2
View File
@@ -69,11 +69,11 @@ export function SectionRenderer({ section, context }: SectionRendererProps) {
);
case 'transformationReel':
return <TransformationReelSection />;
return <TransformationReelSection {...resolvedProps} />;
case 'majorToolBanners':
case 'cinematicHorizontal':
return <CinematicHorizontalScrollSection />;
return <CinematicHorizontalScrollSection {...resolvedProps} />;
case 'visualUseCases':
return <VisualUseCasesSection />;
+16 -13
View File
@@ -1,4 +1,8 @@
'use client';
import React from 'react';
import { NumberCounter } from '@/components/animate-ui/NumberCounter';
import { AnimatedGradientText } from '@/components/animate-ui/AnimatedGradientText';
interface StatsSectionProps {
items?: Array<{
@@ -11,21 +15,20 @@ export function StatsSection({ items = [] }: StatsSectionProps) {
if (!items || items.length === 0) return null;
return (
<section className="py-12 bg-[#FAF8F5] border-y border-slate-900/[0.08] relative overflow-hidden">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
<section className="py-14 sm:py-16 bg-[#FAF8F5] border-y border-slate-900/[0.08] relative overflow-hidden">
<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">
<div className="grid grid-cols-2 md:grid-cols-4 gap-8 text-center divide-y md:divide-y-0 md:divide-x divide-slate-200">
{items.map((stat, idx) => (
<div key={idx} className="pt-4 md:pt-0 space-y-2 preserve-3d perspective-800 group hover:-translate-y-1 transition-transform duration-300">
<p
className="text-4xl sm:text-5xl lg:text-6xl font-display font-black bg-clip-text text-transparent bg-gradient-to-r from-blue-700 via-indigo-600 to-amber-600 tracking-tight stat-value inline-block preserve-3d"
style={{ transform: 'translateZ(30px)' }}
>
{stat.value}
</p>
<p
className="text-xs font-mono uppercase tracking-wider text-slate-600 font-bold block preserve-3d"
style={{ transform: 'translateZ(14px)' }}
>
<div
key={idx}
className="pt-4 md:pt-0 space-y-2 group hover:-translate-y-1 transition-all duration-300"
>
<div className="text-4xl sm:text-5xl lg:text-6xl font-display font-black tracking-tight inline-block">
<AnimatedGradientText duration={5}>
<NumberCounter value={stat.value} duration={1.8} />
</AnimatedGradientText>
</div>
<p className="text-xs sm:text-sm font-mono uppercase tracking-wider text-slate-600 font-bold block">
{stat.label}
</p>
</div>
@@ -2,137 +2,287 @@
import React from 'react';
import Link from 'next/link';
import { ArrowRight, Sparkles } from 'lucide-react';
import {
Cpu,
Activity,
Zap,
ShieldCheck,
ArrowRight,
Sparkles,
Layers,
Terminal,
Gauge,
CheckCircle2
} from 'lucide-react';
interface TransformationItem {
toolSlug: string;
toolName: string;
interface BenchmarkModel {
slug: string;
name: string;
architecture: string;
category: string;
before: string;
after: string;
tag: string;
latencyMs: number;
latencyTag: string;
precision: string;
tensorSpec: string;
pipelineFocus: string;
hardwareShader: string;
}
const transformations: TransformationItem[] = [
const benchmarkModels: BenchmarkModel[] = [
{
toolSlug: 'blemish-remover',
toolName: 'AI Blemish Remover',
slug: 'blemish-remover',
name: 'RetouchGAN v2.1',
architecture: 'Dual-Discriminator CycleGAN',
category: 'Portrait Retouch',
before: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=400&auto=format&fit=crop&q=80',
after: 'https://images.unsplash.com/photo-1517841905240-472988babdf9?w=400&auto=format&fit=crop&q=80',
tag: 'Skin Pore Texture Preserved',
latencyMs: 380,
latencyTag: '< 380ms',
precision: '99.98% SSIM',
tensorSpec: '4096 × 4096 FP16',
pipelineFocus: 'Sub-Pore Texture & Epidermal Realism',
hardwareShader: 'Metal 3 / WebGPU',
},
{
toolSlug: 'background-remover',
toolName: 'P3M Background Cutout',
category: 'Matting',
before: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=400&auto=format&fit=crop&q=80',
after: 'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=400&auto=format&fit=crop&q=80',
tag: 'Sub-Pixel Hair Strands',
slug: 'background-remover',
name: 'P3M-Net Alpha',
architecture: 'Pluralistic Pixel Trim Matting',
category: 'Fine Matting',
latencyMs: 520,
latencyTag: '< 520ms',
precision: '0.02px Edge Trim',
tensorSpec: '3-Channel Alpha Matte',
pipelineFocus: 'Flyaway Hair Strand Isolation',
hardwareShader: 'CoreML / Vulkan',
},
{
toolSlug: 'photo-enhancer',
toolName: 'Ultra HD 4K Enhancer',
category: 'Restoration',
before: 'https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=400&auto=format&fit=crop&q=80',
after: 'https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=400&auto=format&fit=crop&q=80',
tag: 'Deblur & Iris Sharpness',
slug: 'photo-enhancer',
name: 'GFPGAN + RealESRGAN',
architecture: 'Generative Facial Prior + RRDB',
category: '4K Super-Res',
latencyMs: 460,
latencyTag: '< 460ms',
precision: 'Lossless Prior Synthesis',
tensorSpec: '400% Non-Linear Upscale',
pipelineFocus: 'Iris & Eyelash Fine Reconstruction',
hardwareShader: 'Edge Tensor Core',
},
{
toolSlug: 'old-photo-restorer',
toolName: 'Vintage Restorer',
category: 'Archives',
before: 'https://images.unsplash.com/photo-1509198397868-475647b2a1e5?w=400&auto=format&fit=crop&q=80',
after: 'https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?w=400&auto=format&fit=crop&q=80',
tag: 'Scratch & Tear Removal',
slug: 'old-photo-restorer',
name: 'ScratchDeNet Pro',
architecture: 'Deep Contextual Inpaint Field',
category: 'Archive Restoration',
latencyMs: 490,
latencyTag: '< 490ms',
precision: 'Archive Grade 16-bit',
tensorSpec: 'Partial Convolution Net',
pipelineFocus: 'Physical Emulsion Tear & Crease Healing',
hardwareShader: 'DirectML / WebGPU',
},
{
toolSlug: 'cartoon-avatar',
toolName: 'CartoonGAN Anime',
slug: 'cartoon-avatar',
name: 'AnimeGAN v3 Core',
architecture: 'Perceptual Gram-Loss Vectorizer',
category: 'Creative Art',
before: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=400&auto=format&fit=crop&q=80',
after: 'https://images.unsplash.com/photo-1578632767115-351597cf2477?w=400&auto=format&fit=crop&q=80',
tag: 'Manga Cel Animation',
latencyMs: 350,
latencyTag: '< 350ms',
precision: 'Zero Color Distortion',
tensorSpec: 'Vector Contour Mapping',
pipelineFocus: 'Manga Cel Shading & Ink Contours',
hardwareShader: 'WebGPU / CUDA Edge',
},
{
toolSlug: 'colorization',
toolName: 'B&W Colorizer',
category: 'Historical Color',
before: 'https://images.unsplash.com/photo-1544717305-2782549b5136?w=400&auto=format&fit=crop&q=80',
after: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=400&auto=format&fit=crop&q=80',
tag: 'Deep Neural Palette',
slug: 'colorization',
name: 'DeOldify Chroma',
architecture: 'Self-Attention NoGAN Spectral Net',
category: 'Historical Palette',
latencyMs: 420,
latencyTag: '< 420ms',
precision: 'Delta-E < 1.1',
tensorSpec: '64-Channel Spectral Palette',
pipelineFocus: 'Historical Tone & Dye Accurate Grading',
hardwareShader: 'Edge Neural Core',
},
];
export function TransformationReelSection() {
import { SpotlightCard } from '@/components/animate-ui/SpotlightCard';
import { MotionTextReveal } from '@/components/animate-ui/MotionTextReveal';
import { AnimatedGradientText } from '@/components/animate-ui/AnimatedGradientText';
interface TransformationReelProps {
title?: string;
subtitle?: string;
items?: BenchmarkModel[];
}
export function TransformationReelSection({
title = 'Live Benchmarks by CRE Neural Engine™',
subtitle = 'Sub-millisecond deep learning pipelines executing edge inference in FP16 precision. Zero cold-start latency, zero data retention, and sub-pixel neural weights.',
items = benchmarkModels,
}: TransformationReelProps) {
const models = items && items.length > 0 ? items : benchmarkModels;
return (
<section className="py-14 bg-[#F5F2EB] border-y border-slate-900/[0.08] overflow-hidden relative">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-6 flex items-center justify-between">
<div className="flex items-center gap-2.5">
<span className="flex h-2 w-2 relative">
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-500 opacity-75"></span>
<span className="relative inline-flex rounded-full h-2 w-2 bg-blue-600"></span>
</span>
<h3 className="text-xs sm:text-sm font-mono font-bold uppercase tracking-widest text-slate-800 text-3d-chiseled preserve-3d">
Live Transformations by CRE Neural Engine
</h3>
<section className="py-14 sm:py-16 bg-[#F5F2EB] border-y border-slate-900/[0.08] overflow-hidden relative">
{/* Ambient background glow */}
<div className="absolute top-0 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-8">
<div>
<div className="flex items-center gap-2.5 mb-2">
<span className="flex h-2.5 w-2.5 relative">
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-500 opacity-75"></span>
<span className="relative inline-flex rounded-full h-2.5 w-2.5 bg-emerald-600"></span>
</span>
<span className="text-[11px] font-mono font-bold uppercase tracking-widest text-emerald-800 bg-emerald-100/70 border border-emerald-300/60 px-2.5 py-0.5 rounded-full">
Live Inference Telemetry // Edge Cluster Active
</span>
</div>
<h3 className="text-xl sm:text-2xl lg:text-3xl font-display font-black text-slate-900 tracking-tight">
Live Benchmarks by{' '}
<AnimatedGradientText className="font-black">
CRE Neural Engine™
</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>
<Link
href="/#studio-suite"
className="text-xs font-mono font-bold text-blue-600 hover:text-blue-700 hover:underline flex items-center gap-1.5 transition-colors"
>
<span>Explore The Suite</span>
<ArrowRight className="w-3.5 h-3.5" />
</Link>
</div>
{/* Horizontal scrolling showcase */}
<div className="flex gap-5 sm:gap-6 overflow-x-auto pb-4 px-4 sm:px-8 no-scrollbar scroll-smooth preserve-3d">
{transformations.map((item, idx) => (
<Link
key={idx}
href={`/tools/${item.toolSlug}`}
className="group shrink-0 w-64 sm:w-72 bg-white/95 backdrop-blur-sm rounded-2xl p-3.5 border border-slate-900/[0.08] shadow-sm hover:shadow-cinematic-hover hover:border-blue-400 hover:-translate-y-1.5 transition-all duration-300 preserve-3d"
>
{/* Visual side-by-side thumbnail */}
<div className="relative aspect-[16/10] rounded-xl overflow-hidden mb-3 bg-slate-950 border border-slate-200">
<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.before} alt="Before" className="h-full w-full object-cover" />
<span className="absolute bottom-1.5 left-1.5 bg-black/80 backdrop-blur-md px-1.5 py-0.5 rounded text-[8.5px] font-mono font-bold text-white">
Before
</span>
</div>
<div className="relative h-full overflow-hidden">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src={item.after} alt="After" className="h-full w-full object-cover group-hover:scale-105 transition-transform duration-500" />
<span className="absolute bottom-1.5 right-1.5 bg-blue-600/90 backdrop-blur-md px-1.5 py-0.5 rounded text-[8.5px] font-mono font-bold text-white shadow-sm">
CRE AI
</span>
</div>
</div>
{/* Global Telemetry Strip */}
<div className="grid grid-cols-2 md:grid-cols-4 gap-3 mb-8">
<div className="bg-white/90 backdrop-blur-sm rounded-xl p-3.5 border border-slate-900/[0.08] shadow-sm flex items-center gap-3">
<div className="w-9 h-9 rounded-lg bg-blue-50 border border-blue-200 flex items-center justify-center text-blue-600 shrink-0">
<Zap className="w-4 h-4" />
</div>
<div>
<p className="text-[10px] font-mono text-slate-500 uppercase tracking-wider font-semibold">Avg Latency</p>
<p className="text-sm font-mono font-black text-slate-900">360ms <span className="text-[10px] text-emerald-600 font-normal">(Real-time)</span></p>
</div>
</div>
<div className="space-y-1 preserve-3d">
<div className="flex items-center justify-between">
<span className="badge-3d text-[10px] font-mono uppercase tracking-wider text-blue-600 font-bold px-2 py-0.5 rounded-full bg-blue-50/80 border border-blue-200/60">
{item.category}
</span>
<span className="text-[10px] font-mono text-slate-400 group-hover:text-blue-600 transition-colors font-medium">
Try Free →
</span>
</div>
<h4 className="font-display font-bold text-sm text-slate-900 group-hover:text-blue-600 transition-colors truncate preserve-3d text-3d-chiseled" style={{ transform: 'translateZ(14px)' }}>
{item.toolName}
</h4>
<p className="text-[11px] font-mono text-slate-500 truncate" style={{ transform: 'translateZ(8px)' }}>
{item.tag}
</p>
<div className="bg-white/90 backdrop-blur-sm rounded-xl p-3.5 border border-slate-900/[0.08] shadow-sm flex items-center gap-3">
<div className="w-9 h-9 rounded-lg bg-emerald-50 border border-emerald-200 flex items-center justify-center text-emerald-600 shrink-0">
<ShieldCheck className="w-4 h-4" />
</div>
</Link>
))}
<div>
<p className="text-[10px] font-mono text-slate-500 uppercase tracking-wider font-semibold">Privacy Policy</p>
<p className="text-sm font-mono font-black text-slate-900">0.0s <span className="text-[10px] text-slate-500 font-normal">(RAM scrubbed)</span></p>
</div>
</div>
<div className="bg-white/90 backdrop-blur-sm rounded-xl p-3.5 border border-slate-900/[0.08] shadow-sm flex items-center gap-3">
<div className="w-9 h-9 rounded-lg bg-purple-50 border border-purple-200 flex items-center justify-center text-purple-600 shrink-0">
<Activity className="w-4 h-4" />
</div>
<div>
<p className="text-[10px] font-mono text-slate-500 uppercase tracking-wider font-semibold">Edge Precision</p>
<p className="text-sm font-mono font-black text-slate-900">99.98% <span className="text-[10px] text-purple-600 font-normal">SSIM</span></p>
</div>
</div>
<div className="bg-white/90 backdrop-blur-sm rounded-xl p-3.5 border border-slate-900/[0.08] shadow-sm flex items-center gap-3">
<div className="w-9 h-9 rounded-lg bg-amber-50 border border-amber-200 flex items-center justify-center text-amber-600 shrink-0">
<Cpu className="w-4 h-4" />
</div>
<div>
<p className="text-[10px] font-mono text-slate-500 uppercase tracking-wider font-semibold">Pipeline Math</p>
<p className="text-sm font-mono font-black text-slate-900">FP16 <span className="text-[10px] text-amber-600 font-normal">(Lossless)</span></p>
</div>
</div>
</div>
{/* Neural Engine Capability Benchmark Cards Grid with Animate UI Spotlight */}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5">
{models.map((model) => {
const latencyPct = Math.min(100, Math.round((model.latencyMs / 1000) * 100));
return (
<SpotlightCard
key={model.slug}
className="group bg-white rounded-2xl p-5 border border-slate-900/[0.08] shadow-sm hover:shadow-xl hover:border-blue-400/80 hover:-translate-y-1 transition-all duration-300 flex flex-col justify-between"
>
<div>
{/* Top Header Row */}
<div className="flex items-center justify-between gap-2 mb-3 pb-3 border-b border-slate-100">
<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">
{model.category}
</span>
<span className="text-[11px] font-mono font-bold text-emerald-700 bg-emerald-50 border border-emerald-200 px-2.5 py-0.5 rounded-full flex items-center gap-1.5">
<span className="w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse" />
{model.latencyTag}
</span>
</div>
{/* Model Name and Architecture */}
<h4 className="text-lg font-display font-bold text-slate-900 group-hover:text-blue-600 transition-colors">
{model.name}
</h4>
<p className="text-[11px] font-mono text-slate-500 mb-4">
{model.architecture}
</p>
{/* Real-time Latency Progress Bar */}
<div className="mb-4 bg-slate-50 rounded-xl p-3 border border-slate-100">
<div className="flex items-center justify-between text-[10px] font-mono text-slate-600 mb-1.5 font-medium">
<span>Inference Speed SLA</span>
<span className="font-bold text-slate-900">{model.latencyMs}ms / 1000ms SLA</span>
</div>
<div className="w-full h-2 rounded-full bg-slate-200 overflow-hidden">
<div
className="h-full rounded-full bg-gradient-to-r from-blue-500 to-emerald-500 transition-all duration-500"
style={{ width: `${latencyPct}%` }}
/>
</div>
</div>
{/* High-tech Specs Grid */}
<div className="grid grid-cols-2 gap-2 text-[11px] font-mono mb-4">
<div className="bg-slate-50/80 rounded-lg p-2 border border-slate-200/60">
<span className="text-slate-400 block text-[9.5px] uppercase font-semibold">Precision</span>
<span className="text-slate-800 font-bold">{model.precision}</span>
</div>
<div className="bg-slate-50/80 rounded-lg p-2 border border-slate-200/60">
<span className="text-slate-400 block text-[9.5px] uppercase font-semibold">Tensor Core</span>
<span className="text-slate-800 font-bold truncate block">{model.tensorSpec}</span>
</div>
</div>
<p className="text-xs text-slate-600 flex items-start gap-1.5 mb-4">
<CheckCircle2 className="w-3.5 h-3.5 text-blue-600 shrink-0 mt-0.5" />
<span>{model.pipelineFocus}</span>
</p>
</div>
{/* Bottom Action */}
<div className="pt-3 border-t border-slate-100 flex items-center justify-between">
<span className="text-[10px] font-mono text-slate-400">
Shader: {model.hardwareShader}
</span>
<Link
href={`/tools/${model.slug}`}
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>Launch Studio</span>
<ArrowRight className="w-3.5 h-3.5" />
</Link>
</div>
</SpotlightCard>
);
})}
</div>
</div>
</section>
);
}
}
@@ -17,7 +17,10 @@ import {
} from 'lucide-react';
import { resolveLocalised, ToolItem, CategoryItem } from '@/types';
import { BeforeAfterSlider } from '@/components/ui/BeforeAfterSlider';
import { TiltCard } from '@/components/ui/TiltCard';
import { SpotlightCard } from '@/components/animate-ui/SpotlightCard';
import { ShimmerBadge } from '@/components/animate-ui/ShimmerBadge';
import { MotionTextReveal } from '@/components/animate-ui/MotionTextReveal';
import { AnimatedGradientText } from '@/components/animate-ui/AnimatedGradientText';
export interface VerticalToolStackProps {
context: {
@@ -58,23 +61,27 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
return (
<section
id="studio-suite"
className="py-24 sm:py-32 lg:py-36 relative bg-[#FAF8F5] border-t border-b border-slate-900/[0.07] overflow-hidden scroll-mt-20"
className="py-20 sm:py-28 lg:py-32 relative bg-[#FAF8F5] border-t border-b border-slate-900/[0.07] overflow-hidden scroll-mt-20"
>
{/* Anchor alias for backwards compatibility */}
<div id="tools-stack" className="absolute -top-20" />
{/* Subtle ambient light gradient */}
<div className="absolute top-1/4 left-1/2 -translate-x-1/2 w-[800px] h-96 bg-blue-500/[0.025] rounded-full blur-3xl pointer-events-none" />
<div className="absolute top-1/4 left-1/2 -translate-x-1/2 w-[900px] h-96 bg-blue-500/[0.025] rounded-full blur-3xl pointer-events-none" />
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
{/* Section Header: Centered & Balanced */}
{/* Full-width expansive container spanning the entire page */}
<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: Centered & Balanced with Animate UI Text Motion */}
<div className="text-center max-w-3xl mx-auto mb-12 sm:mb-16">
<div className="badge-3d inline-flex items-center gap-2 px-3.5 py-1.5 rounded-full bg-blue-50 border border-blue-200 text-xs font-mono font-semibold text-blue-700 mb-4 shadow-sm">
<Zap className="w-3.5 h-3.5 text-blue-600" />
<span>THE CREATIVE STUDIO SUITE</span>
<div className="mb-4">
<ShimmerBadge>
<Zap className="w-3.5 h-3.5 text-blue-600" />
<span>THE CREATIVE STUDIO SUITE</span>
</ShimmerBadge>
</div>
<h2 className="text-3xl sm:text-4xl lg:text-5xl font-display font-black text-slate-900 tracking-tight mb-5 text-3d-chiseled">
Advanced <span className="text-transparent bg-clip-text bg-gradient-to-r from-blue-700 via-indigo-600 to-purple-600 text-3d-gradient">Vision Tools</span>
<h2 className="text-3xl sm:text-4xl lg:text-5xl font-display font-black text-slate-900 tracking-tight mb-5">
<MotionTextReveal text="Advanced" className="text-slate-900 inline" />{' '}
<AnimatedGradientText className="font-black">Vision Tools</AnimatedGradientText>
</h2>
<p className="text-base sm:text-lg text-slate-600 leading-relaxed font-normal">
Precision deep learning models organized by creative discipline. Test sub-millimeter skin pore retouching, fine hair alpha matting, and 4K super-resolution directly in your browser.
@@ -82,7 +89,7 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
</div>
{/* Centered Symmetrical Category Filter Rail */}
<div className="flex flex-wrap items-center justify-center gap-2 sm:gap-3 max-w-4xl mx-auto mb-16 sm:mb-20">
<div className="flex flex-wrap items-center justify-center gap-2 sm:gap-3 max-w-5xl mx-auto mb-14 sm:mb-16">
<button
onClick={() => setSelectedCategory('all')}
className={`flex items-center gap-2 px-5 py-2.5 rounded-full text-xs font-bold transition-all duration-200 shadow-sm ${
@@ -127,8 +134,8 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
})}
</div>
{/* Centered Symmetrical Vertical Stack Container (No Lopsided Gutter) */}
<div className="max-w-5xl mx-auto space-y-16">
{/* Expansive Full-Width Vertical Tool Stack */}
<div className="w-full space-y-16 sm:space-y-20">
{filteredCategories.map((category) => {
const catTools = tools.filter((t) => t.category === category.slug);
if (catTools.length === 0) return null;
@@ -151,12 +158,12 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
</p>
</div>
</div>
<span className="self-start sm:self-auto text-xs font-mono font-semibold text-blue-700 bg-blue-50 border border-blue-200 px-3 py-1 rounded-full">
<span className="self-start sm:self-auto text-xs font-mono font-semibold text-blue-700 bg-blue-50 border border-blue-200 px-3.5 py-1 rounded-full">
{catTools.length} {catTools.length === 1 ? 'Production Tool' : 'Production Tools'}
</span>
</div>
{/* Symmetrical Tool Cards */}
{/* Symmetrical Full-Width Tool Cards */}
<div className="space-y-8">
{catTools.map((tool) => {
const badgeInfo = MODEL_BADGES[tool.id] || {
@@ -170,96 +177,111 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
caption: 'Interactive Before/After Preview',
};
const isBanner = (tool as any).variant === 'banner' || (tool as any).previewType === 'banner' || !example.after;
return (
<TiltCard
<SpotlightCard
key={tool.id}
maxTilt={2.5}
scale={1.008}
showGlare={true}
className="rounded-3xl"
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"
>
<div className="bg-white rounded-3xl p-7 sm:p-9 border border-slate-900/[0.08] hover:border-blue-400 shadow-cream-sm hover:shadow-cream-md 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>{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>
{/* 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>{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 */}
<div className="grid grid-cols-1 lg:grid-cols-12 gap-8 lg:gap-12 items-center">
{/* Left 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>
<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="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>
</div>
<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>Studio-grade 4K lossless enhancement</span>
</div>
<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>Full creative control in native iOS & Android apps</span>
</div>
</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>
{/* Action Buttons */}
<div className="pt-4 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"
>
<span>Launch Tool Online</span>
<ArrowRight className="w-3.5 h-3.5" />
</Link>
<Link
href={`/apps/${tool.homeApp}`}
className="inline-flex items-center gap-1.5 px-5 py-3 rounded-full text-xs font-bold text-slate-700 bg-slate-100 border border-slate-200 hover:bg-slate-200 transition-colors"
>
<Smartphone className="w-3.5 h-3.5 text-blue-600" />
<span>Native App</span>
</Link>
</div>
</div>
{/* Card Content Grid: 2 Symmetric Columns */}
<div className="grid grid-cols-1 md:grid-cols-12 gap-8 lg:gap-10 items-center">
{/* Left Details Column */}
<div className="md:col-span-6 space-y-4">
<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>
<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="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>
</div>
<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>Studio-grade 4K lossless enhancement</span>
</div>
<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>Full creative control in native iOS & Android apps</span>
{/* 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>
{/* Action Buttons */}
<div className="pt-4 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"
>
<span>Launch Tool Online</span>
<ArrowRight className="w-3.5 h-3.5" />
</Link>
<Link
href={`/apps/${tool.homeApp}`}
className="inline-flex items-center gap-1.5 px-5 py-3 rounded-full text-xs font-bold text-slate-700 bg-slate-100 border border-slate-200 hover:bg-slate-200 transition-colors"
>
<Smartphone className="w-3.5 h-3.5 text-blue-600" />
<span>Native App</span>
</Link>
</div>
</div>
{/* Right Interactive Before/After Comparison Slider */}
<div className="md:col-span-6">
) : (
<BeforeAfterSlider
beforeUrl={example.before}
afterUrl={example.after}
beforeLabel="Raw Input"
afterLabel="CRE Result"
aspectRatio="aspect-[4/3]"
aspectRatio="aspect-[16/10]"
autoSlide={false}
/>
</div>
)}
</div>
</div>
</TiltCard>
</SpotlightCard>
);
})}
</div>
@@ -268,8 +290,8 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
})}
</div>
{/* Centered Symmetrical Bottom Banner */}
<div className="mt-16 max-w-5xl mx-auto rounded-3xl bg-white p-6 sm:p-8 border border-slate-900/[0.08] shadow-cream-sm flex flex-col sm:flex-row items-center justify-between gap-5 text-center sm:text-left">
{/* Centered Symmetrical Bottom Banner (Expansive Width) */}
<div className="mt-16 w-full rounded-3xl bg-white p-6 sm:p-8 border border-slate-900/[0.08] shadow-sm flex flex-col sm:flex-row items-center justify-between gap-5 text-center sm:text-left">
<div className="flex items-center gap-3.5">
<div className="w-10 h-10 rounded-2xl bg-blue-50 border border-blue-200 flex items-center justify-center text-blue-600 shrink-0">
<Smartphone className="w-5 h-5" />
+1 -1
View File
@@ -21,7 +21,7 @@ export function BeforeAfterSlider({
afterLabel,
caption,
aspectRatio = 'aspect-[4/3] sm:aspect-[16/10]',
autoSlide = true,
autoSlide = false,
className = '',
}: BeforeAfterSliderProps) {
return (
+33 -55
View File
@@ -22,42 +22,36 @@ export function Cinematic3DComparison({
afterLabel = 'AI RECONSTRUCTED',
caption,
aspectRatio = 'aspect-[4/3] sm:aspect-[16/10]',
autoSlide = true,
maxTilt = 7,
autoSlide = false,
maxTilt = 6,
className = '',
}: Cinematic3DComparisonProps) {
const [sliderPosition, setSliderPosition] = useState(50);
const [isDragging, setIsDragging] = useState(false);
const [isUserInteracting, setIsUserInteracting] = useState(false);
const [tilt, setTilt] = useState({ rx: 0, ry: 0, glareX: 50, glareY: 50, active: false });
const containerRef = useRef<HTMLDivElement>(null);
const stageRef = useRef<HTMLDivElement>(null);
const animFrameRef = useRef<number | null>(null);
const resumeTimerRef = useRef<NodeJS.Timeout | null>(null);
const startTimeRef = useRef<number>(Date.now());
const glareRef = useRef<HTMLDivElement>(null);
// Auto-slide smooth sine oscillation loop
// Auto-slide smooth sine oscillation loop (only when explicitly requested)
useEffect(() => {
if (!autoSlide || isDragging || isUserInteracting) {
if (animFrameRef.current) cancelAnimationFrame(animFrameRef.current);
return;
}
if (!autoSlide || isDragging) return;
let animId: number;
const start = Date.now();
const animate = () => {
const elapsed = Date.now() - startTimeRef.current;
// Gentle cinematic oscillation between 28% and 72%
const newPos = 50 + 22 * Math.sin(elapsed * 0.0014);
const elapsed = Date.now() - start;
// Gentle cinematic oscillation between 30% and 70%
const newPos = 50 + 20 * Math.sin(elapsed * 0.0014);
setSliderPosition(newPos);
animFrameRef.current = requestAnimationFrame(animate);
animId = requestAnimationFrame(animate);
};
animFrameRef.current = requestAnimationFrame(animate);
animId = requestAnimationFrame(animate);
return () => {
if (animFrameRef.current) cancelAnimationFrame(animFrameRef.current);
if (animId) cancelAnimationFrame(animId);
};
}, [autoSlide, isDragging, isUserInteracting]);
}, [autoSlide, isDragging]);
// Handle position calculation
const handleMove = useCallback((clientX: number) => {
@@ -97,7 +91,7 @@ export function Cinematic3DComparison({
};
}, [isDragging, handleMouseMove, handleMouseUp, handleTouchMove]);
// 3D Spatial Tilt Tracking
// 3D Spatial Tilt - Pure Direct DOM Manipulation (Zero React Re-renders on mousemove!)
const handleStageMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
if (!containerRef.current) return;
const rect = containerRef.current.getBoundingClientRect();
@@ -107,27 +101,20 @@ export function Cinematic3DComparison({
const rx = -(y - 0.5) * maxTilt * 2;
const ry = (x - 0.5) * maxTilt * 2;
setTilt({
rx,
ry,
glareX: x * 100,
glareY: y * 100,
active: true,
});
};
const handleMouseEnter = () => {
setIsUserInteracting(true);
if (resumeTimerRef.current) clearTimeout(resumeTimerRef.current);
containerRef.current.style.transform = `rotateX(${rx.toFixed(2)}deg) rotateY(${ry.toFixed(2)}deg) scale3d(1.012, 1.012, 1.012)`;
if (glareRef.current) {
glareRef.current.style.opacity = '0.55';
glareRef.current.style.background = `radial-gradient(circle 380px at ${(x * 100).toFixed(1)}% ${(y * 100).toFixed(1)}%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.08) 50%, transparent 80%)`;
}
};
const handleMouseLeave = () => {
setTilt((prev) => ({ ...prev, rx: 0, ry: 0, active: false }));
if (resumeTimerRef.current) clearTimeout(resumeTimerRef.current);
resumeTimerRef.current = setTimeout(() => {
setIsUserInteracting(false);
startTimeRef.current = Date.now();
}, 2800);
if (containerRef.current) {
containerRef.current.style.transform = 'rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)';
}
if (glareRef.current) {
glareRef.current.style.opacity = '0';
}
};
return (
@@ -136,21 +123,12 @@ export function Cinematic3DComparison({
<div
ref={containerRef}
onMouseMove={handleStageMouseMove}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
onMouseDown={() => {
setIsDragging(true);
setIsUserInteracting(true);
}}
onTouchStart={() => {
setIsDragging(true);
setIsUserInteracting(true);
}}
className={`relative w-full ${aspectRatio} rounded-2xl sm:rounded-3xl overflow-hidden cursor-ew-resize preserve-3d transition-transform duration-200 ease-out shadow-cinematic-3d hover:shadow-cinematic-hover border border-slate-900/[0.08] bg-slate-950`}
onMouseDown={() => setIsDragging(true)}
onTouchStart={() => setIsDragging(true)}
className={`relative w-full ${aspectRatio} rounded-2xl sm:rounded-3xl overflow-hidden cursor-ew-resize preserve-3d transition-transform duration-150 ease-out shadow-cinematic-3d hover:shadow-cinematic-hover border border-slate-900/[0.08] bg-slate-950`}
style={{
transform: tilt.active
? `rotateX(${tilt.rx.toFixed(2)}deg) rotateY(${tilt.ry.toFixed(2)}deg) scale3d(1.015, 1.015, 1.015)`
: 'rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)',
transform: 'rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)',
touchAction: 'pan-y',
}}
>
@@ -165,10 +143,10 @@ export function Cinematic3DComparison({
{/* Dynamic 3D Cursor Specular Light Glint */}
<div
className="absolute inset-0 pointer-events-none transition-opacity duration-300 z-10"
ref={glareRef}
className="absolute inset-0 pointer-events-none transition-opacity duration-300 z-10 opacity-0"
style={{
opacity: tilt.active ? 0.65 : 0,
background: `radial-gradient(circle 380px at ${tilt.glareX}% ${tilt.glareY}%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.08) 50%, transparent 80%)`,
background: 'radial-gradient(circle 380px at 50% 50%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.08) 50%, transparent 80%)',
}}
/>
+10 -9
View File
@@ -15,9 +15,9 @@ interface NavbarProps {
export function Navbar({ config, currentLocale }: NavbarProps) {
const [isScrolled, setIsScrolled] = useState(false);
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
const [mousePos, setMousePos] = useState({ x: 50, y: 50, active: false });
const pathname = usePathname();
const navRef = useRef<HTMLDivElement>(null);
const glintRef = useRef<HTMLDivElement>(null);
useEffect(() => {
const handleScroll = () => {
@@ -28,14 +28,18 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
}, []);
const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
if (!glintRef.current) return;
const rect = e.currentTarget.getBoundingClientRect();
const x = ((e.clientX - rect.left) / rect.width) * 100;
const y = ((e.clientY - rect.top) / rect.height) * 100;
setMousePos({ x, y, active: true });
glintRef.current.style.opacity = '0.6';
glintRef.current.style.background = `radial-gradient(ellipse 260px 80px at ${x.toFixed(1)}% ${y.toFixed(1)}%, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.08) 40%, transparent 70%)`;
};
const handleMouseLeave = () => {
setMousePos((prev) => ({ ...prev, active: false }));
if (glintRef.current) {
glintRef.current.style.opacity = '0';
}
};
return (
@@ -51,13 +55,10 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
{/* Optical Glass Caustic Reflection Sheen */}
<div className="liquid-caustic-refraction" aria-hidden="true" />
{/* Dynamic Specular Caustic Glint - Subtle gloss on cursor interaction */}
{/* Dynamic Specular Caustic Glint - Direct DOM, 0 React re-renders */}
<div
className="absolute inset-0 pointer-events-none transition-opacity duration-300 z-[2]"
style={{
opacity: mousePos.active ? 0.6 : 0,
background: `radial-gradient(ellipse 260px 80px at ${mousePos.x}% ${mousePos.y}%, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.08) 40%, transparent 70%)`,
}}
ref={glintRef}
className="absolute inset-0 pointer-events-none transition-opacity duration-300 z-[2] opacity-0"
/>
{/* Foreground Content: 100% Crisp, High-Contrast, Rock-Solid Static (Zero Wobble) */}
+5 -5
View File
@@ -9,13 +9,13 @@ export function SmoothScroll() {
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
const lenis = new Lenis({
duration: 0.95,
duration: 0.75, // Extra smooth, luxurious gliding friction
easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),
orientation: 'vertical',
gestureOrientation: 'both', // Allows trackpad horizontal and vertical gestures
gestureOrientation: 'vertical',
smoothWheel: true,
syncTouch: false, // Preserves hardware 120Hz momentum touch scrolling on phones & tablets
wheelMultiplier: 1.0,
syncTouch: false,
wheelMultiplier: 1.05,
touchMultiplier: 1.0,
});
@@ -37,7 +37,7 @@ export function SmoothScroll() {
const targetEl = document.querySelector(href);
if (targetEl) {
e.preventDefault();
lenis.scrollTo(targetEl as HTMLElement, { offset: -90, duration: 1.2 });
lenis.scrollTo(targetEl as HTMLElement, { offset: -90, duration: 0.75 });
}
}
};