{"version":3,"file":"PageMotion.DA1-wfU2.mjs","names":[],"sources":["https:/framerusercontent.com/modules/QkFvArhBn3qPHoCm9OlN/o7UCRtlrCaxnHBSASXWQ/PageMotion.js"],"sourcesContent":["// User request (home page): the page feels static — add movement to elements on scroll / trigger.\n// Invisible helper: on the live site it reveals section content as it scrolls into view (staggered fade-up),\n// adds gentle parallax to large images, a hover lift to cards, and nudges \"Learn ›\" arrows on hover. Skips navigation/footer, does nothing on\n// the Framer canvas, and respects \"reduce motion\". Drop one instance on any page to enable it.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";const STYLE_ID=\"edstory-page-motion\";/**\n * Page Motion\n *\n * @framerIntrinsicWidth 40\n * @framerIntrinsicHeight 40\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function PageMotion(props){const{reveal=true,distance=40,duration=.8,stagger=.08,parallax=true,parallaxAmount=40,cardHover=true,arrowHover=true}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;useEffect(()=>{if(typeof window===\"undefined\"||isCanvas)return;if(window.matchMedia&&window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches)return;const css=`\n[data-em=\"hidden\"]{opacity:0;translate:0 ${distance}px;}\n[data-em]{transition:opacity ${duration}s cubic-bezier(.22,1,.36,1), translate ${duration}s cubic-bezier(.22,1,.36,1);}\n[data-em=\"in\"]{opacity:1;translate:0 0;}\n${cardHover?`[data-em-card]{transition:opacity ${duration}s cubic-bezier(.22,1,.36,1), translate .35s cubic-bezier(.22,1,.36,1), box-shadow .35s ease !important;}\n[data-em-card]:hover{translate:0 -6px !important;box-shadow:0 18px 40px -18px rgba(3,3,13,.25);}`:\"\"}\n${arrowHover?`:is([data-framer-name=\"Chevron Right\"],[data-framer-name=\"ChevronRight\"]){transition:translate .3s cubic-bezier(.22,1,.36,1);}\n:is(a,[data-framer-name=\"Button\"],[data-framer-name=\"Link\"],[data-em-card]):hover :is([data-framer-name=\"Chevron Right\"],[data-framer-name=\"ChevronRight\"]){translate:4px 0;}`:\"\"}\n`;let styleEl=document.getElementById(STYLE_ID);if(!styleEl){styleEl=document.createElement(\"style\");styleEl.id=STYLE_ID;document.head.appendChild(styleEl);}styleEl.textContent=css;const excluded=el=>!!el.closest('[data-framer-name=\"Navigation\"], [data-framer-name=\"Footer\"], nav, footer');// Reveal targets: direct children of every section \"Container\", plus cards.\nconst targets=[];if(reveal){document.querySelectorAll('[data-framer-name=\"Container\"]').forEach(container=>{if(excluded(container))return;Array.from(container.children).forEach((child,i)=>{const el=child;if(el.dataset.em)return;el.dataset.em=\"hidden\";el.style.transitionDelay=`${i*stagger}s`;targets.push(el);});});document.querySelectorAll('[data-framer-name=\"Card\"]').forEach(card=>{if(excluded(card)||card.dataset.em)return;const siblings=card.parentElement?Array.from(card.parentElement.children):[];card.dataset.em=\"hidden\";card.style.transitionDelay=`${Math.max(0,siblings.indexOf(card))*stagger}s`;targets.push(card);});}if(cardHover){document.querySelectorAll('[data-framer-name=\"Card\"]').forEach(card=>{if(!excluded(card))card.setAttribute(\"data-em-card\",\"\");});}const io=new IntersectionObserver(entries=>{entries.forEach(e=>{if(e.isIntersecting){const el=e.target;el.dataset.em=\"in\";io.unobserve(el);// clear the stagger delay after the reveal so hover feels instant\nwindow.setTimeout(()=>el.style.transitionDelay=\"\",(duration+1)*1e3);}});},{rootMargin:\"0px 0px -10% 0px\",threshold:.05});targets.forEach(t=>io.observe(t));// Parallax on large images\nlet raf=0;const images=parallax?Array.from(document.querySelectorAll('[data-framer-name=\"Placeholder Image\"], [data-framer-name=\"Image\"]')).filter(img=>!excluded(img)&&!img.closest('[data-framer-name=\"Card\"]')&&img.getBoundingClientRect().height>=360):[];images.forEach(img=>{img.style.willChange=\"translate\";});const onScroll=()=>{if(raf)return;raf=window.requestAnimationFrame(()=>{raf=0;const vh=window.innerHeight;images.forEach(img=>{const r=img.getBoundingClientRect();if(r.bottom<-200||r.top>vh+200)return;const progress=(r.top+r.height/2-vh/2)/vh// -1..1 around centre\n;img.style.translate=`0 ${(-progress*parallaxAmount).toFixed(1)}px`;});});};if(images.length){window.addEventListener(\"scroll\",onScroll,{passive:true});onScroll();}return()=>{io.disconnect();window.removeEventListener(\"scroll\",onScroll);if(raf)window.cancelAnimationFrame(raf);};},[isCanvas,reveal,distance,duration,stagger,parallax,parallaxAmount,cardHover,arrowHover]);if(isCanvas){return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,width:\"100%\",height:\"100%\",borderRadius:8,background:\"rgba(233, 76, 38, 0.12)\",border:\"1px dashed #E94C26\",color:\"#E94C26\",fontSize:10,fontFamily:\"sans-serif\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",textAlign:\"center\"},children:\"Motion\"});}return null;}addPropertyControls(PageMotion,{reveal:{type:ControlType.Boolean,title:\"Scroll reveal\",defaultValue:true},distance:{type:ControlType.Number,title:\"Distance\",defaultValue:40,min:0,max:120,unit:\"px\",hidden:p=>!p.reveal},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:.8,min:.2,max:2,step:.1,unit:\"s\",hidden:p=>!p.reveal},stagger:{type:ControlType.Number,title:\"Stagger\",defaultValue:.08,min:0,max:.4,step:.02,unit:\"s\",hidden:p=>!p.reveal},parallax:{type:ControlType.Boolean,title:\"Image parallax\",defaultValue:true},parallaxAmount:{type:ControlType.Number,title:\"Parallax\",defaultValue:40,min:0,max:120,unit:\"px\",hidden:p=>!p.parallax},cardHover:{type:ControlType.Boolean,title:\"Card hover lift\",defaultValue:true},arrowHover:{type:ControlType.Boolean,title:\"Arrow nudge\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PageMotion\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"40\",\"framerIntrinsicHeight\":\"40\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"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