@@ -252,26 +252,29 @@ revealTargets.forEach((el) => {
252252 el . setAttribute ( 'data-reveal' , '' ) ;
253253} ) ;
254254
255- /* Stagger grid children so they reveal in a cascade, not a slab. */
255+ /* Stagger grid children so they reveal in a cascade, not a slab.
256+ Delays deliberately shallow and capped at item #5 so large grids don't
257+ take a full second before the last card appears — the user was
258+ previously waiting ~880ms for an 8-card grid to finish. */
256259document . querySelectorAll ( '.grid' ) . forEach ( ( grid ) => {
257260 Array . from ( grid . children ) . forEach ( ( child , i ) => {
258261 if ( child . hasAttribute ( 'data-reveal' ) ) {
259- child . style . setProperty ( '--reveal-delay' , `${ Math . min ( i , 8 ) * 110 } ms` ) ;
262+ child . style . setProperty ( '--reveal-delay' , `${ Math . min ( i , 5 ) * 40 } ms` ) ;
260263 }
261264 } ) ;
262265} ) ;
263266document . querySelectorAll ( '.bars' ) . forEach ( ( bars ) => {
264267 Array . from ( bars . children ) . forEach ( ( row , i ) => {
265268 if ( row . hasAttribute ( 'data-reveal' ) ) {
266- row . style . setProperty ( '--reveal-delay' , `${ Math . min ( i , 8 ) * 90 } ms` ) ;
269+ row . style . setProperty ( '--reveal-delay' , `${ Math . min ( i , 5 ) * 30 } ms` ) ;
267270 }
268271 } ) ;
269272} ) ;
270273/* Hero stats always cascade even though they're above the fold. */
271274document . querySelectorAll ( '.hero-stats' ) . forEach ( ( row ) => {
272275 Array . from ( row . children ) . forEach ( ( stat , i ) => {
273276 if ( stat . hasAttribute ( 'data-reveal' ) ) {
274- stat . style . setProperty ( '--reveal-delay' , `${ i * 120 } ms` ) ;
277+ stat . style . setProperty ( '--reveal-delay' , `${ i * 50 } ms` ) ;
275278 }
276279 } ) ;
277280} ) ;
@@ -285,7 +288,11 @@ if ('IntersectionObserver' in window && revealTargets.length) {
285288 revealIO . unobserve ( entry . target ) ;
286289 }
287290 } ,
288- { threshold : 0.12 , rootMargin : '0px 0px -8% 0px' } ,
291+ // Trigger earlier: fire as soon as any pixel enters the viewport,
292+ // and pre-reveal a band above the fold (240px) so elements finish
293+ // animating right as the user scrolls them into view instead of
294+ // starting the animation only once they're already on screen.
295+ { threshold : 0 , rootMargin : '0px 0px 240px 0px' } ,
289296 ) ;
290297 revealTargets . forEach ( ( el ) => revealIO . observe ( el ) ) ;
291298} else {
0 commit comments