{"version":3,"file":"SplitHeading.CBn_El2U.mjs","names":[],"sources":["https:/framerusercontent.com/modules/RBUZdCXoO10ZFtcrnAd6/5O888sj0w4Bo97V23L6g/SplitHeading.js"],"sourcesContent":["// Planta template · Large headings that reveal line by line / word by word. Edit: Text, Mode, Size, Tag, Colour, Align.\n// !! KEEP IN SYNC: the font sizes / line heights / letter spacing in STYLES below are HARD-CODED copies of the\n// !! Framer text styles Display/Hero, Display/XL, Display/LG and Heading/H1 (all 3 breakpoints). If either text style changes in Framer,\n// !! update STYLES here too — this component does not read the text styles.\n//\n// Planta — Split Heading (Motion 2.0). Server-renders a heading split into masked LINES (hero load reveal)\n// or WORDS (section headers, scroll reveal), so the motion works from the first frame without JS and the\n// heading stays the LCP element. One copy of the text (SEO); screen readers get the whole sentence from\n// aria-label on the heading.\n//   mode \"lines\": each line rises from behind its own mask on load, 80ms apart, starting at --pm-load\n//                 (after the intro on a first visit). CSS keyframes — no JS needed.\n//   mode \"words\": each word rises from behind its mask when the nearest [data-reveal=\"header\"] (Section\n//                 Header) or the heading itself comes into view — CSS transitions toggled by Reveal.tsx.\n// Typography mirrors the text styles (Planta rule: same style on every breakpoint, sizes from CLAUDE.md):\n//   Hero = Display/Hero 96/96 −3.8 · 76/78 −2.9 · 56/60 −2;  XL = Display/XL 80/80 −3.2 · 68/70 −2.6 · 56/60 −2\n//   LG = Display/LG 64/68 −2.4 · 52/57 −1.8 · 40/46 −1.2;    H1 = Heading/H1 56/60 −2 · 48/53 −1.6 · 40/46 −1.2\n// If a text style changes in Framer, update STYLES here too. All motion CSS lives in Site Settings › Custom\n// Code <style id=\"planta-motion-2\">.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";const STYLES=`\n.sh{margin:0;font-family:\"Geist\",\"Geist Placeholder\",sans-serif;font-weight:500;font-style:normal;font-feature-settings:normal}\n.sh[data-size=\"Hero\"]{font-size:96px;line-height:96px;letter-spacing:-3.8px}\n.sh[data-size=\"H1\"]{font-size:56px;line-height:60px;letter-spacing:-2px}\n.sh[data-size=\"XL\"]{font-size:80px;line-height:80px;letter-spacing:-3.2px}\n.sh[data-size=\"LG\"]{font-size:64px;line-height:68px;letter-spacing:-2.4px}\n@media (min-width:810px) and (max-width:1199.98px){.sh[data-size=\"Hero\"]{font-size:76px;line-height:78px;letter-spacing:-2.9px}.sh[data-size=\"H1\"]{font-size:48px;line-height:53px;letter-spacing:-1.6px}.sh[data-size=\"XL\"]{font-size:68px;line-height:70px;letter-spacing:-2.6px}.sh[data-size=\"LG\"]{font-size:52px;line-height:57px;letter-spacing:-1.8px}}\n@media (max-width:809.98px){.sh[data-size=\"Hero\"]{font-size:56px;line-height:60px;letter-spacing:-2px}.sh[data-size=\"H1\"]{font-size:40px;line-height:46px;letter-spacing:-1.2px}.sh[data-size=\"XL\"]{font-size:56px;line-height:60px;letter-spacing:-2px}.sh[data-size=\"LG\"]{font-size:40px;line-height:46px;letter-spacing:-1.2px}}\n.sh-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}\n.sh-l{display:block;overflow:hidden;padding-bottom:.12em;margin-bottom:-.12em}\n.sh-i,.sh-wi{display:inline-block;will-change:transform}\n.sh-w{display:inline-block;overflow:hidden;vertical-align:top;padding-bottom:.12em;margin-bottom:-.12em}\n@media (min-width:810px){.sh-l,.sh-line{white-space:nowrap}}\n`;/**\n * Split Heading\n *\n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 120\n *\n * @framerSupportedLayoutWidth any-prefer-auto\n * @framerSupportedLayoutHeight auto\n */export default function SplitHeading(props){const{text=\"Built for how\\nyou work now.\",mode=\"lines\",size=\"Hero\",tag=\"h2\",color=\"#141414\",align=\"left\",style}=props;const Tag=tag;const lines=String(text??\"\").split(/\\n/);let w=0;return /*#__PURE__*/_jsxs(\"div\",{style:{...style,position:\"relative\"},children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:STYLES}}),/*#__PURE__*/_jsx(Tag,{className:\"sh\",\"data-size\":size,\"data-sh\":mode,\"aria-label\":lines.join(\" \"),style:{color,textAlign:align},children:/*#__PURE__*/_jsx(\"span\",{children:mode===\"lines\"?lines.map((line,i)=>/*#__PURE__*/_jsxs(\"span\",{className:\"sh-l\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"sh-i\",style:{[\"--i\"]:i},children:line}),\" \"]},i)):lines.map((line,i)=>/*#__PURE__*/_jsxs(\"span\",{className:\"sh-line\",children:[line.split(/\\s+/).filter(Boolean).map((word,j)=>/*#__PURE__*/_jsxs(\"span\",{children:[/*#__PURE__*/_jsx(\"span\",{className:\"sh-w\",children:/*#__PURE__*/_jsx(\"span\",{className:\"sh-wi\",style:{[\"--i\"]:w++},children:word})}),\" \"]},j)),i<lines.length-1?/*#__PURE__*/_jsx(\"br\",{}):null]},i))})})]});}addPropertyControls(SplitHeading,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Built for how\\nyou work now.\",displayTextArea:true},mode:{type:ControlType.Enum,title:\"Mode\",options:[\"lines\",\"words\"],optionTitles:[\"Lines (load)\",\"Words (scroll)\"],defaultValue:\"lines\"},size:{type:ControlType.Enum,title:\"Size\",options:[\"Hero\",\"XL\",\"LG\",\"H1\"],optionTitles:[\"Display/Hero\",\"Display/XL\",\"Display/LG\",\"Heading/H1\"],defaultValue:\"Hero\"},tag:{type:ControlType.Enum,title:\"Tag\",options:[\"h1\",\"h2\",\"h3\",\"p\"],defaultValue:\"h2\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#141414\"},align:{type:ControlType.Enum,title:\"Align\",options:[\"left\",\"center\"],defaultValue:\"left\",displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SplitHeading\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-auto\",\"framerContractVersion\":\"1\",\"framerIntrinsicW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