feat(ui): add Three.js 3D neural prism, 3D tilt cards, cursor aura, and flagship banners

This commit is contained in:
2026-11-03 13:36:36 +05:30
parent 37db479f57
commit 0ec7765a3d
16 changed files with 1087 additions and 152 deletions
+65 -13
View File
@@ -1,8 +1,18 @@
'use client';
import React from 'react';
import Link from 'next/link';
import dynamic from 'next/dynamic';
import { Sparkles, ArrowRight, Smartphone, ShieldCheck, Zap, Layers, Cpu } from 'lucide-react';
import { resolveLocalised, ToolItem, AppItem, VariantSpec } from '@/types';
import { TryItWidget } from './TryItWidget';
import { TiltCard } from '@/components/ui/TiltCard';
// Lazy-load Three.js 3D canvas with ssr: false for ultra-fast initial load & SEO safety
const Hero3DCanvas = dynamic(
() => import('@/components/3d/Hero3DCanvas').then((mod) => mod.Hero3DCanvas),
{ ssr: false }
);
interface HeroSectionProps {
title?: any;
@@ -35,14 +45,40 @@ export function HeroSection({
if (variant === 'tryit' && tool) {
return (
<section className="relative overflow-hidden pt-12 pb-20 sm:pt-20 sm:pb-28 lg:pt-24 lg:pb-32 bg-[#FAF8F5]">
{/* Subtle Ambient Radial Lighting */}
{/* Interactive 3D Three.js Neural Prism Canvas Layer */}
<div className="absolute top-4 sm:top-8 left-1/2 -translate-x-1/2 w-full max-w-[620px] h-[340px] sm:h-[400px] pointer-events-none z-0 opacity-65 sm:opacity-80">
<Hero3DCanvas />
</div>
{/* Ambient Radial Lighting Glow */}
<div className="absolute top-0 left-1/2 -translate-x-1/2 w-full max-w-7xl h-[450px] bg-gradient-to-b from-blue-500/[0.04] via-indigo-500/[0.03] to-transparent blur-3xl pointer-events-none -z-10" />
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="text-center max-w-3xl mx-auto space-y-6 mb-12 sm:mb-16">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
{/* Floating Kinetic Telemetry Badges (Squared Media Style) */}
<div className="hidden lg:flex items-center gap-3 px-4 py-2.5 rounded-2xl bg-white/95 backdrop-blur-md border border-slate-900/[0.08] shadow-cream-md absolute top-6 left-6 xl:left-12 animate-float-slow z-20 pointer-events-none">
<span className="relative flex h-2.5 w-2.5">
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"></span>
<span className="relative inline-flex rounded-full h-2.5 w-2.5 bg-emerald-500"></span>
</span>
<div>
<div className="text-[10px] font-mono font-bold text-slate-500 uppercase tracking-wider">Privacy Engine</div>
<div className="text-xs font-mono font-bold text-slate-900">Zero Disk Retention</div>
</div>
</div>
<div className="hidden lg:flex items-center gap-3 px-4 py-2.5 rounded-2xl bg-white/95 backdrop-blur-md border border-slate-900/[0.08] shadow-cream-md absolute top-12 right-6 xl:right-12 animate-float-medium z-20 pointer-events-none">
<Zap className="w-4 h-4 text-amber-500" />
<div>
<div className="text-[10px] font-mono font-bold text-slate-500 uppercase tracking-wider">Stream Latency</div>
<div className="text-xs font-mono font-bold text-slate-900">&lt; 340ms Inference</div>
</div>
</div>
{/* Main Hero Header */}
<div className="text-center max-w-3xl mx-auto space-y-6 mb-12 sm:mb-16 relative z-10">
{/* Live Core Status Pill */}
{resolvedBadge && (
<div className="inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-blue-50 border border-blue-200/80 text-xs font-mono font-semibold text-blue-700 shadow-sm">
<div className="inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-blue-50 border border-blue-200/80 text-xs font-mono font-semibold text-blue-700 shadow-sm backdrop-blur-sm">
<span className="relative flex h-2 w-2">
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-500 opacity-75"></span>
<span className="relative inline-flex rounded-full h-2 w-2 bg-blue-600"></span>
@@ -81,14 +117,25 @@ export function HeroSection({
</div>
</div>
{/* Embedded Interactive Free Try-It Widget */}
<div className="max-w-4xl mx-auto">
<TryItWidget
tool={tool}
homeApp={homeApp}
variants={variants}
locale={locale}
/>
{/* Embedded Interactive Free Try-It Widget wrapped with 3D Tilt Card */}
<div className="max-w-4xl mx-auto relative z-10">
<TiltCard maxTilt={4} scale={1.01} showGlare={true}>
<TryItWidget
tool={tool}
homeApp={homeApp}
variants={variants}
locale={locale}
/>
</TiltCard>
{/* Bottom Floating Architecture Chip */}
<div className="hidden xl:flex items-center gap-3 px-4 py-2.5 rounded-2xl bg-white/95 backdrop-blur-md border border-slate-900/[0.08] shadow-cream-md absolute -bottom-5 -right-6 animate-float-slow z-20 pointer-events-none">
<Cpu className="w-4 h-4 text-indigo-600" />
<div>
<div className="text-[10px] font-mono font-bold text-slate-500 uppercase tracking-wider">Architecture</div>
<div className="text-xs font-mono font-bold text-slate-900">Dual-Stream P3M &amp; GAN</div>
</div>
</div>
</div>
</div>
</section>
@@ -98,9 +145,14 @@ export function HeroSection({
// Centered Hero for Tools/Apps/Pricing pages
return (
<section className="relative overflow-hidden pt-20 pb-24 sm:pt-28 sm:pb-32 text-center bg-[#FAF8F5] border-b border-slate-900/[0.07]">
{/* Ambient 3D Canvas in background */}
<div className="absolute top-0 left-1/2 -translate-x-1/2 w-full max-w-[500px] h-[300px] pointer-events-none -z-0 opacity-40">
<Hero3DCanvas />
</div>
<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" />
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 space-y-6">
<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" />