2026-11-04 17:55:18 +05:30
|
|
|
'use client';
|
|
|
|
|
|
2026-11-04 18:28:04 +05:30
|
|
|
import React, { useState } from 'react';
|
|
|
|
|
import Link from 'next/link';
|
2026-11-04 17:55:18 +05:30
|
|
|
import {
|
|
|
|
|
Sparkles,
|
|
|
|
|
Scissors,
|
|
|
|
|
Wand2,
|
|
|
|
|
Palette,
|
|
|
|
|
Video,
|
|
|
|
|
SunMedium,
|
|
|
|
|
Layers,
|
2026-11-04 18:28:04 +05:30
|
|
|
ArrowRight,
|
|
|
|
|
Maximize2,
|
|
|
|
|
Minimize2,
|
|
|
|
|
GripHorizontal,
|
2026-11-04 18:37:52 +05:30
|
|
|
Smile,
|
|
|
|
|
Camera,
|
|
|
|
|
Eye,
|
|
|
|
|
Eraser,
|
|
|
|
|
Film
|
2026-11-04 17:55:18 +05:30
|
|
|
} from 'lucide-react';
|
|
|
|
|
import { TextAnimate } from '@/components/magicui/text-animate';
|
|
|
|
|
|
|
|
|
|
interface TrendyBentoSectionProps {
|
|
|
|
|
title?: string;
|
|
|
|
|
badge?: string;
|
|
|
|
|
subtitle?: string;
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-04 18:37:52 +05:30
|
|
|
export type EffectCategory = 'all' | 'portrait' | 'cutout' | 'restore' | 'creative';
|
|
|
|
|
|
2026-11-04 18:28:04 +05:30
|
|
|
interface TileItem {
|
|
|
|
|
id: string;
|
|
|
|
|
name: string;
|
|
|
|
|
description: string;
|
2026-11-04 18:37:52 +05:30
|
|
|
category: EffectCategory;
|
2026-11-04 18:28:04 +05:30
|
|
|
href: string;
|
|
|
|
|
cta: string;
|
|
|
|
|
badge: string;
|
|
|
|
|
icon: React.ElementType;
|
|
|
|
|
imageUrl: string;
|
|
|
|
|
isWide?: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-04 18:37:52 +05:30
|
|
|
const CATEGORIES: { id: EffectCategory; label: string }[] = [
|
|
|
|
|
{ id: 'all', label: 'All Effects' },
|
|
|
|
|
{ id: 'portrait', label: 'Portrait & Beauty' },
|
|
|
|
|
{ id: 'cutout', label: 'Cutout & Matting' },
|
|
|
|
|
{ id: 'restore', label: 'Restoration & 4K' },
|
|
|
|
|
{ id: 'creative', label: 'Creative & Anime' },
|
|
|
|
|
];
|
|
|
|
|
|
2026-11-04 18:28:04 +05:30
|
|
|
const INITIAL_TILES: TileItem[] = [
|
|
|
|
|
{
|
|
|
|
|
id: 'tile-matting',
|
|
|
|
|
name: 'Hair-Strand Matting',
|
|
|
|
|
description: 'Flyaway hair boundary separation with sub-pixel alpha matting.',
|
2026-11-04 18:37:52 +05:30
|
|
|
category: 'cutout',
|
2026-11-04 18:28:04 +05:30
|
|
|
href: '/tools/background-remover',
|
|
|
|
|
cta: 'Try Matting',
|
|
|
|
|
badge: 'TRENDING CUTOUT',
|
|
|
|
|
icon: Scissors,
|
|
|
|
|
imageUrl: '/management/pages/home/media/landscape_bg_matting.jpg',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'tile-restore',
|
|
|
|
|
name: '4K Face Restore',
|
|
|
|
|
description: 'Generative restoration preserving real skin pores and eyelashes.',
|
2026-11-04 18:37:52 +05:30
|
|
|
category: 'restore',
|
2026-11-04 18:28:04 +05:30
|
|
|
href: '/tools/old-photo-restorer',
|
|
|
|
|
cta: 'Restore Photo',
|
|
|
|
|
badge: '4K RESTORE',
|
|
|
|
|
icon: Wand2,
|
|
|
|
|
imageUrl: '/management/pages/home/media/landscape_restore_after.jpg',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'tile-anime',
|
|
|
|
|
name: 'AnimeGAN Synthesis',
|
|
|
|
|
description: 'Transform portraits into high-definition anime illustrations.',
|
2026-11-04 18:37:52 +05:30
|
|
|
category: 'creative',
|
2026-11-04 18:28:04 +05:30
|
|
|
href: '/tools/cartoon-avatar',
|
|
|
|
|
cta: 'Create Avatar',
|
|
|
|
|
badge: 'VIRAL ANIME',
|
|
|
|
|
icon: Sparkles,
|
|
|
|
|
imageUrl: '/management/pages/home/media/landscape_cartoon_after.jpg',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'tile-video',
|
|
|
|
|
name: 'Video Retouching',
|
|
|
|
|
description: 'Temporal epidermal smoothing across 4K dynamic video clips.',
|
2026-11-04 18:37:52 +05:30
|
|
|
category: 'portrait',
|
2026-11-04 18:28:04 +05:30
|
|
|
href: '/tools/blemish-remover',
|
|
|
|
|
cta: 'Watch Reel',
|
|
|
|
|
badge: '4K 60FPS',
|
|
|
|
|
icon: Video,
|
|
|
|
|
imageUrl: '/management/pages/home/media/landscape_blemish_after.jpg',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'tile-color',
|
|
|
|
|
name: 'Deep Colorizer',
|
|
|
|
|
description: 'Reconstruct vintage monochrome family archives with rich pigments.',
|
2026-11-04 18:37:52 +05:30
|
|
|
category: 'restore',
|
2026-11-04 18:28:04 +05:30
|
|
|
href: '/tools/colorization',
|
|
|
|
|
cta: 'Colorize Archive',
|
|
|
|
|
badge: 'ARCHIVAL AI',
|
|
|
|
|
icon: Palette,
|
|
|
|
|
imageUrl: '/management/pages/home/media/landscape_color_after.jpg',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'tile-relight',
|
|
|
|
|
name: 'Studio Relight',
|
2026-11-04 18:37:52 +05:30
|
|
|
description: 'Virtual three-point studio softbox illumination and portrait retouch.',
|
|
|
|
|
category: 'portrait',
|
2026-11-04 18:28:04 +05:30
|
|
|
href: '/tools/blemish-remover',
|
|
|
|
|
cta: 'Relight Portrait',
|
|
|
|
|
badge: 'STUDIO GRADE',
|
|
|
|
|
icon: SunMedium,
|
|
|
|
|
imageUrl: '/management/pages/home/media/landscape_portrait_studio.jpg',
|
2026-11-04 18:37:52 +05:30
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'tile-teeth',
|
|
|
|
|
name: 'Teeth Whitener AI',
|
|
|
|
|
description: 'Enamel luminosity brightening with natural gum tone preservation.',
|
|
|
|
|
category: 'portrait',
|
|
|
|
|
href: '/tools/teeth-whitener',
|
|
|
|
|
cta: 'Brighten Smile',
|
|
|
|
|
badge: 'SMILE ENHANCE',
|
|
|
|
|
icon: Smile,
|
|
|
|
|
imageUrl: '/management/pages/home/media/landscape_teeth_after.jpg',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'tile-cutout-studio',
|
|
|
|
|
name: 'E-Commerce White Studio',
|
|
|
|
|
description: 'Instant clean white backdrops and transparent PNG exports for shops.',
|
|
|
|
|
category: 'cutout',
|
|
|
|
|
href: '/tools/background-remover',
|
|
|
|
|
cta: 'Cutout Product',
|
|
|
|
|
badge: 'ECOMMERCE',
|
|
|
|
|
icon: Eraser,
|
|
|
|
|
imageUrl: '/management/pages/home/media/landscape_bg_matting.jpg',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'tile-polaroid',
|
|
|
|
|
name: 'Vintage Polaroid',
|
|
|
|
|
description: 'Warm analog grain, authentic border frames, and vintage flash tones.',
|
|
|
|
|
category: 'creative',
|
|
|
|
|
href: '/tools/polaroid-maker',
|
|
|
|
|
cta: 'Make Polaroid',
|
|
|
|
|
badge: 'VINTAGE FILM',
|
|
|
|
|
icon: Camera,
|
|
|
|
|
imageUrl: '/management/pages/home/media/landscape_polaroid.jpg',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'tile-eyes',
|
|
|
|
|
name: 'Iris Glint Sharpener',
|
|
|
|
|
description: 'Crystal-clear eye reflections and sub-millimeter pupil depth enhancement.',
|
|
|
|
|
category: 'restore',
|
|
|
|
|
href: '/tools/photo-enhancer',
|
|
|
|
|
cta: 'Sharpen Eyes',
|
|
|
|
|
badge: '4K CLARITY',
|
|
|
|
|
icon: Eye,
|
|
|
|
|
imageUrl: '/management/pages/home/media/landscape_enhancer_after.jpg',
|
2026-11-04 18:28:04 +05:30
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
2026-11-04 17:55:18 +05:30
|
|
|
export function TrendyBentoSection({
|
|
|
|
|
title = 'Trendy Neural Effects',
|
2026-11-04 18:37:52 +05:30
|
|
|
badge = 'EXPLORE CATEGORIES',
|
|
|
|
|
subtitle = 'Discover our collection of viral AI effects. Tap any category to explore specialized tools.',
|
2026-11-04 17:55:18 +05:30
|
|
|
}: TrendyBentoSectionProps) {
|
2026-11-04 18:37:52 +05:30
|
|
|
const [activeCategory, setActiveCategory] = useState<EffectCategory>('all');
|
2026-11-04 18:28:04 +05:30
|
|
|
const [tiles, setTiles] = useState<TileItem[]>(INITIAL_TILES);
|
|
|
|
|
|
2026-11-04 18:37:52 +05:30
|
|
|
// Filtered tiles based on category
|
|
|
|
|
const displayedTiles = activeCategory === 'all'
|
|
|
|
|
? tiles
|
|
|
|
|
: tiles.filter((t) => t.category === activeCategory);
|
|
|
|
|
|
|
|
|
|
// Toggle individual tile width (1x1 to 2x1)
|
2026-11-04 18:28:04 +05:30
|
|
|
const toggleTileSize = (id: string, e: React.MouseEvent) => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
e.stopPropagation();
|
|
|
|
|
setTiles((prev) =>
|
|
|
|
|
prev.map((tile) =>
|
|
|
|
|
tile.id === id ? { ...tile, isWide: !tile.isWide } : tile
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2026-11-04 17:55:18 +05:30
|
|
|
return (
|
2026-11-04 18:37:52 +05:30
|
|
|
<section id="trendy-effects" className="py-14 sm:py-20 px-4 sm:px-6 md:px-8 lg:px-10 bg-[#FAF8F5] relative overflow-hidden border-t border-slate-900/[0.06]">
|
|
|
|
|
{/* Symbolic Elemental Ambient Background Animation */}
|
|
|
|
|
<div
|
|
|
|
|
className="absolute inset-0 pointer-events-none -z-10"
|
|
|
|
|
style={{
|
|
|
|
|
background: 'radial-gradient(circle at 80% 20%, rgba(99,102,241,0.06) 0%, transparent 50%), radial-gradient(circle at 20% 80%, rgba(6,182,212,0.05) 0%, transparent 50%)',
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<div className="max-w-[1640px] mx-auto space-y-10">
|
2026-11-04 17:55:18 +05:30
|
|
|
{/* Header */}
|
|
|
|
|
<div className="text-center max-w-3xl mx-auto space-y-4">
|
|
|
|
|
<div className="inline-flex items-center gap-2 px-3.5 py-1 rounded-full text-xs font-mono font-semibold tracking-wider uppercase text-blue-700 bg-blue-50 border border-blue-200">
|
|
|
|
|
<Sparkles className="w-3.5 h-3.5 text-blue-600" />
|
|
|
|
|
<span>{badge}</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-11-04 18:28:04 +05:30
|
|
|
<h2 className="text-3xl sm:text-5xl font-display font-extrabold text-slate-900 tracking-tight text-balance">
|
2026-11-05 12:45:11 +05:30
|
|
|
<TextAnimate animation="slideLeft" by="word">
|
2026-11-04 17:55:18 +05:30
|
|
|
{title}
|
|
|
|
|
</TextAnimate>
|
|
|
|
|
</h2>
|
|
|
|
|
|
2026-11-04 18:05:26 +05:30
|
|
|
<p className="text-sm sm:text-base text-slate-600 font-sans text-pretty">
|
2026-11-05 12:45:11 +05:30
|
|
|
<TextAnimate animation="fadeIn" by="word" delay={0.08}>
|
2026-11-04 17:55:18 +05:30
|
|
|
{subtitle}
|
|
|
|
|
</TextAnimate>
|
|
|
|
|
</p>
|
2026-11-04 18:28:04 +05:30
|
|
|
|
2026-11-04 18:37:52 +05:30
|
|
|
{/* Category Filter Pills (Expands Scrolling View) */}
|
|
|
|
|
<div className="pt-3 flex items-center justify-center flex-wrap gap-2 text-xs font-display font-bold">
|
|
|
|
|
{CATEGORIES.map((cat) => {
|
|
|
|
|
const isActive = cat.id === activeCategory;
|
|
|
|
|
const count = cat.id === 'all'
|
|
|
|
|
? tiles.length
|
|
|
|
|
: tiles.filter((t) => t.category === cat.id).length;
|
2026-11-04 18:28:04 +05:30
|
|
|
|
2026-11-04 18:37:52 +05:30
|
|
|
return (
|
|
|
|
|
<button
|
|
|
|
|
key={cat.id}
|
|
|
|
|
onClick={() => setActiveCategory(cat.id)}
|
2026-11-04 18:48:24 +05:30
|
|
|
className={`flex items-center gap-1.5 px-4 py-2 rounded-full transition-[transform,background-color,color] duration-200 ease-[cubic-bezier(0.16,1,0.3,1)] ${
|
2026-11-04 18:37:52 +05:30
|
|
|
isActive
|
|
|
|
|
? 'bg-slate-950 text-white shadow-md shadow-slate-900/15 scale-105'
|
|
|
|
|
: 'bg-white/90 text-slate-700 hover:bg-slate-100 border border-slate-200 shadow-sm'
|
|
|
|
|
}`}
|
|
|
|
|
>
|
|
|
|
|
<span>{cat.label}</span>
|
|
|
|
|
<span className={`px-1.5 py-0.5 rounded-full text-[10px] font-mono ${
|
|
|
|
|
isActive ? 'bg-blue-600 text-white' : 'bg-slate-100 text-slate-600'
|
|
|
|
|
}`}>
|
|
|
|
|
{count}
|
|
|
|
|
</span>
|
|
|
|
|
</button>
|
|
|
|
|
);
|
|
|
|
|
})}
|
2026-11-04 18:28:04 +05:30
|
|
|
</div>
|
2026-11-04 17:55:18 +05:30
|
|
|
</div>
|
|
|
|
|
|
2026-11-04 18:37:52 +05:30
|
|
|
{/* Squarical Tile Grid (100% Squarical by default, expandable 2x1) */}
|
|
|
|
|
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
|
|
|
|
|
{displayedTiles.map((tile) => {
|
2026-11-04 18:28:04 +05:30
|
|
|
const Icon = tile.icon;
|
2026-11-04 18:37:52 +05:30
|
|
|
const tileClasses = tile.isWide
|
|
|
|
|
? 'col-span-1 sm:col-span-2 aspect-[16/9] sm:aspect-[2/1] rounded-[36px] sm:rounded-[42px]'
|
|
|
|
|
: 'col-span-1 aspect-square rounded-[36px] sm:rounded-[42px]';
|
2026-11-04 18:28:04 +05:30
|
|
|
|
|
|
|
|
return (
|
2026-11-05 13:10:05 +05:30
|
|
|
<Link
|
2026-11-04 18:28:04 +05:30
|
|
|
key={tile.id}
|
2026-11-05 13:10:05 +05:30
|
|
|
href={tile.href}
|
|
|
|
|
className={`group relative flex flex-col justify-between overflow-hidden bg-slate-950 border border-slate-900/[0.08] shadow-cream-sm transition-[transform] duration-500 ease-[cubic-bezier(0.16,1,0.3,1)] hover:-translate-y-1.5 transform-gpu will-change-transform cursor-pointer ${tileClasses}`}
|
2026-11-04 18:28:04 +05:30
|
|
|
>
|
2026-11-04 18:48:24 +05:30
|
|
|
{/* GPU-composited shadow elevation layer */}
|
|
|
|
|
<div
|
|
|
|
|
className="absolute -inset-px rounded-[36px] sm:rounded-[42px] shadow-cream-lg opacity-0 group-hover:opacity-100 transition-opacity duration-700 ease-[cubic-bezier(0.16,1,0.3,1)] pointer-events-none z-30"
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
/>
|
|
|
|
|
|
2026-11-04 18:28:04 +05:30
|
|
|
{/* Background Image (Covering the squarical tile) */}
|
|
|
|
|
<img
|
|
|
|
|
src={tile.imageUrl}
|
|
|
|
|
alt={tile.name}
|
2026-11-04 18:48:24 +05:30
|
|
|
className="absolute inset-0 w-full h-full object-cover transition-transform duration-700 ease-[cubic-bezier(0.16,1,0.3,1)] group-hover:scale-105 will-change-transform transform-gpu"
|
2026-11-04 18:28:04 +05:30
|
|
|
loading="lazy"
|
|
|
|
|
/>
|
|
|
|
|
|
2026-11-04 18:48:24 +05:30
|
|
|
{/* Vignette Overlay for Readability (GPU Opacity) */}
|
|
|
|
|
<div className="absolute inset-0 bg-gradient-to-t from-slate-950/90 via-slate-950/30 to-slate-950/20 opacity-100 group-hover:opacity-85 transition-opacity duration-500 ease-[cubic-bezier(0.16,1,0.3,1)] pointer-events-none" />
|
2026-11-04 18:28:04 +05:30
|
|
|
|
2026-11-04 18:37:52 +05:30
|
|
|
{/* Top Tile Bar: Badge and Quick-Settings Resize Button */}
|
2026-11-04 18:28:04 +05:30
|
|
|
<div className="relative z-20 flex items-center justify-between p-5">
|
2026-11-04 18:37:52 +05:30
|
|
|
<span className="px-3 py-1 rounded-full text-[10px] font-mono font-bold tracking-wider uppercase bg-black/60 backdrop-blur-md text-cyan-400 border border-cyan-500/30 shadow-sm">
|
|
|
|
|
{tile.badge}
|
|
|
|
|
</span>
|
2026-11-04 18:28:04 +05:30
|
|
|
|
|
|
|
|
{/* Android Quick Settings Size Toggle Button (1x1 to 2x1) */}
|
|
|
|
|
<button
|
2026-11-05 13:10:05 +05:30
|
|
|
type="button"
|
2026-11-04 18:28:04 +05:30
|
|
|
onClick={(e) => toggleTileSize(tile.id, e)}
|
2026-11-04 18:37:52 +05:30
|
|
|
title={tile.isWide ? 'Shrink tile' : 'Expand tile'}
|
2026-11-05 13:10:05 +05:30
|
|
|
className="w-9 h-9 rounded-2xl bg-white/90 hover:bg-white text-slate-800 shadow-md flex items-center justify-center transition-[transform,background-color] duration-200 ease-[cubic-bezier(0.16,1,0.3,1)] hover:scale-110 active:scale-95 z-30"
|
2026-11-04 18:28:04 +05:30
|
|
|
>
|
|
|
|
|
{tile.isWide ? (
|
|
|
|
|
<Minimize2 className="w-4 h-4 text-blue-600" />
|
|
|
|
|
) : (
|
|
|
|
|
<Maximize2 className="w-4 h-4 text-blue-600" />
|
|
|
|
|
)}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Bottom Tile Info & Link */}
|
|
|
|
|
<div className="relative z-20 p-6 flex flex-col gap-2">
|
|
|
|
|
<div className="w-10 h-10 rounded-2xl bg-white/90 backdrop-blur-md text-blue-600 flex items-center justify-center shadow-md mb-1">
|
|
|
|
|
<Icon className="w-5 h-5" />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h3 className="text-xl font-display font-bold text-white tracking-tight group-hover:text-cyan-300 transition-colors">
|
|
|
|
|
{tile.name}
|
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
<p className="text-xs text-slate-200 line-clamp-2 leading-relaxed font-sans">
|
|
|
|
|
{tile.description}
|
|
|
|
|
</p>
|
|
|
|
|
|
2026-11-05 13:10:05 +05:30
|
|
|
<div
|
2026-11-04 18:28:04 +05:30
|
|
|
className="mt-2 inline-flex items-center gap-1.5 text-xs font-display font-bold text-cyan-300 group-hover:text-white transition-colors"
|
|
|
|
|
>
|
|
|
|
|
<span>{tile.cta}</span>
|
|
|
|
|
<ArrowRight className="w-3.5 h-3.5 transition-transform group-hover:translate-x-1" />
|
2026-11-05 13:10:05 +05:30
|
|
|
</div>
|
2026-11-04 18:28:04 +05:30
|
|
|
</div>
|
2026-11-05 13:10:05 +05:30
|
|
|
</Link>
|
2026-11-04 18:28:04 +05:30
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</div>
|
2026-11-04 17:55:18 +05:30
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
);
|
|
|
|
|
}
|