{"version":3,"file":"FluidScale.CVLo84xP.mjs","names":[],"sources":["https:/framerusercontent.com/modules/SK0ngKEZO72OpNC7IqKJ/D953YvWv1u9P4UgWhfVI/FluidScale.js"],"sourcesContent":["// FluidScale: CSS-only scaling for display type across desktop widths (Mardon template).\n// withFluidContainer marks a full-width wrapper as an inline-size container.\n// withFluidScale zooms its node by (container width / DESIGN_WIDTH), clamped to MIN–MAX.\n// DESIGN_WIDTH is the hero content width at the 1440 design (1440 − 2 × 48 margin).\n// Result: 0.82 at 1200, 1.0 at 1440, ~1.36 at 1920. Below 1200 (Tablet and Phone breakpoints) the zoom is held at 1 by a CSS step,\n// because those breakpoints have their own fluid layouts. Unlike `scale`, `zoom` also resizes the layout box, so nothing overflows.\n// No JavaScript runs, so server and client render the same; browsers without support show 1440 sizes.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";const DESIGN_WIDTH=1344;const MIN=.8// the Laptop breakpoint starts at 1200: 1104 / 1344 = 0.82\n;const MAX=1.4;const FROM=1200// below this width the zoom stays 1 (Tablet and Phone layouts)\n;// 1 at or above FROM, 0 below it. tan(atan2(length, 1px)) turns a length into a plain number.\nconst STEP=`clamp(0, tan(atan2(100vw - ${FROM-1}px, 1px)), 1)`;const RATIO=`clamp(${MIN}, tan(atan2(100cqw, ${DESIGN_WIDTH}px)), ${MAX})`;export function withFluidContainer(Component){return /*#__PURE__*/forwardRef(function FluidContainer(props,ref){const{style,...rest}=props;return /*#__PURE__*/_jsx(Component,{...rest,ref:ref,style:{...style,containerType:\"inline-size\"}});});}export function withFluidScale(Component){return /*#__PURE__*/forwardRef(function FluidScale(props,ref){// A native scale is only there so the editor canvas (where overrides never run) previews the zoom\n// on the Laptop breakpoint; live, the zoom does the work, so the scale is dropped.\nconst{style,...rest}=props;const{scale,...live}=style||{};return /*#__PURE__*/_jsx(Component,{...rest,ref:ref,style:{...live,zoom:`calc(1 + (${RATIO} - 1) * ${STEP})`}});});}// withFluidScaleWide only enlarges (1 → 1.4 from 1440 up) and never shrinks. Use it on blocks with body copy,\n// which should reflow on the Laptop breakpoint instead of shrinking their text.\nexport function withFluidScaleWide(Component){return /*#__PURE__*/forwardRef(function FluidScaleWide(props,ref){const{style,...rest}=props;return /*#__PURE__*/_jsx(Component,{...rest,ref:ref,style:{...style,zoom:`clamp(1, tan(atan2(100cqw, ${DESIGN_WIDTH}px)), ${MAX})`}});});}// withFluidFit zooms its node to always fit its container (used by the footer wordmark on every breakpoint).\nexport function withFluidFit(Component){return /*#__PURE__*/forwardRef(function FluidFit(props,ref){const{style,...rest}=props;return /*#__PURE__*/_jsx(Component,{...rest,ref:ref,style:{...style,zoom:`clamp(0.2, tan(atan2(100cqw, ${DESIGN_WIDTH}px)), ${MAX})`}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withFluidScale\":{\"type\":\"reactHoc\",\"name\":\"withFluidScale\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFluidContainer\":{\"type\":\"reactHoc\",\"name\":\"withFluidContainer\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFluidFit\":{\"type\":\"reactHoc\",\"name\":\"withFluidFit\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFluidScaleWide\":{\"type\":\"reactHoc\",\"name\":\"withFluidScaleWide\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FluidScale.map"],"mappings":"kHAU0I,SAAgB,EAAmB,EAAU,CAAC,OAAoB,EAAW,SAAwB,EAAM,EAAI,CAAC,GAAK,CAAC,QAAM,GAAG,GAAM,EAAM,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAS,MAAI,MAAM,CAAC,GAAG,EAAM,cAAc,aAAa,CAAC,CAAC,CAAE,CAAC,CAAE,CAAC,SAAgB,EAAe,EAAU,CAAC,OAAoB,EAAW,SAAoB,EAAM,EAAI,CAEne,GAAK,CAAC,QAAM,GAAG,GAAM,EAAW,CAAC,QAAM,G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