Header condense on scroll

A sticky header's title shrinks and a shadow fades in during the first 80px of scrolling.

ScrollScroll progress CSS scroll-timeline scroll-progress-based Targets: Web · App Chrome/Edge 115+, Safari 26+, Firefox behind flag; fallback everywhere
Settings
Scroll inside the frame ↕
Target
Implement the "Header condense on scroll" effect in vanilla HTML/CSS/JS.

Context: A sticky header's title shrinks and a shadow fades in during the first 80px of scrolling.
Trigger: the page scrolls; progress is bound to scroll position, not time.
Timeline: scroll-progress-based (map scroll position to animation progress; no fixed duration).

Motion tokens (normal):
- scale (title): 1 → 0.8
- opacity (shadow layer): 0 → 1
- scroll range: 0px → 80px of scroll
- easing: linear
- note: title transform-origin left center

Motion tokens (prefers-reduced-motion):
- opacity (shadow layer): 0 → 1
- scroll range: 0px → 80px
- easing: linear

Technique: prefer CSS `animation-timeline: scroll()/view()` inside `@supports (animation-timeline: scroll())`, with a JS fallback.

Acceptance:
- animate only transform and opacity unless the spec lists other properties
- no layout shift; content is visible without the animation
- when prefers-reduced-motion is set, use the reduced tokens only
- header height never changes; only the title transform and a shadow overlay animate
- fully reversible when scrolling back to top

Generated from the spec. Prompts differ by target name only; the tokens are the source of truth.