(()=>{let r,e=[];function t(){return gsap.utils.toArray(".scroll-story-block")}function a(r){return gsap.utils.toArray(r.querySelectorAll(".narrative-card"))}function n(){e.forEach(r=>r.kill()),e=[],gsap.utils.toArray(".scroll-story-block .narrative-card").forEach(r=>{gsap.set(r,{clearProps:"all"})})}function o(){window.innerWidth<768?n():0===e.length?(n(),t().forEach(r=>{!function(r){const t=a(r);if(0===t.length)return;let n=ScrollTrigger.create({trigger:t[0],start:"top 10%"});e.push(n);let o=ScrollTrigger.create({trigger:t[t.length-1],start:"top 10%"});e.push(o),t.forEach((r,a)=>{var n=1-.025*(t.length-a);let i=gsap.to(r,{scale:n}),l=ScrollTrigger.create({trigger:r,start:"top 10%",end:()=>o.start+0,pin:!0,pinSpacing:!1,ease:"none",animation:i,toggleActions:"restart none none reverse"});e.push(l)})}(r)}),ScrollTrigger.refresh()):ScrollTrigger.refresh()}t().forEach(r=>{a(r).forEach((r,e)=>{r.classList.remove("narrative-card--even","narrative-card--odd"),e%2==0?r.classList.add("narrative-card--even"):r.classList.add("narrative-card--odd")})}),o(),window.addEventListener("load",()=>{window.innerWidth>=768&&e.length>0&&ScrollTrigger.refresh()}),window.addEventListener("resize",()=>{clearTimeout(r),r=setTimeout(()=>{o()},250)})})();