{"version":3,"file":"SectionTag.73pzmiFp.mjs","names":["useRef","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","le","c","init_jsx_runtime","de","init_framer_D1IzEvwH","RenderTarget","ControlType","addPropertyControls","hostOf","p","el","SectionTag","props","ref","onCanvas","s","STYLE_ID","CSS","host","role","id","anchorId","offset","t","FF","NOTAG","init_SectionTag"],"sources":["https:/framerusercontent.com/modules/71kZnjGetHR9qnttSR8c/TrshEEA831rekcnzx5d9/SectionTag.js"],"sourcesContent":["// Clouden section tag: anchors and responsive rules without relying on layer names.\n// Brief: About page sticky navigation needs working #anchors (#who-we-are, #model, ...) with a\n// header offset, and the page needs tablet and phone spacing. Place one SectionTag inside a\n// frame (set the instance to position Absolute, 1 x 1 px, so it takes no space). On the site\n// it tags its parent frame:\n//  - \"Anchor ID\" becomes the frame's id, with a scroll margin of \"Header offset\", so links to\n//    /about#values (from this page or any other) land with the heading clear of the sticky\n//    site header and section bar. Framer reserves the \"id\" prop, so this uses its own name.\n//  - \"Role\" adds responsive spacing to that frame:\n//      section: content section, 88 px / 32 px padding on tablet, 72 px / 20 px on phone;\n//      hero: page hero, 32 px side padding on tablet, 32 / 20 / 64 px on phone;\n//      gutter: side padding only (CTA band): 32 px tablet, 20 px phone;\n//      footer: as gutter, and footer text links use the body colour (indigo on hover)\n//              instead of the project's default link colour;\n//      split: two-column row, smaller gap when stacked (48 px tablet, 40 px phone);\n//      herorow: hero copy and visual row, stacked full width below 1000 px;\n//      stage: hero illustration stage, natural height below 1000 px so nothing is clipped;\n//      formfirst: two-column row whose first child is a column of supporting blocks and\n//             whose second child is a form. Below 1000 px it stacks as: the first block of\n//             the column (the introduction), then the form, then the remaining blocks, so\n//             the form comes early on tablets and phones (Contact page);\n//      none: anchor only.\n// The canvas is left untouched so breakpoints stay editable. Renders nothing visible.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useLayoutEffect,useRef}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";const STYLE_ID=\"clouden-section-tag-css\";const FF='[data-cl-role=\"formfirst\"]';const NOTAG=':not([class*=\"-container\"])';const CSS=`\n[data-cl-role=\"footer\"] * { --framer-link-text-color: rgb(71, 80, 103) !important; --framer-link-hover-text-color: rgb(63, 66, 224) !important; }\n[data-cl-role=\"footer\"] a:hover, [data-cl-role=\"footer\"] a:hover * { color: rgb(63, 66, 224) !important; }\n@media (min-width: 810px) and (max-width: 1199.98px) {\n  [data-cl-role=\"section\"] { padding: 88px 32px !important; }\n  [data-cl-role=\"hero\"], [data-cl-role=\"gutter\"], [data-cl-role=\"footer\"] { padding-left: 32px !important; padding-right: 32px !important; }\n  [data-cl-role=\"split\"] { gap: 48px !important; }\n}\n@media (max-width: 809.98px) {\n  [data-cl-role=\"section\"] { padding: 72px 20px !important; }\n  [data-cl-role=\"hero\"] { padding: 32px 20px 64px !important; }\n  [data-cl-role=\"gutter\"], [data-cl-role=\"footer\"] { padding-left: 20px !important; padding-right: 20px !important; }\n  [data-cl-role=\"split\"] { gap: 40px !important; }\n  ${FF} { gap: 36px !important; }\n}\n@media (max-width: 999.98px) {\n  [data-cl-role=\"stage\"] { height: auto !important; min-height: 0 !important; }\n  [data-cl-role=\"herorow\"] { flex-direction: column !important; flex-wrap: nowrap !important; align-items: stretch !important; gap: 40px !important; }\n  [data-cl-role=\"herorow\"] > * { min-width: 0 !important; max-width: 100% !important; width: 100% !important; flex: 0 0 auto !important; }\n  ${FF} { flex-direction: column !important; flex-wrap: nowrap !important; align-items: stretch !important; gap: 44px !important; }\n  ${FF} > *${NOTAG} { min-width: 0 !important; max-width: 100% !important; width: 100% !important; flex: 0 0 auto !important; }\n  ${FF} > *${NOTAG}:first-child { display: contents !important; }\n  ${FF} > *${NOTAG}:first-child > * { order: 2; min-width: 0 !important; max-width: 100% !important; width: 100% !important; }\n  ${FF} > *${NOTAG}:first-child > *:first-child { order: 0; }\n  ${FF} > *${NOTAG}:nth-child(2) { order: 1; }\n}\n`;// Climb out of Framer's instance wrapper to the frame that contains this tag.\nfunction hostOf(el){let p=el?.parentElement||null;if(p&&/(^|\\s)framer-[\\w-]*-container(\\s|$)/.test(p.className))p=p.parentElement;return p;}/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 1\n * @framerIntrinsicHeight 1\n */export default function SectionTag(props){const{anchorId=\"\",offset=132,role=\"section\"}=props;const ref=useRef(null);const onCanvas=RenderTarget.current()===RenderTarget.canvas;useLayoutEffect(()=>{if(onCanvas||typeof document===\"undefined\")return;// One shared style element; its rules are refreshed so edits apply without a reload.\nlet s=document.getElementById(STYLE_ID);if(!s){s=document.createElement(\"style\");s.id=STYLE_ID;document.head.appendChild(s);}if(s.textContent!==CSS)s.textContent=CSS;const host=hostOf(ref.current);if(!host)return;if(role!==\"none\")host.setAttribute(\"data-cl-role\",role);const id=anchorId.replace(/^#/,\"\").trim();if(id){if(!document.getElementById(id))host.id=id;host.style.scrollMarginTop=`${offset}px`;// Arriving from another page with this hash: jump once the layout has settled.\nif(decodeURIComponent(location.hash.slice(1))===id){const t=window.setTimeout(()=>host.scrollIntoView({block:\"start\"}),150);return()=>window.clearTimeout(t);}}},[anchorId,offset,role,onCanvas]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,\"aria-hidden\":\"true\",style:{position:\"relative\",width:1,height:1,overflow:\"hidden\",pointerEvents:\"none\",...props.style}});}addPropertyControls(SectionTag,{anchorId:{type:ControlType.String,title:\"Anchor ID\",defaultValue:\"\",placeholder:\"e.g. values\"},offset:{type:ControlType.Number,title:\"Header offset\",defaultValue:132,min:0,max:300,unit:\"px\"},role:{type:ControlType.Enum,title:\"Role\",options:[\"section\",\"hero\",\"gutter\",\"footer\",\"split\",\"herorow\",\"stage\",\"formfirst\",\"none\"],optionTitles:[\"Content section\",\"Page hero\",\"Side gutter only\",\"Footer\",\"Two-column row\",\"Hero row (copy and visual)\",\"Hero visual stage\",\"Form row (form early on phones)\",\"Anchor only\"],defaultValue:\"section\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SectionTag\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"1\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SectionTag.map"],"mappings":"A,uMAkDA,SAASa,EAAO,EAAG,CAAC,IAAIC,EAAEC,GAAI,eAAe,KAAqF,OAA7ED,GAAG,sCAAsC,KAAKA,EAAE,SAAS,IAAE,EAAEA,EAAE,eAAqBA,CAAE,CAKxI,SAAwBE,EAAW,EAAM,CAAC,GAAK,CAAC,WAAS,GAAG,SAAO,IAAI,OAAK,WAAWC,EAAYC,EAAIlB,EAAO,IAAI,EAAQmB,EAAST,EAAa,QAAQ,IAAIA,EAAa,OAEsB,OAFfL,MAAoB,CAAC,GAAGc,GAAU,OAAO,SAAW,IAAY,OACnP,IAAIC,EAAE,SAAS,eAAeC,CAAQ,EAAMD,IAAG,EAAE,SAAS,cAAc,OAAO,EAAE,EAAE,GAAGC,EAAS,SAAS,KAAK,YAAYD,CAAC,GAAMA,EAAE,cAAcE,IAAI,EAAE,YAAYA,GAAI,IAAMC,EAAKV,EAAOK,EAAI,OAAO,EAAE,GAAG,CAACK,EAAK,OAAUC,IAAO,QAAOD,EAAK,aAAa,eAAeC,CAAI,EAAE,IAAMC,EAAGC,EAAS,QAAQ,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,GAAGD,IAAQ,SAAS,eAAeA,CAAE,IAAE,EAAK,GAAGA,GAAG,EAAK,MAAM,gBAAgB,GAAGE,EAAO,IAC3Y,mBAAmB,SAAS,KAAK,MAAM,CAAC,CAAC,IAAIF,GAAG,CAAC,IAAMG,EAAExB,EAAO,eAAemB,EAAK,eAAe,CAAC,MAAM,OAAO,CAAC,EAAE,GAAG,EAAE,UA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