feat(homepage+tools): redesign hero with Image_homepage, transparent text buttons navbar, semi-solid transformation, and sticky persistent tools filter

This commit is contained in:
2026-11-05 17:04:30 +05:30
parent b23bd8e066
commit 44cb60ecfe
5 changed files with 313 additions and 406 deletions
+79 -124
View File
@@ -263,149 +263,104 @@ export function HeroSection({
// -------------------------------------------------------------
// 3. Pure Front Page Hero View (for homepage /):
// Ultra-refined Typography, Optical Crystal Prism & Ambient Particles
// Matching User Reference Image: Image_homepage.jpg background,
// Left-aligned typography, pill buttons, and glass telemetry capsule
// -------------------------------------------------------------
return (
<section className="relative isolate min-h-[96vh] flex flex-col justify-center items-center text-center overflow-hidden bg-[#FAF8F5] pt-28 pb-20 px-4 sm:px-6 md:px-8 lg:px-12">
{/* 1. MagicUI Ambient Floating Particles (Desktop only, 0% CPU on mobile/tablets) */}
<Particles
className="absolute inset-0 -z-20 opacity-40 pointer-events-none"
quantity={15}
color="#3b82f6"
size={0.7}
/>
{/* 2. Interactive 3D WebGL Crystal Prism Canvas (Desktop Only - Completely Removed on Phones & Mobile Devices) */}
<div className="hidden lg:flex absolute inset-0 -z-10 items-center justify-center pointer-events-none select-none overflow-hidden">
<div className="w-[1000px] h-[1000px] lg:w-[1300px] lg:h-[1300px] opacity-85 transform-gpu transition-opacity duration-1000">
<Hero3DCanvas className="w-full h-full" />
</div>
<section className="relative min-h-[92vh] sm:min-h-screen flex items-center overflow-hidden bg-black pt-20 sm:pt-24 pb-14 sm:pb-20">
{/* 1. Background Image with Left Dark Gradient Overlay */}
<div className="absolute inset-0 z-0">
<img
src="/management/pages/home/Image_homepage.jpg"
alt="CRE AI Photo Magic"
className="w-full h-full object-cover object-[75%_center] sm:object-right-top select-none pointer-events-none"
loading="eager"
decoding="async"
/>
{/* Dark Gradient Overlay for Maximum Text Readability */}
<div className="absolute inset-0 bg-gradient-to-r from-black/95 via-black/75 to-black/30 sm:via-black/55 sm:to-transparent" />
{/* Smooth Bottom Blend to Section Below */}
<div className="absolute inset-x-0 bottom-0 h-28 bg-gradient-to-t from-[#FAF8F5] via-[#FAF8F5]/70 to-transparent pointer-events-none" />
</div>
{/* 3. Radiant Multidimensional Chromatic Glow Mesh */}
<div
className="absolute inset-0 -z-30 pointer-events-none"
style={{
background: 'radial-gradient(circle at 50% 36%, rgba(59,130,246,0.12) 0%, rgba(99,102,241,0.08) 32%, rgba(6,182,212,0.04) 55%, transparent 75%)',
}}
/>
<div
className="absolute inset-0 -z-30 pointer-events-none opacity-50"
style={{
background: 'radial-gradient(ellipse at 78% 22%, rgba(236,72,153,0.06) 0%, transparent 50%), radial-gradient(ellipse at 22% 68%, rgba(16,185,129,0.05) 0%, transparent 50%)',
}}
/>
<div className="absolute inset-x-0 bottom-0 h-40 bg-gradient-to-t from-[#FAF8F5] via-[#FAF8F5]/80 to-transparent -z-10 pointer-events-none" />
{/* 4. Center Hero Typography & Visual Atmosphere */}
<div className="relative z-10 max-w-6xl mx-auto flex flex-col items-center justify-center w-full">
{/* Grand Headline: Masterpiece Proportions, Zero Awkward Wraps */}
<h1 className="text-3xl sm:text-5xl md:text-6xl lg:text-[5.2rem] xl:text-[5.8rem] font-display font-extrabold tracking-[-0.035em] leading-[1.08] max-w-6xl mx-auto text-balance">
<span className="block text-slate-950 pb-1 sm:pb-2">
<TextAnimate animation="slideLeft" by="word">
{/* 2. Left-Aligned Content Container */}
<div className="relative z-10 max-w-[1640px] w-full mx-auto px-4 sm:px-8 lg:px-14 flex flex-col justify-center min-h-[90vh] sm:min-h-[92vh]">
<div className="max-w-2xl sm:max-w-3xl">
{/* Masterpiece Headline */}
<h1 className="text-4xl sm:text-6xl md:text-7xl lg:text-[5.2rem] font-display font-extrabold tracking-[-0.03em] leading-[1.06] text-left">
<span className="block text-white">
Imagine. Transform.
</TextAnimate>
</span>
<span className="block mt-1 sm:mt-2 text-blue-600 pb-3 sm:whitespace-nowrap font-black">
<TextAnimate animation="slideLeft" by="word" delay={0.06}>
</span>
<span className="block mt-1 sm:mt-2 bg-gradient-to-r from-blue-400 via-indigo-300 to-pink-400 bg-clip-text text-transparent">
Create the Impossible.
</TextAnimate>
</span>
</h1>
{/* Inspiring, Refined Editorial Subtitle */}
<p className="mt-6 sm:mt-7 text-base sm:text-lg md:text-xl text-slate-600/90 max-w-2xl sm:max-w-3xl mx-auto font-sans leading-relaxed tracking-[-0.01em] text-balance">
<TextAnimate animation="fadeIn" by="word" delay={0.12}>
Turn ordinary moments into extraordinary visual art. Instant, effortless, and private photo magic right in your browser.
</TextAnimate>
</p>
{/* Luxury CTA Action Buttons */}
<div className="mt-9 sm:mt-10 flex flex-wrap items-center justify-center gap-4 sm:gap-5">
<a
href={primaryCtaHref}
className="group relative inline-flex items-center gap-3 rounded-full bg-slate-950 px-8 sm:px-9 py-4 text-xs sm:text-sm font-semibold tracking-tight text-white border border-white/10 shadow-[0_4px_20px_-4px_rgba(15,23,42,0.3),0_0_0_1px_rgba(255,255,255,0.08)_inset] hover:shadow-[0_8px_30px_-6px_rgba(37,99,235,0.4),0_0_0_1px_rgba(59,130,246,0.3)] transition-all duration-300 ease-out hover:scale-[1.03] active:scale-[0.98] cursor-pointer"
>
<span>{primaryCtaLabel}</span>
<span className="w-6 h-6 rounded-full bg-white/10 flex items-center justify-center group-hover:bg-blue-600 transition-colors duration-300">
<ArrowDown className="w-3.5 h-3.5 transition-transform duration-300 ease-out group-hover:translate-y-0.5" />
</span>
</a>
</h1>
<a
href={secondaryCtaHref}
className="group inline-flex items-center gap-2.5 rounded-full border border-slate-200/90 bg-white/80 hover:bg-white backdrop-blur-xl px-7 sm:px-8 py-4 text-xs sm:text-sm font-semibold tracking-tight text-slate-800 hover:text-slate-950 shadow-[0_4px_16px_-4px_rgba(15,23,42,0.06)] hover:shadow-[0_8px_24px_-6px_rgba(15,23,42,0.1)] hover:border-blue-400/60 transition-all duration-300 ease-out hover:scale-[1.03] active:scale-[0.98] cursor-pointer"
>
<Smartphone className="w-4 h-4 text-blue-600 group-hover:scale-110 transition-transform duration-300" />
<span>{secondaryCtaLabel}</span>
<span className="px-1.5 py-0.5 rounded text-[10px] font-mono font-bold bg-blue-50 text-blue-700 border border-blue-200/60">
iOS / Android
</span>
</a>
</div>
{/* Subtitle */}
<p className="mt-5 sm:mt-7 text-sm sm:text-base md:text-lg text-slate-200/90 max-w-xl text-left font-sans leading-relaxed">
Turn ordinary moments into extraordinary visual art, Instant, effortless, and private photo magic right in your browser.
</p>
{/* Floating Glass Telemetry & Capability Capsule */}
<div className="mt-14 sm:mt-16 w-full max-w-4xl mx-auto rounded-2xl sm:rounded-full bg-white/85 backdrop-blur-2xl border border-slate-900/[0.08] shadow-[0_16px_40px_-16px_rgba(15,23,42,0.08),0_0_0_1px_rgba(255,255,255,0.8)_inset] p-4 sm:py-5 sm:px-8 grid grid-cols-2 sm:flex sm:items-center sm:justify-around gap-4 sm:gap-6 text-center transform-gpu">
{/* Metric 1 */}
<div className="flex flex-col items-center justify-center p-2 sm:p-0">
<div className="text-2xl sm:text-3xl font-display font-black tracking-tight bg-gradient-to-b from-slate-950 via-slate-900 to-slate-700 bg-clip-text text-transparent">
1.4M+
</div>
<div className="text-[11px] font-mono font-semibold uppercase tracking-wider text-slate-500 mt-1">
Photos Transformed
</div>
{/* Action Buttons */}
<div className="mt-8 sm:mt-10 flex flex-wrap items-center gap-3 sm:gap-4">
<a
href={primaryCtaHref}
className="px-7 sm:px-8 py-3.5 sm:py-4 rounded-full text-xs sm:text-sm font-bold text-white bg-blue-600 hover:bg-blue-500 shadow-lg shadow-blue-600/35 transition-all duration-200 hover:scale-105 active:scale-95 cursor-pointer"
>
Explore Our Tools
</a>
<a
href={secondaryCtaHref}
className="px-7 sm:px-8 py-3.5 sm:py-4 rounded-full text-xs sm:text-sm font-bold text-slate-950 bg-white hover:bg-slate-100 shadow-md transition-all duration-200 hover:scale-105 active:scale-95 cursor-pointer"
>
Recommended Apps
</a>
</div>
<div className="hidden sm:block w-px h-10 bg-gradient-to-b from-transparent via-slate-200 to-transparent" />
{/* Metric 2 */}
<div className="flex flex-col items-center justify-center p-2 sm:p-0">
<div className="text-2xl sm:text-3xl font-display font-black tracking-tight bg-gradient-to-r from-blue-600 to-cyan-500 bg-clip-text text-transparent">
&lt; 0.8s
{/* Glass Metrics Pill Capsule */}
<div className="mt-12 sm:mt-16 w-full max-w-2xl sm:max-w-3xl rounded-3xl sm:rounded-full bg-white/[0.06] backdrop-blur-xl border border-white/20 p-4 sm:py-4 sm:px-8 grid grid-cols-2 sm:grid-cols-4 gap-4 sm:gap-6 shadow-2xl">
{/* Metric 1 */}
<div className="flex flex-col text-left">
<span className="text-xl sm:text-2xl font-display font-black tracking-tight text-blue-400">
1.4M+
</span>
<span className="text-[11px] sm:text-xs text-slate-300 font-sans mt-0.5">
Photo Tranformed
</span>
</div>
<div className="text-[11px] font-mono font-semibold uppercase tracking-wider text-slate-500 mt-1">
Instant Inference
</div>
</div>
<div className="hidden sm:block w-px h-10 bg-gradient-to-b from-transparent via-slate-200 to-transparent" />
{/* Metric 3 */}
<div className="flex flex-col items-center justify-center p-2 sm:p-0">
<div className="text-2xl sm:text-3xl font-display font-black tracking-tight bg-gradient-to-r from-emerald-600 to-teal-500 bg-clip-text text-transparent">
100%
{/* Metric 2 */}
<div className="flex flex-col text-left">
<span className="text-xl sm:text-2xl font-display font-black tracking-tight text-indigo-300">
&lt;0.8s
</span>
<span className="text-[11px] sm:text-xs text-slate-300 font-sans mt-0.5">
Instant Interene
</span>
</div>
<div className="text-[11px] font-mono font-semibold uppercase tracking-wider text-slate-500 mt-1">
Client-Side Privacy
</div>
</div>
<div className="hidden sm:block w-px h-10 bg-gradient-to-b from-transparent via-slate-200 to-transparent" />
{/* Metric 4 */}
<div className="flex flex-col items-center justify-center p-2 sm:p-0">
<div className="text-2xl sm:text-3xl font-display font-black tracking-tight bg-gradient-to-r from-indigo-600 via-purple-600 to-pink-500 bg-clip-text text-transparent">
4K UHD
{/* Metric 3 */}
<div className="flex flex-col text-left">
<span className="text-xl sm:text-2xl font-display font-black tracking-tight text-indigo-400">
100%
</span>
<span className="text-[11px] sm:text-xs text-slate-300 font-sans mt-0.5">
Client side privacy
</span>
</div>
<div className="text-[11px] font-mono font-semibold uppercase tracking-wider text-slate-500 mt-1">
Studio Resolution
{/* Metric 4 */}
<div className="flex flex-col text-left">
<span className="text-xl sm:text-2xl font-display font-black tracking-tight bg-gradient-to-r from-blue-300 via-indigo-300 to-pink-400 bg-clip-text text-transparent">
4K UHD
</span>
<span className="text-[11px] sm:text-xs text-slate-300 font-sans mt-0.5">
Studio Resolution
</span>
</div>
</div>
</div>
{/* Subtle Luxury Scroll Cue */}
<a
href="#our-tools"
aria-label="Scroll to our tools"
className="mt-8 sm:mt-10 inline-flex flex-col items-center gap-2 text-[10px] font-mono uppercase tracking-widest text-slate-400 hover:text-blue-600 transition-colors group cursor-pointer"
>
<span className="font-semibold tracking-widest text-slate-400 group-hover:text-blue-600 transition-colors">
Scroll to Explore
</span>
<span className="w-4 h-7 rounded-full border border-slate-300 group-hover:border-blue-400 flex justify-center p-1 transition-colors">
<span className="w-1 h-1.5 rounded-full bg-blue-600 animate-bounce" />
</span>
</a>
</div>
</section>
);
+87 -87
View File
@@ -359,103 +359,103 @@ export function ToolGridSection({
</div>
)}
{/* Elegant Non-Sticky Category Hub & Search (Zero obstruction, no sticky bar under topbar) */}
{/* Persistent Sticky Search & Category Hub - Never disappears when scrolling */}
{(showCategoryFilter || showSearch) && (
<div className="mb-8 sm:mb-12 space-y-4">
{/* Search Bar - Center Aligned */}
{showSearch && (
<div className="max-w-md mx-auto relative px-1">
<Search className="w-4 h-4 absolute left-4 top-1/2 -translate-y-1/2 text-slate-400 pointer-events-none" />
<input
type="text"
placeholder="Search AI photo tools..."
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
className="w-full pl-10 pr-9 py-2.5 rounded-full text-xs sm:text-sm border border-slate-200/90 bg-white text-slate-900 placeholder-slate-400 focus:outline-none focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 shadow-sm"
/>
{searchQuery && (
<button
onClick={() => setSearchQuery('')}
className="absolute right-4 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 cursor-pointer"
>
<X className="w-3.5 h-3.5" />
</button>
)}
</div>
)}
{/* Category Navigation Dock:
- On desktop: Centered floating glass pill capsule dock
- On mobile: Smooth edge-padded horizontal touch rail */}
{showCategoryFilter && (
<div className="flex items-center justify-center">
<div className="flex items-center gap-1.5 sm:gap-2 overflow-x-auto no-scrollbar scroll-smooth py-1 px-2 max-w-full touch-pan-x sm:p-1.5 sm:bg-white/80 sm:backdrop-blur-md sm:rounded-full sm:border sm:border-slate-200/90 sm:shadow-sm">
{/* All Categories Pill */}
<button
onClick={() => {
setSelectedCategory('all');
if (searchQuery) setSearchQuery('');
}}
className={`shrink-0 flex items-center gap-1.5 sm:gap-2 px-3.5 sm:px-4 py-2 rounded-full text-xs font-bold transition-all duration-200 shadow-sm cursor-pointer ${
selectedCategory === 'all' && !searchQuery
? 'bg-blue-600 text-white shadow-blue-500/25 ring-2 ring-blue-500/30 scale-[1.02]'
: 'bg-white text-slate-700 hover:text-slate-900 hover:bg-slate-50 border border-slate-200/90 sm:border-transparent'
}`}
>
<Layers className="w-3.5 h-3.5" />
<span>All Tools</span>
<span
className={`text-[10px] font-mono px-1.5 py-0.2 rounded-full ${
<div className="sticky top-[52px] sm:top-[58px] z-30 -mx-4 sm:-mx-6 lg:-mx-8 px-4 sm:px-6 lg:px-8 py-2.5 sm:py-3 bg-[#FAF8F5]/95 backdrop-blur-md border-b border-slate-200/80 shadow-xs mb-8 sm:mb-12 transition-all">
<div className="max-w-7xl mx-auto flex flex-col md:flex-row items-center justify-between gap-2.5 sm:gap-4">
{/* Category Navigation Pills */}
{showCategoryFilter && (
<div className="w-full md:w-auto flex items-center justify-start md:justify-center overflow-x-auto no-scrollbar scroll-smooth py-0.5">
<div className="flex items-center gap-1.5 sm:gap-2">
{/* All Categories Pill */}
<button
onClick={() => {
setSelectedCategory('all');
if (searchQuery) setSearchQuery('');
}}
className={`shrink-0 flex items-center gap-1.5 sm:gap-2 px-3 sm:px-3.5 py-1.5 sm:py-2 rounded-full text-xs font-bold transition-all duration-200 shadow-sm cursor-pointer ${
selectedCategory === 'all' && !searchQuery
? 'bg-white/20 text-white'
: 'bg-slate-100 text-slate-600'
? 'bg-blue-600 text-white shadow-blue-500/25 ring-2 ring-blue-500/30 scale-[1.02]'
: 'bg-white text-slate-700 hover:text-slate-900 hover:bg-slate-50 border border-slate-200/90'
}`}
>
{tools.length}
</span>
</button>
{/* Category Pills */}
{categorizedTools.map((group) => {
const isSelected =
selectedCategory === group.id && !searchQuery;
const catName = group.category
? resolveLocalised(group.category.name, locale)
: group.id;
const theme = CATEGORY_THEMES[group.id];
return (
<button
key={group.id}
onClick={() => {
setSelectedCategory(group.id);
if (searchQuery) setSearchQuery('');
}}
className={`shrink-0 flex items-center gap-1.5 sm:gap-2 px-3 sm:px-3.5 py-2 rounded-full text-xs font-bold transition-all duration-200 shadow-sm cursor-pointer ${
isSelected
? 'bg-blue-600 text-white shadow-blue-500/25 ring-2 ring-blue-500/30 scale-[1.02]'
: 'bg-white text-slate-700 hover:text-slate-900 hover:bg-slate-50 border border-slate-200/90 sm:border-transparent'
<Layers className="w-3.5 h-3.5" />
<span>All Tools</span>
<span
className={`text-[10px] font-mono px-1.5 py-0.2 rounded-full ${
selectedCategory === 'all' && !searchQuery
? 'bg-white/20 text-white'
: 'bg-slate-100 text-slate-600'
}`}
>
<span className={isSelected ? 'text-white' : ''}>
{theme?.icon || <Wand2 className="w-4 h-4" />}
</span>
<span>{catName}</span>
<span
className={`text-[10px] font-mono px-1.5 py-0.2 rounded-full ${
{tools.length}
</span>
</button>
{/* Category Pills */}
{categorizedTools.map((group) => {
const isSelected =
selectedCategory === group.id && !searchQuery;
const catName = group.category
? resolveLocalised(group.category.name, locale)
: group.id;
const theme = CATEGORY_THEMES[group.id];
return (
<button
key={group.id}
onClick={() => {
setSelectedCategory(group.id);
if (searchQuery) setSearchQuery('');
}}
className={`shrink-0 flex items-center gap-1.5 sm:gap-2 px-3 sm:px-3.5 py-1.5 sm:py-2 rounded-full text-xs font-bold transition-all duration-200 shadow-sm cursor-pointer ${
isSelected
? 'bg-white/20 text-white'
: 'bg-slate-100 text-slate-600'
? 'bg-blue-600 text-white shadow-blue-500/25 ring-2 ring-blue-500/30 scale-[1.02]'
: 'bg-white text-slate-700 hover:text-slate-900 hover:bg-slate-50 border border-slate-200/90'
}`}
>
{group.tools.length}
</span>
</button>
);
})}
<span className={isSelected ? 'text-white' : ''}>
{theme?.icon || <Wand2 className="w-4 h-4" />}
</span>
<span>{catName}</span>
<span
className={`text-[10px] font-mono px-1.5 py-0.2 rounded-full ${
isSelected
? 'bg-white/20 text-white'
: 'bg-slate-100 text-slate-600'
}`}
>
{group.tools.length}
</span>
</button>
);
})}
</div>
</div>
</div>
)}
)}
{/* Search Bar */}
{showSearch && (
<div className="w-full md:w-64 lg:w-72 relative shrink-0">
<Search className="w-3.5 h-3.5 sm:w-4 sm:h-4 absolute left-3 top-1/2 -translate-y-1/2 text-slate-400 pointer-events-none" />
<input
type="text"
placeholder="Search AI photo tools..."
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
className="w-full pl-8 sm:pl-9 pr-7 sm:pr-8 py-1.5 sm:py-2 rounded-full text-xs sm:text-sm border border-slate-200/90 bg-white text-slate-900 placeholder-slate-400 focus:outline-none focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 shadow-sm"
/>
{searchQuery && (
<button
onClick={() => setSearchQuery('')}
className="absolute right-2.5 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 cursor-pointer"
>
<X className="w-3.5 h-3.5" />
</button>
)}
</div>
)}
</div>
</div>
)}