{"version":3,"file":"AuroraBackground.a4R3cLpg.mjs","names":["React.useRef","React.useState"],"sources":["https:/framerusercontent.com/modules/pciMdeG7hYCWzqJNhRQO/Mrz2qm4YAtJDZAVau5UU/AuroraBackground.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 DESKTOP_MQ=\"(min-width: 810px)\";/**\n * Animated blue-green aurora gradient — the River Oaks signature brand\n * element, alive. Soft radial color fields drift slowly behind hero\n * content. Perf notes: no CSS filter blur (the radial falloff does the\n * softness; blur(90px) over vmax-sized layers was a mobile paint killer),\n * drift runs on desktop only and pauses while off-screen. Static on\n * mobile, on canvas, and under prefers-reduced-motion.\n * At runtime it pins its own wrapper to fill the parent section (canvas\n * pin values are unreliable via MCP — see MEMORY/attempts.md).\n *\n * PHOTO HEROES (added 2026-08-21). The client's rule from the review call is\n * that the looping video hero belongs to the homepage alone and every other\n * page gets a static photo with the same wording, fonts and layout on top of\n * it. Setting Photo URL here turns any existing hero into exactly that: the\n * photo becomes the base layer and the aurora keeps washing over it, which\n * is the brand's photo-under-gradient treatment rather than a flat picture.\n *\n * It is built as a prop on this component instead of a new PhotoHero section\n * because all ten dark heroes already contain an AuroraBackground instance.\n * One string in the properties panel converts a page, with no canvas surgery\n * and nothing to rebuild per breakpoint — which also means the pages the MCP\n * cannot currently reach can be converted by hand in seconds.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 1200\n * @framerIntrinsicHeight 600\n */export default function AuroraBackground(props){const{color1,color2,color3,intensity,speed,fillParent,imageUrl,focus,grayscale,scrim=.42,washOpacity=.55,style}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const rootRef=React.useRef(null);const[animate,setAnimate]=React.useState(false);const[inView,setInView]=React.useState(true);const hasPhoto=Boolean(imageUrl);React.useEffect(()=>{if(isCanvas||typeof window===\"undefined\")return;const desktop=window.matchMedia(DESKTOP_MQ);const reduced=window.matchMedia(\"(prefers-reduced-motion: reduce)\");const update=()=>setAnimate(desktop.matches&&!reduced.matches);update();desktop.addEventListener(\"change\",update);reduced.addEventListener(\"change\",update);return()=>{desktop.removeEventListener(\"change\",update);reduced.removeEventListener(\"change\",update);};},[isCanvas]);// Pause the drift while the section is off-screen.\nReact.useEffect(()=>{if(isCanvas||typeof window===\"undefined\")return;if(!(\"IntersectionObserver\"in window)||!rootRef.current)return;const io=new IntersectionObserver(entries=>setInView(entries.some(e=>e.isIntersecting)),{rootMargin:\"80px\"});io.observe(rootRef.current);return()=>io.disconnect();},[isCanvas]);// Canvas-set pins don't survive MCP writes, so at runtime we pin the\n// Framer wrapper element ourselves to fill the parent section.\nReact.useLayoutEffect(()=>{if(isCanvas||!fillParent||!rootRef.current)return;const wrapper=rootRef.current.parentElement;if(!wrapper||wrapper===document.body)return;Object.assign(wrapper.style,{position:\"absolute\",top:\"0px\",left:\"0px\",right:\"0px\",bottom:\"0px\",width:\"100%\",height:\"100%\",maxWidth:\"none\",transform:\"none\",pointerEvents:\"none\",zIndex:\"0\"});const section=wrapper.parentElement;if(section&&getComputedStyle(section).position===\"static\"){section.style.position=\"relative\";}},[isCanvas,fillParent]);const playing=animate&&inView;// speed 1–10 scales the three staggered blob cycles (~18–26s at default 4)\nconst scale=4/Math.max(1,speed);const durs=[22*scale,26*scale,18*scale];const blob=(color,size,pos,anim,dur)=>({position:\"absolute\",width:size,height:size,borderRadius:\"50%\",// Softness comes from the long falloff, not a filter.\n    background:`radial-gradient(circle, ${color} 0%, rgba(0,0,0,0) 58%)`,mixBlendMode:\"screen\",willChange:animate?\"transform\":undefined,animation:animate?`${anim} ${dur}s ease-in-out infinite alternate`:\"none\",animationPlayState:playing?\"running\":\"paused\",...pos});return /*#__PURE__*/_jsxs(\"div\",{ref:rootRef,\"aria-hidden\":true,style:{width:\"100%\",height:\"100%\",overflow:\"hidden\",pointerEvents:\"none\",// Without a photo the whole layer carries the intensity, as\n// before. With one, the photo must stay at full strength and\n// only the colour wash is dialled back, so intensity moves\n// onto the wash group below.\nopacity:hasPhoto?1:intensity,backgroundColor:hasPhoto?\"#000000\":undefined,contain:\"strict\",...style},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                @keyframes ro-aurora-a {\n                    from { transform: translate(-8%, -4%) scale(1); }\n                    to   { transform: translate(16%, 10%) scale(1.2); }\n                }\n                @keyframes ro-aurora-b {\n                    from { transform: translate(6%, 4%) scale(1.15); }\n                    to   { transform: translate(-14%, -8%) scale(0.92); }\n                }\n                @keyframes ro-aurora-c {\n                    from { transform: translate(-4%, 6%) scale(0.95); }\n                    to   { transform: translate(10%, -12%) scale(1.18); }\n                }\n            `}),hasPhoto?/*#__PURE__*/_jsx(\"img\",{src:imageUrl,alt:\"\",decoding:\"async\",style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",// River Oaks' photography puts faces in the upper\n// third of a mostly-portrait frame, and a hero crops\n// hard vertically on a phone. Centring the crop lands\n// on torsos, so the default bias is upward.\nobjectPosition:focus||\"center 35%\",filter:grayscale?\"grayscale(100%)\":\"none\"}}):null,/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",inset:0,opacity:hasPhoto?washOpacity:1},children:[/*#__PURE__*/_jsx(\"div\",{style:blob(color1,\"72vmax\",{top:\"-32%\",left:\"-20%\"},\"ro-aurora-a\",durs[0])}),/*#__PURE__*/_jsx(\"div\",{style:blob(color2,\"60vmax\",{bottom:\"-36%\",right:\"-18%\"},\"ro-aurora-b\",durs[1])}),/*#__PURE__*/_jsx(\"div\",{style:blob(color3,\"46vmax\",{top:\"2%\",right:\"2%\"},\"ro-aurora-c\",durs[2])})]}),hasPhoto&&scrim>0?/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,background:`linear-gradient(180deg, rgba(0,0,0,${scrim*.75}) 0%, rgba(0,0,0,${scrim*.5}) 40%, rgba(0,0,0,${scrim}) 100%)`}}):null]});}addPropertyControls(AuroraBackground,{imageUrl:{type:ControlType.String,title:\"Photo URL\",defaultValue:\"\",description:\"Turns this hero into a static photo hero. Empty keeps the plain aurora.\"},focus:{type:ControlType.String,title:\"Focus\",defaultValue:\"\",description:\"CSS object-position, e.g. 'center 30%' or 'left top'. Defaults to center 35%.\",hidden:p=>!p.imageUrl},grayscale:{type:ControlType.Boolean,title:\"Black & White\",defaultValue:false,hidden:p=>!p.imageUrl},scrim:{type:ControlType.Number,title:\"Darken\",defaultValue:.42,min:0,max:.85,step:.02,description:\"Keeps white headline type readable over the photo\",hidden:p=>!p.imageUrl},washOpacity:{type:ControlType.Number,title:\"Gradient Over Photo\",defaultValue:.55,min:0,max:1,step:.05,description:\"How strongly the blue-green wash sits on the photo\",hidden:p=>!p.imageUrl},color1:{type:ControlType.Color,title:\"Color 1\",defaultValue:\"rgba(77, 158, 233, 0.55)\"},color2:{type:ControlType.Color,title:\"Color 2\",defaultValue:\"rgba(61, 140, 98, 0.45)\"},color3:{type:ControlType.Color,title:\"Color 3\",defaultValue:\"rgba(113, 178, 238, 0.4)\"},intensity:{type:ControlType.Number,title:\"Intensity\",defaultValue:.85,min:.2,max:1,step:.05,hidden:p=>!!p.imageUrl},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:4,min:1,max:10,step:1},fillParent:{type:ControlType.Boolean,title:\"Fill Section\",defaultValue:true,description:\"Pin itself to fill the parent section at runtime\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AuroraBackground\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicHeight\":\"600\",\"framerIntrinsicWidth\":\"1200\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AuroraBackground.map"],"mappings":"sNA2BG,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,SAAO,SAAO,SAAO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