{"version":3,"file":"SectionOpener.CmO2HmLz.mjs","names":["useRef","useState","__esmMin","init_ssg_sandbox_shims","te","window","_e","de","p","c","init_jsx_runtime","init_npm_react_18_3_1","ce","addPropertyControls","useIsStaticRenderer","ControlType","init_framer_BisrWwwE","SectionOpener","props","ref","isStatic","shown","setShown","el","raf","observer","stopped","reveal","stop","check","entry","entries","visible","num","title","style","FONTS","SYNCRO","main","sub","init_SectionOpener"],"sources":["https:/framerusercontent.com/modules/9D46BAt4yNDF9rChSqMZ/U72hAHKSu98smdvuxVtQ/SectionOpener.js"],"sourcesContent":["// Big section openers for incahoots.marketing (7 Oct 2026).\n//\n// Caitlin: \"the section headings need to be bigger, because when you scroll you\n// don't know where you are\". Each section now opens with a small Karla number,\n// a big Otto title and an optional Syncro line, centred. Signed off from the\n// local mock (.preview/site-mock in the studio repo).\n//\n// HerePill.tsx reads the data-opener-* attributes below to show the\n// \"where you are\" label, so keep them if this file changes.\n//\n// Otto is loaded here from assets.incahoots.marketing (CORS *) under its own\n// family name, so the title never depends on what the page has loaded.\n// Title size uses cqw (the opener's own width), not vw: on Framer's canvas the\n// viewport is not the breakpoint width.\n//\n// The fade-up is driven by a scroll check, not an IntersectionObserver alone:\n// Framer's preview does not always fire in-view events (see Animations.tsx),\n// and an observer on a clipped element never fires at all, which is what left\n// the case study type labels invisible on the live site until 7 Oct.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";const FONTS=`@font-face{font-family:\"IC Otto\";src:url(https://framerusercontent.com/assets/Eau568x5qTbKoxL4ds7qNYy6ROE.woff2) format(\"woff2\");font-weight:300;font-display:swap}`;const KARLA='Karla, \"Karla Placeholder\", sans-serif';const SYNCRO='\"Syncro Book\", \"Syncro Book Placeholder\", serif';/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n */export default function SectionOpener(props){const{num=\"01\",title=\"Work\",main=false,sub=\"\",color=\"rgb(17, 17, 18)\",paddingTop=40,paddingBottom=72,style}=props;const ref=useRef(null);const isStatic=useIsStaticRenderer();const[shown,setShown]=useState(false);useEffect(()=>{const el=ref.current;if(!el||isStatic)return;if(typeof window===\"undefined\"||typeof document===\"undefined\")return;if(window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches){startTransition(()=>setShown(true));return;}let raf=0;let observer=null;let stopped=false;const reveal=()=>{if(stopped)return;stopped=true;startTransition(()=>setShown(true));stop();};const check=()=>{if(el.getBoundingClientRect().top<window.innerHeight*.88){reveal();}};const stop=()=>{document.removeEventListener(\"scroll\",check,{capture:true});window.removeEventListener(\"resize\",check);if(observer)observer.disconnect();if(raf)window.cancelAnimationFrame(raf);};if(\"IntersectionObserver\"in window){observer=new IntersectionObserver(entries=>{for(const entry of entries){if(entry.isIntersecting){reveal();break;}}},{threshold:.12});observer.observe(el);}document.addEventListener(\"scroll\",check,{passive:true,capture:true});window.addEventListener(\"resize\",check);check();raf=window.requestAnimationFrame(check);return stop;},[isStatic]);const visible=isStatic||shown;return /*#__PURE__*/_jsxs(\"div\",{ref:ref,className:\"ic-opener\",\"data-opener-num\":num,\"data-opener-name\":title,style:{width:\"100%\",...{containerType:\"inline-size\"},textAlign:\"left\",color,paddingTop,paddingBottom,opacity:visible?1:0,transform:visible?\"none\":\"translateY(28px)\",transition:\"opacity .9s ease, transform .9s ease\",...style},children:[/*#__PURE__*/_jsx(\"style\",{children:`${FONTS}\n                .ic-opener :is(h1,h2){margin:0;font:300 clamp(46px,6.4cqw,92px)/.95 \"ABC Otto Light\",\"IC Otto\",serif;letter-spacing:-.035em}\n                .ic-opener p{margin:18px 0 0;max-width:620px;font:400 20px/1.45 ${SYNCRO}}\n                @container (max-width:600px){.ic-opener p{font-size:19px}}`}),main?/*#__PURE__*/_jsx(\"h1\",{children:title}):/*#__PURE__*/_jsx(\"h2\",{children:title}),sub?/*#__PURE__*/_jsx(\"p\",{children:sub}):null]});}addPropertyControls(SectionOpener,{num:{type:ControlType.String,title:\"Number\",defaultValue:\"01\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"Work\"},// 27 Oct 2026: the page's own heading is its h1 for Google; one per page.\nmain:{type:ControlType.Boolean,title:\"Main heading\",defaultValue:false},sub:{type:ControlType.String,title:\"Line\",displayTextArea:true,defaultValue:\"\"},color:{type:ControlType.Color,title:\"Colour\",defaultValue:\"rgb(17, 17, 18)\"},paddingTop:{type:ControlType.Number,title:\"Top\",defaultValue:40,min:0,max:200,unit:\"px\"},paddingBottom:{type:ControlType.Number,title:\"Bottom\",defaultValue:72,min:0,max:200,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SectionOpener\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SectionOpener.map"],"mappings":"A,4NAsBG,SAAwBiB,EAAc,EAAM,CAAC,GAAK,CAAC,MAAI,KAAK,QAAM,OAAO,OAAK,GAAM,MAAI,GAAG,QAAM,kBAAkB,aAAW,GAAG,gBAAc,GAAG,SAAOC,EAAYC,EAAInB,EAAO,IAAI,EAAQoB,EAASN,EAAoB,EAAO,CAACO,EAAMC,GAAUrB,EAAS,EAAK,EAAEW,MAAc,CAAC,IAAMW,EAAGJ,EAAI,QAAgC,GAArB,CAACI,GAAIH,GAA0Bf,IAAS,QAAa,OAAO,SAAW,IAAY,OAAO,GAAGA,EAAO,WAAW,kCAAkC,CAAC,CAAC,QAAQ,CAACD,MAAoBkB,EAAS,EAAI,CAAC,EAAE,MAAO,CAAC,IAAIE,EAAI,EAAMC,EAAS,KAASC,EAAQ,GAAYC,MAAW,CAAID,IAAe,EAAQ,GAAKtB,MAAoBkB,EAAS,EAAI,CAAC,EAAEM,EAAK,EAAE,EAAQC,MAAU,CAAI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