{"version":3,"file":"WeftPageHeader.DeZXgkY9.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/KrRQMiU3KQLfymswuvZw/QFTPQFGE6c7gXUyd0OLd/WeftPageHeader.js"],"sourcesContent":["// Weft — Page header.\n// Header for inner pages (Shop, About, Journal, Help, Contact…): eyebrow, oversized title with an\n// italic accent word, intro text and an optional full-width image. Scroll-linked: the title\n// slides sideways and the image parallaxes as you scroll past.\n// Responsive: the title stays on one line on wide screens and wraps (balanced) on tablets and\n// phones, scaled with the screen so it never runs off the edge. Container queries handle it when\n// the header sits in a column; a viewport fallback covers the cases where it doesn't.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{motion,useScroll,useTransform,useReducedMotion}from\"framer-motion\";import{useRef}from\"react\";/**\n * Weft — Page header\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 1200\n */export default function WeftPageHeader(props){const{eyebrow=\"The shop\",title=\"All\",italic=\"pieces\",intro=\"Everything we make, in one place. Filter by collection, sort by price, and add straight to your bag.\",image,showImage=false,imageRatio=2.4,align=\"left\",ink=\"#121110\",soft=\"#5C5853\",accent=\"#2B35E0\",tile=\"#E2DDD4\",style}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const reduced=useReducedMotion();const still=isCanvas||!!reduced;const ref=useRef(null);const{scrollYProgress}=useScroll({target:ref,offset:[\"start start\",\"end start\"]});const x=useTransform(scrollYProgress,[0,1],[\"0%\",align===\"center\"?\"0%\":\"-8%\"]);const imgY=useTransform(scrollYProgress,[0,1],[\"-6%\",\"10%\"]);const center=align===\"center\";const css=`\n      .wph { container-type: inline-size; width: 100%; }\n      .wph-eye { font: 500 11px 'Geist Mono', monospace; letter-spacing: .16em; text-transform: uppercase; color: ${accent}; margin-bottom: 18px; }\n      .wph-t { margin: 0; font-weight: 500; font-size: clamp(40px, 13cqw, 220px); line-height: .84; letter-spacing: -0.065em; white-space: nowrap; }\n      .wph-intro { margin: 24px 0 0; ${center?\"margin-left: auto; margin-right: auto;\":\"\"} max-width: 520px; color: ${soft}; font-size: clamp(15px, 1.4cqw, 18px); line-height: 1.6; }\n      .wph-img { position: relative; margin-top: clamp(28px, 4cqw, 56px); aspect-ratio: ${String(Number(imageRatio)||2.4)}; border-radius: 24px; overflow: hidden; background: ${tile}; }\n      /* Container-based (works when the header sits inside a sized column) */\n      @container (max-width: 640px) {\n        .wph-t { font-size: clamp(38px, 15cqw, 96px); line-height: .9; letter-spacing: -0.05em; white-space: normal; text-wrap: balance; overflow-wrap: anywhere; transform: none !important; }\n      }\n      /* Viewport fallback (always fires on small screens, even if the container context is off) */\n      @media (max-width: 700px) {\n        .wph-eye { margin-bottom: 14px; }\n        .wph-t { font-size: clamp(34px, 11.5vw, 84px) !important; line-height: .92 !important; letter-spacing: -0.045em !important; white-space: normal !important; text-wrap: balance; overflow-wrap: anywhere; transform: none !important; }\n        .wph-intro { margin-top: 18px; font-size: 15px; }\n      }\n      @media (max-width: 700px) {\n        .wph-img { aspect-ratio: ${Math.min(1.6,Number(imageRatio)||2.4)}; margin-top: 28px; }\n      }\n    `;return /*#__PURE__*/_jsxs(\"header\",{ref:ref,className:\"wph\",style:{...style,color:ink,fontFamily:\"'Inter Tight', system-ui, sans-serif\",textAlign:center?\"center\":\"left\"},children:[/*#__PURE__*/_jsx(\"style\",{children:css}),eyebrow&&/*#__PURE__*/_jsxs(\"div\",{className:\"wph-eye\",children:[/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline-block\",width:7,height:7,borderRadius:7,background:accent,marginRight:10,verticalAlign:1}}),eyebrow]}),/*#__PURE__*/_jsxs(motion.h1,{className:\"wph-t\",style:{x:still?0:x},children:[title,\" \",/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:\"'Instrument Serif', Georgia, serif\",fontStyle:\"italic\",fontWeight:400,letterSpacing:\"-0.03em\"},children:italic})]}),intro&&/*#__PURE__*/_jsx(\"p\",{className:\"wph-intro\",children:intro}),showImage&&/*#__PURE__*/_jsx(\"div\",{className:\"wph-img\",children:/*#__PURE__*/_jsx(motion.div,{\"aria-hidden\":\"true\",style:{position:\"absolute\",inset:\"-12% 0\",y:still?0:imgY,backgroundImage:`url(${image?.src||\"https://images.unsplash.com/photo-1645561305502-63a9ba09ab09?auto=format&fit=crop&w=2400&q=80\"})`,backgroundSize:\"cover\",backgroundPosition:\"center 35%\"}})})]});}WeftPageHeader.defaultProps={eyebrow:\"The shop\",title:\"All\",italic:\"pieces\",intro:\"Everything we make, in one place. Filter by collection, sort by price, and add straight to your bag.\",showImage:false,imageRatio:2.4,align:\"left\",ink:\"#121110\",soft:\"#5C5853\",accent:\"#2B35E0\",tile:\"#E2DDD4\"};addPropertyControls(WeftPageHeader,{eyebrow:{type:ControlType.String,title:\"Eyebrow\"},title:{type:ControlType.String,title:\"Title\"},italic:{type:ControlType.String,title:\"Italic word\"},intro:{type:ControlType.String,title:\"Intro\",displayTextArea:true},align:{type:ControlType.Enum,title:\"Align\",options:[\"left\",\"center\"],displaySegmentedControl:true},showImage:{type:ControlType.Boolean,title:\"Image\"},image:{type:ControlType.ResponsiveImage,title:\"Image file\",hidden:p=>!p.showImage},imageRatio:{type:ControlType.Number,title:\"Ratio\",min:1,max:4,step:.1,hidden:p=>!p.showImage},ink:{type:ControlType.Color,title:\"Ink\",defaultValue:\"#121110\"},soft:{type:ControlType.Color,title:\"Body\",defaultValue:\"#5C5853\"},accent:{type:ControlType.Color,title:\"Accent\",defaultValue:\"#2B35E0\"},tile:{type:ControlType.Color,title:\"Image tile\",defaultValue:\"#E2DDD4\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WeftPageHeader\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"1200\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__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