Intersection Observer reports when a target crosses intersection thresholds relative to a root. It avoids measuring element positions on every scroll event.
In the demo a card moves through an observation window, updating its ratio and state. Callbacks are asynchronous, so it is not for pixel-perfect scroll synchronization.
When to use
Use it for lazy images or animations triggered when content enters view.