2026-11-03 12:24:43 +05:30
|
|
|
'use client';
|
|
|
|
|
|
|
|
|
|
import React, { useState, useEffect } from 'react';
|
|
|
|
|
import Link from 'next/link';
|
|
|
|
|
import { usePathname } from 'next/navigation';
|
2026-11-03 12:54:41 +05:30
|
|
|
import { Menu, X, Smartphone, Layers, Sparkles, Activity } from 'lucide-react';
|
2026-11-03 12:24:43 +05:30
|
|
|
import { SiteConfig, resolveLocalised } from '@/types';
|
2026-11-03 12:54:41 +05:30
|
|
|
import { BrandLogo } from './BrandLogo';
|
2026-11-03 12:24:43 +05:30
|
|
|
|
|
|
|
|
interface NavbarProps {
|
|
|
|
|
config: SiteConfig;
|
|
|
|
|
currentLocale: string;
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-03 12:31:06 +05:30
|
|
|
export function Navbar({ config, currentLocale }: NavbarProps) {
|
2026-11-03 12:24:43 +05:30
|
|
|
const [isScrolled, setIsScrolled] = useState(false);
|
|
|
|
|
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
|
|
|
|
const pathname = usePathname();
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
const handleScroll = () => {
|
2026-11-03 12:54:41 +05:30
|
|
|
setIsScrolled(window.scrollY > 20);
|
2026-11-03 12:24:43 +05:30
|
|
|
};
|
2026-11-03 12:31:06 +05:30
|
|
|
window.addEventListener('scroll', handleScroll, { passive: true });
|
2026-11-03 12:24:43 +05:30
|
|
|
return () => window.removeEventListener('scroll', handleScroll);
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<header
|
2026-11-03 12:54:41 +05:30
|
|
|
className={`sticky top-0 z-50 transition-all duration-300 px-4 sm:px-6 lg:px-8 py-3.5 ${
|
2026-11-03 12:24:43 +05:30
|
|
|
isScrolled
|
2026-11-03 12:54:41 +05:30
|
|
|
? 'bg-[#05070B]/85 backdrop-blur-2xl shadow-2xl shadow-cyan-950/20 border-b border-white/[0.08]'
|
|
|
|
|
: 'bg-transparent border-b border-white/[0.04]'
|
2026-11-03 12:24:43 +05:30
|
|
|
}`}
|
|
|
|
|
>
|
2026-11-03 12:54:41 +05:30
|
|
|
<div className="max-w-7xl mx-auto flex items-center justify-between">
|
|
|
|
|
{/* Bespoke CRE Innovations Vector Brand Logo */}
|
|
|
|
|
<BrandLogo size="md" />
|
2026-11-03 12:24:43 +05:30
|
|
|
|
2026-11-03 12:54:41 +05:30
|
|
|
{/* Center Navigation Links (Floating Glass Pill on Desktop) */}
|
|
|
|
|
<nav className="hidden md:flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-white/[0.03] border border-white/[0.08] backdrop-blur-xl shadow-inner shadow-white/[0.02]">
|
2026-11-03 12:24:43 +05:30
|
|
|
{config.nav.header.map((item) => {
|
|
|
|
|
const active = pathname === item.href;
|
|
|
|
|
return (
|
|
|
|
|
<Link
|
|
|
|
|
key={item.href}
|
|
|
|
|
href={item.href}
|
2026-11-03 12:54:41 +05:30
|
|
|
className={`relative px-4 py-2 rounded-full text-xs font-semibold tracking-wide transition-all duration-200 ${
|
2026-11-03 12:24:43 +05:30
|
|
|
active
|
2026-11-03 12:54:41 +05:30
|
|
|
? 'text-cyan-300 bg-white/[0.08] shadow-[0_0_15px_rgba(0,240,255,0.2)] border border-cyan-500/30'
|
|
|
|
|
: 'text-slate-300 hover:text-white hover:bg-white/[0.04]'
|
2026-11-03 12:24:43 +05:30
|
|
|
}`}
|
|
|
|
|
>
|
|
|
|
|
{resolveLocalised(item.label, currentLocale)}
|
|
|
|
|
</Link>
|
|
|
|
|
);
|
|
|
|
|
})}
|
2026-11-03 12:54:41 +05:30
|
|
|
|
|
|
|
|
{/* Direct Anchor to Vertical Tool Stack */}
|
|
|
|
|
<Link
|
|
|
|
|
href="/#tools-stack"
|
|
|
|
|
className="flex items-center gap-1.5 px-4 py-2 rounded-full text-xs font-semibold tracking-wide text-cyan-400 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors"
|
|
|
|
|
>
|
|
|
|
|
<Layers className="w-3.5 h-3.5 text-cyan-400" />
|
|
|
|
|
<span>Tools Stack</span>
|
|
|
|
|
</Link>
|
2026-11-03 12:24:43 +05:30
|
|
|
</nav>
|
|
|
|
|
|
2026-11-03 12:54:41 +05:30
|
|
|
{/* Right Status & Action Items */}
|
|
|
|
|
<div className="hidden lg:flex items-center space-x-4">
|
|
|
|
|
{/* Live System Operational Indicator */}
|
|
|
|
|
<div className="flex items-center gap-2 px-3 py-1.5 rounded-full bg-emerald-950/40 border border-emerald-500/30 text-[11px] font-mono text-emerald-400 shadow-sm">
|
|
|
|
|
<span className="relative flex h-2 w-2">
|
|
|
|
|
<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 w-2 bg-emerald-500"></span>
|
|
|
|
|
</span>
|
|
|
|
|
<span>Neural Core v2.4 Active</span>
|
|
|
|
|
</div>
|
2026-11-03 12:24:43 +05:30
|
|
|
|
|
|
|
|
{/* Primary CTA Button */}
|
|
|
|
|
<Link
|
|
|
|
|
href={config.nav.cta.href}
|
2026-11-03 12:54:41 +05:30
|
|
|
className="group relative inline-flex items-center gap-2 px-5 py-2.5 rounded-full text-xs font-bold text-black bg-gradient-to-r from-cyan-400 via-teal-300 to-cyan-300 hover:from-cyan-300 hover:to-teal-200 shadow-[0_0_25px_rgba(0,240,255,0.35)] hover:shadow-[0_0_35px_rgba(0,240,255,0.5)] transition-all duration-300 hover:-translate-y-0.5 active:translate-y-0"
|
2026-11-03 12:24:43 +05:30
|
|
|
>
|
2026-11-03 12:54:41 +05:30
|
|
|
<Smartphone className="w-4 h-4 text-black group-hover:rotate-6 transition-transform" />
|
2026-11-03 12:24:43 +05:30
|
|
|
<span>{resolveLocalised(config.nav.cta.label, currentLocale)}</span>
|
|
|
|
|
</Link>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Mobile menu trigger */}
|
|
|
|
|
<div className="flex md:hidden items-center space-x-2">
|
|
|
|
|
<button
|
|
|
|
|
onClick={() => setMobileMenuOpen(!mobileMenuOpen)}
|
2026-11-03 12:54:41 +05:30
|
|
|
className="p-2.5 rounded-xl text-slate-200 bg-white/[0.05] border border-white/[0.1] hover:bg-white/[0.1] transition-colors"
|
2026-11-03 12:24:43 +05:30
|
|
|
aria-label="Open menu"
|
|
|
|
|
>
|
2026-11-03 12:54:41 +05:30
|
|
|
{mobileMenuOpen ? <X className="w-5 h-5 text-cyan-400" /> : <Menu className="w-5 h-5" />}
|
2026-11-03 12:24:43 +05:30
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-11-03 12:31:06 +05:30
|
|
|
{/* Mobile Drawer */}
|
2026-11-03 12:24:43 +05:30
|
|
|
{mobileMenuOpen && (
|
2026-11-03 12:54:41 +05:30
|
|
|
<div className="md:hidden mt-3 rounded-2xl border border-white/[0.1] bg-[#07090E]/95 backdrop-blur-2xl p-5 space-y-3 shadow-2xl animate-in slide-in-from-top-4 duration-200">
|
|
|
|
|
<div className="flex items-center justify-between pb-3 border-b border-white/[0.08]">
|
|
|
|
|
<div className="flex items-center gap-2 text-xs font-mono text-emerald-400">
|
|
|
|
|
<span className="h-2 w-2 rounded-full bg-emerald-400 animate-pulse" />
|
|
|
|
|
<span>Core v2.4 Active</span>
|
|
|
|
|
</div>
|
|
|
|
|
<span className="text-[10px] font-mono text-slate-400">RAM Streaming</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="space-y-1">
|
|
|
|
|
{config.nav.header.map((item) => {
|
|
|
|
|
const active = pathname === item.href;
|
|
|
|
|
return (
|
|
|
|
|
<Link
|
|
|
|
|
key={item.href}
|
|
|
|
|
href={item.href}
|
|
|
|
|
onClick={() => setMobileMenuOpen(false)}
|
|
|
|
|
className={`flex items-center justify-between px-4 py-3 rounded-xl text-sm font-semibold transition-colors ${
|
|
|
|
|
active
|
|
|
|
|
? 'text-cyan-400 bg-cyan-950/40 border border-cyan-500/30'
|
|
|
|
|
: 'text-slate-300 hover:bg-white/[0.05]'
|
|
|
|
|
}`}
|
|
|
|
|
>
|
|
|
|
|
<span>{resolveLocalised(item.label, currentLocale)}</span>
|
|
|
|
|
</Link>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
|
|
|
|
|
<Link
|
|
|
|
|
href="/#tools-stack"
|
|
|
|
|
onClick={() => setMobileMenuOpen(false)}
|
|
|
|
|
className="flex items-center justify-between px-4 py-3 rounded-xl text-sm font-semibold text-cyan-400 bg-white/[0.03] hover:bg-white/[0.06]"
|
|
|
|
|
>
|
|
|
|
|
<span className="flex items-center gap-2">
|
|
|
|
|
<Layers className="w-4 h-4 text-cyan-400" />
|
|
|
|
|
Tools Stack
|
|
|
|
|
</span>
|
|
|
|
|
</Link>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="pt-3 border-t border-white/[0.08]">
|
2026-11-03 12:24:43 +05:30
|
|
|
<Link
|
|
|
|
|
href={config.nav.cta.href}
|
|
|
|
|
onClick={() => setMobileMenuOpen(false)}
|
2026-11-03 12:54:41 +05:30
|
|
|
className="flex items-center justify-center gap-2 w-full py-3.5 rounded-xl text-sm font-bold text-black bg-gradient-to-r from-cyan-400 to-teal-300 shadow-[0_0_20px_rgba(0,240,255,0.3)]"
|
2026-11-03 12:24:43 +05:30
|
|
|
>
|
|
|
|
|
<Smartphone className="w-4 h-4" />
|
|
|
|
|
<span>{resolveLocalised(config.nav.cta.label, currentLocale)}</span>
|
|
|
|
|
</Link>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</header>
|
|
|
|
|
);
|
|
|
|
|
}
|