diff --git a/src/components/sections/HeroSection.tsx b/src/components/sections/HeroSection.tsx index 153ccd6..cde0a41 100644 --- a/src/components/sections/HeroSection.tsx +++ b/src/components/sections/HeroSection.tsx @@ -283,11 +283,13 @@ export function HeroSection({ decoding="async" /> - {/* White / Cream Gradient Overlay for Radiant Light Aesthetic */} -
+ {/* White / Cream Gradient Overlay: Restrained to left side so background artwork & glowing ribbons stay clearly visible */} + + {/* Soft Bottom Fade to Seamlessly Blend with Upcoming Scroll Content */} + - {/* Zero-Overhead Scroll Sentinel for Navbar Transformation */} + {/* Zero-Overhead Scroll Sentinel */} {/* 2. Left-Aligned Content Container */} diff --git a/src/components/sections/ShiftableToolsGridSection.tsx b/src/components/sections/ShiftableToolsGridSection.tsx index 6dd0031..6ed82fd 100644 --- a/src/components/sections/ShiftableToolsGridSection.tsx +++ b/src/components/sections/ShiftableToolsGridSection.tsx @@ -177,12 +177,10 @@ function ShiftableRow({ items }: { items: ToolMediaItem[] }) { key={item.id} onMouseEnter={() => setHoveredId(item.id)} onMouseLeave={() => setHoveredId(null)} + className="w-[82vw] max-w-[320px] md:max-w-none md:w-auto shrink-0 md:shrink md:flex-1 snap-start transition-[flex-grow] duration-700 ease-[cubic-bezier(0.16,1,0.3,1)] flex flex-col min-w-0" style={{ flexGrow: flexGrowValue, - flexShrink: 1, - flexBasis: '0%', }} - className="w-[82vw] sm:w-[320px] md:w-full shrink-0 md:shrink snap-start transition-[flex-grow] duration-1000 ease-[cubic-bezier(0.16,1,0.3,1)] will-change-[flex-grow] flex flex-col min-w-0" > {/* Window Container with strictly locked pixel height & landscape aspect */} {item.mediaType === 'comparison' ? ( @@ -465,7 +463,7 @@ function ToolWindowMedia({ item, isHovered }: { item: ToolMediaItem; isHovered: playsInline preload="auto" style={{ borderRadius: '28px' }} - className="absolute inset-y-0 left-1/2 -translate-x-1/2 h-full w-[680px] max-w-none object-cover pointer-events-none [backface-visibility:hidden]" + className="absolute inset-0 w-full h-full md:inset-y-0 md:left-1/2 md:-translate-x-1/2 md:w-[680px] md:max-w-none object-cover pointer-events-none [backface-visibility:hidden]" /> {/* GPU-composited overlay (opacity only) */} @@ -516,7 +514,7 @@ function ToolWindowMedia({ item, isHovered }: { item: ToolMediaItem; isHovered: src={item.beforeUrl} alt="Before" style={{ borderRadius: '28px' }} - className="absolute inset-y-0 left-1/2 -translate-x-1/2 h-full w-[680px] max-w-none object-cover pointer-events-none [backface-visibility:hidden]" + className="absolute inset-0 w-full h-full md:inset-y-0 md:left-1/2 md:-translate-x-1/2 md:w-[680px] md:max-w-none object-cover pointer-events-none [backface-visibility:hidden]" loading="lazy" /> @@ -573,7 +571,7 @@ function ToolWindowMedia({ item, isHovered }: { item: ToolMediaItem; isHovered: src={item.imageUrl || item.afterUrl || item.beforeUrl || '/brand/og-default.png'} alt={item.title} style={{ borderRadius: '28px' }} - className="absolute inset-y-0 left-1/2 -translate-x-1/2 h-full w-[680px] max-w-none object-cover pointer-events-none [backface-visibility:hidden]" + className="absolute inset-0 w-full h-full md:inset-y-0 md:left-1/2 md:-translate-x-1/2 md:w-[680px] md:max-w-none object-cover pointer-events-none [backface-visibility:hidden]" loading="lazy" /> {/* GPU-composited overlay (opacity only) */} diff --git a/src/components/ui/Navbar.tsx b/src/components/ui/Navbar.tsx index 1890871..1f36f3b 100644 --- a/src/components/ui/Navbar.tsx +++ b/src/components/ui/Navbar.tsx @@ -13,28 +13,9 @@ interface NavbarProps { } export function Navbar({ config, currentLocale }: NavbarProps) { - const [isScrolled, setIsScrolled] = useState(false); const [mobileMenuOpen, setMobileMenuOpen] = useState(false); const pathname = usePathname(); - // Fast, scroll-aware navbar transformation: - // - Homepage at rest (scrollY <= 25): Transparent text buttons over dark hero - // - As soon as scrolled (scrollY > 25) or on any other page: Transforms into solid navbar - useEffect(() => { - if (pathname !== '/') { - setIsScrolled(true); - return; - } - - const checkScroll = () => { - setIsScrolled(window.scrollY > 25); - }; - - checkScroll(); - window.addEventListener('scroll', checkScroll, { passive: true }); - return () => window.removeEventListener('scroll', checkScroll); - }, [pathname]); - // Close mobile menu on Escape key useEffect(() => { if (!mobileMenuOpen) return; @@ -60,26 +41,15 @@ export function Navbar({ config, currentLocale }: NavbarProps) { }; }, [mobileMenuOpen]); - // Whether we are at top of homepage on the dark hero - const isHeroTransparent = pathname === '/' && !isScrolled; - return ( -