{"version":3,"file":"KineticHeadline.SbYVk7Ne.mjs","names":["React.useRef","React.useState","React.Fragment"],"sources":["https:/framerusercontent.com/modules/ZYZRnecV71NUv4CXSjB0/VJddddY5TJ2dTFwWAlMJ/KineticHeadline.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";const HEAD_FONT=\"'Montserrat', 'Helvetica Neue', sans-serif\";// Word reveal + gradient drift run on desktop only. On phones the headline\n// renders instantly: the reveal delays LCP (the hero H1 IS the LCP element)\n// and background-position animation is non-composited paint work.\nconst DESKTOP_MQ=\"(min-width: 810px)\";/**\n * Two-line display headline. On desktop: word-by-word mask reveal in view,\n * line 2 optionally italic with a slowly moving blue-green gradient fill.\n * On mobile and under prefers-reduced-motion: static, instant, gradient\n * frozen. SSR-safe (renders visible, arms on mount).\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 820\n */export default function KineticHeadline(props){const{line1,line2,line2Italic,line2Gradient,gradientFrom,gradientMid,gradientTo,color,fontSize,align,contentMaxWidth,style}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const ref=React.useRef(null);// \"idle\" (SSR/canvas/mobile: visible, unanimated) → \"armed\" (hidden) → \"play\"\nconst[phase,setPhase]=React.useState(\"idle\");const[drift,setDrift]=React.useState(false);React.useLayoutEffect(()=>{if(isCanvas||typeof window===\"undefined\")return;if(!window.matchMedia(DESKTOP_MQ).matches)return;if(window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches)return;setDrift(true);if(!(\"IntersectionObserver\"in window))return;setPhase(\"armed\");const io=new IntersectionObserver(entries=>{if(entries.some(e=>e.isIntersecting)){setPhase(\"play\");io.disconnect();}},{threshold:.25});if(ref.current)io.observe(ref.current);return()=>io.disconnect();},[isCanvas]);// The old formula was clamp(34px, fontSize*0.058px + 2.6vw, fontSize) —\n// the viewport term is tiny, so on a 390px phone it always bottomed out\n// at the 34px floor and never actually scaled. At 34px a line like\n// \"WITH THE LOVE OF\" measures wider than the 342px of content a 390px\n// phone has, and the italic overshoot pushed it past the right edge.\n//\n// 7vw genuinely tracks the viewport (27px at 390, 57px at 810 where the\n// max takes over), and the 28px floor keeps the smallest phones legible.\nconst size=`clamp(28px, 7vw, ${fontSize}px)`;const lineStyle={fontFamily:HEAD_FONT,fontWeight:700,fontSize:size,lineHeight:1.08,letterSpacing:\"-0.02em\",color,margin:0,textAlign:align,// Last-resort guard: a single word longer than the column (a long\n// place name, a pasted URL) breaks instead of overflowing.\noverflowWrap:\"break-word\"};let wordIndex=0;// Each word sits in an overflow-hidden mask span. The separating space\n// must live OUTSIDE the mask — browsers trim trailing whitespace inside\n// an inline-block, which glued the words together (\"LOVEGOD\").\nconst renderWords=(text,italic,gradient)=>(text||\"\").split(/\\s+/).filter(Boolean).map((word,i)=>{const delay=.08*wordIndex++;return /*#__PURE__*/_jsxs(React.Fragment,{children:[i>0?\" \":null,/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline-block\",overflow:\"hidden\",verticalAlign:\"bottom\",// room for italic overshoot so glyphs aren't clipped\n    padding:italic?\"0 0.06em\":undefined,margin:italic?\"0 -0.06em\":undefined},children:/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline-block\",transform:phase===\"armed\"?\"translateY(112%)\":\"none\",animation:phase===\"play\"?`ro-word-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) ${delay}s both`:\"none\",...gradient?{backgroundImage:`linear-gradient(100deg, ${gradientFrom}, ${gradientMid}, ${gradientTo}, ${gradientFrom})`,backgroundSize:\"300% 100%\",WebkitBackgroundClip:\"text\",backgroundClip:\"text\",WebkitTextFillColor:\"transparent\",color:\"transparent\",animation:phase===\"play\"?`ro-word-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) ${delay}s both${drift?`, ro-gradient-drift 9s linear ${delay+.7}s infinite`:\"\"}`:drift||isCanvas?\"ro-gradient-drift 9s linear infinite\":\"none\"}:{}},children:word})})]},i);});return /*#__PURE__*/_jsxs(\"div\",{ref:ref,style:{width:\"100%\",...style},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .ro-kinetic { text-wrap: balance; }\n                @keyframes ro-word-up {\n                    from { transform: translateY(112%); }\n                    to { transform: translateY(0); }\n                }\n                @keyframes ro-gradient-drift {\n                    from { background-position: 0% 50%; }\n                    to { background-position: 300% 50%; }\n                }\n                /* Phones centre every other piece of page copy (the site-wide\n                   rule lives in SiteHeader), but this component renders its\n                   own DOM without Framer's classes, so that rule never\n                   reached it and the hero headline sat left of a centred\n                   eyebrow and body. Match them. */\n                @media (max-width: 809px) {\n                    .ro-kinetic { text-align: center !important; }\n                }\n                @media (prefers-reduced-motion: reduce) {\n                    .ro-kinetic * { animation: none !important; transform: none !important; }\n                }\n            `}),/*#__PURE__*/_jsx(\"div\",{style:{maxWidth:contentMaxWidth||880,margin:\"0 auto\",width:\"100%\"},children:/*#__PURE__*/_jsxs(\"h1\",{className:\"ro-kinetic\",style:lineStyle,children:[renderWords(line1,false,false),line2?/*#__PURE__*/_jsx(\"br\",{}):null,line2?/*#__PURE__*/_jsx(\"span\",{style:{fontStyle:line2Italic?\"italic\":\"normal\"},children:renderWords(line2,line2Italic,line2Gradient)}):null]})})]});}addPropertyControls(KineticHeadline,{line1:{type:ControlType.String,title:\"Line 1\",defaultValue:\"LOVE GOD AND\"},line2:{type:ControlType.String,title:\"Line 2\",defaultValue:\"LOVE OTHERS.\"},line2Italic:{type:ControlType.Boolean,title:\"Line 2 Italic\",defaultValue:true},line2Gradient:{type:ControlType.Boolean,title:\"Line 2 Gradient\",defaultValue:true},gradientFrom:{type:ControlType.Color,title:\"Gradient From\",defaultValue:\"#71b2ee\"},gradientMid:{type:ControlType.Color,title:\"Gradient Mid\",defaultValue:\"#4d9ee9\"},gradientTo:{type:ControlType.Color,title:\"Gradient To\",defaultValue:\"#3d8c62\"},color:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#ffffff\"},fontSize:{type:ControlType.Number,title:\"Max Size\",defaultValue:48,min:28,max:96,step:1},align:{type:ControlType.Enum,title:\"Align\",options:[\"left\",\"center\"],optionTitles:[\"Left\",\"Center\"],defaultValue:\"left\"},contentMaxWidth:{type:ControlType.Number,title:\"Max Width\",defaultValue:880,min:400,max:1200,step:10}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"KineticHeadline\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"820\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./KineticHeadline.map"],"mappings":"2NAYG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,QAAM,QAAM,cAAY,gBAAc,eAAa,cAAY,aAAW,QAAM,WAAS,QAAM,kBAAgB,SAAO,EAAY,EAAS,EAAa,QAAQ,IAAI,EAAa,OAAa,EAAIA,EAAa,IAAI,EACtQ,CAAC,EAAM,GAAUC,EAAe,MAAM,EAAO,CAAC,EAAM,GAAUA,EAAe,EAAK,EAAE,MAA0B,CAAyL,GAArL,GAAiB,IAAS,QAAsB,CAAC,EAAO,WAAW,CAAU,CAAC,CAAC,SAAkB,EAAO,WAAW,kCAAkC,CAAC,CAAC,UAAe,EAAS,EAAI,EAAK,EAAE,yBAAyB,IAAQ,OAAO,EAAS,OAAO,EAAE,IAAM,EAAG,IAAI,qBAAqB,GAAS,CAAI,EAAQ,KAAK,GAAG,EAAE,cAAc,IAAG,EAAS,MAAM,EAAE,EAAG,WAAW,EAAG,EAAE,CAAC,UAAU,GAAG,CAAC,EAAyC,OAApC,EAAI,SAAQ,EAAG,QAAQ,EAAI,OAAO,MAAY,EAAG,WAAW,CAAE,EAAE,CAAC,CAAQ,CAAC,EAQ/jB,IAAM,EAAK,oBAAoB,EAAS,KAAW,EAAU,CAAC,WAAW,EAA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