{"version":3,"file":"PageEffects.CNGMrhrg.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/CxX771vNZD4MAAUN9dLU/lTg9aHCftPjdrZVCe2Fk/PageEffects.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * PageEffects - Invisible component that adds scroll-reveal animations\n * and hover effects to all sibling sections on the page.\n * Place as the SECOND child of a page (after Navigation).\n */export default function PageEffects({scrollReveal=true,hoverCards=true,hoverButtons=true,revealDistance=40,revealDuration=.7,staggerDelay=.08}){const ref=useRef(null);useEffect(()=>{if(!ref.current)return;const parent=ref.current.parentElement;if(!parent)return;const cleanups=[];// Normalize Framer preview/published viewport meta when it is forced to a\n// desktop width (e.g. width=1440). Otherwise narrow devices render as a\n// cropped desktop viewport. Leave the editor host untouched.\nif(typeof window!==\"undefined\"&&typeof document!==\"undefined\"){const host=window.location.hostname;const isEditorHost=host===\"framer.com\"||host.endsWith(\".framer.com\");if(!isEditorHost){const viewport=document.querySelector('meta[name=\"viewport\"]');if(viewport){const originalViewportContent=viewport.getAttribute(\"content\")??\"\";const hasFixedWidthViewport=/(?:^|,)\\s*width\\s*=\\s*\\d+/i.test(originalViewportContent);const hasDeviceWidthViewport=/width\\s*=\\s*device-width/i.test(originalViewportContent);if(hasFixedWidthViewport||!hasDeviceWidthViewport){viewport.setAttribute(\"content\",\"width=device-width, initial-scale=1, viewport-fit=cover\");cleanups.push(()=>{try{viewport.setAttribute(\"content\",originalViewportContent);}catch{}});}}}}const isTouchLike=typeof window!==\"undefined\"&&window.matchMedia(\"(hover: none), (pointer: coarse)\").matches;const isSmallViewport=typeof window!==\"undefined\"&&window.innerWidth<768;// --- Scroll Reveal Animations ---\nif(scrollReveal){const sections=Array.from(parent.children).filter(child=>child!==ref.current&&child instanceof HTMLElement&&child.offsetHeight>50);// Skip the first section (hero) - it should be visible immediately\nconst animatableSections=sections.slice(1);animatableSections.forEach((section,index)=>{section.style.opacity=\"0\";section.style.transform=`translateY(${revealDistance}px)`;section.style.transition=`opacity ${revealDuration}s cubic-bezier(0.25, 0.46, 0.45, 0.94) ${index*staggerDelay}s, transform ${revealDuration}s cubic-bezier(0.25, 0.46, 0.45, 0.94) ${index*staggerDelay}s`;section.style.willChange=\"opacity, transform\";});const observer=new IntersectionObserver(entries=>{startTransition(()=>{entries.forEach(entry=>{if(entry.isIntersecting){const el=entry.target;el.style.opacity=\"1\";el.style.transform=\"translateY(0)\";observer.unobserve(el);// Clean up will-change after animation\nsetTimeout(()=>{el.style.willChange=\"auto\";},(revealDuration+.5)*1e3);}});});},{threshold:.08,rootMargin:isSmallViewport?\"0px 0px -24px 0px\":\"0px 0px -60px 0px\"});animatableSections.forEach(section=>observer.observe(section));cleanups.push(()=>observer.disconnect());}// --- Hover Effects for Cards ---\nif(hoverCards&&!isTouchLike&&!isSmallViewport){const cards=parent.querySelectorAll('[style*=\"border-radius\"][style*=\"background\"]');cards.forEach(card=>{const rect=card.getBoundingClientRect();// Only target card-sized elements (not tiny icons or huge sections)\nif(rect.width<100||rect.width>800||rect.height<80)return;// Skip if it's a top-level section\nif(card.parentElement===parent)return;const originalTransform=card.style.transform||\"\";const originalTransition=card.style.transition||\"\";const originalBoxShadow=card.style.boxShadow||\"\";const onEnter=()=>{card.style.transition=\"transform 0.3s ease, box-shadow 0.3s ease\";card.style.transform=`${originalTransform} translateY(-4px) scale(1.02)`.trim();card.style.boxShadow=\"0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.1)\";};const onLeave=()=>{card.style.transition=\"transform 0.3s ease, box-shadow 0.3s ease\";card.style.transform=originalTransform||\"none\";card.style.boxShadow=originalBoxShadow||\"none\";};card.addEventListener(\"mouseenter\",onEnter);card.addEventListener(\"mouseleave\",onLeave);cleanups.push(()=>{card.removeEventListener(\"mouseenter\",onEnter);card.removeEventListener(\"mouseleave\",onLeave);card.style.transform=originalTransform;card.style.transition=originalTransition;card.style.boxShadow=originalBoxShadow;});});}// --- Hover Effects for Buttons ---\nif(hoverButtons&&!isTouchLike&&!isSmallViewport){const allLinks=parent.querySelectorAll(\"a, [data-framer-component-type]\");const buttons=[];// Find button-like elements by checking styles\nparent.querySelectorAll(\"*\").forEach(el=>{const style=getComputedStyle(el);const bg=style.backgroundColor;const isLink=el.closest(\"a\")!==null||el.hasAttribute(\"data-framer-name\");const isSmall=el.offsetWidth<300&&el.offsetHeight<80;const hasRoundedCorners=parseFloat(style.borderRadius)>=4;const hasBg=bg&&bg!==\"rgba(0, 0, 0, 0)\"&&bg!==\"transparent\";if(isLink&&isSmall&&hasRoundedCorners&&hasBg&&el.offsetHeight>20){// Check it's not already a card\nif(el.offsetWidth<400&&el.offsetHeight<60){buttons.push(el);}}});buttons.forEach(btn=>{const originalTransform=btn.style.transform||\"\";const originalTransition=btn.style.transition||\"\";const originalBoxShadow=btn.style.boxShadow||\"\";const onEnter=()=>{btn.style.transition=\"transform 0.2s ease, box-shadow 0.2s ease\";btn.style.transform=`${originalTransform} scale(1.05)`.trim();btn.style.boxShadow=\"0 0 20px rgba(59, 130, 246, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2)\";};const onLeave=()=>{btn.style.transition=\"transform 0.2s ease, box-shadow 0.2s ease\";btn.style.transform=originalTransform||\"none\";btn.style.boxShadow=originalBoxShadow||\"none\";};const onDown=()=>{btn.style.transform=`${originalTransform} scale(0.97)`.trim();};const onUp=()=>{btn.style.transform=`${originalTransform} scale(1.05)`.trim();};btn.addEventListener(\"mouseenter\",onEnter);btn.addEventListener(\"mouseleave\",onLeave);btn.addEventListener(\"mousedown\",onDown);btn.addEventListener(\"mouseup\",onUp);cleanups.push(()=>{btn.removeEventListener(\"mouseenter\",onEnter);btn.removeEventListener(\"mouseleave\",onLeave);btn.removeEventListener(\"mousedown\",onDown);btn.removeEventListener(\"mouseup\",onUp);btn.style.transform=originalTransform;btn.style.transition=originalTransition;btn.style.boxShadow=originalBoxShadow;});});}return()=>{cleanups.forEach(fn=>fn());};},[scrollReveal,hoverCards,hoverButtons,revealDistance,revealDuration,staggerDelay]);// Render as invisible element\nreturn /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{position:\"absolute\",width:0,height:0,overflow:\"hidden\",pointerEvents:\"none\"}});}addPropertyControls(PageEffects,{scrollReveal:{type:ControlType.Boolean,title:\"Scroll Reveal\",defaultValue:true},hoverCards:{type:ControlType.Boolean,title:\"Card Hover\",defaultValue:true},hoverButtons:{type:ControlType.Boolean,title:\"Button Hover\",defaultValue:true},revealDistance:{type:ControlType.Number,title:\"Reveal Distance\",defaultValue:40,min:10,max:100,step:5},revealDuration:{type:ControlType.Number,title:\"Reveal Duration\",defaultValue:.7,min:.2,max:2,step:.1},staggerDelay:{type:ControlType.Number,title:\"Stagger Delay\",defaultValue:.08,min:0,max:.3,step:.02}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PageEffects\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PageEffects.map"],"mappings":"sMAIG,SAAwB,EAAY,CAAC,eAAa,GAAK,aAAW,GAAK,eAAa,GAAK,iBAAe,GAAG,iBAAe,GAAG,eAAa,KAAK,CAAC,IAAM,EAAIA,EAAO,IAAI,EAaxK,OAb0K,MAAc,CAAC,GAAG,CAAC,EAAI,QAAQ,OAAO,IAAM,EAAO,EAAI,QAAQ,cAAc,GAAG,CAAC,EAAO,OAAO,IAAM,EAAS,CAAC,EAGzR,GAAU,IAAS,QAAa,OAAO,SAAW,IAAY,CAAC,IAAM,EAAK,EAAO,SAAS,SAA8E,GAAG,EAArD,IAAO,cAAc,EAAK,SAAS,aAAa,GAAmB,CAAC,IAAM,EAAS,SAAS,cAAc,uBAAuB,EAAE,GAAG,EAAS,CAAC,IAAM,EAAwB,EAAS,aAAa,SAAS,GAAG,GAAS,EAAsB,6BAA6B,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