feat(ui): complete homepage overhaul with magicui animations, shiftable tools grid, bento grid, 3D visualizer, and marquee reviews
This commit is contained in:
@@ -1,28 +1,21 @@
|
||||
'use client';
|
||||
|
||||
import React, { useState } from 'react';
|
||||
import React from 'react';
|
||||
import Link from 'next/link';
|
||||
import {
|
||||
Sparkles,
|
||||
ArrowRight,
|
||||
Smartphone,
|
||||
Layers,
|
||||
ShieldCheck,
|
||||
LockKeyhole,
|
||||
ImagePlus,
|
||||
Check,
|
||||
Zap,
|
||||
UploadCloud,
|
||||
SlidersHorizontal,
|
||||
ArrowDown
|
||||
} from 'lucide-react';
|
||||
import { resolveLocalised, ToolItem, AppItem, VariantSpec } from '@/types';
|
||||
import { TryItWidget } from './TryItWidget';
|
||||
import { HeroPrism } from '@/components/3d/HeroPrism';
|
||||
import { Kinetic3DText } from '@/components/ui/Kinetic3DText';
|
||||
import { ShimmerBadge } from '@/components/animate-ui/ShimmerBadge';
|
||||
import { CardBeforeAfterSlider } from '@/components/ui/CardBeforeAfterSlider';
|
||||
import { BeforeAfterSlider } from '@/components/ui/BeforeAfterSlider';
|
||||
import { NeuralGrainOverlay } from '@/components/ui/NeuralGrainOverlay';
|
||||
import { Hero3DCanvas } from '@/components/3d/Hero3DCanvas';
|
||||
import { TextAnimate } from '@/components/magicui/text-animate';
|
||||
import { GrainTransformShowcase } from '@/components/ui/GrainTransformShowcase';
|
||||
|
||||
interface HeroSectionProps {
|
||||
@@ -58,82 +51,15 @@ export function HeroSection({
|
||||
variants = [],
|
||||
locale = 'en',
|
||||
}: HeroSectionProps) {
|
||||
const [grainActive, setGrainActive] = useState<boolean>(true);
|
||||
const resolvedTitle = resolveLocalised(title, locale);
|
||||
const resolvedSubtitle = resolveLocalised(subtitle, locale);
|
||||
const resolvedBadge = resolveLocalised(badge, locale);
|
||||
const resolvedSubtitle = resolveLocalised(subtitle, locale) || 'Studio-grade neural vision tools with zero sign-up and zero data retention. Process high-resolution portraits, precision cutouts, and 4K restorations directly in your browser.';
|
||||
const resolvedBadge = resolveLocalised(badge, locale) || 'Next-Gen Neural AI Studio';
|
||||
|
||||
const primaryCtaLabel = resolveLocalised(primaryCta?.label, locale, 'Explore the tools');
|
||||
const primaryCtaHref = primaryCta?.href || '/tools';
|
||||
const secondaryCtaLabel = resolveLocalised(secondaryCta?.label, locale, 'Our apps');
|
||||
const secondaryCtaHref = secondaryCta?.href || '/apps';
|
||||
const primaryCtaLabel = resolveLocalised(primaryCta?.label, locale, 'Explore Our Tools');
|
||||
const primaryCtaHref = primaryCta?.href || '#our-tools';
|
||||
const secondaryCtaLabel = resolveLocalised(secondaryCta?.label, locale, 'Recommended Apps');
|
||||
const secondaryCtaHref = secondaryCta?.href || '#recommended-apps';
|
||||
|
||||
const activeTrustBadges = trustBadges && trustBadges.length > 0 ? trustBadges : [
|
||||
{ text: 'No account needed' },
|
||||
{ text: "Photos aren't stored" },
|
||||
{ text: 'Try with a sample' },
|
||||
];
|
||||
|
||||
if (variant === 'tryit' && tool) {
|
||||
return (
|
||||
<section className="relative isolate overflow-hidden pt-28 pb-16 sm:pt-36 sm:pb-24 lg:pt-40 lg:pb-28 bg-[#FAF8F5]">
|
||||
<div className="absolute inset-x-0 top-0 h-[620px] bg-[radial-gradient(ellipse_at_72%_18%,rgba(87,132,220,0.14),transparent_48%),radial-gradient(ellipse_at_12%_0%,rgba(208,182,142,0.12),transparent_36%)] pointer-events-none" />
|
||||
<div className="absolute right-[4%] top-12 w-[360px] h-[360px] opacity-35 pointer-events-none hidden lg:block" aria-hidden="true">
|
||||
<HeroPrism />
|
||||
</div>
|
||||
|
||||
<div className="relative z-10 max-w-[1440px] mx-auto px-4 sm:px-6 lg:px-10">
|
||||
<div className="grid lg:grid-cols-[0.82fr_1.18fr] gap-10 xl:gap-16 items-center">
|
||||
<div className="max-w-xl">
|
||||
<div className="inline-flex items-center gap-2 rounded-full border border-blue-200/80 bg-white/75 px-3.5 py-2 text-[11px] font-semibold tracking-[0.12em] uppercase text-blue-800 shadow-sm backdrop-blur">
|
||||
<Sparkles className="w-3.5 h-3.5" />
|
||||
<span>{resolvedBadge || 'A calmer way to create'}</span>
|
||||
</div>
|
||||
|
||||
<Kinetic3DText
|
||||
primaryText={resolvedTitle}
|
||||
subtitle={resolvedSubtitle}
|
||||
className="mt-7 text-left [&_h1]:text-left [&_h1]:text-[2.7rem] sm:[&_h1]:text-6xl lg:[&_h1]:text-[4.25rem] [&_h1]:leading-[1.02] [&_p]:mx-0 [&_p]:mt-5 [&_p]:max-w-lg [&_p]:text-base [&_p]:sm:text-lg"
|
||||
/>
|
||||
|
||||
<div className="mt-8 flex flex-wrap gap-3">
|
||||
<Link href={primaryCtaHref} className="group inline-flex items-center gap-2.5 rounded-full bg-slate-950 px-6 py-3.5 text-sm font-semibold text-white shadow-lg shadow-slate-900/10 transition-all hover:-translate-y-0.5 hover:bg-blue-700 hover:shadow-xl">
|
||||
{primaryCtaLabel} <ArrowRight className="h-4 w-4 transition-transform group-hover:translate-x-1" />
|
||||
</Link>
|
||||
<Link href={secondaryCtaHref} className="inline-flex items-center gap-2 rounded-full border border-slate-300/80 bg-white/75 px-5 py-3.5 text-sm font-semibold text-slate-800 shadow-sm transition-all hover:-translate-y-0.5 hover:border-slate-400 hover:bg-white">
|
||||
<Smartphone className="h-4 w-4 text-blue-700" /> {secondaryCtaLabel}
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className="mt-9 flex flex-wrap gap-x-5 gap-y-2 text-xs font-medium text-slate-600">
|
||||
{activeTrustBadges.map((badgeItem, bIdx) => (
|
||||
<span key={bIdx} className="inline-flex items-center gap-1.5">
|
||||
<ShieldCheck className="h-4 w-4 text-emerald-700" /> {badgeItem.text}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="relative min-w-0">
|
||||
<div className="absolute -inset-4 rounded-[2.25rem] bg-gradient-to-br from-blue-200/50 via-white/30 to-amber-100/60 blur-2xl" />
|
||||
<div className="relative rounded-[1.8rem] border border-slate-200/90 bg-white/88 p-1.5 shadow-[0_35px_100px_-38px_rgba(32,49,84,0.32)] sm:p-2">
|
||||
<TryItWidget
|
||||
tool={tool}
|
||||
homeApp={homeApp}
|
||||
variants={variants}
|
||||
locale={locale}
|
||||
samplePresets={tryIt?.samplePresets}
|
||||
ctaText={tryIt?.ctaText}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
// Dedicated Tool Landing Hero (for Google Search / Direct Traffic SEO)
|
||||
// Dedicated Tool Landing Hero (for /tools/[slug] SEO pages)
|
||||
if (variant === 'toolHero' && tool) {
|
||||
const categoryName = tool.category?.replace('-', ' ').toUpperCase() || 'AI TOOL';
|
||||
const appName = homeApp ? resolveLocalised(homeApp.name, locale) : 'Mobile App';
|
||||
@@ -146,20 +72,17 @@ export function HeroSection({
|
||||
|
||||
return (
|
||||
<section className="relative isolate overflow-hidden pt-28 pb-16 sm:pt-32 sm:pb-20 lg:pt-36 lg:pb-24 bg-[#FAF8F5] border-b border-slate-900/[0.07]">
|
||||
{/* Ambient subtle warm gradient */}
|
||||
<div className="absolute inset-x-0 top-0 h-[640px] bg-[radial-gradient(ellipse_at_75%_20%,rgba(87,132,220,0.12),transparent_50%),radial-gradient(ellipse_at_15%_0%,rgba(208,182,142,0.15),transparent_40%)] pointer-events-none" />
|
||||
|
||||
<div className="relative z-10 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
{/* Breadcrumb Navigation */}
|
||||
<nav aria-label="Breadcrumb" className="mb-5 flex items-center justify-center gap-2 text-xs font-medium text-slate-500">
|
||||
<Link href="/" className="hover:text-blue-700 transition-colors">Home</Link>
|
||||
<span>/</span>
|
||||
<Link href="/tools" className="hover:text-blue-700 transition-colors">Tools</Link>
|
||||
<span>/</span>
|
||||
<span className="text-slate-900 font-semibold">{resolvedTitle}</span>
|
||||
<span className="text-slate-900 font-semibold">{resolveLocalised(tool.name, locale)}</span>
|
||||
</nav>
|
||||
|
||||
{/* Centered Editorial Tool Header (Typography OUTSIDE cards) */}
|
||||
<div className="text-center max-w-4xl mx-auto mb-10 sm:mb-12">
|
||||
<div className="inline-flex items-center gap-2 rounded-full border border-blue-200/90 bg-white/90 px-4 py-1.5 text-xs font-semibold tracking-[0.14em] uppercase text-blue-800 shadow-sm backdrop-blur">
|
||||
<Sparkles className="w-3.5 h-3.5 text-blue-600" />
|
||||
@@ -167,14 +90,13 @@ export function HeroSection({
|
||||
</div>
|
||||
|
||||
<h1 className="mt-4 text-3xl sm:text-5xl lg:text-6xl font-display font-black tracking-tight text-slate-900 leading-[1.08]">
|
||||
{resolvedTitle}
|
||||
<TextAnimate animation="slideLeft" by="word">{resolveLocalised(tool.name, locale)}</TextAnimate>
|
||||
</h1>
|
||||
|
||||
<p className="mt-4 text-base sm:text-lg leading-relaxed text-slate-600 max-w-2xl mx-auto">
|
||||
{resolvedSubtitle}
|
||||
<p className="mt-4 text-base sm:text-lg leading-relaxed text-slate-600 max-w-2xl mx-auto font-sans">
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.15}>{resolveLocalised(tool.summary, locale)}</TextAnimate>
|
||||
</p>
|
||||
|
||||
{/* Model Specs Row Outside Cards */}
|
||||
<div className="mt-6 flex flex-wrap items-center justify-center gap-2 sm:gap-3 text-xs font-medium text-slate-600">
|
||||
<span className="inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-full bg-white/90 border border-slate-200/80 shadow-2xs">
|
||||
<Check className="w-3.5 h-3.5 text-blue-600" /> Lossless 4K Reconstruction
|
||||
@@ -185,15 +107,10 @@ export function HeroSection({
|
||||
<span className="inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-full bg-white/90 border border-slate-200/80 shadow-2xs">
|
||||
<ShieldCheck className="w-3.5 h-3.5 text-emerald-600" /> 100% Private (Never Stored)
|
||||
</span>
|
||||
<span className="inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-full bg-white/90 border border-slate-200/80 shadow-2xs">
|
||||
<Sparkles className="w-3.5 h-3.5 text-indigo-600" /> Free Browser Trial
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Unified Tool Studio on Same Page (Upload Studio + Live Transformation Preview) */}
|
||||
<div className="grid grid-cols-1 lg:grid-cols-12 gap-8 items-stretch max-w-7xl mx-auto" id="tool-studio">
|
||||
{/* Column 1: Spacious, Prominent Upload Studio (lg:col-span-7) */}
|
||||
<div className="lg:col-span-7 flex flex-col">
|
||||
<TryItWidget
|
||||
tool={tool}
|
||||
@@ -204,9 +121,8 @@ export function HeroSection({
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Column 2: Sleeker, Focused Neural Transformation Preview (lg:col-span-5) */}
|
||||
<div className="lg:col-span-5 flex flex-col" id="transformation-preview">
|
||||
<div className="h-full rounded-3xl overflow-hidden border border-slate-900/[0.1] shadow-cinematic-3d bg-slate-950 flex flex-col justify-between min-h-[380px] sm:min-h-[460px]">
|
||||
<div className="h-full rounded-3xl overflow-hidden border border-slate-900/[0.1] shadow-2xl bg-slate-950 flex flex-col justify-between min-h-[380px] sm:min-h-[460px]">
|
||||
<GrainTransformShowcase
|
||||
beforeUrl={primaryExample.before}
|
||||
afterUrl={primaryExample.after}
|
||||
@@ -216,60 +132,110 @@ export function HeroSection({
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Clean Trust Indicators */}
|
||||
<div className="mt-8 flex flex-wrap items-center justify-center gap-x-6 gap-y-2 text-xs font-medium text-slate-500">
|
||||
<span className="inline-flex items-center gap-1.5"><ShieldCheck className="h-4 w-4 text-emerald-600" /> No account required</span>
|
||||
<span className="inline-flex items-center gap-1.5"><LockKeyhole className="h-4 w-4 text-emerald-600" /> Photos never stored</span>
|
||||
<span className="inline-flex items-center gap-1.5"><Check className="h-4 w-4 text-blue-600" /> High-res 4K export</span>
|
||||
{homeApp && (
|
||||
<Link href={`/apps/${homeApp.slug}`} className="inline-flex items-center gap-1.5 text-blue-700 hover:underline font-semibold">
|
||||
<Smartphone className="h-4 w-4" /> Available in {appName} App
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
// Centered Hero for Tools/Apps/Pricing pages
|
||||
// Pure Front Page View (PRD & User Requirements):
|
||||
// Clean, beautifully formatted typography + interactive 3D visuals strictly behind the text
|
||||
return (
|
||||
<section className="relative overflow-hidden pt-28 pb-20 sm:pt-36 sm:pb-28 text-center bg-[#FAF8F5] border-b border-slate-900/[0.07]">
|
||||
<div className="absolute top-0 left-1/2 -translate-x-1/2 w-full max-w-7xl h-96 bg-gradient-to-b from-blue-500/[0.04] to-transparent blur-3xl pointer-events-none -z-10" />
|
||||
<section className="relative isolate min-h-[92vh] sm:min-h-[95vh] flex flex-col justify-center items-center text-center overflow-hidden bg-[#FAF8F5] pt-24 pb-16 px-4 sm:px-6 lg:px-8">
|
||||
{/* 1. Interactive 3D WebGL Canvas & Particle Constellation Mounted Behind Text */}
|
||||
<div className="absolute inset-0 -z-10 flex items-center justify-center pointer-events-none select-none overflow-hidden">
|
||||
<div className="w-[520px] h-[520px] sm:w-[780px] sm:h-[780px] lg:w-[980px] lg:h-[980px] opacity-70 transform-gpu transition-opacity duration-1000">
|
||||
<Hero3DCanvas className="w-full h-full" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 space-y-6 relative z-10">
|
||||
{resolvedBadge && (
|
||||
<div className="inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-blue-50 border border-blue-200 text-xs font-mono font-semibold text-blue-700 shadow-sm">
|
||||
<Sparkles className="w-3.5 h-3.5 text-blue-600" />
|
||||
<span>{resolvedBadge}</span>
|
||||
</div>
|
||||
)}
|
||||
{/* 2. Ambient Atmosphere Radial Glows */}
|
||||
<div
|
||||
className="absolute inset-0 -z-20 pointer-events-none"
|
||||
style={{
|
||||
background: 'radial-gradient(circle at 50% 45%, rgba(37,99,235,0.13) 0%, rgba(14,165,233,0.07) 35%, transparent 70%)',
|
||||
}}
|
||||
/>
|
||||
<div
|
||||
className="absolute inset-x-0 bottom-0 h-40 bg-gradient-to-t from-[#FAF8F5] to-transparent -z-10 pointer-events-none"
|
||||
/>
|
||||
|
||||
<h1 className="text-4xl sm:text-5xl lg:text-6xl font-display font-black text-slate-900 tracking-tight leading-tight">
|
||||
{resolvedTitle}
|
||||
{/* 3. Front Page Content: Flawlessly Formatted, Luxurious Typography */}
|
||||
<div className="relative z-10 max-w-5xl mx-auto flex flex-col items-center justify-center">
|
||||
{/* Subtle Elegant Pill Badge */}
|
||||
<div className="inline-flex items-center gap-2 rounded-full border border-blue-500/20 bg-white/90 backdrop-blur-md px-4 py-1.5 text-xs font-mono font-medium tracking-wider uppercase text-blue-800 shadow-sm mb-6">
|
||||
<span className="flex h-2 w-2 relative">
|
||||
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"></span>
|
||||
<span className="relative inline-flex rounded-full h-2 w-2 bg-blue-600"></span>
|
||||
</span>
|
||||
<span>{resolvedBadge}</span>
|
||||
</div>
|
||||
|
||||
{/* Editorial High-Impact Headline (SF Pro & Poppins) */}
|
||||
<h1 className="text-4xl sm:text-6xl lg:text-[4.5rem] font-display font-extrabold tracking-[-0.035em] text-slate-900 leading-[1.08] max-w-4xl mx-auto text-balance">
|
||||
<span className="block text-slate-900">
|
||||
<TextAnimate animation="slideLeft" by="character">
|
||||
Transform Photos with
|
||||
</TextAnimate>
|
||||
</span>
|
||||
<span className="block mt-2 text-blue-600">
|
||||
<TextAnimate animation="slideLeft" by="character" delay={0.25}>
|
||||
Next-Gen Neural AI
|
||||
</TextAnimate>
|
||||
</span>
|
||||
</h1>
|
||||
|
||||
<p className="text-base sm:text-xl text-slate-600 max-w-2xl mx-auto leading-relaxed">
|
||||
{resolvedSubtitle}
|
||||
{/* Balanced, Readable Subtitle (Inter / SF Pro) */}
|
||||
<p className="mt-6 text-base sm:text-lg lg:text-xl text-slate-600 max-w-2xl mx-auto font-sans leading-relaxed text-balance">
|
||||
<TextAnimate animation="fadeIn" by="word" delay={0.25}>
|
||||
{resolvedSubtitle}
|
||||
</TextAnimate>
|
||||
</p>
|
||||
|
||||
<div className="flex flex-wrap items-center justify-center gap-4 pt-4">
|
||||
<Link
|
||||
href="/#studio-suite"
|
||||
className="inline-flex items-center gap-2 px-7 py-3.5 rounded-full font-bold text-xs sm:text-sm text-white bg-blue-600 hover:bg-blue-700 shadow-sm shadow-blue-500/20 transition-all hover:scale-105 active:scale-95"
|
||||
{/* Primary and Secondary Action Buttons */}
|
||||
<div className="mt-9 flex flex-wrap items-center justify-center gap-3.5">
|
||||
<a
|
||||
href={primaryCtaHref}
|
||||
className="group inline-flex items-center gap-2.5 rounded-full bg-slate-950 px-8 py-3.5 text-xs sm:text-sm font-bold text-white shadow-lg shadow-slate-900/15 transition-all duration-300 hover:scale-105 hover:bg-blue-600 active:scale-95"
|
||||
>
|
||||
<Layers className="w-4 h-4 text-white" />
|
||||
<span>The Creative Suite</span>
|
||||
</Link>
|
||||
<Link
|
||||
href="/apps"
|
||||
className="inline-flex items-center gap-2 px-7 py-3.5 rounded-full font-bold text-xs sm:text-sm text-slate-700 bg-white border border-slate-200 hover:bg-slate-50 transition-colors shadow-sm"
|
||||
<span>{primaryCtaLabel}</span>
|
||||
<ArrowDown className="w-4 h-4 transition-transform group-hover:translate-y-0.5" />
|
||||
</a>
|
||||
<a
|
||||
href={secondaryCtaHref}
|
||||
className="inline-flex items-center gap-2 rounded-full border border-slate-300/90 bg-white/80 backdrop-blur-md px-7 py-3.5 text-xs sm:text-sm font-semibold text-slate-800 shadow-sm transition-all duration-300 hover:scale-105 hover:bg-white active:scale-95"
|
||||
>
|
||||
<Smartphone className="w-4 h-4 text-blue-600" />
|
||||
<span>Mobile Apps Suite</span>
|
||||
</Link>
|
||||
<span>{secondaryCtaLabel}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{/* Trust Badges Strip */}
|
||||
<div className="mt-8 flex flex-wrap items-center justify-center gap-x-6 gap-y-2 text-xs font-medium text-slate-500 font-sans">
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
<ShieldCheck className="h-4 w-4 text-emerald-600" />
|
||||
<span>Zero-Storage Guarantee</span>
|
||||
</span>
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
<Check className="h-4 w-4 text-blue-600" />
|
||||
<span>Lossless 4K Export</span>
|
||||
</span>
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
<Zap className="h-4 w-4 text-amber-500" />
|
||||
<span>< 0.8s Inference</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Gentle Scroll Cue */}
|
||||
<a
|
||||
href="#our-tools"
|
||||
aria-label="Scroll to our tools"
|
||||
className="mt-12 inline-flex flex-col items-center gap-1.5 text-[11px] font-mono uppercase tracking-widest text-slate-600 hover:text-blue-600 transition-colors"
|
||||
>
|
||||
<span>Scroll to Explore</span>
|
||||
<span className="w-4 h-7 rounded-full border border-slate-300 flex justify-center p-1">
|
||||
<span className="w-1 h-1.5 rounded-full bg-blue-600 animate-bounce" />
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user