feat(homepage): refine gradient rightwards, dim hero background, seamless bottom fade, and scroll-activated navbar
This commit is contained in:
@@ -263,12 +263,14 @@ export function HeroSection({
|
||||
|
||||
// -------------------------------------------------------------
|
||||
// 3. Pure Front Page Hero View (for homepage /):
|
||||
// Matching User Reference Image: Image_homepage.jpg background with
|
||||
// White/Cream Gradient Overlay, Editorial Typography, and Telemetry Capsule
|
||||
// Matching User Specifications:
|
||||
// - Slightly dimmer background image (opacity-85 brightness-[0.88])
|
||||
// - Extended white/cream gradient to the right (~75% width)
|
||||
// - Perfect bottom fade (h-28 sm:h-36) seamlessly blending with content below
|
||||
// -------------------------------------------------------------
|
||||
return (
|
||||
<section className="relative min-h-[92vh] sm:min-h-screen flex items-center overflow-hidden bg-[#FAF8F5] pt-20 sm:pt-24 pb-14 sm:pb-20">
|
||||
{/* 1. Background Image with Responsive Ultra-Fast Loading */}
|
||||
<section id="hero-section" className="relative min-h-[92vh] sm:min-h-screen flex items-center overflow-hidden bg-[#FAF8F5] pt-20 sm:pt-24 pb-14 sm:pb-20">
|
||||
{/* 1. Background Image with Responsive Ultra-Fast Loading & Subtle Dimming */}
|
||||
<div className="absolute inset-0 z-0 overflow-hidden">
|
||||
<picture>
|
||||
<source media="(max-width: 768px)" srcSet="/management/pages/home/hero_mobile.webp" type="image/webp" />
|
||||
@@ -277,20 +279,22 @@ export function HeroSection({
|
||||
<img
|
||||
src="/management/pages/home/hero_desktop.jpg"
|
||||
alt="CRE AI Photo Magic"
|
||||
className="w-full h-full object-cover object-[75%_center] sm:object-right-top select-none pointer-events-none"
|
||||
className="w-full h-full object-cover object-[75%_center] sm:object-right-top select-none pointer-events-none opacity-72 brightness-[0.82] contrast-[0.98]"
|
||||
loading="eager"
|
||||
fetchPriority="high"
|
||||
decoding="async"
|
||||
/>
|
||||
</picture>
|
||||
{/* White / Cream Gradient Overlay: Restrained to left side so background artwork & glowing ribbons stay clearly visible */}
|
||||
<div className="absolute inset-0 bg-gradient-to-r from-[#FAF8F5]/90 via-[#FAF8F5]/40 via-30% to-transparent to-55% sm:via-30% sm:to-55% pointer-events-none" />
|
||||
{/* Soft Bottom Fade to Seamlessly Blend with Upcoming Scroll Content */}
|
||||
<div className="absolute inset-x-0 bottom-0 h-16 sm:h-20 bg-gradient-to-t from-[#FAF8F5] to-transparent pointer-events-none" />
|
||||
{/* White / Cream Gradient Overlay: Extended towards the right (~88%) for smooth, balanced contrast */}
|
||||
<div className="absolute inset-0 bg-gradient-to-r from-[#FAF8F5] from-30% via-[#FAF8F5]/90 via-55% via-[#FAF8F5]/50 via-75% to-transparent to-90% pointer-events-none" />
|
||||
{/* Mobile vertical soft overlay to keep text completely readable on small screens */}
|
||||
<div className="absolute inset-0 bg-gradient-to-b from-[#FAF8F5]/80 via-[#FAF8F5]/60 via-40% to-[#FAF8F5] sm:hidden pointer-events-none" />
|
||||
{/* Perfect Bottom Fade: Seamlessly blends with upcoming scroll content (#our-tools) */}
|
||||
<div className="absolute inset-x-0 bottom-0 h-44 sm:h-64 lg:h-80 bg-gradient-to-t from-[#FAF8F5] from-20% via-[#FAF8F5]/95 via-50% via-[#FAF8F5]/50 via-80% to-transparent pointer-events-none" />
|
||||
</div>
|
||||
|
||||
{/* Zero-Overhead Scroll Sentinel */}
|
||||
<div id="hero-sentinel" className="absolute bottom-28 left-0 w-full h-1 pointer-events-none opacity-0" aria-hidden="true" />
|
||||
{/* Hero End Sentinel for exact scroll position detection */}
|
||||
<div id="hero-end-sentinel" className="absolute bottom-0 left-0 w-full h-2 pointer-events-none opacity-0" aria-hidden="true" />
|
||||
|
||||
{/* 2. Left-Aligned Content Container */}
|
||||
<div className="relative z-10 max-w-[1640px] w-full mx-auto px-4 sm:px-8 lg:px-14 flex flex-col justify-center min-h-[90vh] sm:min-h-[92vh]">
|
||||
|
||||
Reference in New Issue
Block a user