diff --git a/apps/web/src/components/landing/hero-splash.tsx b/apps/web/src/components/landing/hero-splash.tsx index ff18473..7a3143a 100644 --- a/apps/web/src/components/landing/hero-splash.tsx +++ b/apps/web/src/components/landing/hero-splash.tsx @@ -49,8 +49,8 @@ function SuchMark({ animate }: { animate: boolean }) { /> )} - {/* letters with a gentle breath */} - + {/* letters: static so they're a stable LCP candidate */} + {/* S */} {/* U */} @@ -137,7 +137,6 @@ export function HeroSplash({ onEnter, sectionRef }: { onEnter: () => void; secti style={{ animationDuration: "4.5s" }} /> { ); }; -export const NebulaField = ({ className, density = 4, themeMode = 'dark', position }: NebulaProps) => { +export const NebulaField = ({ className, density = 8, themeMode = 'dark', position }: NebulaProps) => { // === ALL HOOKS MUST BE CALLED BEFORE ANY CONDITIONAL RETURNS === const monitorControls = useAnimation(); const [monitorColor, setMonitorColor] = useState(themeMode === 'light' ? "text-sky-500" : "text-cyan-400/70"); const [prefersReducedMotion, setPrefersReducedMotion] = useState(false); + // Parallax Scroll hooks (called unconditionally) + const { scrollY } = useScroll(); + const yRange = useTransform(scrollY, [0, 1000], [0, 250]); + // Position calculations const computerX = position?.x ?? 18; const computerY = position?.y ?? 18; @@ -187,7 +191,7 @@ export const NebulaField = ({ className, density = 4, themeMode = 'dark', positi {/* Slowly-pulsing Cherenkov "reactor pool" bloom */} @@ -217,10 +222,11 @@ export const NebulaField = ({ className, density = 4, themeMode = 'dark', positi - {paths.map((d: string, i: number) => ( ))} - + ); };