Bet you did not know this: scroll is not an excluding input for CLS. There is no 500ms grace period. Every layout shift during a scroll counts.
That hide-on-scroll header animating top? New layout shift on every frame. Every scroll direction change.
Fix: replace top with transform: translateY(). Compositor only. Zero shifts.
Lighthouse will never catch this. It does not scroll.
https://corewebvitals.io/pagespeed/scroll-triggered-animations-cause-cls








