{"version":3,"file":"PostCard.C7IrI2LM.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/LgBXtS4b7Y1b3uQZdjok/qxezFRByOWouyZlnFrnE/PostCard.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Atrium journal card, matched to the approved prototype.\n *\n * Card     a 4:3 photo over the category and date, the title and the excerpt\n * Feature  the latest article: a wide photo beside the title, with a\n *          \"Read the article\" line. Below 900 wide it stacks, photo on top\n *\n * The whole card is one link, and the photo zooms in slightly on hover.\n * Title Size: Card 30 / 30 / 26, Feature 52 / 40 / 32 (Desktop / Tablet / Phone).\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 360\n */export default function PostCard(props){const{layout,image,category,date,title,excerpt,more,size,link,newTab,cursorLabel,titleFont,textFont,labelFont,ink,muted,accent,photoBg}=props;const[hover,setHover]=useState(false);const[calm,setCalm]=useState(false);useEffect(()=>{const mq=window.matchMedia(\"(prefers-reduced-motion: reduce)\");const sync=()=>setCalm(mq.matches);sync();mq.addEventListener(\"change\",sync);return()=>mq.removeEventListener(\"change\",sync);},[]);const feature=layout===\"feature\";// Without a link it is a plain block, so search engines don't meet a dead link\nconst Card=link?\"a\":\"div\";const Title=feature?\"h2\":\"h3\";const meta=[category,formatDate(date)].filter(s=>String(s??\"\").trim()).join(\" \\xb7 \");const ease=\"cubic-bezier(.22, 1, .36, 1)\";return /*#__PURE__*/_jsxs(Card,{className:`atr-pc${feature?\" atr-pc-f\":\"\"}`,href:link||undefined,\"data-cursor\":link&&cursorLabel?cursorLabel:undefined,target:newTab?\"_blank\":undefined,rel:newTab?\"noopener\":undefined,onPointerEnter:()=>setHover(true),onPointerLeave:()=>setHover(false),style:{\"--ink\":ink,\"--muted\":muted,\"--accent\":accent,\"--bg\":photoBg,\"--size\":`${size}px`,\"--ease\":ease,\"--serif\":family(titleFont,SERIF),\"--sans\":family(textFont,SANS),\"--mono\":family(labelFont,MONO),\"--tw\":titleFont?.fontWeight||400,\"--ts\":titleFont?.fontStyle||\"normal\",cursor:link?\"pointer\":\"default\"},\"data-hover\":hover||undefined,\"data-calm\":calm||undefined,children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:CSS}}),/*#__PURE__*/_jsxs(\"div\",{className:\"atr-pc-in\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"atr-pc-img\",children:image?.src&&/*#__PURE__*/_jsx(\"img\",{src:image.src,srcSet:image.srcSet,// Feature: about 60% of the page on Desktop, full width below. Card: a third, a half, then full width\nsizes:feature?\"(max-width: 1199.98px) 100vw, 760px\":\"(max-width: 809.98px) 100vw, (max-width: 1199.98px) 50vw, 420px\",alt:image.alt||\"\",loading:feature?\"eager\":\"lazy\"})}),/*#__PURE__*/_jsxs(\"div\",{className:\"atr-pc-copy\",children:[meta&&/*#__PURE__*/_jsx(\"span\",{className:\"atr-pc-meta\",children:meta}),title&&/*#__PURE__*/_jsx(Title,{className:\"atr-pc-title\",children:title}),excerpt&&/*#__PURE__*/_jsx(\"p\",{className:\"atr-pc-ex\",children:excerpt}),feature&&more&&/*#__PURE__*/_jsx(\"span\",{className:\"atr-pc-more\",children:more})]})]})]});}// \"2026-10-08\" or a CMS date becomes \"Oct 8, 2026\"; anything else is shown as it is\nfunction formatDate(value){if(!value)return\"\";const d=new Date(value);if(isNaN(d.getTime()))return String(value);return d.toLocaleDateString(\"en-US\",{month:\"short\",day:\"numeric\",year:\"numeric\",timeZone:\"UTC\"});}// A font picked in the panel goes first, with Atrium's own font behind it while it loads\nfunction family(font,fallback){return font?.fontFamily?`${font.fontFamily}, ${fallback}`:fallback;}const SERIF=`\"Instrument Serif\", \"Iowan Old Style\", \"Times New Roman\", serif`;const SANS=`\"Instrument Sans\", system-ui, -apple-system, \"Segoe UI\", sans-serif`;const MONO=`\"IBM Plex Mono\", ui-monospace, Menlo, monospace`;const CSS=`\n.atr-pc{display:block;width:100%;container-type:inline-size;color:var(--ink);text-decoration:none;-webkit-font-smoothing:antialiased}\n.atr-pc-in{display:grid;gap:18px;align-content:start}\n.atr-pc-img{position:relative;aspect-ratio:4/3;border-radius:6px;overflow:hidden;background:var(--bg);-webkit-mask-image:-webkit-radial-gradient(white,black)}\n.atr-pc-img img{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;display:block;transition:transform 1.1s var(--ease)}\n.atr-pc[data-hover] .atr-pc-img img{transform:scale(1.05)}\n.atr-pc-copy{display:grid;gap:10px;justify-items:start;min-width:0}\n.atr-pc-meta{font-family:var(--mono);font-size:12px;line-height:1.4;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}\n.atr-pc-title{margin:0;font-family:var(--serif);font-weight:var(--tw);font-style:var(--ts);font-size:var(--size);line-height:1.1;letter-spacing:-.005em;text-wrap:balance;color:var(--ink);transition:color .35s var(--ease)}\n.atr-pc[data-hover] .atr-pc-title{color:var(--accent)}\n.atr-pc-ex{margin:0;font-family:var(--sans);font-size:16px;line-height:1.6;color:var(--muted)}\n.atr-pc-more{margin-top:6px;font-family:var(--sans);font-weight:500;font-size:16px;color:var(--ink);background:linear-gradient(currentColor,currentColor) 0 100%/100% 1px no-repeat;padding-bottom:4px;transition:background-size .5s var(--ease)}\n.atr-pc[data-hover] .atr-pc-more{background-size:0 1px;background-position:100% 100%}\n.atr-pc-f .atr-pc-copy{gap:18px}\n.atr-pc-f .atr-pc-title{line-height:1.02;letter-spacing:-.012em}\n.atr-pc-f .atr-pc-ex{font-size:18px;max-width:24em}\n.atr-pc-f .atr-pc-img{aspect-ratio:16/9}\n@container (min-width: 900px){\n  .atr-pc-f .atr-pc-in{grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:clamp(32px,5cqw,64px);align-items:center}\n  .atr-pc-f .atr-pc-img{aspect-ratio:3/2}\n}\n@container (max-width: 559px){\n  .atr-pc-f .atr-pc-img{aspect-ratio:4/3}\n  .atr-pc-f .atr-pc-ex{font-size:16px}\n}\n.atr-pc[data-calm] *{transition:none!important}\n`;PostCard.defaultProps={layout:\"card\",category:\"Selling\",date:\"2026-10-08\",title:\"What a good valuation actually includes\",excerpt:\"Three numbers, two comparables and one honest conversation.\",more:\"Read the article\",size:30,newTab:false,cursorLabel:\"Read\",ink:\"#1B1A17\",muted:\"#5F5B54\",accent:\"#2F4A3A\",photoBg:\"#E3DDD3\"};addPropertyControls(PostCard,{layout:{type:ControlType.Enum,title:\"Layout\",options:[\"card\",\"feature\"],optionTitles:[\"Card\",\"Feature\"],displaySegmentedControl:true},image:{type:ControlType.ResponsiveImage,title:\"Photo\"},category:{type:ControlType.String,title:\"Category\"},date:{type:ControlType.Date,title:\"Date\"},title:{type:ControlType.String,title:\"Title\",displayTextArea:true},excerpt:{type:ControlType.String,title:\"Excerpt\",displayTextArea:true},more:{type:ControlType.String,title:\"Read Label\",hidden:p=>p.layout!==\"feature\"},size:{type:ControlType.Number,title:\"Title Size\",min:16,max:96,step:1,unit:\"px\"},link:{type:ControlType.Link,title:\"Link\"},newTab:{type:ControlType.Boolean,title:\"New Tab\"},cursorLabel:{type:ControlType.String,title:\"Cursor\",description:\"Shown in the arch cursor over this card. Empty keeps the normal cursor.\"},titleFont:{type:ControlType.Font,title:\"Title Font\",controls:\"basic\",defaultFontType:\"serif\"},textFont:{type:ControlType.Font,title:\"Text Font\",controls:\"basic\",defaultFontType:\"sans-serif\"},labelFont:{type:ControlType.Font,title:\"Label Font\",controls:\"basic\",defaultFontType:\"monospace\"},ink:{type:ControlType.Color,title:\"Ink\"},muted:{type:ControlType.Color,title:\"Muted\"},accent:{type:ControlType.Color,title:\"Hover\"},photoBg:{type:ControlType.Color,title:\"Photo BG\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PostCard\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"360\",\"framerSupport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