{"version":3,"file":"Responsive.DBNPZLUC.mjs","names":["useState","useEffect","forwardRef","_jsx","useRef","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","_e","c","J","ce","de","useViewportWidth","w","setW","m","withTightPadding","Component","props","ref","style","rest","pad","useStack","top","outer","box","raf","off","tick","el","parent","r","natural","target","pr","last","lastH","LAST_TOP","next","n","withStackCard1","withStackCard2","withStackCard3","init_Responsive","init_jsx_runtime"],"sources":["https:/framerusercontent.com/modules/Jm86b0HO0H1n07pAajwk/pAbNXFPncny2iJuvKhT0/Responsive.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef,useState}from\"react\";// Responsive helpers for tablet and phone. They change nothing at 1440px and wider (desktop),\n// so they are safe on layers shared by every breakpoint, like the inside of a component.\nfunction useViewportWidth(){const[w,setW]=useState(0);useEffect(()=>{if(typeof window===\"undefined\")return;const m=()=>setW(window.innerWidth);m();window.addEventListener(\"resize\",m);return()=>window.removeEventListener(\"resize\",m);},[]);return w;}// Boxed panels with big desktop padding: smaller padding on tablet, much smaller on phone,\n// so the content inside gets the width instead of the padding.\nexport function withTightPadding(Component){return /*#__PURE__*/forwardRef(function TightPadding(props,ref){const{style,...rest}=props;const w=useViewportWidth();const pad=w&&w<810?\"24px 18px 24px 18px\":w&&w<1440?\"40px 44px 40px 44px\":null;return /*#__PURE__*/_jsx(Component,{...rest,ref:ref,style:pad?{...style,padding:pad}:style});});}// Phone only (below 810px): cards that stack while you scroll. Each card pins at its own top offset,\n// so the earlier cards' headers stay visible above it, and the whole stack leaves with its section.\n// Does nothing on tablet and desktop.\nconst LAST_TOP=92;function useStack(top,outer){const box=useRef(null);useEffect(()=>{if(typeof window===\"undefined\")return;let raf=0,off=0;const tick=()=>{const el=box.current;if(el){if(window.innerWidth>=810){if(off){off=0;el.style.transform=\"\";}}else{const parent=el.parentElement;const r=el.getBoundingClientRect();const natural=r.top-off;// The stack leaves together: every card lets go when the last card reaches the section's end\nlet target=top;if(parent){const pr=parent.getBoundingClientRect();const last=parent.lastElementChild;const lastH=last?last.getBoundingClientRect().height:r.height;target=Math.min(top,pr.bottom-lastH-(LAST_TOP-top));}const next=Math.max(0,target-natural);if(Math.abs(next-off)>.5){off=next;el.style.transform=off?\"translate3d(0,\"+off+\"px,0)\":\"\";}}}raf=requestAnimationFrame(tick);};raf=requestAnimationFrame(tick);return()=>cancelAnimationFrame(raf);},[]);return n=>{box.current=n;if(typeof outer===\"function\")outer(n);else if(outer)outer.current=n;};}export function withStackCard1(Component){return /*#__PURE__*/forwardRef(function StackCard1(props,ref){const r=useStack(64,ref);return /*#__PURE__*/_jsx(Component,{...props,ref:r});});}export function withStackCard2(Component){return /*#__PURE__*/forwardRef(function StackCard2(props,ref){const r=useStack(78,ref);return /*#__PURE__*/_jsx(Component,{...props,ref:r});});}export function withStackCard3(Component){return /*#__PURE__*/forwardRef(function StackCard3(props,ref){const r=useStack(92,ref);return /*#__PURE__*/_jsx(Component,{...props,ref:r});});}// Phone only: the section label above a card stack. It pins above the cards and changes to the label\n// of whichever card is on top (\"01 / The problem\" → \"Where the team was\" → \"What I did\").\nconst STACK_LABELS={\"01 / The problem\":[\"01 / The problem\",\"Where the team was\",\"What I did\"]};const CARD_TOPS=[64,78,92];export function withStackLabel(Component){return /*#__PURE__*/forwardRef(function StackLabel(props,ref){const pin=useStack(20,ref);const own=useRef(null);const setRef=n=>{own.current=n;pin(n);};useEffect(()=>{if(typeof window===\"undefined\")return;let raf=0,shown=-1,labels=null,textEl=null;const tick=()=>{const el=own.current;if(el&&window.innerWidth<810){if(!textEl){textEl=el.querySelector(\"p, h1, h2, h3, h4, h5, h6\");const t=(textEl?.textContent||\"\").trim();labels=STACK_LABELS[t]||null;}if(textEl&&labels&&el.parentElement){const cards=Array.from(el.parentElement.children).filter(c=>c!==el);let active=0;cards.forEach((c,i)=>{if(i>0&&c.getBoundingClientRect().top<=(CARD_TOPS[i]??92)+2)active=i;});if(active!==shown){shown=active;textEl.textContent=labels[active]||labels[0];}}}raf=requestAnimationFrame(tick);};raf=requestAnimationFrame(tick);return()=>cancelAnimationFrame(raf);},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:setRef});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withStackCard3\":{\"type\":\"reactHoc\",\"name\":\"withStackCard3\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTightPadding\":{\"type\":\"reactHoc\",\"name\":\"withTightPadding\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStackLabel\":{\"type\":\"reactHoc\",\"name\":\"withStackLabel\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStackCard1\":{\"type\":\"reactHoc\",\"name\":\"withStackCard1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStackCard2\":{\"type\":\"reactHoc\",\"name\":\"withStackCard2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Responsive.map"],"mappings":"A,gJAEA,SAASc,GAAkB,CAAC,GAAK,CAACC,EAAEC,GAAMhB,EAAS,CAAC,EAA0L,OAAxLC,MAAc,CAAC,GAAUO,IAAS,OAAY,OAAO,IAAMS,MAAMD,EAAKR,EAAO,UAAU,EAA0C,OAAxCS,EAAE,EAAET,EAAO,iBAAiB,SAASS,CAAC,MAAYT,EAAO,oBAAoB,SAASS,CAAC,CAAE,EAAE,CAAC,CAAC,EAASF,CAAE,CAEvP,SAAgBG,EAAiBC,EAAU,CAAC,MAAoBjB,gBAAW,SAAsBkB,EAAMC,EAAI,CAAC,GAAK,CAACC,QAAM,GAAGC,GAAMH,EAAYL,EAAED,EAAiB,EAAQU,EAAIT,GAAGA,EAAE,IAAI,sBAAsBA,GAAGA,EAAE,KAAK,sBAAsB,KAAK,MAAoBZ,gBAAKgB,EAAU,CAAC,GAAGI,EAASF,MAAI,MAAMG,EAAI,CAAC,GAAGF,EAAM,QAAQE,CAAG,EAAEF,CAAK,CAAC,CAAE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