diff --git a/src/app/globals.css b/src/app/globals.css
index 5a44cdf..8796ea9 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -316,90 +316,48 @@
-webkit-text-fill-color: transparent;
}
-/* Universal 3D Cinematic Extruded Typography */
-h1, h2, h3, h4, h5, h6, .font-display, .text-3d-chiseled {
- transform-style: preserve-3d;
- will-change: transform;
- text-shadow:
- 0 1px 0 #FFFFFF,
- 0 2px 0 #E5DCCE,
- 0 3px 1px #D6C7B2,
- 0 4px 2px #C5B298,
- 0 6px 6px rgba(15, 23, 42, 0.12),
- 0 12px 24px rgba(15, 23, 42, 0.08);
+/* Guaranteed Text Visibility - Fix all text disappearance issues */
+.text-transparent,
+[class*="text-transparent"],
+[class*="bg-clip-text"],
+.text-gradient-brand,
+.text-gradient-cyan,
+.text-gradient-champagne {
+ text-shadow: none !important;
+ filter: none !important;
+ transform-style: flat !important;
+ -webkit-text-fill-color: transparent !important;
+ -webkit-background-clip: text !important;
+ background-clip: text !important;
+ display: inline-block;
+ opacity: 1 !important;
+ visibility: visible !important;
}
-/* 3D Extruded Stat Numbers & Metric Badges */
+/* Crisp, Ultra-Lightweight Editorial Headings (Zero CPU load, Zero Disappearance) */
+h1, h2, h3, h4, h5, h6, .text-3d-chiseled {
+ text-rendering: optimizeLegibility;
+ -webkit-font-smoothing: antialiased;
+ text-shadow: 0 1px 1px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
+}
+
+/* Crisp Stat Numbers */
.stat-value, .stat-number, [data-stat] {
display: inline-block;
- transform-style: preserve-3d;
- will-change: transform;
- filter:
- drop-shadow(0 1px 0 #FFFFFF)
- drop-shadow(0 2px 0 #E2D6C3)
- drop-shadow(0 4px 2px rgba(197, 168, 128, 0.5))
- drop-shadow(0 8px 18px rgba(37, 99, 235, 0.35));
+ text-shadow: none !important;
+ filter: none !important;
}
-/* 3D Kinetic Light Sweep Animation across Gradient Headings */
-@keyframes text-3d-shimmer {
- 0% {
- background-position: 0% center;
- }
- 50% {
- background-position: 100% center;
- }
- 100% {
- background-position: 0% center;
- }
-}
-
-/* Continuous Organic 3D Floating Wave */
-@keyframes text-3d-float-organic {
- 0%, 100% {
- transform: perspective(900px) rotateX(0deg) rotateY(0deg) translateZ(14px);
- }
- 25% {
- transform: perspective(900px) rotateX(2.5deg) rotateY(-3deg) translateZ(24px);
- }
- 50% {
- transform: perspective(900px) rotateX(-2deg) rotateY(2.5deg) translateZ(16px);
- }
- 75% {
- transform: perspective(900px) rotateX(2deg) rotateY(1.8deg) translateZ(26px);
- }
-}
-
-/* 3D Gradient Text Styling with Multi-Plane Depth */
-.text-3d-gradient,
-.text-transparent.bg-clip-text {
- background-size: 200% auto;
- animation: text-3d-shimmer 6s ease-in-out infinite;
- display: inline-block;
- transform-style: preserve-3d;
- filter:
- drop-shadow(0 1px 0 rgba(255, 255, 255, 0.95))
- drop-shadow(0 2px 1px rgba(197, 168, 128, 0.55))
- drop-shadow(0 5px 12px rgba(37, 99, 235, 0.32))
- drop-shadow(0 14px 28px rgba(15, 23, 42, 0.1));
-}
-
-/* Continuous 3D Spatial Pulse for Badges & Telemetry */
-@keyframes badge-3d-pulse {
- 0%, 100% {
- transform: perspective(600px) translateZ(8px) rotateX(0deg) rotateY(0deg);
- box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
- }
- 50% {
- transform: perspective(600px) translateZ(18px) rotateX(3.5deg) rotateY(-2deg);
- box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18), inset 0 1px 0 rgba(255, 255, 255, 1);
- }
-}
-
-.badge-3d, [class*="badge"]:not([data-no3d]) {
- animation: badge-3d-pulse 4s ease-in-out infinite;
- transform-style: preserve-3d;
+/* Lightweight Badge Styling (Zero Continuous CPU/GPU Spikes) */
+.badge-3d, [class*="badge"] {
display: inline-flex;
+ box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.85);
+ transition: transform 0.2s ease, box-shadow 0.2s ease;
+}
+
+.badge-3d:hover {
+ transform: translateY(-1px);
+ box-shadow: 0 4px 8px -2px rgba(37, 99, 235, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 0be9cf7..a4008e0 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -6,7 +6,6 @@ import { Navbar } from '@/components/ui/Navbar';
import { Footer } from '@/components/ui/Footer';
import { CursorAura } from '@/components/ui/CursorAura';
import { SmoothScroll } from '@/components/ui/SmoothScroll';
-import { Cinematic3DTextEngine } from '@/components/ui/Cinematic3DTextEngine';
const sansFont = Plus_Jakarta_Sans({
subsets: ['latin'],
@@ -93,7 +92,6 @@ export default function RootLayout({
-
{children}
diff --git a/src/components/3d/Hero3DCanvas.tsx b/src/components/3d/Hero3DCanvas.tsx
index b88ec4b..38ac153 100644
--- a/src/components/3d/Hero3DCanvas.tsx
+++ b/src/components/3d/Hero3DCanvas.tsx
@@ -38,11 +38,11 @@ export function Hero3DCanvas({ className = '' }: Hero3DCanvasProps) {
// Geometries & Materials for cleanup
let crystalGeo: THREE.OctahedronGeometry | null = null;
- let crystalMat: THREE.MeshPhysicalMaterial | null = null;
+ let crystalMat: THREE.MeshStandardMaterial | null = null;
let edgesGeo: THREE.EdgesGeometry | null = null;
let edgesMat: THREE.LineBasicMaterial | null = null;
let innerGeo: THREE.OctahedronGeometry | null = null;
- let innerMat: THREE.MeshPhysicalMaterial | null = null;
+ let innerMat: THREE.MeshStandardMaterial | null = null;
let dotGeo: THREE.BufferGeometry | null = null;
let dotMat: THREE.PointsMaterial | null = null;
let particlesGeo: THREE.BufferGeometry | null = null;
@@ -56,11 +56,11 @@ export function Hero3DCanvas({ className = '' }: Hero3DCanvasProps) {
renderer = new THREE.WebGLRenderer({
alpha: true,
- antialias: true,
- powerPreference: 'high-performance',
+ antialias: false,
+ powerPreference: 'default',
});
renderer.setSize(width, height);
- renderer.setPixelRatio(Math.min(window.devicePixelRatio || 1, 2));
+ renderer.setPixelRatio(1); // 1x DPR saves massive GPU raster fillrate
renderer.outputColorSpace = THREE.SRGBColorSpace;
container.appendChild(renderer.domElement);
@@ -68,17 +68,14 @@ export function Hero3DCanvas({ className = '' }: Hero3DCanvasProps) {
const rootGroup = new THREE.Group();
scene.add(rootGroup);
- // 1. Outer Translucent Diamond Crystal Prism (Octahedron)
+ // 1. Outer Translucent Diamond Crystal Prism (Octahedron - Standard Lightweight Material)
crystalGeo = new THREE.OctahedronGeometry(1.8, 0);
- crystalMat = new THREE.MeshPhysicalMaterial({
+ crystalMat = new THREE.MeshStandardMaterial({
color: 0x2563eb, // Studio Sapphire
- roughness: 0.08,
- metalness: 0.15,
- transmission: 0.85,
- opacity: 0.7,
+ roughness: 0.2,
+ metalness: 0.1,
+ opacity: 0.45,
transparent: true,
- emissive: 0x1d4ed8,
- emissiveIntensity: 0.25,
});
const crystalMesh = new THREE.Mesh(crystalGeo, crystalMat);
rootGroup.add(crystalMesh);
@@ -95,14 +92,12 @@ export function Hero3DCanvas({ className = '' }: Hero3DCanvasProps) {
// 2. Inner Nested Core Prism (Counter-rotating Gold Core)
innerGeo = new THREE.OctahedronGeometry(1.0, 0);
- innerMat = new THREE.MeshPhysicalMaterial({
+ innerMat = new THREE.MeshStandardMaterial({
color: 0xd4af37, // Metallic Gold
- roughness: 0.2,
- metalness: 0.85,
- emissive: 0xb45309,
- emissiveIntensity: 0.45,
+ roughness: 0.3,
+ metalness: 0.7,
transparent: true,
- opacity: 0.85,
+ opacity: 0.8,
});
const innerMesh = new THREE.Mesh(innerGeo, innerMat);
rootGroup.add(innerMesh);
diff --git a/src/components/ui/Cinematic3DTextEngine.tsx b/src/components/ui/Cinematic3DTextEngine.tsx
deleted file mode 100644
index 969cc69..0000000
--- a/src/components/ui/Cinematic3DTextEngine.tsx
+++ /dev/null
@@ -1,141 +0,0 @@
-'use client';
-
-import React, { useEffect } from 'react';
-
-export function Cinematic3DTextEngine() {
- useEffect(() => {
- // Check prefers-reduced-motion
- if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
-
- let rafId: number;
- let targetMouseX = 0;
- let targetMouseY = 0;
- let currentMouseX = 0;
- let currentMouseY = 0;
-
- let lastScrollY = window.scrollY || 0;
- let targetScrollPitch = 0;
- let currentScrollPitch = 0;
-
- let clock = 0;
-
- const handleMouseMove = (e: MouseEvent) => {
- const vw = window.innerWidth;
- const vh = window.innerHeight;
- targetMouseX = (e.clientX / vw) * 2 - 1;
- targetMouseY = (e.clientY / vh) * 2 - 1;
- };
-
- const handleScroll = () => {
- const sy = window.scrollY || 0;
- const delta = sy - lastScrollY;
- lastScrollY = sy;
- targetScrollPitch = Math.max(Math.min(delta * 0.18, 7), -7);
- };
-
- window.addEventListener('mousemove', handleMouseMove, { passive: true });
- window.addEventListener('scroll', handleScroll, { passive: true });
-
- // Target headings, badges, card titles, and stats
- const selector = [
- 'h1:not([data-no3d])',
- 'h2:not([data-no3d])',
- 'h3:not([data-no3d])',
- 'h4:not([data-no3d])',
- '.font-display:not([data-no3d])',
- '.stat-value:not([data-no3d])',
- '.badge-3d:not([data-no3d])',
- '[data-3d-text]',
- ].join(', ');
-
- // Use IntersectionObserver to track visible elements with ZERO per-frame DOM reads
- const visibleElements = new Set();
-
- const observer = new IntersectionObserver(
- (entries) => {
- entries.forEach((entry) => {
- const el = entry.target as HTMLElement;
- if (entry.isIntersecting) {
- visibleElements.add(el);
- // Ensure inline elements can be 3D transformed
- if (window.getComputedStyle(el).display === 'inline') {
- el.style.display = 'inline-block';
- }
- el.style.transformStyle = 'preserve-3d';
- el.style.willChange = 'transform';
- } else {
- visibleElements.delete(el);
- }
- });
- },
- { rootMargin: '100px 0px 100px 0px', threshold: 0 }
- );
-
- const allElements = document.querySelectorAll(selector);
- allElements.forEach((el) => {
- if (!el.closest('canvas') && !el.closest('[data-no3d-container]')) {
- observer.observe(el);
- }
- });
-
- const tick = () => {
- clock += 0.024;
-
- // Fast, responsive lerps (0.12 factor eliminates input lag)
- currentMouseX += (targetMouseX - currentMouseX) * 0.12;
- currentMouseY += (targetMouseY - currentMouseY) * 0.12;
- currentScrollPitch += (targetScrollPitch - currentScrollPitch) * 0.15;
- targetScrollPitch *= 0.85;
-
- let idx = 0;
- visibleElements.forEach((el) => {
- idx++;
- const phase = idx * 0.5;
- const waveX = Math.sin(clock * 1.4 + phase) * 3.4;
- const waveY = Math.cos(clock * 1.1 + phase) * 4.0;
- const waveZ = Math.sin(clock * 1.8 + phase) * 6;
-
- const tagName = el.tagName.toLowerCase();
- let baseZ = 16;
- let rotMultiplier = 1;
-
- if (tagName === 'h1') {
- baseZ = 32;
- rotMultiplier = 1.3;
- } else if (tagName === 'h2') {
- baseZ = 24;
- rotMultiplier = 1.15;
- } else if (tagName === 'h3') {
- baseZ = 18;
- rotMultiplier = 1.0;
- } else if (el.classList.contains('stat-value')) {
- baseZ = 28;
- rotMultiplier = 1.25;
- } else if (tagName === 'h4') {
- baseZ = 14;
- rotMultiplier = 0.9;
- }
-
- const rotX = (-currentMouseY * 6 + currentScrollPitch + waveX) * rotMultiplier;
- const rotY = (currentMouseX * 7 + waveY) * rotMultiplier;
- const transZ = Math.max(baseZ + waveZ, 6);
-
- // Batch write directly to GPU transform matrix (ZERO DOM READS!)
- el.style.transform = `perspective(950px) rotateX(${rotX.toFixed(2)}deg) rotateY(${rotY.toFixed(2)}deg) translateZ(${transZ.toFixed(1)}px)`;
- });
-
- rafId = requestAnimationFrame(tick);
- };
-
- rafId = requestAnimationFrame(tick);
-
- return () => {
- cancelAnimationFrame(rafId);
- observer.disconnect();
- window.removeEventListener('mousemove', handleMouseMove);
- window.removeEventListener('scroll', handleScroll);
- };
- }, []);
-
- return null;
-}
diff --git a/src/components/ui/CursorAura.tsx b/src/components/ui/CursorAura.tsx
index b057d70..bccbd7b 100644
--- a/src/components/ui/CursorAura.tsx
+++ b/src/components/ui/CursorAura.tsx
@@ -17,32 +17,44 @@ export function CursorAura() {
return;
}
+ let isMoving = false;
+ let animId: number = 0;
+
+ const render = () => {
+ const pos = posRef.current;
+ const dx = pos.targetX - pos.currentX;
+ const dy = pos.targetY - pos.currentY;
+
+ // Snappy lerp
+ pos.currentX += dx * 0.15;
+ pos.currentY += dy * 0.15;
+
+ if (auraRef.current) {
+ auraRef.current.style.transform = `translate3d(${pos.currentX - 200}px, ${pos.currentY - 200}px, 0)`;
+ }
+
+ // Automatically halt RAF loop when mouse stops to achieve 0% idle CPU
+ if (Math.abs(dx) > 0.5 || Math.abs(dy) > 0.5) {
+ animId = requestAnimationFrame(render);
+ } else {
+ isMoving = false;
+ }
+ };
+
const onMouseMove = (e: MouseEvent) => {
posRef.current.targetX = e.clientX;
posRef.current.targetY = e.clientY;
+
+ if (!isMoving) {
+ isMoving = true;
+ animId = requestAnimationFrame(render);
+ }
};
window.addEventListener('mousemove', onMouseMove, { passive: true });
- let animId: number;
-
- const render = () => {
- const pos = posRef.current;
- // Damped lerp follower
- pos.currentX += (pos.targetX - pos.currentX) * 0.08;
- pos.currentY += (pos.targetY - pos.currentY) * 0.08;
-
- if (auraRef.current) {
- auraRef.current.style.transform = `translate3d(${pos.currentX - 250}px, ${pos.currentY - 250}px, 0)`;
- }
-
- animId = requestAnimationFrame(render);
- };
-
- animId = requestAnimationFrame(render);
-
return () => {
- cancelAnimationFrame(animId);
+ if (animId) cancelAnimationFrame(animId);
window.removeEventListener('mousemove', onMouseMove);
};
}, []);
@@ -56,11 +68,10 @@ export function CursorAura() {
>
diff --git a/src/components/ui/Kinetic3DText.tsx b/src/components/ui/Kinetic3DText.tsx
index f810fee..160ce76 100644
--- a/src/components/ui/Kinetic3DText.tsx
+++ b/src/components/ui/Kinetic3DText.tsx
@@ -1,6 +1,6 @@
'use client';
-import React, { useRef, useEffect } from 'react';
+import React, { useRef, useState, useCallback } from 'react';
interface Kinetic3DTextProps {
primaryText: string;
@@ -15,119 +15,58 @@ export function Kinetic3DText({
subtitle,
className = '',
}: Kinetic3DTextProps) {
+ const [tilt, setTilt] = useState({ rx: 0, ry: 0, active: false });
const containerRef = useRef(null);
- const headlineRef = useRef(null);
- const shadowRef = useRef(null);
- const subtitleRef = useRef(null);
- useEffect(() => {
- // Check prefers-reduced-motion
- if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
+ const handleMouseMove = useCallback((e: React.MouseEvent) => {
+ if (!containerRef.current) return;
+ const rect = containerRef.current.getBoundingClientRect();
+ const nx = (e.clientX - rect.left) / rect.width - 0.5;
+ const ny = (e.clientY - rect.top) / rect.height - 0.5;
+ setTilt({
+ rx: Math.max(Math.min(-ny * 10, 8), -8),
+ ry: Math.max(Math.min(nx * 12, 10), -10),
+ active: true,
+ });
+ }, []);
- let rafId: number;
- let targetRx = 0;
- let targetRy = 0;
- let currentRx = 0;
- let currentRy = 0;
- let clock = 0;
-
- const handleMouseMove = (e: MouseEvent) => {
- const vw = window.innerWidth;
- const vh = window.innerHeight;
- // Normalized coordinates -1 to +1 centered on screen
- const nx = (e.clientX / vw) * 2 - 1;
- const ny = (e.clientY / vh) * 2 - 1;
-
- targetRy = nx * 14; // Horizontal tilt up to 14 deg
- targetRx = -ny * 12; // Vertical tilt up to 12 deg
- };
-
- const updateLoop = () => {
- clock += 0.025;
-
- // Inertial damping lerp for mouse response
- currentRx += (targetRx - currentRx) * 0.085;
- currentRy += (targetRy - currentRy) * 0.085;
-
- // Autonomous continuous 3D breathing wave (always alive)
- const waveRx = Math.sin(clock * 1.4) * 3.5;
- const waveRy = Math.cos(clock * 1.1) * 4.2;
- const waveZ = Math.sin(clock * 1.8) * 8;
-
- const totalRx = currentRx + waveRx;
- const totalRy = currentRy + waveRy;
-
- if (containerRef.current) {
- containerRef.current.style.transform = `perspective(1100px) rotateX(${totalRx.toFixed(2)}deg) rotateY(${totalRy.toFixed(2)}deg) translateZ(${waveZ.toFixed(1)}px)`;
- }
-
- if (headlineRef.current) {
- // Multi-tier parallax elevation
- headlineRef.current.style.transform = `translateZ(42px) rotateX(${(totalRx * 0.3).toFixed(2)}deg)`;
- }
-
- if (shadowRef.current) {
- // Holographic blur shadow projected behind
- shadowRef.current.style.transform = `translateZ(-28px) translate(${(totalRy * 1.8).toFixed(1)}px, ${(totalRx * 1.8).toFixed(1)}px) scale(1.05)`;
- }
-
- if (subtitleRef.current) {
- subtitleRef.current.style.transform = `translateZ(24px) rotateX(${(totalRx * 0.2).toFixed(2)}deg)`;
- }
-
- rafId = requestAnimationFrame(updateLoop);
- };
-
- window.addEventListener('mousemove', handleMouseMove, { passive: true });
- rafId = requestAnimationFrame(updateLoop);
-
- return () => {
- window.removeEventListener('mousemove', handleMouseMove);
- cancelAnimationFrame(rafId);
- };
+ const handleMouseLeave = useCallback(() => {
+ setTilt({ rx: 0, ry: 0, active: false });
}, []);
return (
-
- {/* 3D Stereoscopic Kinetic Text Stage */}
+
- {/* Layer 1: Ambient 3D Text Holographic Depth Reflection */}
-
-
- {primaryText}
- {highlightText}
-
-
-
- {/* Layer 2: Main Floating 3D Headline with Chiseled Extrusion */}
-
- {primaryText}{' '}
+ {/* Main Floating Headline (100% Visible, Crisp, Zero Disappearance) */}
+
+ {primaryText}{' '}
{highlightText && (
-
-
+
+
{highlightText}
)}
- {/* Layer 3: Elevated 3D Subtitle */}
+ {/* Subtitle (100% Visible & Crisp) */}
{subtitle && (
-
+
{subtitle}
)}