feat(ui): complete vertical layout overhaul, dynamic JSON banners, and animate-ui text motion graphics
This commit is contained in:
+61
-1
@@ -46,7 +46,67 @@
|
|||||||
{
|
{
|
||||||
"id": "flagship-banners",
|
"id": "flagship-banners",
|
||||||
"type": "majorToolBanners",
|
"type": "majorToolBanners",
|
||||||
"props": {}
|
"props": {
|
||||||
|
"title": "Interactive Model Showcase",
|
||||||
|
"badge": "FLAGSHIP TRANSFORMATION MODELS",
|
||||||
|
"subtitle": "Scroll down to seamlessly explore next-generation neural engines in real-time.",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"id": "alpha-matting",
|
||||||
|
"index": "01 / 03",
|
||||||
|
"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 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",
|
||||||
|
"toolSlug": "background-remover",
|
||||||
|
"appSlug": "bg-cleaner-app",
|
||||||
|
"appName": "Magic Cutout",
|
||||||
|
"specs": ["0.02px edge preservation", "Alpha PNG lossless stream", "Studio hair detail"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "editorial-portrait-banner",
|
||||||
|
"index": "02 / 03",
|
||||||
|
"tabLabel": "02 BANNER",
|
||||||
|
"category": "STUDIO PRO BANNER",
|
||||||
|
"model": "RetouchGAN v2.1 Prime",
|
||||||
|
"latency": "< 380ms Stream",
|
||||||
|
"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",
|
||||||
|
"specs": ["Sub-pore texture matrix", "Authentic epidermal micro-details", "Lossless 4K color gamut"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"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",
|
||||||
|
"specs": ["Iris & eyelash synthesis", "400% lossless super-resolution", "Studio-grade crispness"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "tools-vertical-stack",
|
"id": "tools-vertical-stack",
|
||||||
|
|||||||
Generated
+43
@@ -10,6 +10,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/three": "^0.187.0",
|
"@types/three": "^0.187.0",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
|
"framer-motion": "^14.9.0",
|
||||||
"lenis": "^1.3.27",
|
"lenis": "^1.3.27",
|
||||||
"lucide-react": "^0.468.0",
|
"lucide-react": "^0.468.0",
|
||||||
"next": "^14.2.15",
|
"next": "^14.2.15",
|
||||||
@@ -1933,6 +1934,33 @@
|
|||||||
"url": "https://github.com/sponsors/rawify"
|
"url": "https://github.com/sponsors/rawify"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/framer-motion": {
|
||||||
|
"version": "14.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-14.9.0.tgz",
|
||||||
|
"integrity": "sha512-g1hZu8WoTwgsoVAaqEEcefhvR03cKGtkmrKaRrWpXhnM3LGR8jl1u2qyJ1PMVlO7LKQHE8TTRQYUlMmnrY4L+g==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"motion-dom": "14.9.0",
|
||||||
|
"motion-utils": "14.7.0",
|
||||||
|
"tslib": "^2.4.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "^18.0.0 || ^19.0.0",
|
||||||
|
"react-dom": "^18.0.0 || ^19.0.0",
|
||||||
|
"remix": "^3.1.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"react": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"react-dom": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"remix": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/fsevents": {
|
"node_modules/fsevents": {
|
||||||
"version": "2.3.3",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||||
@@ -2217,6 +2245,21 @@
|
|||||||
"node": ">=8.6"
|
"node": ">=8.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/motion-dom": {
|
||||||
|
"version": "14.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-14.9.0.tgz",
|
||||||
|
"integrity": "sha512-wGjKbNDMHd75aLStkxLCKZ+T8/wusZHklmNLK1Ak68UrdBt2X8I4yweYR/0WonxGnBsw6oloDTIV8pN+UTvzzA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"motion-utils": "14.7.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/motion-utils": {
|
||||||
|
"version": "14.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-14.7.0.tgz",
|
||||||
|
"integrity": "sha512-woO0/Nb7ys75f94fjvQi/6leiHGvZUYkeHUPEZ3vxsV+9OpEVhkxp01x8MlRwX0zt31EqgXsKDAoBoJLC148Tw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/ms": {
|
"node_modules/ms": {
|
||||||
"version": "2.1.3",
|
"version": "2.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/three": "^0.187.0",
|
"@types/three": "^0.187.0",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
|
"framer-motion": "^14.9.0",
|
||||||
"lenis": "^1.3.27",
|
"lenis": "^1.3.27",
|
||||||
"lucide-react": "^0.468.0",
|
"lucide-react": "^0.468.0",
|
||||||
"next": "^14.2.15",
|
"next": "^14.2.15",
|
||||||
|
|||||||
@@ -214,6 +214,44 @@
|
|||||||
animation: shimmer 3s infinite;
|
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 */
|
/* Clean Minimalist Warm Scrollbar */
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 7px;
|
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>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -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>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -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>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -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,276 +1,159 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import React, { useRef, useState, useEffect, useCallback } from 'react';
|
import React from 'react';
|
||||||
import Link from 'next/link';
|
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 { 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;
|
id: string;
|
||||||
index: string;
|
index: string;
|
||||||
|
tabLabel?: string;
|
||||||
category: string;
|
category: string;
|
||||||
model: string;
|
model: string;
|
||||||
latency: string;
|
latency: string;
|
||||||
title: string;
|
title: string;
|
||||||
tagline: string;
|
tagline: string;
|
||||||
description: string;
|
description: string;
|
||||||
|
variant?: 'comparison' | 'banner';
|
||||||
|
beforeUrl?: string;
|
||||||
|
afterUrl?: string;
|
||||||
|
bannerImage?: string;
|
||||||
|
bannerBadge?: string;
|
||||||
toolSlug: string;
|
toolSlug: string;
|
||||||
appSlug: string;
|
appSlug: string;
|
||||||
appName: string;
|
appName: string;
|
||||||
beforeUrl: string;
|
|
||||||
afterUrl: string;
|
|
||||||
specs: 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',
|
index: '01 / 03',
|
||||||
category: 'ALPHA MATTING ARCHIVE',
|
tabLabel: '01 ALPHA',
|
||||||
|
category: 'FINE MATTING & CUTOUT',
|
||||||
model: 'P3M-Net Dual-Stream Alpha',
|
model: 'P3M-Net Dual-Stream Alpha',
|
||||||
latency: '< 520ms Stream',
|
latency: '< 520ms Stream',
|
||||||
title: 'Hair-Strand Matting & Alpha Isolation',
|
title: 'Hair-Strand Matting & Alpha Isolation',
|
||||||
tagline: 'Sub-pixel edge detection with microscopic flyaway hair preservation.',
|
tagline: 'Sub-pixel hair strands, transparent veils, and motion blur cutout.',
|
||||||
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.',
|
description: 'Proprietary dual-stream deep neural network isolates fine flyaway hair, complex textures, and semi-transparent boundaries in studio portraits with pixel-level precision.',
|
||||||
toolSlug: 'background-remover',
|
variant: 'comparison',
|
||||||
appSlug: 'bg-cleaner-app',
|
|
||||||
appName: 'Magic Cutout Studio',
|
|
||||||
beforeUrl: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=800&auto=format&fit=crop&q=80',
|
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',
|
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',
|
index: '02 / 03',
|
||||||
category: 'DERMAL RESTORATION',
|
tabLabel: '02 BANNER',
|
||||||
model: 'RetouchGAN v2.1 Micro-Pore',
|
category: 'STUDIO PRO BANNER',
|
||||||
|
model: 'RetouchGAN v2.1 Prime',
|
||||||
latency: '< 380ms Stream',
|
latency: '< 380ms Stream',
|
||||||
title: 'Sub-Pore Skin Retouching & Blemish Removal',
|
title: 'Editorial Portrait Engine Pro',
|
||||||
tagline: 'Authentic microscopic texture preservation without plastic smoothing.',
|
tagline: 'Next-generation sub-pore epidermal synthesis.',
|
||||||
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.',
|
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',
|
toolSlug: 'blemish-remover',
|
||||||
appSlug: 'portrait-app',
|
appSlug: 'portrait-app',
|
||||||
appName: 'Portrait Studio AI',
|
appName: 'Portrait Studio AI',
|
||||||
beforeUrl: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=800&auto=format&fit=crop&q=80',
|
specs: ['Sub-pore texture matrix', 'Authentic epidermal micro-details', 'Lossless 4K color gamut'],
|
||||||
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'],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'enhancer',
|
id: 'super-resolution',
|
||||||
index: '03 / 03',
|
index: '03 / 03',
|
||||||
|
tabLabel: '03 4K',
|
||||||
category: '4K SUPER-RESOLUTION',
|
category: '4K SUPER-RESOLUTION',
|
||||||
model: 'GFPGAN + RealESRGAN Ultra',
|
model: 'GFPGAN + RealESRGAN Ultra',
|
||||||
latency: '< 460ms Stream',
|
latency: '< 460ms Stream',
|
||||||
title: '4K Super-Resolution & Facial Deblurring',
|
title: '4K Super-Resolution & Facial Deblurring',
|
||||||
tagline: 'Transform low-resolution snapshots into crystal-clear 4K portraits.',
|
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.',
|
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',
|
toolSlug: 'photo-enhancer',
|
||||||
appSlug: 'photo-enhancer-pro',
|
appSlug: 'photo-enhancer-pro',
|
||||||
appName: 'Enhance Ultra AI',
|
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'],
|
specs: ['Iris & eyelash synthesis', '400% lossless super-resolution', 'Studio-grade crispness'],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export function CinematicHorizontalScrollSection() {
|
export function CinematicHorizontalScrollSection({
|
||||||
const scrollRef = useRef<HTMLDivElement>(null);
|
title = 'Interactive Model Showcase',
|
||||||
const [activeIndex, setActiveIndex] = useState(0);
|
badge = 'FLAGSHIP TRANSFORMATION MODELS',
|
||||||
const [isDragging, setIsDragging] = useState(false);
|
subtitle = 'Explore our next-generation neural engines with live benchmark telemetry.',
|
||||||
const [dragStartX, setDragStartX] = useState(0);
|
items = DEFAULT_ITEMS,
|
||||||
const [dragScrollLeft, setDragScrollLeft] = useState(0);
|
}: CinematicHorizontalProps) {
|
||||||
|
const showcaseCards = items && items.length > 0 ? items : DEFAULT_ITEMS;
|
||||||
// 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);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
id="flagship-models"
|
id="flagship-models"
|
||||||
className="py-20 sm:py-28 lg:py-32 bg-[#FAF8F5] border-t border-slate-900/[0.08] relative overflow-hidden"
|
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 */}
|
{/* Subtle ambient light 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 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="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" />
|
|
||||||
|
|
||||||
{/* Massive Typographic Watermark (Lightweight CSS) */}
|
<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
|
{/* Section Header with Motion Graphics Text */}
|
||||||
className="absolute top-6 left-1/2 -translate-x-1/2 w-max select-none pointer-events-none opacity-[0.03] -z-10"
|
<div className="text-center max-w-3xl mx-auto mb-14 sm:mb-16">
|
||||||
aria-hidden="true"
|
<div className="mb-3">
|
||||||
>
|
<ShimmerBadge>
|
||||||
<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">
|
|
||||||
<Sparkles className="w-3.5 h-3.5 text-blue-600" />
|
<Sparkles className="w-3.5 h-3.5 text-blue-600" />
|
||||||
<span>FLAGSHIP TRANSFORMATION MODELS</span>
|
<span>{badge}</span>
|
||||||
|
</ShimmerBadge>
|
||||||
</div>
|
</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 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>
|
</h2>
|
||||||
|
|
||||||
|
<p className="text-base sm:text-lg text-slate-600 leading-relaxed font-normal">
|
||||||
|
{subtitle}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Navigation Controls: Tabs & Arrow Buttons */}
|
{/* 100% Pure Vertical Stack (Zero Horizontal Scroll, Zero Lag, Ultra Smooth) */}
|
||||||
<div className="flex flex-wrap items-center gap-3">
|
<div className="w-full space-y-12 sm:space-y-16">
|
||||||
{/* 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) => {
|
{showcaseCards.map((card, idx) => {
|
||||||
const isActive = activeIndex === idx;
|
const isBannerMode = card.variant === 'banner' || (!card.afterUrl && !!card.bannerImage);
|
||||||
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>
|
|
||||||
|
|
||||||
{/* 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>
|
|
||||||
</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 (
|
return (
|
||||||
<div
|
<SpotlightCard
|
||||||
key={card.id}
|
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 ${
|
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"
|
||||||
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'
|
|
||||||
}`}
|
|
||||||
>
|
>
|
||||||
|
{/* Border Beam subtle light effect on hover */}
|
||||||
|
<BorderBeam duration={14} size={280} borderWidth={1.5} colorFrom="#3b82f6" colorTo="#a855f7" />
|
||||||
|
|
||||||
{/* Card Header Metadata Bar */}
|
{/* 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 flex-wrap items-center justify-between gap-3 pb-4 border-b border-slate-100 mb-6">
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
@@ -284,59 +167,49 @@ export function CinematicHorizontalScrollSection() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center gap-2">
|
<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">
|
<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">
|
||||||
{card.model}
|
<Cpu className="w-3 h-3 text-blue-600" />
|
||||||
|
<span>{card.model}</span>
|
||||||
</span>
|
</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">
|
<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">
|
||||||
{card.latency}
|
<span className="w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse" />
|
||||||
|
<span>{card.latency}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Interactive Comparison Viewport */}
|
{/* Symmetrical Two-Column Content Grid: Details on Left, Visual on Right */}
|
||||||
<div className="mb-6 rounded-2xl overflow-hidden border border-slate-200 bg-slate-100">
|
<div className="grid grid-cols-1 lg:grid-cols-12 gap-8 lg:gap-14 items-center">
|
||||||
<Cinematic3DComparison
|
{/* Left Column: Editorial Content, Specs & Actions */}
|
||||||
beforeUrl={card.beforeUrl}
|
<div className="lg:col-span-5 space-y-5">
|
||||||
afterUrl={card.afterUrl}
|
<div>
|
||||||
beforeLabel="RAW SOURCE"
|
<span className="text-xs font-mono text-blue-600 font-bold uppercase tracking-wider block mb-1">
|
||||||
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}
|
{card.tagline}
|
||||||
</span>
|
</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>
|
</div>
|
||||||
|
|
||||||
<p className="text-sm sm:text-base text-slate-600 leading-relaxed font-normal">
|
<p className="text-sm sm:text-base text-slate-600 leading-relaxed font-normal">
|
||||||
{card.description}
|
{card.description}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{/* Specs Chips */}
|
{/* Specs Checklist Chips */}
|
||||||
<div className="flex flex-wrap gap-2 pt-1">
|
<div className="space-y-2 pt-1">
|
||||||
{card.specs.map((spec, i) => (
|
{card.specs.map((spec, i) => (
|
||||||
<span
|
<div key={i} className="flex items-center gap-2.5 text-xs sm:text-sm text-slate-700 font-medium">
|
||||||
key={i}
|
<CheckCircle2 className="w-4 h-4 text-blue-600 shrink-0" />
|
||||||
className="px-3 py-1 rounded-lg bg-slate-50 text-slate-700 text-xs font-mono font-medium border border-slate-200"
|
<span>{spec}</span>
|
||||||
>
|
</div>
|
||||||
✓ {spec}
|
|
||||||
</span>
|
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Direct Action Links */}
|
{/* Action Links */}
|
||||||
<div className="pt-4 flex flex-wrap items-center justify-between gap-3 border-t border-slate-100">
|
<div className="pt-4 flex flex-wrap items-center gap-3">
|
||||||
<Link
|
<Link
|
||||||
href={`/tools/${card.toolSlug}`}
|
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"
|
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>
|
<span>Launch Online Studio</span>
|
||||||
<ArrowRight className="w-3.5 h-3.5" />
|
<ArrowRight className="w-3.5 h-3.5" />
|
||||||
@@ -344,36 +217,70 @@ export function CinematicHorizontalScrollSection() {
|
|||||||
|
|
||||||
<Link
|
<Link
|
||||||
href={`/apps/${card.appSlug}`}
|
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"
|
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" />
|
<Smartphone className="w-3.5 h-3.5 text-blue-600" />
|
||||||
<span>{card.appName}</span>
|
<span>{card.appName}</span>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</div>
|
||||||
|
|
||||||
{/* Bottom Progress Bar Indicator */}
|
{/* Bottom Banner Content */}
|
||||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mt-6">
|
<div className="absolute bottom-5 left-5 right-5 z-20 flex items-end justify-between">
|
||||||
<div className="flex items-center justify-between gap-4">
|
<div>
|
||||||
<div className="flex-1 max-w-xs h-1.5 bg-slate-200 rounded-full overflow-hidden">
|
<span className="text-[10px] font-mono text-blue-300 font-bold uppercase tracking-wider block mb-1">
|
||||||
<div
|
Neural Preset Matrix
|
||||||
className="h-full bg-gradient-to-r from-blue-600 to-indigo-600 rounded-full transition-all duration-300"
|
</span>
|
||||||
style={{
|
<h4 className="text-xl sm:text-2xl font-display font-bold text-white drop-shadow">
|
||||||
width: `${((activeIndex + 1) / showcaseCards.length) * 100}%`,
|
{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 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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</SpotlightCard>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,12 +2,14 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Link from 'next/link';
|
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 { resolveLocalised, ToolItem, AppItem, VariantSpec } from '@/types';
|
||||||
import { TryItWidget } from './TryItWidget';
|
import { TryItWidget } from './TryItWidget';
|
||||||
import { TiltCard } from '@/components/ui/TiltCard';
|
|
||||||
import { Hero3DCanvas } from '@/components/3d/Hero3DCanvas';
|
import { Hero3DCanvas } from '@/components/3d/Hero3DCanvas';
|
||||||
import { Kinetic3DText } from '@/components/ui/Kinetic3DText';
|
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 {
|
interface HeroSectionProps {
|
||||||
title?: any;
|
title?: any;
|
||||||
@@ -61,20 +63,19 @@ export function HeroSection({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Main Hero Header */}
|
{/* Main Hero Header */}
|
||||||
<div className="text-center max-w-4xl mx-auto space-y-6 mb-12 sm:mb-16 relative z-10">
|
<div className="text-center max-w-4xl mx-auto space-y-6 mb-10 sm:mb-14 relative z-10">
|
||||||
{/* Live Core Status & Enigma Editorial Metadata */}
|
{/* Live Core Status & Animate UI Shimmer Badge */}
|
||||||
<div className="flex flex-wrap items-center justify-center gap-2.5 preserve-3d">
|
<div className="flex flex-wrap items-center justify-center gap-2.5">
|
||||||
{resolvedBadge && (
|
<ShimmerBadge>
|
||||||
<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 mr-1">
|
||||||
<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="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 className="relative inline-flex rounded-full h-2 w-2 bg-blue-600"></span>
|
||||||
</span>
|
</span>
|
||||||
<span>{resolvedBadge}</span>
|
<span>{resolvedBadge || 'NEXT-GEN NEURAL STUDIO v4.2'}</span>
|
||||||
</div>
|
</ShimmerBadge>
|
||||||
)}
|
|
||||||
<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">
|
<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>VOL. 26 // NEURAL STUDIO</span>
|
<span>FP16 LOSSLESS PIPELINE</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -84,18 +85,65 @@ export function HeroSection({
|
|||||||
highlightText="Next-Gen Neural AI"
|
highlightText="Next-Gen Neural AI"
|
||||||
subtitle={resolvedSubtitle}
|
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>
|
</div>
|
||||||
|
|
||||||
{/* Embedded Interactive Free Try-It Widget wrapped with 3D Tilt Card */}
|
{/* 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 Animate UI Border Beam */}
|
||||||
<div className="max-w-4xl mx-auto relative z-10">
|
<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
|
<TryItWidget
|
||||||
tool={tool}
|
tool={tool}
|
||||||
homeApp={homeApp}
|
homeApp={homeApp}
|
||||||
variants={variants}
|
variants={variants}
|
||||||
locale={locale}
|
locale={locale}
|
||||||
/>
|
/>
|
||||||
</TiltCard>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -69,11 +69,11 @@ export function SectionRenderer({ section, context }: SectionRendererProps) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
case 'transformationReel':
|
case 'transformationReel':
|
||||||
return <TransformationReelSection />;
|
return <TransformationReelSection {...resolvedProps} />;
|
||||||
|
|
||||||
case 'majorToolBanners':
|
case 'majorToolBanners':
|
||||||
case 'cinematicHorizontal':
|
case 'cinematicHorizontal':
|
||||||
return <CinematicHorizontalScrollSection />;
|
return <CinematicHorizontalScrollSection {...resolvedProps} />;
|
||||||
|
|
||||||
case 'visualUseCases':
|
case 'visualUseCases':
|
||||||
return <VisualUseCasesSection />;
|
return <VisualUseCasesSection />;
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { NumberCounter } from '@/components/animate-ui/NumberCounter';
|
||||||
|
import { AnimatedGradientText } from '@/components/animate-ui/AnimatedGradientText';
|
||||||
|
|
||||||
interface StatsSectionProps {
|
interface StatsSectionProps {
|
||||||
items?: Array<{
|
items?: Array<{
|
||||||
@@ -11,21 +15,20 @@ export function StatsSection({ items = [] }: StatsSectionProps) {
|
|||||||
if (!items || items.length === 0) return null;
|
if (!items || items.length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="py-12 bg-[#FAF8F5] border-y border-slate-900/[0.08] relative overflow-hidden">
|
<section className="py-14 sm:py-16 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">
|
<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">
|
<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) => (
|
{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">
|
<div
|
||||||
<p
|
key={idx}
|
||||||
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"
|
className="pt-4 md:pt-0 space-y-2 group hover:-translate-y-1 transition-all duration-300"
|
||||||
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 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}
|
{stat.label}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,136 +2,286 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Link from 'next/link';
|
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 {
|
interface BenchmarkModel {
|
||||||
toolSlug: string;
|
slug: string;
|
||||||
toolName: string;
|
name: string;
|
||||||
|
architecture: string;
|
||||||
category: string;
|
category: string;
|
||||||
before: string;
|
latencyMs: number;
|
||||||
after: string;
|
latencyTag: string;
|
||||||
tag: string;
|
precision: string;
|
||||||
|
tensorSpec: string;
|
||||||
|
pipelineFocus: string;
|
||||||
|
hardwareShader: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const transformations: TransformationItem[] = [
|
const benchmarkModels: BenchmarkModel[] = [
|
||||||
{
|
{
|
||||||
toolSlug: 'blemish-remover',
|
slug: 'blemish-remover',
|
||||||
toolName: 'AI Blemish Remover',
|
name: 'RetouchGAN v2.1',
|
||||||
|
architecture: 'Dual-Discriminator CycleGAN',
|
||||||
category: 'Portrait Retouch',
|
category: 'Portrait Retouch',
|
||||||
before: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=400&auto=format&fit=crop&q=80',
|
latencyMs: 380,
|
||||||
after: 'https://images.unsplash.com/photo-1517841905240-472988babdf9?w=400&auto=format&fit=crop&q=80',
|
latencyTag: '< 380ms',
|
||||||
tag: 'Skin Pore Texture Preserved',
|
precision: '99.98% SSIM',
|
||||||
|
tensorSpec: '4096 × 4096 FP16',
|
||||||
|
pipelineFocus: 'Sub-Pore Texture & Epidermal Realism',
|
||||||
|
hardwareShader: 'Metal 3 / WebGPU',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
toolSlug: 'background-remover',
|
slug: 'background-remover',
|
||||||
toolName: 'P3M Background Cutout',
|
name: 'P3M-Net Alpha',
|
||||||
category: 'Matting',
|
architecture: 'Pluralistic Pixel Trim Matting',
|
||||||
before: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=400&auto=format&fit=crop&q=80',
|
category: 'Fine Matting',
|
||||||
after: 'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=400&auto=format&fit=crop&q=80',
|
latencyMs: 520,
|
||||||
tag: 'Sub-Pixel Hair Strands',
|
latencyTag: '< 520ms',
|
||||||
|
precision: '0.02px Edge Trim',
|
||||||
|
tensorSpec: '3-Channel Alpha Matte',
|
||||||
|
pipelineFocus: 'Flyaway Hair Strand Isolation',
|
||||||
|
hardwareShader: 'CoreML / Vulkan',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
toolSlug: 'photo-enhancer',
|
slug: 'photo-enhancer',
|
||||||
toolName: 'Ultra HD 4K Enhancer',
|
name: 'GFPGAN + RealESRGAN',
|
||||||
category: 'Restoration',
|
architecture: 'Generative Facial Prior + RRDB',
|
||||||
before: 'https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=400&auto=format&fit=crop&q=80',
|
category: '4K Super-Res',
|
||||||
after: 'https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=400&auto=format&fit=crop&q=80',
|
latencyMs: 460,
|
||||||
tag: 'Deblur & Iris Sharpness',
|
latencyTag: '< 460ms',
|
||||||
|
precision: 'Lossless Prior Synthesis',
|
||||||
|
tensorSpec: '400% Non-Linear Upscale',
|
||||||
|
pipelineFocus: 'Iris & Eyelash Fine Reconstruction',
|
||||||
|
hardwareShader: 'Edge Tensor Core',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
toolSlug: 'old-photo-restorer',
|
slug: 'old-photo-restorer',
|
||||||
toolName: 'Vintage Restorer',
|
name: 'ScratchDeNet Pro',
|
||||||
category: 'Archives',
|
architecture: 'Deep Contextual Inpaint Field',
|
||||||
before: 'https://images.unsplash.com/photo-1509198397868-475647b2a1e5?w=400&auto=format&fit=crop&q=80',
|
category: 'Archive Restoration',
|
||||||
after: 'https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?w=400&auto=format&fit=crop&q=80',
|
latencyMs: 490,
|
||||||
tag: 'Scratch & Tear Removal',
|
latencyTag: '< 490ms',
|
||||||
|
precision: 'Archive Grade 16-bit',
|
||||||
|
tensorSpec: 'Partial Convolution Net',
|
||||||
|
pipelineFocus: 'Physical Emulsion Tear & Crease Healing',
|
||||||
|
hardwareShader: 'DirectML / WebGPU',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
toolSlug: 'cartoon-avatar',
|
slug: 'cartoon-avatar',
|
||||||
toolName: 'CartoonGAN Anime',
|
name: 'AnimeGAN v3 Core',
|
||||||
|
architecture: 'Perceptual Gram-Loss Vectorizer',
|
||||||
category: 'Creative Art',
|
category: 'Creative Art',
|
||||||
before: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=400&auto=format&fit=crop&q=80',
|
latencyMs: 350,
|
||||||
after: 'https://images.unsplash.com/photo-1578632767115-351597cf2477?w=400&auto=format&fit=crop&q=80',
|
latencyTag: '< 350ms',
|
||||||
tag: 'Manga Cel Animation',
|
precision: 'Zero Color Distortion',
|
||||||
|
tensorSpec: 'Vector Contour Mapping',
|
||||||
|
pipelineFocus: 'Manga Cel Shading & Ink Contours',
|
||||||
|
hardwareShader: 'WebGPU / CUDA Edge',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
toolSlug: 'colorization',
|
slug: 'colorization',
|
||||||
toolName: 'B&W Colorizer',
|
name: 'DeOldify Chroma',
|
||||||
category: 'Historical Color',
|
architecture: 'Self-Attention NoGAN Spectral Net',
|
||||||
before: 'https://images.unsplash.com/photo-1544717305-2782549b5136?w=400&auto=format&fit=crop&q=80',
|
category: 'Historical Palette',
|
||||||
after: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=400&auto=format&fit=crop&q=80',
|
latencyMs: 420,
|
||||||
tag: 'Deep Neural Palette',
|
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 (
|
return (
|
||||||
<section className="py-14 bg-[#F5F2EB] border-y border-slate-900/[0.08] overflow-hidden relative">
|
<section className="py-14 sm:py-16 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">
|
{/* Ambient background glow */}
|
||||||
<div className="flex items-center gap-2.5">
|
<div className="absolute top-0 right-1/4 w-96 h-96 bg-blue-500/[0.03] rounded-full blur-3xl pointer-events-none" />
|
||||||
<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>
|
<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">
|
||||||
<span className="relative inline-flex rounded-full h-2 w-2 bg-blue-600"></span>
|
{/* 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>
|
</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>
|
|
||||||
</div>
|
</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
|
<Link
|
||||||
href="/#studio-suite"
|
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"
|
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>
|
<span>Explore The Suite</span>
|
||||||
<ArrowRight className="w-3.5 h-3.5" />
|
<ArrowRight className="w-3.5 h-3.5" />
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Horizontal scrolling showcase */}
|
{/* Global Telemetry Strip */}
|
||||||
<div className="flex gap-5 sm:gap-6 overflow-x-auto pb-4 px-4 sm:px-8 no-scrollbar scroll-smooth preserve-3d">
|
<div className="grid grid-cols-2 md:grid-cols-4 gap-3 mb-8">
|
||||||
{transformations.map((item, idx) => (
|
<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">
|
||||||
<Link
|
<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">
|
||||||
key={idx}
|
<Zap className="w-4 h-4" />
|
||||||
href={`/tools/${item.toolSlug}`}
|
</div>
|
||||||
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"
|
<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="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>
|
||||||
|
<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"
|
||||||
>
|
>
|
||||||
{/* Visual side-by-side thumbnail */}
|
<div>
|
||||||
<div className="relative aspect-[16/10] rounded-xl overflow-hidden mb-3 bg-slate-950 border border-slate-200">
|
{/* Top Header Row */}
|
||||||
<div className="grid grid-cols-2 h-full w-full">
|
<div className="flex items-center justify-between gap-2 mb-3 pb-3 border-b border-slate-100">
|
||||||
<div className="relative h-full overflow-hidden border-r border-white/20">
|
<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">
|
||||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
{model.category}
|
||||||
<img src={item.before} alt="Before" className="h-full w-full object-cover" />
|
</span>
|
||||||
<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">
|
<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">
|
||||||
Before
|
<span className="w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse" />
|
||||||
|
{model.latencyTag}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="relative h-full overflow-hidden">
|
|
||||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
{/* Model Name and Architecture */}
|
||||||
<img src={item.after} alt="After" className="h-full w-full object-cover group-hover:scale-105 transition-transform duration-500" />
|
<h4 className="text-lg font-display font-bold text-slate-900 group-hover:text-blue-600 transition-colors">
|
||||||
<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">
|
{model.name}
|
||||||
CRE AI
|
</h4>
|
||||||
</span>
|
<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>
|
||||||
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="space-y-1 preserve-3d">
|
{/* High-tech Specs Grid */}
|
||||||
<div className="flex items-center justify-between">
|
<div className="grid grid-cols-2 gap-2 text-[11px] font-mono mb-4">
|
||||||
<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">
|
<div className="bg-slate-50/80 rounded-lg p-2 border border-slate-200/60">
|
||||||
{item.category}
|
<span className="text-slate-400 block text-[9.5px] uppercase font-semibold">Precision</span>
|
||||||
</span>
|
<span className="text-slate-800 font-bold">{model.precision}</span>
|
||||||
<span className="text-[10px] font-mono text-slate-400 group-hover:text-blue-600 transition-colors font-medium">
|
|
||||||
Try Free →
|
|
||||||
</span>
|
|
||||||
</div>
|
</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)' }}>
|
<div className="bg-slate-50/80 rounded-lg p-2 border border-slate-200/60">
|
||||||
{item.toolName}
|
<span className="text-slate-400 block text-[9.5px] uppercase font-semibold">Tensor Core</span>
|
||||||
</h4>
|
<span className="text-slate-800 font-bold truncate block">{model.tensorSpec}</span>
|
||||||
<p className="text-[11px] font-mono text-slate-500 truncate" style={{ transform: 'translateZ(8px)' }}>
|
</div>
|
||||||
{item.tag}
|
</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>
|
</p>
|
||||||
</div>
|
</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>
|
</Link>
|
||||||
))}
|
</div>
|
||||||
|
</SpotlightCard>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -17,7 +17,10 @@ import {
|
|||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import { resolveLocalised, ToolItem, CategoryItem } from '@/types';
|
import { resolveLocalised, ToolItem, CategoryItem } from '@/types';
|
||||||
import { BeforeAfterSlider } from '@/components/ui/BeforeAfterSlider';
|
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 {
|
export interface VerticalToolStackProps {
|
||||||
context: {
|
context: {
|
||||||
@@ -58,23 +61,27 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
|
|||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
id="studio-suite"
|
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 */}
|
{/* Anchor alias for backwards compatibility */}
|
||||||
<div id="tools-stack" className="absolute -top-20" />
|
<div id="tools-stack" className="absolute -top-20" />
|
||||||
|
|
||||||
{/* Subtle ambient light gradient */}
|
{/* 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">
|
{/* Full-width expansive container spanning the entire page */}
|
||||||
{/* Section Header: Centered & Balanced */}
|
<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="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">
|
<div className="mb-4">
|
||||||
|
<ShimmerBadge>
|
||||||
<Zap className="w-3.5 h-3.5 text-blue-600" />
|
<Zap className="w-3.5 h-3.5 text-blue-600" />
|
||||||
<span>THE CREATIVE STUDIO SUITE</span>
|
<span>THE CREATIVE STUDIO SUITE</span>
|
||||||
|
</ShimmerBadge>
|
||||||
</div>
|
</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">
|
<h2 className="text-3xl sm:text-4xl lg:text-5xl font-display font-black text-slate-900 tracking-tight mb-5">
|
||||||
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>
|
<MotionTextReveal text="Advanced" className="text-slate-900 inline" />{' '}
|
||||||
|
<AnimatedGradientText className="font-black">Vision Tools</AnimatedGradientText>
|
||||||
</h2>
|
</h2>
|
||||||
<p className="text-base sm:text-lg text-slate-600 leading-relaxed font-normal">
|
<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.
|
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>
|
</div>
|
||||||
|
|
||||||
{/* Centered Symmetrical Category Filter Rail */}
|
{/* 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
|
<button
|
||||||
onClick={() => setSelectedCategory('all')}
|
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 ${
|
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>
|
</div>
|
||||||
|
|
||||||
{/* Centered Symmetrical Vertical Stack Container (No Lopsided Gutter) */}
|
{/* Expansive Full-Width Vertical Tool Stack */}
|
||||||
<div className="max-w-5xl mx-auto space-y-16">
|
<div className="w-full space-y-16 sm:space-y-20">
|
||||||
{filteredCategories.map((category) => {
|
{filteredCategories.map((category) => {
|
||||||
const catTools = tools.filter((t) => t.category === category.slug);
|
const catTools = tools.filter((t) => t.category === category.slug);
|
||||||
if (catTools.length === 0) return null;
|
if (catTools.length === 0) return null;
|
||||||
@@ -151,12 +158,12 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</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'}
|
{catTools.length} {catTools.length === 1 ? 'Production Tool' : 'Production Tools'}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Symmetrical Tool Cards */}
|
{/* Symmetrical Full-Width Tool Cards */}
|
||||||
<div className="space-y-8">
|
<div className="space-y-8">
|
||||||
{catTools.map((tool) => {
|
{catTools.map((tool) => {
|
||||||
const badgeInfo = MODEL_BADGES[tool.id] || {
|
const badgeInfo = MODEL_BADGES[tool.id] || {
|
||||||
@@ -170,15 +177,13 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
|
|||||||
caption: 'Interactive Before/After Preview',
|
caption: 'Interactive Before/After Preview',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const isBanner = (tool as any).variant === 'banner' || (tool as any).previewType === 'banner' || !example.after;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TiltCard
|
<SpotlightCard
|
||||||
key={tool.id}
|
key={tool.id}
|
||||||
maxTilt={2.5}
|
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"
|
||||||
scale={1.008}
|
|
||||||
showGlare={true}
|
|
||||||
className="rounded-3xl"
|
|
||||||
>
|
>
|
||||||
<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 */}
|
{/* 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 justify-between gap-3 mb-6 pb-4 border-b border-slate-100">
|
||||||
<div className="flex flex-wrap items-center gap-2">
|
<div className="flex flex-wrap items-center gap-2">
|
||||||
@@ -200,10 +205,10 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Card Content Grid: 2 Symmetric Columns */}
|
{/* Card Content Grid: 2 Balanced Columns with Wide Preview */}
|
||||||
<div className="grid grid-cols-1 md:grid-cols-12 gap-8 lg:gap-10 items-center">
|
<div className="grid grid-cols-1 lg:grid-cols-12 gap-8 lg:gap-12 items-center">
|
||||||
{/* Left Details Column */}
|
{/* Left Details Column */}
|
||||||
<div className="md:col-span-6 space-y-4">
|
<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">
|
<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)}
|
{resolveLocalised(tool.name, locale)}
|
||||||
</h4>
|
</h4>
|
||||||
@@ -247,19 +252,36 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Right Interactive Before/After Comparison Slider */}
|
{/* Right Interactive Viewport: Simple Banner vs Comparison Slider */}
|
||||||
<div className="md:col-span-6">
|
<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
|
<BeforeAfterSlider
|
||||||
beforeUrl={example.before}
|
beforeUrl={example.before}
|
||||||
afterUrl={example.after}
|
afterUrl={example.after}
|
||||||
beforeLabel="Raw Input"
|
beforeLabel="Raw Input"
|
||||||
afterLabel="CRE Result"
|
afterLabel="CRE Result"
|
||||||
aspectRatio="aspect-[4/3]"
|
aspectRatio="aspect-[16/10]"
|
||||||
|
autoSlide={false}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</SpotlightCard>
|
||||||
</TiltCard>
|
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
@@ -268,8 +290,8 @@ export function VerticalToolStackSection({ context }: VerticalToolStackProps) {
|
|||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Centered Symmetrical Bottom Banner */}
|
{/* Centered Symmetrical Bottom Banner (Expansive Width) */}
|
||||||
<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">
|
<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="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">
|
<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" />
|
<Smartphone className="w-5 h-5" />
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export function BeforeAfterSlider({
|
|||||||
afterLabel,
|
afterLabel,
|
||||||
caption,
|
caption,
|
||||||
aspectRatio = 'aspect-[4/3] sm:aspect-[16/10]',
|
aspectRatio = 'aspect-[4/3] sm:aspect-[16/10]',
|
||||||
autoSlide = true,
|
autoSlide = false,
|
||||||
className = '',
|
className = '',
|
||||||
}: BeforeAfterSliderProps) {
|
}: BeforeAfterSliderProps) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -22,42 +22,36 @@ export function Cinematic3DComparison({
|
|||||||
afterLabel = 'AI RECONSTRUCTED',
|
afterLabel = 'AI RECONSTRUCTED',
|
||||||
caption,
|
caption,
|
||||||
aspectRatio = 'aspect-[4/3] sm:aspect-[16/10]',
|
aspectRatio = 'aspect-[4/3] sm:aspect-[16/10]',
|
||||||
autoSlide = true,
|
autoSlide = false,
|
||||||
maxTilt = 7,
|
maxTilt = 6,
|
||||||
className = '',
|
className = '',
|
||||||
}: Cinematic3DComparisonProps) {
|
}: Cinematic3DComparisonProps) {
|
||||||
const [sliderPosition, setSliderPosition] = useState(50);
|
const [sliderPosition, setSliderPosition] = useState(50);
|
||||||
const [isDragging, setIsDragging] = useState(false);
|
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 containerRef = useRef<HTMLDivElement>(null);
|
||||||
const stageRef = useRef<HTMLDivElement>(null);
|
const glareRef = useRef<HTMLDivElement>(null);
|
||||||
const animFrameRef = useRef<number | null>(null);
|
|
||||||
const resumeTimerRef = useRef<NodeJS.Timeout | null>(null);
|
|
||||||
const startTimeRef = useRef<number>(Date.now());
|
|
||||||
|
|
||||||
// Auto-slide smooth sine oscillation loop
|
// Auto-slide smooth sine oscillation loop (only when explicitly requested)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!autoSlide || isDragging || isUserInteracting) {
|
if (!autoSlide || isDragging) return;
|
||||||
if (animFrameRef.current) cancelAnimationFrame(animFrameRef.current);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
let animId: number;
|
||||||
|
const start = Date.now();
|
||||||
const animate = () => {
|
const animate = () => {
|
||||||
const elapsed = Date.now() - startTimeRef.current;
|
const elapsed = Date.now() - start;
|
||||||
// Gentle cinematic oscillation between 28% and 72%
|
// Gentle cinematic oscillation between 30% and 70%
|
||||||
const newPos = 50 + 22 * Math.sin(elapsed * 0.0014);
|
const newPos = 50 + 20 * Math.sin(elapsed * 0.0014);
|
||||||
setSliderPosition(newPos);
|
setSliderPosition(newPos);
|
||||||
animFrameRef.current = requestAnimationFrame(animate);
|
animId = requestAnimationFrame(animate);
|
||||||
};
|
};
|
||||||
|
|
||||||
animFrameRef.current = requestAnimationFrame(animate);
|
animId = requestAnimationFrame(animate);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
if (animFrameRef.current) cancelAnimationFrame(animFrameRef.current);
|
if (animId) cancelAnimationFrame(animId);
|
||||||
};
|
};
|
||||||
}, [autoSlide, isDragging, isUserInteracting]);
|
}, [autoSlide, isDragging]);
|
||||||
|
|
||||||
// Handle position calculation
|
// Handle position calculation
|
||||||
const handleMove = useCallback((clientX: number) => {
|
const handleMove = useCallback((clientX: number) => {
|
||||||
@@ -97,7 +91,7 @@ export function Cinematic3DComparison({
|
|||||||
};
|
};
|
||||||
}, [isDragging, handleMouseMove, handleMouseUp, handleTouchMove]);
|
}, [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>) => {
|
const handleStageMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
|
||||||
if (!containerRef.current) return;
|
if (!containerRef.current) return;
|
||||||
const rect = containerRef.current.getBoundingClientRect();
|
const rect = containerRef.current.getBoundingClientRect();
|
||||||
@@ -107,27 +101,20 @@ export function Cinematic3DComparison({
|
|||||||
const rx = -(y - 0.5) * maxTilt * 2;
|
const rx = -(y - 0.5) * maxTilt * 2;
|
||||||
const ry = (x - 0.5) * maxTilt * 2;
|
const ry = (x - 0.5) * maxTilt * 2;
|
||||||
|
|
||||||
setTilt({
|
containerRef.current.style.transform = `rotateX(${rx.toFixed(2)}deg) rotateY(${ry.toFixed(2)}deg) scale3d(1.012, 1.012, 1.012)`;
|
||||||
rx,
|
if (glareRef.current) {
|
||||||
ry,
|
glareRef.current.style.opacity = '0.55';
|
||||||
glareX: x * 100,
|
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%)`;
|
||||||
glareY: y * 100,
|
}
|
||||||
active: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleMouseEnter = () => {
|
|
||||||
setIsUserInteracting(true);
|
|
||||||
if (resumeTimerRef.current) clearTimeout(resumeTimerRef.current);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleMouseLeave = () => {
|
const handleMouseLeave = () => {
|
||||||
setTilt((prev) => ({ ...prev, rx: 0, ry: 0, active: false }));
|
if (containerRef.current) {
|
||||||
if (resumeTimerRef.current) clearTimeout(resumeTimerRef.current);
|
containerRef.current.style.transform = 'rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)';
|
||||||
resumeTimerRef.current = setTimeout(() => {
|
}
|
||||||
setIsUserInteracting(false);
|
if (glareRef.current) {
|
||||||
startTimeRef.current = Date.now();
|
glareRef.current.style.opacity = '0';
|
||||||
}, 2800);
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -136,21 +123,12 @@ export function Cinematic3DComparison({
|
|||||||
<div
|
<div
|
||||||
ref={containerRef}
|
ref={containerRef}
|
||||||
onMouseMove={handleStageMouseMove}
|
onMouseMove={handleStageMouseMove}
|
||||||
onMouseEnter={handleMouseEnter}
|
|
||||||
onMouseLeave={handleMouseLeave}
|
onMouseLeave={handleMouseLeave}
|
||||||
onMouseDown={() => {
|
onMouseDown={() => setIsDragging(true)}
|
||||||
setIsDragging(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-150 ease-out shadow-cinematic-3d hover:shadow-cinematic-hover border border-slate-900/[0.08] bg-slate-950`}
|
||||||
}}
|
|
||||||
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`}
|
|
||||||
style={{
|
style={{
|
||||||
transform: tilt.active
|
transform: 'rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)',
|
||||||
? `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)',
|
|
||||||
touchAction: 'pan-y',
|
touchAction: 'pan-y',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -165,10 +143,10 @@ export function Cinematic3DComparison({
|
|||||||
|
|
||||||
{/* Dynamic 3D Cursor Specular Light Glint */}
|
{/* Dynamic 3D Cursor Specular Light Glint */}
|
||||||
<div
|
<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={{
|
style={{
|
||||||
opacity: tilt.active ? 0.65 : 0,
|
background: 'radial-gradient(circle 380px at 50% 50%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.08) 50%, transparent 80%)',
|
||||||
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%)`,
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ interface NavbarProps {
|
|||||||
export function Navbar({ config, currentLocale }: NavbarProps) {
|
export function Navbar({ config, currentLocale }: NavbarProps) {
|
||||||
const [isScrolled, setIsScrolled] = useState(false);
|
const [isScrolled, setIsScrolled] = useState(false);
|
||||||
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
||||||
const [mousePos, setMousePos] = useState({ x: 50, y: 50, active: false });
|
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const navRef = useRef<HTMLDivElement>(null);
|
const navRef = useRef<HTMLDivElement>(null);
|
||||||
|
const glintRef = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleScroll = () => {
|
const handleScroll = () => {
|
||||||
@@ -28,14 +28,18 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
|
const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
|
||||||
|
if (!glintRef.current) return;
|
||||||
const rect = e.currentTarget.getBoundingClientRect();
|
const rect = e.currentTarget.getBoundingClientRect();
|
||||||
const x = ((e.clientX - rect.left) / rect.width) * 100;
|
const x = ((e.clientX - rect.left) / rect.width) * 100;
|
||||||
const y = ((e.clientY - rect.top) / rect.height) * 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 = () => {
|
const handleMouseLeave = () => {
|
||||||
setMousePos((prev) => ({ ...prev, active: false }));
|
if (glintRef.current) {
|
||||||
|
glintRef.current.style.opacity = '0';
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -51,13 +55,10 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
|
|||||||
{/* Optical Glass Caustic Reflection Sheen */}
|
{/* Optical Glass Caustic Reflection Sheen */}
|
||||||
<div className="liquid-caustic-refraction" aria-hidden="true" />
|
<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
|
<div
|
||||||
className="absolute inset-0 pointer-events-none transition-opacity duration-300 z-[2]"
|
ref={glintRef}
|
||||||
style={{
|
className="absolute inset-0 pointer-events-none transition-opacity duration-300 z-[2] opacity-0"
|
||||||
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%)`,
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Foreground Content: 100% Crisp, High-Contrast, Rock-Solid Static (Zero Wobble) */}
|
{/* Foreground Content: 100% Crisp, High-Contrast, Rock-Solid Static (Zero Wobble) */}
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ export function SmoothScroll() {
|
|||||||
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
|
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
|
||||||
|
|
||||||
const lenis = new Lenis({
|
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)),
|
easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),
|
||||||
orientation: 'vertical',
|
orientation: 'vertical',
|
||||||
gestureOrientation: 'both', // Allows trackpad horizontal and vertical gestures
|
gestureOrientation: 'vertical',
|
||||||
smoothWheel: true,
|
smoothWheel: true,
|
||||||
syncTouch: false, // Preserves hardware 120Hz momentum touch scrolling on phones & tablets
|
syncTouch: false,
|
||||||
wheelMultiplier: 1.0,
|
wheelMultiplier: 1.05,
|
||||||
touchMultiplier: 1.0,
|
touchMultiplier: 1.0,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ export function SmoothScroll() {
|
|||||||
const targetEl = document.querySelector(href);
|
const targetEl = document.querySelector(href);
|
||||||
if (targetEl) {
|
if (targetEl) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
lenis.scrollTo(targetEl as HTMLElement, { offset: -90, duration: 1.2 });
|
lenis.scrollTo(targetEl as HTMLElement, { offset: -90, duration: 0.75 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user