{"version":3,"file":"CtaButtons.C4WzfvWN.mjs","names":["useCallback"],"sources":["https:/framerusercontent.com/modules/J6WHK2b0gZVS0r9cDf0Z/AsUBWcQb1HFYpPdVn806/CtaButtons.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useCallback}from\"react\";// User request: Update CtaButtons so buttons keep row layout on desktop/tablet, but automatically stack vertically as full-width buttons on phone widths to avoid clipping, while preserving existing controls/defaults and visual styling.\n// Added `vertical` prop: when true the buttons stack (primary above secondary), left-aligned, at natural width — used to demote the secondary CTA below the primary on the enterprise hero. Defaults false (row) so existing instances are unaffected.\n// Added `ctaPrimary` / `ctaSecondary` (+ their `*Kind`): these stamp the data-cta\n// attributes the site's GTM tracker reads. The tracker can derive a name from the\n// label and href on its own, but a derived name changes the moment marketing\n// rewords a button, which silently splits the GA series. Setting these pins a\n// stable name. All default to empty, so no existing instance is affected.\n// BRAND BLUE MIGRATION: the accent moved from indigo rgb(90,96,208) to the product\n// blue rgb(76,167,249). The glow shadows below were hardcoded indigo and are NOT\n// overridable per instance, so they are now driven by --accent-glow, derived from\n// the accent prop — change the accent and the glow follows. Note the primary label\n// must be near-black on the light blue (6.29:1); white on it is 2.51:1 and fails.\n/**\n * CtaButtons — primary (filled) + secondary buttons, side by side on one line,\n * rounded-rectangle shape, each with a hover lift + colour. The secondary is an\n * outline by default (secondaryBg = transparent); set secondaryBg to an opaque\n * colour when the hero has an image/busy backdrop that would show through it.\n * Set `vertical` to stack the secondary below the primary.\n *\n * NOTE: `onDark` only swaps the secondary's BORDER colour and hover brightness.\n * It does NOT change the text colour — pass `secondaryText` explicitly (cream or\n * white) for a dark background, or the label renders near-black and disappears.\n *\n * NOTE: the phone rules below are `!important` on purpose. Layout here is set as\n * an inline style (it depends on the `vertical` prop), and an inline style beats\n * a stylesheet rule — so without `!important` the media query set the anchors to\n * width:100% while the row stayed `row`/`nowrap`, putting two full-width buttons\n * on one line and clipping the second label off-screen.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 360\n * @framerIntrinsicHeight 52\n */const RAD=10;const CSS=`\n.cta-row a{font-family:'Hanken Grotesk',sans-serif;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;border-radius:${RAD}px;font-weight:600;font-size:15px;line-height:1;cursor:pointer;white-space:nowrap;transition:transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, filter .18s ease, border-color .18s ease}\n.cta-primary{color:var(--pc);background:var(--accent);padding:14px 24px;box-shadow:0 6px 18px var(--accent-glow)}\n.cta-primary:hover{transform:translateY(-2px);filter:brightness(1.08);box-shadow:0 12px 28px var(--accent-glow-hover)}\n.cta-primary:active{transform:translateY(0)}\n.cta-secondary{color:var(--sc);background:var(--sbg);padding:13px 22px;border:1px solid var(--sb)}\n.cta-secondary:hover{transform:translateY(-2px);border-color:var(--sbh);filter:brightness(var(--sbr))}\n.cta-secondary:active{transform:translateY(0)}\n@media (max-width: 640px){\n  .cta-row{flex-direction:column !important;align-items:stretch !important;width:100% !important;max-width:100% !important}\n  .cta-row a{width:100% !important;box-sizing:border-box}\n}\n`;// Pull the r,g,b out of the accent so the glow always matches the button.\n// Falls back to the brand blue if the accent is a keyword or an unparsed format.\nfunction rgbTriplet(color){const m=/(\\d+)[,\\s]+(\\d+)[,\\s]+(\\d+)/.exec(color||\"\");if(m)return`${m[1]},${m[2]},${m[3]}`;const hex=/^#?([0-9a-f]{6})$/i.exec((color||\"\").trim());if(hex){const n=parseInt(hex[1],16);return`${n>>16&255},${n>>8&255},${n&255}`;}return\"76,167,249\";}// ---------------------------------------------------------------------------\n// GLOW SHADE (2026-09-09)\n// `0 6px 18px` offset downward is ELEVATION, not emission, so the halo has to\n// sit at or below the luminance of the surface it lifts off. Indigo was dark\n// enough (relative luminance 0.151) for a same-hue shadow to read correctly.\n// The platform blue is 0.360, so at the original alpha the hero glow came out\n// 1.9x brighter than before and read as a light source. Measured: multiplying\n// the accent by 0.67 reproduces indigo's exact elevation on the dark hero\n// (lift x6.33 at rest, x10.47 on hover) and still darkens correctly on cream.\n// Derived rather than hardcoded, so it self-corrects for any future accent.\nconst GLOW_SHADE=.67;function shadeTriplet(triplet,k){return triplet.split(\",\").map(n=>Math.max(0,Math.min(255,Math.round(parseFloat(n)*k)))).join(\",\");}// BLUE MIGRATION SHIM (2026-09-09)\n// The accent is baked into every instance's props and a ControlType.Color prop\n// cannot point at a project colour style (Framer coerces a style path to black),\n// so there is no token to flip: the 21 instances across the site each carry\n// their own copy. Legacy values are mapped here at render time instead of being\n// edited page by page. Delete this block once the instances carry real values.\nconst PLATFORM_BLUE=\"rgb(76,167,249)\";const INK=\"rgb(18,18,18)\";const normalizeColour=c=>String(c||\"\").toLowerCase().replace(/\\s+/g,\"\");const LEGACY_FILLS=new Set([\"rgb(90,96,208)\",\"#5a60d0\",\"rgb(24,99,220)\",\"#1863dc\"]);const LIGHT_LABELS=new Set([\"rgb(255,255,255)\",\"#ffffff\",\"#fff\",\"rgb(255,253,245)\",\"#fffdf5\"]);function migrateAccent(colour){return LEGACY_FILLS.has(normalizeColour(colour))?PLATFORM_BLUE:colour;}// Only the PRIMARY label is corrected: it sits on the accent fill, where white is\n// 2.51:1 and ink is 7.32:1. `secondaryText` is deliberately left alone, because\n// the secondary is an outline button on the page ground, not on the accent.\nfunction migratePrimaryText(colour,resolvedAccent){if(normalizeColour(resolvedAccent)!==normalizeColour(PLATFORM_BLUE))return colour;return LIGHT_LABELS.has(normalizeColour(colour))?INK:colour;}// ---------------------------------------------------------------------------\nexport default function CtaButtons(props){const{primaryLabel=\"Try for Free\",primaryUrl=\"#\",secondaryLabel=\"See how it works\",secondaryUrl=\"/how-it-works\",showSecondary=true,primaryOpenInNewTab=false,secondaryOpenInNewTab=false,vertical=false,accent=\"rgb(76,167,249)\",primaryText=\"rgb(18,18,18)\",secondaryText=\"rgb(15,15,16)\",secondaryBg=\"transparent\",onDark=false,ctaPrimary=\"\",ctaKindPrimary=\"auto\",ctaSecondary=\"\",ctaKindSecondary=\"auto\"}=props;// Legacy instance values are corrected here rather than page by page.\nconst accentFinal=migrateAccent(accent);const primaryTextFinal=migratePrimaryText(primaryText,accentFinal);const sb=onDark?\"rgba(255,255,255,0.24)\":\"rgba(15,15,16,0.20)\";const sbh=onDark?\"rgba(255,255,255,0.48)\":\"rgba(15,15,16,0.42)\";const sbr=onDark?\"1.12\":\"0.97\";const glow=shadeTriplet(rgbTriplet(accentFinal),GLOW_SHADE);const vars={\"--accent\":accentFinal,\"--pc\":primaryTextFinal,\"--sc\":secondaryText,\"--sb\":sb,\"--sbh\":sbh,\"--sbg\":secondaryBg,\"--sbr\":sbr,\"--accent-glow\":`rgba(${glow},0.35)`,\"--accent-glow-hover\":`rgba(${glow},0.50)`};const dataAttrs=(cta,kind)=>({\"data-cta\":(cta||\"\").trim()||undefined,\"data-cta-kind\":kind&&kind!==\"auto\"?kind:undefined});const normalizePathname=useCallback(pathname=>{if(!pathname)return\"/\";return pathname.length>1?pathname.replace(/\\/+$/,\"\"):pathname;},[]);const shouldHandleSmoothScroll=useCallback((href,e)=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return false;// NOTE: deliberately no e.defaultPrevented check — Framer's client-side\n// router intercepts same-site anchor clicks at the capture phase and\n// preventDefaults them WITHOUT scrolling to the hash target, so by the\n// time this bubble-phase handler runs the event is always \"handled\".\n// For same-page #hash links we must scroll regardless.\nif(e.button!==0)return false;if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return false;if(!href)return false;try{const resolved=new URL(href,window.location.origin);const current=new URL(window.location.href);if(!resolved.hash)return false;if(resolved.origin!==current.origin)return false;if(normalizePathname(resolved.pathname)!==normalizePathname(current.pathname)){return false;}return true;}catch{return false;}},[normalizePathname]);const handleCtaClick=useCallback((href,openInNewTab,e)=>{if(openInNewTab)return;if(!shouldHandleSmoothScroll(href,e))return;e.preventDefault();const hash=new URL(href,window.location.origin).hash;const targetId=decodeURIComponent(hash.slice(1));const target=targetId?document.getElementById(targetId):null;if(!target)return;target.scrollIntoView({behavior:\"smooth\",block:\"start\"});if(window.location.hash!==hash){window.history.replaceState(null,\"\",hash);}},[shouldHandleSmoothScroll]);return /*#__PURE__*/_jsxs(\"div\",{className:\"cta-row\",style:{position:\"relative\",display:\"flex\",flexDirection:vertical?\"column\":\"row\",flexWrap:\"wrap\",alignItems:vertical?\"flex-start\":\"center\",gap:12,...vars,...props.style},children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:CSS}}),/*#__PURE__*/_jsx(\"link\",{href:\"https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&display=swap\",rel:\"stylesheet\"}),/*#__PURE__*/_jsx(\"a\",{className:\"cta-primary\",href:primaryUrl,target:primaryOpenInNewTab?\"_blank\":undefined,rel:primaryOpenInNewTab?\"noreferrer noopener\":undefined,onClick:e=>handleCtaClick(primaryUrl,primaryOpenInNewTab,e),...dataAttrs(ctaPrimary,ctaKindPrimary),children:primaryLabel}),showSecondary&&/*#__PURE__*/_jsx(\"a\",{className:\"cta-secondary\",href:secondaryUrl,target:secondaryOpenInNewTab?\"_blank\":undefined,rel:secondaryOpenInNewTab?\"noreferrer noopener\":undefined,onClick:e=>handleCtaClick(secondaryUrl,secondaryOpenInNewTab,e),...dataAttrs(ctaSecondary,ctaKindSecondary),children:secondaryLabel})]});}const KINDS=[\"auto\",\"signup\",\"demo\",\"docs\",\"login\",\"internal\",\"external\",\"email\",\"action\"];addPropertyControls(CtaButtons,{primaryLabel:{type:ControlType.String,title:\"Primary\",defaultValue:\"Try for Free\"},primaryUrl:{type:ControlType.String,title:\"Primary URL\",defaultValue:\"#\"},primaryOpenInNewTab:{type:ControlType.Boolean,title:\"Primary New Tab\",defaultValue:false},secondaryLabel:{type:ControlType.String,title:\"Secondary\",defaultValue:\"See how it works\"},secondaryUrl:{type:ControlType.String,title:\"Secondary URL\",defaultValue:\"/how-it-works\"},secondaryOpenInNewTab:{type:ControlType.Boolean,title:\"Secondary New Tab\",defaultValue:false},showSecondary:{type:ControlType.Boolean,title:\"Secondary?\",defaultValue:true},vertical:{type:ControlType.Boolean,title:\"Stack vertical\",defaultValue:false},accent:{type:ControlType.Color,title:\"Accent\",defaultValue:\"rgb(76,167,249)\"},primaryText:{type:ControlType.Color,title:\"Primary text\",defaultValue:\"rgb(18,18,18)\"},secondaryText:{type:ControlType.Color,title:\"Secondary text\",defaultValue:\"rgb(15,15,16)\"},secondaryBg:{type:ControlType.Color,title:\"Secondary fill\",defaultValue:\"transparent\"},onDark:{type:ControlType.Boolean,title:\"On dark\",defaultValue:false},ctaPrimary:{type:ControlType.String,title:\"data-cta (primary)\",description:\"Stable GTM name. Empty = tracker derives it from the label.\",defaultValue:\"\"},ctaKindPrimary:{type:ControlType.Enum,title:\"Kind (primary)\",options:KINDS,defaultValue:\"auto\"},ctaSecondary:{type:ControlType.String,title:\"data-cta (secondary)\",defaultValue:\"\"},ctaKindSecondary:{type:ControlType.Enum,title:\"Kind (secondary)\",options:KINDS,defaultValue:\"auto\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CtaButtons\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CtaButtons.map"],"mappings":"qLA+CA,SAAS,EAAW,EAAM,CAAC,IAAM,EAAE,8BAA8B,KAAK,GAAO,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,EAAE,GAAG,GAAG,EAAE,GAAG,GAAG,EAAE,KAAK,IAAM,EAAI,qBAAqB,MAAM,GAAO,GAAA,CAAI,KAAK,CAAC,EAAE,GAAG,EAAI,CAAC,IAAM,EAAE,SAAS,EAAI,GAAG,EAAE,EAAE,MAAM,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,EAAE,IAAI,GAAG,EAAE,KAAM,CAAC,MAAM,YAAa,CAU3P,S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