Files
webb/src/components/ui/BrandLogo.tsx
T

109 lines
4.5 KiB
TypeScript
Raw Normal View History

import React from 'react';
import Link from 'next/link';
interface BrandLogoProps {
size?: 'sm' | 'md' | 'lg';
showWordmark?: boolean;
className?: string;
asLink?: boolean;
}
export function BrandLogo({
size = 'md',
showWordmark = true,
className = '',
asLink = true,
}: BrandLogoProps) {
const iconDimensions = {
sm: { w: 32, h: 32, textScale: 'text-base', subText: 'text-[7px]' },
md: { w: 40, h: 40, textScale: 'text-xl', subText: 'text-[9px]' },
lg: { w: 52, h: 52, textScale: 'text-2xl', subText: 'text-[11px]' },
}[size];
const content = (
<div className={`group flex items-center gap-3 select-none ${className}`}>
{/* Precision Geometric Aperture Emblem */}
<div
className="relative flex items-center justify-center shrink-0 transition-transform duration-300 group-hover:scale-105"
style={{ width: iconDimensions.w, height: iconDimensions.h }}
>
{/* Subtle Ambient Hover Glow */}
<div className="absolute inset-0 rounded-full bg-gradient-to-tr from-blue-500/10 via-cyan-500/10 to-indigo-500/10 blur-md opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none" />
<svg
viewBox="0 0 100 100"
fill="none"
className="w-full h-full drop-shadow-[0_2px_8px_rgba(37,99,235,0.25)]"
>
<defs>
<linearGradient id="bl-blue-cyan" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stopColor="#2563EB" />
<stop offset="100%" stopColor="#0284C7" />
</linearGradient>
<linearGradient id="bl-purple-pink" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stopColor="#7C3AED" />
<stop offset="100%" stopColor="#EC4899" />
</linearGradient>
<linearGradient id="bl-teal-emerald" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stopColor="#059669" />
<stop offset="100%" stopColor="#0284C7" />
</linearGradient>
<radialGradient id="bl-core-light" cx="50%" cy="50%" r="50%">
<stop offset="0%" stopColor="#FFFFFF" />
<stop offset="45%" stopColor="#38BDF8" stopOpacity="0.9" />
<stop offset="100%" stopColor="#0284C7" stopOpacity="0" />
</radialGradient>
</defs>
{/* Precision outer neural ring */}
<circle cx="50" cy="50" r="44" stroke="rgba(15, 23, 42, 0.12)" strokeWidth="1.5" strokeDasharray="3 5" />
{/* Aperture Tri-blade Geometry */}
<path d="M 50 14 C 68 14, 82 26, 84 44 C 74 38, 62 38, 50 44 C 42 34, 46 22, 50 14 Z" fill="url(#bl-blue-cyan)" opacity="0.95" />
<path d="M 84 56 C 80 74, 66 84, 50 86 C 54 74, 50 62, 40 54 C 52 48, 66 48, 84 56 Z" fill="url(#bl-purple-pink)" opacity="0.95" />
<path d="M 38 82 C 22 76, 14 62, 16 44 C 26 50, 38 48, 48 42 C 46 56, 44 70, 38 82 Z" fill="url(#bl-teal-emerald)" opacity="0.95" />
{/* Neural Ray Intersections */}
<path d="M 50 20 L 76 68 L 24 68 Z" stroke="#FFFFFF" strokeWidth="1.5" fill="none" opacity="0.8" />
{/* Glowing Optical Core */}
<circle cx="50" cy="52" r="13" fill="url(#bl-core-light)" />
<circle cx="50" cy="52" r="4" fill="#FFFFFF" />
{/* Apex Nodes */}
<circle cx="50" cy="20" r="2.5" fill="#0284C7" />
<circle cx="76" cy="68" r="2.5" fill="#7C3AED" />
<circle cx="24" cy="68" r="2.5" fill="#059669" />
</svg>
</div>
{/* Typographic Wordmark */}
{showWordmark && (
<div className="flex flex-col">
<div className="flex items-center tracking-tight leading-none">
<span className={`font-display font-black text-transparent bg-clip-text bg-gradient-to-r from-blue-700 to-indigo-600 tracking-[0.1em] ${iconDimensions.textScale}`}>
CRE
</span>
<span className={`font-display font-bold text-slate-900 tracking-[0.16em] ml-1.5 ${iconDimensions.textScale}`}>
INNOVATIONS
</span>
</div>
<span className={`font-mono text-blue-600 tracking-[0.25em] uppercase font-semibold mt-0.5 ${iconDimensions.subText}`}>
Neural Vision Studio
</span>
</div>
)}
</div>
);
if (asLink) {
return (
<Link href="/" className="inline-block outline-none focus-visible:ring-2 focus-visible:ring-blue-500 rounded-lg">
{content}
</Link>
);
}
return content;
}