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

196 lines
8.4 KiB
TypeScript

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: 34, h: 34, textScale: 'text-base', subText: 'text-[7px]' },
md: { w: 42, h: 42, textScale: 'text-xl', subText: 'text-[9px]' },
lg: { w: 54, h: 54, textScale: 'text-2xl', subText: 'text-[11px]' },
}[size];
const content = (
<div className={`group flex items-center gap-3 select-none ${className}`}>
{/* Animated Bright Quantum Prism 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 }}
>
{/* Clean Static Multi-Color Ambient Glow (Zero Continuous Animations or Heavy Blurs) */}
<div className="absolute -inset-1 rounded-2xl bg-gradient-to-tr from-cyan-400 via-blue-500 to-fuchsia-500 opacity-25 group-hover:opacity-75 transition-opacity duration-300 pointer-events-none" />
{/* Glossy Bezel Container */}
<div className="relative w-full h-full rounded-2xl overflow-hidden bg-slate-950 p-[1.5px] shadow-[0_4px_20px_-4px_rgba(56,189,248,0.5)] border border-white/30 group-hover:border-cyan-400/80 transition-all duration-300">
<svg
viewBox="0 0 100 100"
fill="none"
className="w-full h-full"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
{/* Vibrant Prismatic Gradients */}
<linearGradient id="cre-bright-cyan" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stopColor="#00F5FF" />
<stop offset="100%" stopColor="#2563EB" />
</linearGradient>
<linearGradient id="cre-bright-purple" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stopColor="#A855F7" />
<stop offset="100%" stopColor="#EC4899" />
</linearGradient>
<linearGradient id="cre-bright-gold" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stopColor="#F59E0B" />
<stop offset="100%" stopColor="#FACC15" />
</linearGradient>
<linearGradient id="cre-bright-teal" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stopColor="#10B981" />
<stop offset="100%" stopColor="#06B6D4" />
</linearGradient>
{/* Core Star Bloom Flare */}
<radialGradient id="cre-star-bloom" cx="50%" cy="50%" r="50%">
<stop offset="0%" stopColor="#FFFFFF" />
<stop offset="35%" stopColor="#38BDF8" stopOpacity="0.95" />
<stop offset="70%" stopColor="#818CF8" stopOpacity="0.4" />
<stop offset="100%" stopColor="#0284C7" stopOpacity="0" />
</radialGradient>
{/* Diagonal Light Shimmer Sweep */}
<linearGradient id="cre-shimmer-sweep" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stopColor="#FFFFFF" stopOpacity="0" />
<stop offset="50%" stopColor="#FFFFFF" stopOpacity="0.75" />
<stop offset="100%" stopColor="#FFFFFF" stopOpacity="0" />
</linearGradient>
{/* Deep Space Radial Base */}
<radialGradient id="cre-bg-cosmic" cx="50%" cy="50%" r="50%">
<stop offset="0%" stopColor="#1E293B" />
<stop offset="60%" stopColor="#0F172A" />
<stop offset="100%" stopColor="#020617" />
</radialGradient>
</defs>
{/* Cosmic Background Disc */}
<circle cx="50" cy="50" r="48" fill="url(#cre-bg-cosmic)" />
{/* Outer Orbiting Energy Ring (Clockwise) */}
<g className="cre-anim-orbit">
<circle
cx="50"
cy="50"
r="41"
stroke="rgba(56, 189, 248, 0.45)"
strokeWidth="1.5"
strokeDasharray="4 6"
/>
{/* Orbiting Photon Nodes */}
<circle cx="50" cy="9" r="3" fill="#00F5FF" />
<circle cx="91" cy="50" r="2.5" fill="#EC4899" />
<circle cx="15" cy="70" r="2.5" fill="#FACC15" />
</g>
{/* Inner Counter-Orbiting Quantum Track */}
<g className="cre-anim-orbit-reverse">
<circle
cx="50"
cy="50"
r="33"
stroke="rgba(168, 85, 247, 0.35)"
strokeWidth="1"
strokeDasharray="2 4"
/>
<circle cx="73" cy="27" r="2" fill="#38BDF8" />
<circle cx="27" cy="73" r="2" fill="#A855F7" />
</g>
{/* Faceted Quantum Crystal Prism (8-Point Isometric Star) */}
<g className="cre-anim-core">
{/* North Facet: Electric Cyan */}
<polygon points="50,16 62,38 50,50 38,38" fill="url(#cre-bright-cyan)" opacity="0.95" />
{/* East Facet: Electric Purple / Magenta */}
<polygon points="84,50 62,62 50,50 62,38" fill="url(#cre-bright-purple)" opacity="0.95" />
{/* South Facet: Solar Amber / Gold */}
<polygon points="50,84 38,62 50,50 62,62" fill="url(#cre-bright-gold)" opacity="0.95" />
{/* West Facet: Vibrant Emerald / Teal */}
<polygon points="16,50 38,38 50,50 38,62" fill="url(#cre-bright-teal)" opacity="0.95" />
{/* Diagonal Crystalline Diamond Corner Facets */}
<polygon points="50,50 62,38 72,28 62,28" fill="#38BDF8" opacity="0.8" />
<polygon points="50,50 62,62 72,72 72,62" fill="#EC4899" opacity="0.8" />
<polygon points="50,50 38,62 28,72 38,72" fill="#FACC15" opacity="0.8" />
<polygon points="50,50 38,38 28,28 28,38" fill="#10B981" opacity="0.8" />
{/* Geometric Fine Crystal Ridge Wireframe */}
<line x1="50" y1="16" x2="50" y2="84" stroke="#FFFFFF" strokeWidth="1.2" opacity="0.85" />
<line x1="16" y1="50" x2="84" y2="50" stroke="#FFFFFF" strokeWidth="1.2" opacity="0.85" />
<line x1="26" y1="26" x2="74" y2="74" stroke="#FFFFFF" strokeWidth="0.8" opacity="0.6" />
<line x1="74" y1="26" x2="26" y2="74" stroke="#FFFFFF" strokeWidth="0.8" opacity="0.6" />
{/* Radiant Supernova Core Bloom */}
<circle cx="50" cy="50" r="14" fill="url(#cre-star-bloom)" />
<circle cx="50" cy="50" r="5" fill="#FFFFFF" />
{/* Central 4-Point Micro Diamond Glint */}
<polygon points="50,42 52,50 50,58 48,50" fill="#FFFFFF" />
<polygon points="42,50 50,52 58,50 50,48" fill="#FFFFFF" />
</g>
{/* Sweeping Specular Caustic Glint */}
<rect
x="20"
y="-40"
width="60"
height="20"
fill="url(#cre-shimmer-sweep)"
className="cre-anim-shimmer pointer-events-none"
/>
</svg>
</div>
</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 via-indigo-600 to-cyan-600 tracking-[0.1em] text-3d-gradient ${iconDimensions.textScale}`}>
CRE
</span>
<span className={`font-display font-bold text-slate-900 tracking-[0.16em] ml-1.5 text-3d-chiseled ${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;
}