202 lines
11 KiB
TypeScript
202 lines
11 KiB
TypeScript
import { useState, useRef, useEffect } from 'react';
|
|
import { NavView } from '../types';
|
|
import { Sparkles, ArrowRight } from 'lucide-react';
|
|
import { motion } from 'motion/react';
|
|
|
|
interface HeroSectionProps {
|
|
onNavigate: (view: NavView) => void;
|
|
onExploreServices: () => void;
|
|
}
|
|
|
|
export default function HeroSection({ onNavigate, onExploreServices }: HeroSectionProps) {
|
|
const [videoReady, setVideoReady] = useState<boolean>(false);
|
|
const videoRef = useRef<HTMLVideoElement | null>(null);
|
|
|
|
useEffect(() => {
|
|
if (videoRef.current) {
|
|
videoRef.current.play().catch(() => {
|
|
// Autoplay policy handled with muted
|
|
});
|
|
}
|
|
}, []);
|
|
|
|
return (
|
|
<section
|
|
id="hero-section"
|
|
className="relative min-h-[94vh] flex items-center justify-center overflow-hidden pt-28 pb-20 px-4 sm:px-6"
|
|
>
|
|
{/* 1. FALLBACK BACKGROUND (Canvas grid lines & dark-mode ambient orbs) */}
|
|
<div className="absolute inset-0 pointer-events-none z-0">
|
|
<div className="orb-1 absolute top-1/4 left-1/10 w-96 h-96 rounded-full bg-blue-600/20 blur-[100px] hidden dark:block" />
|
|
<div className="orb-2 absolute bottom-1/4 right-1/10 w-80 h-80 rounded-full bg-cyan-400/15 blur-[90px] hidden dark:block" />
|
|
<div className="grid-lines absolute inset-0 opacity-15 dark:opacity-40" />
|
|
<div className="grid-dots absolute inset-0 opacity-15 dark:opacity-30" />
|
|
</div>
|
|
|
|
{/* 2. BACKGROUND VIDEO (Slightly darker, richer tone with lessened white wash) */}
|
|
<div className="absolute inset-0 z-0 overflow-hidden pointer-events-none">
|
|
{/* Subtle cool foundation behind video so light canvas doesn't wash out deep pixels */}
|
|
<div className="absolute inset-0 bg-slate-900/15 dark:bg-[#060e22]" />
|
|
|
|
<video
|
|
ref={videoRef}
|
|
src="/ai_demo_video.mp4"
|
|
autoPlay
|
|
loop
|
|
muted
|
|
playsInline
|
|
preload="auto"
|
|
onCanPlay={() => setVideoReady(true)}
|
|
className={`w-full h-full object-cover transition-all duration-700 ${
|
|
videoReady
|
|
? 'opacity-90 contrast-[1.1] saturate-[1.25] dark:opacity-90 dark:contrast-100 dark:saturate-100'
|
|
: 'opacity-0'
|
|
}`}
|
|
/>
|
|
|
|
{/* Soft subtle tint overlay: lightened white wash, slightly darker grounding */}
|
|
<div className="absolute inset-0 bg-gradient-to-b from-slate-900/15 via-transparent to-slate-900/25 dark:from-[#050d1f]/60 dark:via-transparent dark:to-[#050d1f]/75" />
|
|
|
|
{/* Delicate centered ambient light diffuser (reduced from 50% to 20% to avoid milky white fog) */}
|
|
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-4xl h-[440px] bg-white/20 rounded-full blur-[80px] pointer-events-none block dark:hidden" />
|
|
</div>
|
|
|
|
{/* 3. HERO CONTENT LAYER (Intelligence at Scale - Enhanced Impact in Dark & Light Theme) */}
|
|
<div className="relative z-10 max-w-5xl mx-auto text-center">
|
|
{/* Ambient atmospheric backlight for dark mode to make headline and narrative pop against the video */}
|
|
<div className="absolute top-1/3 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-3xl h-[420px] bg-gradient-to-tr from-blue-600/25 via-cyan-500/20 to-indigo-600/15 rounded-full blur-[110px] pointer-events-none hidden dark:block" />
|
|
|
|
{/* Leading AI Services Platform Badge */}
|
|
<motion.div
|
|
initial={{ opacity: 0, y: 16 }}
|
|
animate={{ opacity: 1, y: 0 }}
|
|
transition={{ duration: 0.6, delay: 0.1 }}
|
|
className="flex items-center justify-center mb-8"
|
|
>
|
|
<div className="inline-flex items-center gap-2.5 px-4 py-1.5 rounded-full text-xs font-mono font-semibold tracking-widest uppercase border border-blue-200 dark:border-cyan-400/40 bg-white/95 dark:bg-[#050d1f]/80 backdrop-blur-md text-blue-700 dark:text-cyan-300 shadow-sm dark:shadow-[0_0_25px_rgba(0,207,255,0.2)]">
|
|
<span className="relative flex h-2 w-2">
|
|
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-500 dark:bg-cyan-400 opacity-75" />
|
|
<span className="relative inline-flex rounded-full h-2 w-2 bg-blue-600 dark:bg-cyan-400" />
|
|
</span>
|
|
<span>Leading AI Services Platform</span>
|
|
</div>
|
|
</motion.div>
|
|
|
|
{/* Primary Headline: Scaling Intelligence */}
|
|
<motion.h1
|
|
initial={{ opacity: 0, y: 20 }}
|
|
animate={{ opacity: 1, y: 0 }}
|
|
transition={{ duration: 0.7, delay: 0.2 }}
|
|
className="font-extrabold text-5xl sm:text-7xl lg:text-[5.5rem] tracking-tight leading-[1.04] mb-6 sm:mb-8"
|
|
>
|
|
<span className="block text-slate-950 dark:text-white drop-shadow-[0_2px_12px_rgba(255,255,255,0.9)] dark:drop-shadow-[0_0_35px_rgba(255,255,255,0.3)]">
|
|
Scaling
|
|
</span>
|
|
<span
|
|
style={{ marginBottom: '0px', paddingBottom: '12px' }}
|
|
className="block bg-gradient-to-r from-blue-700 via-indigo-600 to-cyan-600 dark:from-white dark:via-cyan-200 dark:to-cyan-400 bg-clip-text text-transparent drop-shadow-sm dark:drop-shadow-[0_0_35px_rgba(6,182,212,0.5)]"
|
|
>
|
|
Intelligence
|
|
</span>
|
|
</motion.h1>
|
|
|
|
{/* Lead Narrative */}
|
|
<motion.div
|
|
initial={{ opacity: 0, y: 20 }}
|
|
animate={{ opacity: 1, y: 0 }}
|
|
transition={{ duration: 0.7, delay: 0.35 }}
|
|
className="max-w-3xl mx-auto mb-10"
|
|
>
|
|
<p className="text-base sm:text-lg lg:text-xl leading-relaxed text-slate-900 dark:text-slate-200 font-medium dark:font-normal sm:dark:font-medium dark:drop-shadow-[0_2px_16px_rgba(0,0,0,0.85)] bg-white/30 dark:bg-transparent backdrop-blur-sm dark:backdrop-blur-none border border-white/30 dark:border-transparent rounded-2xl dark:rounded-none px-6 py-4 sm:px-8 sm:py-5 dark:p-0 shadow-xs shadow-slate-900/5 dark:shadow-none transition-colors duration-300">
|
|
AI India Innovations delivers{' '}
|
|
<span className="font-bold dark:font-semibold text-slate-950 dark:text-white dark:drop-shadow-[0_0_12px_rgba(255,255,255,0.25)]">
|
|
enterprise-ready AI solutions
|
|
</span>{' '}
|
|
— from{' '}
|
|
<span className="font-bold dark:font-semibold text-blue-700 dark:text-cyan-300 dark:drop-shadow-[0_0_8px_rgba(0,207,255,0.4)]">
|
|
Agentic AI
|
|
</span>{' '}
|
|
and{' '}
|
|
<span className="font-bold dark:font-semibold text-blue-700 dark:text-cyan-300 dark:drop-shadow-[0_0_8px_rgba(0,207,255,0.4)]">
|
|
AI Automation
|
|
</span>{' '}
|
|
to{' '}
|
|
<span className="font-bold dark:font-semibold text-blue-700 dark:text-cyan-300 dark:drop-shadow-[0_0_8px_rgba(0,207,255,0.4)]">
|
|
Gen AI
|
|
</span>{' '}
|
|
and{' '}
|
|
<span className="font-bold dark:font-semibold text-blue-700 dark:text-cyan-300 dark:drop-shadow-[0_0_8px_rgba(0,207,255,0.4)]">
|
|
Computer Vision
|
|
</span>{' '}
|
|
— engineered to turn complex business challenges into{' '}
|
|
<span className="font-bold dark:font-semibold text-slate-950 dark:text-white dark:drop-shadow-[0_0_12px_rgba(255,255,255,0.25)]">
|
|
intelligent, scalable, and future-ready AI solutions
|
|
</span>
|
|
.
|
|
</p>
|
|
</motion.div>
|
|
|
|
{/* CTA Buttons */}
|
|
<motion.div
|
|
initial={{ opacity: 0, y: 20 }}
|
|
animate={{ opacity: 1, y: 0 }}
|
|
transition={{ duration: 0.7, delay: 0.45 }}
|
|
className="flex flex-col sm:flex-row items-center justify-center gap-4 mb-8"
|
|
>
|
|
<button
|
|
id="hero-cta-services"
|
|
type="button"
|
|
onClick={onExploreServices}
|
|
className="w-full sm:w-auto px-8 py-3.5 rounded-xl font-semibold text-base text-white transition-all duration-300 hover:scale-[1.03] active:scale-[0.98] shadow-lg flex items-center justify-center gap-2 group cursor-pointer"
|
|
style={{
|
|
background: 'linear-gradient(135deg, #1a4fff 0%, #0d2ec4 100%)',
|
|
boxShadow: '0 0 35px rgba(26,79,255,0.4), inset 0 1px 0 rgba(255,255,255,0.25)',
|
|
}}
|
|
>
|
|
<span>Explore Services</span>
|
|
<ArrowRight className="w-4 h-4 text-cyan-200 transition-transform group-hover:translate-x-1" />
|
|
</button>
|
|
|
|
<button
|
|
id="hero-cta-contact"
|
|
type="button"
|
|
onClick={() => {
|
|
onNavigate('Contact');
|
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
}}
|
|
className="w-full sm:w-auto px-8 py-3.5 rounded-xl font-semibold text-base transition-all duration-300 border border-slate-300 dark:border-cyan-400/50 text-slate-800 dark:text-cyan-300 bg-white/95 dark:bg-[#050d1f]/80 backdrop-blur-md hover:bg-slate-50 dark:hover:bg-cyan-950/70 hover:text-blue-700 dark:hover:text-white hover:border-blue-400 dark:hover:border-cyan-400 hover:scale-[1.02] active:scale-[0.98] flex items-center justify-center gap-2 cursor-pointer shadow-md dark:shadow-[0_4px_20px_rgba(0,0,0,0.5)]"
|
|
>
|
|
<Sparkles className="w-4 h-4 text-blue-600 dark:text-cyan-400" />
|
|
<span>Talk to our Experts</span>
|
|
</button>
|
|
</motion.div>
|
|
|
|
{/* Capability Tags */}
|
|
<motion.div
|
|
initial={{ opacity: 0 }}
|
|
animate={{ opacity: 1 }}
|
|
transition={{ duration: 0.7, delay: 0.55 }}
|
|
className="flex flex-wrap items-center justify-center gap-2 sm:gap-3 text-xs font-mono"
|
|
>
|
|
<span className="px-3 py-1 rounded-md bg-white/90 dark:bg-slate-900/80 backdrop-blur-sm border border-slate-200 dark:border-slate-700/80 text-slate-700 dark:text-slate-200 shadow-xs dark:shadow-md">
|
|
Autonomous Agents
|
|
</span>
|
|
<span className="text-blue-600 dark:text-cyan-400 font-bold">•</span>
|
|
<span className="px-3 py-1 rounded-md bg-white/90 dark:bg-slate-900/80 backdrop-blur-sm border border-slate-200 dark:border-slate-700/80 text-slate-700 dark:text-slate-200 shadow-xs dark:shadow-md">
|
|
Computer Vision
|
|
</span>
|
|
<span className="text-blue-600 dark:text-cyan-400 font-bold">•</span>
|
|
<span className="px-3 py-1 rounded-md bg-white/90 dark:bg-slate-900/80 backdrop-blur-sm border border-slate-200 dark:border-slate-700/80 text-slate-700 dark:text-slate-200 shadow-xs dark:shadow-md">
|
|
Sovereign Infrastructure
|
|
</span>
|
|
<span className="text-blue-600 dark:text-cyan-400 font-bold">•</span>
|
|
<span className="px-3 py-1 rounded-md bg-white/90 dark:bg-slate-900/80 backdrop-blur-sm border border-slate-200 dark:border-slate-700/80 text-slate-700 dark:text-slate-200 shadow-xs dark:shadow-md">
|
|
Defense & Healthcare AI
|
|
</span>
|
|
</motion.div>
|
|
</div>
|
|
</section>
|
|
);
|
|
}
|
|
|