Scroll text highlight

Words of a paragraph brighten one after another as the reader scrolls, like a highlighter following the eye.

ScrollScroll progress CSS scroll-timelineGSAP scroll-progress-based Targets: Web Chrome/Edge 115+, Safari 26+, Firefox behind flag; JS fallback included

Good motion explains what just happened, where things came from and where they went. It is a specification, not decoration, and every value in it should be a decision you can name.

Scroll inside the frame ↕
Target
Implement the "Scroll text highlight" effect in vanilla HTML/CSS/JS.

Context: Words of a paragraph brighten one after another as the reader scrolls, like a highlighter following the eye.
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):
- opacity (each word): 0.25 → 1
- scroll range: cover 15% (paragraph) → cover 65%
- easing: linear
- stagger: per word, evenly across the range

Motion tokens (prefers-reduced-motion):
- opacity (whole paragraph): 0.25 → 1
- scroll range: cover 15% → cover 65%
- easing: linear
- note: no per-word stagger

Technique: prefer CSS `animation-timeline: scroll()/view()` inside `@supports (animation-timeline: scroll())`, with a JS fallback; GSAP (ScrollTrigger where relevant) is acceptable as an alternative.

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
- split words with inline spans; keep the text selectable and readable at opacity 0.25
- animate opacity only, never color (keeps it off the main thread)

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