Skip to content

Commit 45a59c7

Browse files
committed
Header starts invisible on home; emerges as the hero scrolls
Previously the header strip was always visible: opaque bg, blur, brand wordmark — even at scroll 0 when the hero was dominant. The two competed for attention. Now the header strip is invisible to start (opacity 0, transparent bg) on pages with a hero, and emerges over the same scroll range the hero is collapsing through. Header now has its own scroll-driven emergence (replaces header-solidify): header-emerge 40-240px opacity 0→1, background rgba(0.0)→rgba(0.95), box-shadow none→0 1px 8px (subtle weight) brand-focus 80-240px filter blur(4px)→0, transform scale(0.88)→1 (no opacity; inherits from header) Brand-reveal renamed to brand-focus since it no longer touches opacity. Header-solidify removed; merged into header-emerge. Non-home pages (no .hero) keep the header visible from the start — body:has(.hero) scopes the invisible-by-default rule. Older browsers without @supports (animation-timeline:scroll()) see the header visible by default; reduced-motion users likewise.
1 parent c637590 commit 45a59c7

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
.hero { animation: hero-fade linear forwards; animation-timeline: scroll(root); animation-range: 0 280px; }
3737
.hero h1 { animation: hero-h1-morph linear forwards; animation-timeline: scroll(root); animation-range: 0 240px; }
3838
.hero p { animation: hero-p-fade linear forwards; animation-timeline: scroll(root); animation-range: 0 140px; }
39-
body:has(.hero) header .brand { opacity: 0; filter: blur(4px); transform: scale(0.88); animation: brand-reveal linear forwards; animation-timeline: scroll(root); animation-range: 80px 240px; }
40-
header { animation: header-solidify linear forwards; animation-timeline: scroll(root); animation-range: 0 240px; }
39+
body:has(.hero) header { opacity: 0; background: rgba(245, 241, 235, 0); box-shadow: none; animation: header-emerge linear forwards; animation-timeline: scroll(root); animation-range: 40px 240px; }
40+
body:has(.hero) header .brand { filter: blur(4px); transform: scale(0.88); animation: brand-focus linear forwards; animation-timeline: scroll(root); animation-range: 80px 240px; }
4141
}
4242
}
4343
@keyframes hero-fade {
@@ -49,11 +49,11 @@
4949
@keyframes hero-p-fade {
5050
to { opacity: 0; transform: translateY(-4px); }
5151
}
52-
@keyframes brand-reveal {
53-
to { opacity: 1; filter: blur(0); transform: scale(1); }
52+
@keyframes brand-focus {
53+
to { filter: blur(0); transform: scale(1); }
5454
}
55-
@keyframes header-solidify {
56-
to { background: rgba(245, 241, 235, 0.95); box-shadow: 0 1px 8px rgba(82, 16, 0, 0.06); }
55+
@keyframes header-emerge {
56+
to { opacity: 1; background: rgba(245, 241, 235, 0.95); box-shadow: 0 1px 8px rgba(82, 16, 0, 0.06); }
5757
}
5858
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--space-3); }
5959
.card { display: block; min-height: 10rem; border: 1px solid var(--hairline); border-radius: .75rem; padding: var(--space-3); background: var(--surface-2); color: inherit; text-decoration: none; box-shadow: 0 1px 3px rgba(82, 16, 0, 0.04), 0 4px 12px rgba(82, 16, 0, 0.02); transition-property: transform, background-color, border-color; transition-duration: 200ms; transition-timing-function: cubic-bezier(0, 0, 0.2, 1); }

public/site.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
.hero { animation: hero-fade linear forwards; animation-timeline: scroll(root); animation-range: 0 280px; }
3737
.hero h1 { animation: hero-h1-morph linear forwards; animation-timeline: scroll(root); animation-range: 0 240px; }
3838
.hero p { animation: hero-p-fade linear forwards; animation-timeline: scroll(root); animation-range: 0 140px; }
39-
body:has(.hero) header .brand { opacity: 0; filter: blur(4px); transform: scale(0.88); animation: brand-reveal linear forwards; animation-timeline: scroll(root); animation-range: 80px 240px; }
40-
header { animation: header-solidify linear forwards; animation-timeline: scroll(root); animation-range: 0 240px; }
39+
body:has(.hero) header { opacity: 0; background: rgba(245, 241, 235, 0); box-shadow: none; animation: header-emerge linear forwards; animation-timeline: scroll(root); animation-range: 40px 240px; }
40+
body:has(.hero) header .brand { filter: blur(4px); transform: scale(0.88); animation: brand-focus linear forwards; animation-timeline: scroll(root); animation-range: 80px 240px; }
4141
}
4242
}
4343
@keyframes hero-fade {
@@ -49,11 +49,11 @@
4949
@keyframes hero-p-fade {
5050
to { opacity: 0; transform: translateY(-4px); }
5151
}
52-
@keyframes brand-reveal {
53-
to { opacity: 1; filter: blur(0); transform: scale(1); }
52+
@keyframes brand-focus {
53+
to { filter: blur(0); transform: scale(1); }
5454
}
55-
@keyframes header-solidify {
56-
to { background: rgba(245, 241, 235, 0.95); box-shadow: 0 1px 8px rgba(82, 16, 0, 0.06); }
55+
@keyframes header-emerge {
56+
to { opacity: 1; background: rgba(245, 241, 235, 0.95); box-shadow: 0 1px 8px rgba(82, 16, 0, 0.06); }
5757
}
5858
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--space-3); }
5959
.card { display: block; min-height: 10rem; border: 1px solid var(--hairline); border-radius: .75rem; padding: var(--space-3); background: var(--surface-2); color: inherit; text-decoration: none; box-shadow: 0 1px 3px rgba(82, 16, 0, 0.04), 0 4px 12px rgba(82, 16, 0, 0.02); transition-property: transform, background-color, border-color; transition-duration: 200ms; transition-timing-function: cubic-bezier(0, 0, 0.2, 1); }

src/asset_manifest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Generated by scripts/fingerprint_assets.py. Do not edit by hand.
2-
ASSET_PATHS = {'SITE_CSS': '/site.b7913985255d.css', 'SYNTAX_JS': '/syntax-highlight.3b6c7f730d46.js', 'EDITOR_JS': '/editor.dd81f5171b14.js'}
3-
HTML_CACHE_VERSION = '801d4d11e527'
2+
ASSET_PATHS = {'SITE_CSS': '/site.b5d5cf89f344.css', 'SYNTAX_JS': '/syntax-highlight.3b6c7f730d46.js', 'EDITOR_JS': '/editor.dd81f5171b14.js'}
3+
HTML_CACHE_VERSION = '0476ea74e5b1'

0 commit comments

Comments
 (0)