{"version":3,"file":"NavBar.CfcKfeHW.mjs","names":["useRef","useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/G31N7vcarOlP9rvUBppq/jCX44CvpbtHA4FKFwira/NavBar.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect,useRef}from\"react\";export default function NavBar({caseStudiesLink,aboutLink,clientProfileLink,contactLink,accentColor}){const containerRef=useRef(null);const[menuOpen,setMenuOpen]=useState(false);const[scrolled,setScrolled]=useState(false);const[ctaHovered,setCtaHovered]=useState(false);const[isMobile,setIsMobile]=useState(false);useEffect(()=>{// ResizeObserver for hamburger breakpoint — works in Framer canvas\nconst el=containerRef.current;if(!el)return;const ro=new ResizeObserver(([entry])=>{setIsMobile(entry.contentRect.width<600);});ro.observe(el);return()=>ro.disconnect();},[]);useEffect(()=>{const handleScroll=()=>setScrolled(window.scrollY>20);handleScroll();window.addEventListener(\"scroll\",handleScroll);return()=>window.removeEventListener(\"scroll\",handleScroll);},[]);// Only treat the hash as a navigation anchor if it looks like a plain\n// CSS id selector (letters, numbers, - and _). Some other component on\n// the page may store its own state in the URL hash (e.g. JSON like\n// \"#services={\"a\":1}\"), which is NOT a valid selector and would throw\n// if passed straight to querySelector.\nconst isAnchorHash=hash=>/^#[A-Za-z][\\w-]*$/.test(hash);const scrollToHash=hash=>{if(!isAnchorHash(hash))return;try{const el=document.querySelector(hash);if(el)el.scrollIntoView({behavior:\"smooth\"});}catch{// Defensive: ignore any selector errors rather than crashing\n}};// On page load, if the URL carries a hash (e.g. we just navigated here\n// from another page via \"/#casestudies\"), scroll to that section once\n// the home page content has mounted.\nuseEffect(()=>{if(typeof window===\"undefined\")return;const hash=window.location.hash;if(!hash||!isAnchorHash(hash))return;// Give the page a moment to render/layout before measuring position.\n// Retries briefly in case the target section mounts slightly late.\nlet attempts=0;const maxAttempts=20// ~2s total\n;const tryScroll=()=>{let el=null;try{el=document.querySelector(hash);}catch{return;}if(el){el.scrollIntoView({behavior:\"smooth\"});}else if(attempts<maxAttempts){attempts+=1;setTimeout(tryScroll,100);}};tryScroll();},[]);const isHomePage=()=>typeof window!==\"undefined\"&&(window.location.pathname===\"/\"||window.location.pathname===\"\");const navigate=href=>{setMenuOpen(false);if(href.startsWith(\"#\")){if(isHomePage()){// Already on home — just scroll directly\nscrollToHash(href);}else{// Not on home — go to home page carrying the hash,\n// the on-load effect above will pick it up and scroll\nwindow.location.href=\"/\"+href;}}else{window.location.href=href;}};const links=[{label:\"Case Studies\",href:caseStudiesLink},{label:\"About\",href:aboutLink},{label:\"Client Profile\",href:clientProfileLink}];const glassStyle={background:scrolled?\"rgba(8,8,8,0.75)\":\"rgba(8,8,8,0.92)\",backdropFilter:\"blur(16px)\",WebkitBackdropFilter:\"blur(16px)\",border:scrolled?\"1px solid rgba(255,255,255,0.08)\":\"1px solid rgba(255,255,255,0.04)\",transition:\"all 0.3s ease\"};const linkStyle={fontSize:14,fontWeight:400,color:\"rgba(255,255,255,0.8)\",fontFamily:\"'Poppins', sans-serif\",cursor:\"pointer\",background:\"none\",border:\"none\",padding:0,transition:\"color 0.2s ease\",letterSpacing:\"0.01em\",whiteSpace:\"nowrap\"};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{position:\"fixed\",top:0,left:0,right:0,zIndex:1e3,display:\"flex\",flexDirection:\"column\",alignItems:\"center\",padding:isMobile?\"12px 16px\":\"14px 24px\",pointerEvents:\"none\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{...glassStyle,borderRadius:999,width:\"100%\",maxWidth:900,display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",padding:isMobile?\"10px 12px 10px 20px\":\"10px 14px 10px 28px\",boxSizing:\"border-box\",pointerEvents:\"all\"},children:[/*#__PURE__*/_jsx(\"span\",{onClick:()=>navigate(\"/\"),style:{fontSize:isMobile?14:17,fontWeight:600,color:\"#fff\",fontFamily:\"'Poppins', sans-serif\",letterSpacing:\"-0.01em\",cursor:\"pointer\",flexShrink:0,whiteSpace:\"nowrap\"},children:\"Carmen Oviedo\"}),!isMobile&&/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:32},children:links.map(link=>/*#__PURE__*/_jsx(\"button\",{onClick:()=>navigate(link.href),style:linkStyle,onMouseEnter:e=>e.currentTarget.style.color=\"#fff\",onMouseLeave:e=>e.currentTarget.style.color=\"rgba(255,255,255,0.8)\",children:link.label},link.label))}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:8,flexShrink:0},children:[/*#__PURE__*/_jsx(\"button\",{onClick:()=>navigate(contactLink),onMouseEnter:()=>setCtaHovered(true),onMouseLeave:()=>setCtaHovered(false),style:{background:ctaHovered?\"#e04444\":accentColor,border:\"none\",borderRadius:999,padding:isMobile?\"8px 16px\":\"10px 22px\",fontSize:isMobile?13:14,fontWeight:600,color:\"#fff\",cursor:\"pointer\",fontFamily:\"'Poppins', sans-serif\",transition:\"background 0.2s ease\",letterSpacing:\"0.01em\",whiteSpace:\"nowrap\"},children:\"Contact\"}),isMobile&&/*#__PURE__*/_jsxs(\"button\",{onClick:()=>setMenuOpen(!menuOpen),\"aria-label\":\"Toggle menu\",style:{background:\"rgba(255,255,255,0.08)\",border:\"1px solid rgba(255,255,255,0.12)\",borderRadius:999,width:36,height:36,display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",gap:4,cursor:\"pointer\",padding:0,flexShrink:0},children:[/*#__PURE__*/_jsx(\"span\",{style:{display:\"block\",width:15,height:1.5,background:\"#fff\",borderRadius:2,transform:menuOpen?\"rotate(45deg) translate(3px, 3px)\":\"none\",transition:\"transform 0.25s ease\"}}),/*#__PURE__*/_jsx(\"span\",{style:{display:\"block\",width:15,height:1.5,background:\"#fff\",borderRadius:2,opacity:menuOpen?0:1,transition:\"opacity 0.2s ease\"}}),/*#__PURE__*/_jsx(\"span\",{style:{display:\"block\",width:15,height:1.5,background:\"#fff\",borderRadius:2,transform:menuOpen?\"rotate(-45deg) translate(3px, -3px)\":\"none\",transition:\"transform 0.25s ease\"}})]})]})]}),isMobile&&menuOpen&&/*#__PURE__*/_jsx(\"div\",{style:{...glassStyle,borderRadius:20,width:\"100%\",maxWidth:900,marginTop:8,overflow:\"hidden\",boxSizing:\"border-box\",pointerEvents:\"all\"},children:links.map((link,i)=>/*#__PURE__*/_jsx(\"button\",{onClick:()=>navigate(link.href),style:{display:\"block\",width:\"100%\",textAlign:\"left\",padding:\"14px 24px\",fontSize:15,fontWeight:400,color:\"rgba(255,255,255,0.85)\",fontFamily:\"'Poppins', sans-serif\",background:\"none\",border:\"none\",borderBottom:i<links.length-1?\"1px solid rgba(255,255,255,0.06)\":\"none\",cursor:\"pointer\",letterSpacing:\"0.01em\",transition:\"color 0.2s ease, background 0.2s ease\",boxSizing:\"border-box\"},onMouseEnter:e=>{e.currentTarget.style.background=\"rgba(255,255,255,0.05)\";e.currentTarget.style.color=\"#fff\";},onMouseLeave:e=>{e.currentTarget.style.background=\"none\";e.currentTarget.style.color=\"rgba(255,255,255,0.85)\";},children:link.label},link.label))})]}),/*#__PURE__*/_jsx(\"div\",{style:{height:isMobile?68:76}})]});}NavBar.defaultProps={caseStudiesLink:\"#casestudies\",aboutLink:\"/loading-about\",clientProfileLink:\"#client-profile\",contactLink:\"#footer\",accentColor:\"#FF5151\"};addPropertyControls(NavBar,{caseStudiesLink:{type:ControlType.String,title:\"Case Studies link\",defaultValue:\"#casestudies\"},aboutLink:{type:ControlType.String,title:\"About link\",defaultValue:\"/loading-about\"},clientProfileLink:{type:ControlType.String,title:\"Client Profile link\",defaultValue:\"#client-profile\"},contactLink:{type:ControlType.String,title:\"Contact link\",defaultValue:\"#footer\"},accentColor:{type:ControlType.Color,title:\"CTA color\",defaultValue:\"#FF5151\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",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