{"version":3,"file":"HoverCard.DfGmsoIX.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/VOacZ2K2RfPquBV8mdOE/qUkHR36aKjsEadMxNqPl/HoverCard.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useState}from\"react\";import{RenderTarget}from\"framer\";/**\n * HoverCard — the site's standard card hover treatment, applied to an\n * existing card FrameNode via `codeOverride`. Matches ChecklistCard.tsx\n * (Avinya_2/ChecklistCard), the reference the client approved on\n * immigration-and-visas: brass ring, soft double drop-shadow, 2px lift.\n *\n * ONLY apply this to real cards — nodes with their own background fill.\n * Transparent containers (text columns, image+text blocks, outlined\n * panels) are not cards; giving them a hover ring outlines something that\n * does not read as a surface.\n *\n * ── Three things this file has to work around ────────────────────────────\n *\n * 1. NEVER set the `border` CSS property here.\n *    Framer renders a node's border as a `::after` pseudo-element on\n *    `[data-border=\"true\"]`, driven by CSS custom properties:\n *        border-color: var(--border-color, none)\n *        border-width: var(--border-top-width, 0) ...\n *    Setting `border` inline adds a REAL second ring on top of Framer's,\n *    which is the \"double outline\" bug. Change `--border-color` instead —\n *    that recolours the ring Framer is already drawing, so there is only\n *    ever one.\n *\n * 2. NEVER set `transform` here.\n *    `appearEffect` (the § 19 scroll-reveal) animates `transform` and\n *    `opacity` inline. Writing `transform` fights it. The lift uses the\n *    standalone `translate` property instead, which composites with\n *    `transform` independently, so both effects coexist.\n *\n * 3. MUST forward the ref.\n *    `appearEffect` needs a real DOM ref for its IntersectionObserver.\n *    Dropping it leaves the card stuck at `opacity: 0` on the published\n *    site while still looking fine on canvas (§ 26).\n *\n * ── Two exports, by whether the card has its own border ──────────────────\n *   withHoverCard      cards that already have a Framer border. Recolours\n *                      that existing ring to brass on hover.\n *   withHoverCardRing  cards with a background but no border. Draws the\n *                      brass ring with an inset box-shadow, which adds no\n *                      layout and has no Framer ring to collide with.\n *\n * Neither needs to know the card's resting border colour — at rest this\n * override changes nothing, so every card keeps exactly the look it was\n * designed with.\n */const BRASS=\"rgb(181, 142, 94)\"// accent/brass\n;const DROP=\"0px 18px 44px rgba(58, 61, 61, 0.16), 0px 3px 8px rgba(58, 61, 61, 0.10)\";const RING=`inset 0 0 0 1px ${BRASS}`;const TRANSITION=\"box-shadow 0.25s ease, translate 0.25s ease\";function useHover(){const[hovered,setHovered]=useState(false);return{hovered,handlers:{onMouseEnter:()=>setHovered(true),onMouseLeave:()=>setHovered(false)}};}export function withHoverCard(Component){return /*#__PURE__*/forwardRef(function HoverCard(props,ref){const isCanvas=RenderTarget.current()===RenderTarget.canvas;const{hovered,handlers}=useHover();// Canvas renders the card exactly as designed, untouched.\nif(isCanvas)return /*#__PURE__*/_jsx(Component,{ref:ref,...props});const style={...props.style,...hovered?{\"--border-color\":BRASS}:null,boxShadow:hovered?DROP:props.style?.boxShadow,translate:hovered?\"0 -2px\":\"0 0\",transition:TRANSITION};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,...handlers,style:style});});}export function withHoverCardRing(Component){return /*#__PURE__*/forwardRef(function HoverCardRing(props,ref){const isCanvas=RenderTarget.current()===RenderTarget.canvas;const{hovered,handlers}=useHover();if(isCanvas)return /*#__PURE__*/_jsx(Component,{ref:ref,...props});const style={...props.style,boxShadow:hovered?`${RING}, ${DROP}`:props.style?.boxShadow,translate:hovered?\"0 -2px\":\"0 0\",transition:TRANSITION};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,...handlers,style:style});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withHoverCard\":{\"type\":\"reactHoc\",\"name\":\"withHoverCard\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHoverCardRing\":{\"type\":\"reactHoc\",\"name\":\"withHoverCardRing\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HoverCard.map"],"mappings":"0KA6C4L,SAAS,GAAU,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAS,EAAK,EAAE,MAAM,CAA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