{
  "id": "skew-hover-cards",
  "kind": "element",
  "title": "Skew hover cards",
  "summary": "Three cards that bend, twist and tilt in 3D under the pointer, each with its own personality, and settle back flat when you leave.",
  "url": "https://enrichr.dev/elements/skew-hover-cards.html",
  "section": "band",
  "techniques": [
    "pointer-interaction",
    "3d-css"
  ],
  "stack": [
    "Vanilla JS",
    "CSS"
  ],
  "frameworks": [
    "React",
    "Next.js",
    "Vanilla"
  ],
  "mood": [
    "tactile",
    "modern"
  ],
  "intents": [
    "3D skew hover cards",
    "card tilt on mouse move",
    "hover distort card effect",
    "interactive feature cards",
    "perspective hover cards"
  ],
  "status": "tested",
  "params": [
    {
      "key": "strength",
      "label": "Strength",
      "type": "range",
      "min": 0,
      "max": 2,
      "step": 0.05,
      "value": 1
    },
    {
      "key": "settle",
      "label": "Settle time (s)",
      "type": "range",
      "min": 0.2,
      "max": 2,
      "step": 0.05,
      "value": 0.8
    },
    {
      "key": "background",
      "label": "Background",
      "type": "color",
      "value": "#0c1e18"
    },
    {
      "key": "card",
      "label": "Card colour",
      "type": "color",
      "value": "#173b2e"
    },
    {
      "key": "accent",
      "label": "Accent",
      "type": "color",
      "value": "#e6ff55"
    },
    {
      "key": "text",
      "label": "Text colour",
      "type": "color",
      "value": "#fbf8f1"
    }
  ],
  "license": "Free to use in personal and client projects during the preview. Final licence terms will be published here before any paid tier starts; ask before reselling the code as a collection.",
  "contract": "function mount(root, opts) -> { update(partialOpts), destroy() }; root must contain the element markup",
  "exports": {
    "claude": "Add the \"Skew hover cards\" element to this project.\n\nThis is the \"Skew hover cards\" element from the Enrichr Library: Three cards that bend, twist and tilt in 3D under the pointer, each with its own personality, and settle back flat when you leave.\nPage: https://enrichr.dev/elements/skew-hover-cards.html\nMachine-readable spec: https://enrichr.dev/elements/skew-hover-cards.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nSteps:\n1. Look at the project first to see its framework and where components, styles and static files live. Follow its conventions.\n2. Fetch https://enrichr.dev/elements/skew-hover-cards.json if you can read URLs (fields: source.markup, source.css, source.js, params); otherwise use the source at the end of this message.\n3. Add the files, mount it where I tell you (default: the top of the home page), and pass the settings below as the opts.\n4. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n5. Run the dev server and check it. with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "chatgpt": "I want the \"Skew hover cards\" element on my website. Below is its complete source. Please:\n1. Build one self-contained index.html that I can open locally to see it working (put the CSS in a <style> tag and the JavaScript in a <script> tag, with the markup in the body).\n2. Then explain, step by step, which parts go where in my own site, and how to mount it. My stack is: [tell me yours, or say \"plain HTML\"].\n3. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nThis is the \"Skew hover cards\" element from the Enrichr Library: Three cards that bend, twist and tilt in 3D under the pointer, each with its own personality, and settle back flat when you leave.\nPage: https://enrichr.dev/elements/skew-hover-cards.html\nMachine-readable spec: https://enrichr.dev/elements/skew-hover-cards.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}\n\nVerify: with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.",
    "cursor": "Add the \"Skew hover cards\" element to this codebase.\n\nThis is the \"Skew hover cards\" element from the Enrichr Library: Three cards that bend, twist and tilt in 3D under the pointer, each with its own personality, and settle back flat when you leave.\nPage: https://enrichr.dev/elements/skew-hover-cards.html\nMachine-readable spec: https://enrichr.dev/elements/skew-hover-cards.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nUse Composer / agent mode. First search the repo for how components, styles and scripts are organised, then add the files in the matching places, mount it on the page I name, and run the app to confirm it works. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}\n\nVerify: with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.\n\nOptional: save this as .cursor/rules/enrichr-skew-hover-cards.mdc so the rule stays with the project:\n---\ndescription: How to use the Enrichr Skew hover cards element\nalwaysApply: false\n---\nmount(root, opts) expects the element markup inside root and returns { update, destroy }. Always call destroy() on unmount and never edit the ef- class names.",
    "v0": "Create a Next.js (App Router) client component for the \"Skew hover cards\" element. Tailwind is available but this component needs no utility classes.\n\nThis is the \"Skew hover cards\" element from the Enrichr Library: Three cards that bend, twist and tilt in 3D under the pointer, each with its own personality, and settle back flat when you leave.\nPage: https://enrichr.dev/elements/skew-hover-cards.html\nMachine-readable spec: https://enrichr.dev/elements/skew-hover-cards.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles to create:\n- skew-hover-cards.js : the JavaScript below, with one line appended at the end: export { mount };  (and the markup exported as: export const markup = \"<the markup string>\";). If the project uses TypeScript and does not allow JS imports, put // @ts-nocheck on the first line.\n- the CSS below goes in your global stylesheet (or a plain .css file imported once at the app root). The class names are global and start with ef-.\n\nUse this component as the wrapper (adjust the import paths):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./skew-hover-cards\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function SkewHoverCards(props: Record<string, unknown>) {\n  const ref = useRef<HTMLDivElement>(null);\n  const fx = useRef<{ update: (o: object) => void; destroy: () => void } | null>(null);\n  useEffect(() => {\n    const root = ref.current;\n    if (!root) return;\n    root.innerHTML = markup;\n    fx.current = mount(root, props);\n    return () => { fx.current?.destroy(); fx.current = null; root.innerHTML = \"\"; };\n  }, []);\n  useEffect(() => { fx.current?.update(props); }, [JSON.stringify(props)]);\n  return <div ref={ref} />;\n}\n```\n\nRender it on the home page so I can see it. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "lovable": "Add the \"Skew hover cards\" element to this React + Vite + TypeScript + Tailwind project. Do not install any packages.\n\nThis is the \"Skew hover cards\" element from the Enrichr Library: Three cards that bend, twist and tilt in 3D under the pointer, each with its own personality, and settle back flat when you leave.\nPage: https://enrichr.dev/elements/skew-hover-cards.html\nMachine-readable spec: https://enrichr.dev/elements/skew-hover-cards.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles to create:\n- skew-hover-cards.js : the JavaScript below, with one line appended at the end: export { mount };  (and the markup exported as: export const markup = \"<the markup string>\";). If the project uses TypeScript and does not allow JS imports, put // @ts-nocheck on the first line.\n- the CSS below goes in your global stylesheet (or a plain .css file imported once at the app root). The class names are global and start with ef-.\n\nWrapper component (src/components/SkewHoverCards.tsx):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./skew-hover-cards\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function SkewHoverCards(props: Record<string, unknown>) {\n  const ref = useRef<HTMLDivElement>(null);\n  const fx = useRef<{ update: (o: object) => void; destroy: () => void } | null>(null);\n  useEffect(() => {\n    const root = ref.current;\n    if (!root) return;\n    root.innerHTML = markup;\n    fx.current = mount(root, props);\n    return () => { fx.current?.destroy(); fx.current = null; root.innerHTML = \"\"; };\n  }, []);\n  useEffect(() => { fx.current?.update(props); }, [JSON.stringify(props)]);\n  return <div ref={ref} />;\n}\n```\n\nRemove the \"use client\" line if it is not needed. Show it on the home page. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "bolt": "Create a small Vite project (vanilla JavaScript, no framework unless I already have one) that shows the \"Skew hover cards\" element.\n\nThis is the \"Skew hover cards\" element from the Enrichr Library: Three cards that bend, twist and tilt in 3D under the pointer, each with its own personality, and settle back flat when you leave.\nPage: https://enrichr.dev/elements/skew-hover-cards.html\nMachine-readable spec: https://enrichr.dev/elements/skew-hover-cards.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles: index.html (a container element, then a script tag), style.css (the CSS below), skew-hover-cards.js (the JavaScript below) and main.js that sets the container's innerHTML to the markup and calls mount(container, opts) with the settings below. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}\n\nVerify: with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.",
    "replit": "Create a new HTML, CSS and JavaScript Repl that shows the \"Skew hover cards\" element. No packages, no server code.\n\nThis is the \"Skew hover cards\" element from the Enrichr Library: Three cards that bend, twist and tilt in 3D under the pointer, each with its own personality, and settle back flat when you leave.\nPage: https://enrichr.dev/elements/skew-hover-cards.html\nMachine-readable spec: https://enrichr.dev/elements/skew-hover-cards.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles: index.html (a container element, link style.css, load skew-hover-cards.js and then main.js), style.css (the CSS below), skew-hover-cards.js (the JavaScript below), main.js (sets the container's innerHTML to the markup, then calls mount(container, opts) with the settings below). Press Run to preview. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "figma": "Designer handoff notes for the \"Skew hover cards\" element (Enrichr Library). Figma cannot run this JavaScript inside a design file, so use it as a motion reference and hand the code to a developer.\n\nThis is the \"Skew hover cards\" element from the Enrichr Library: Three cards that bend, twist and tilt in 3D under the pointer, each with its own personality, and settle back flat when you leave.\nPage: https://enrichr.dev/elements/skew-hover-cards.html\nMachine-readable spec: https://enrichr.dev/elements/skew-hover-cards.json\n\nWhat it does: While the pointer is over a card, every frame turns its place inside the card (from minus a half to a half across and down) straight into a pose: a skew of up to 16 and 10 degrees, a twist, a tilt around both axes and a slight push in, behind a 900 px perspective inside a 1000 px perspective row. Each card responds a little more strongly than the one before and has a small fixed lean of its own. There is no easing on the way in, so the card follows the pointer exactly; on leaving it settles back to flat over 0.8 seconds on a power3 out curve, and all cards settle if the window loses focus. The pointer position is read from the card's current on-screen box, as in the original.\nAccessibility: The cards are plain text, not controls, so they take no focus and the words read normally. The decorative glyphs and the puzzle mark are hidden from assistive technology. With prefers-reduced-motion the cards stay flat and only the hover glow changes.\n\nTunable settings:\n- Strength: range 0 to 2, step 0.05, default 1\n- Settle time (s): range 0.2 to 2, step 0.05, default 0.8\n- Background: color, default #0c1e18\n- Card colour: color, default #173b2e\n- Accent: color, default #e6ff55\n- Text colour: color, default #fbf8f1\n\nCurrent settings:\n{{SETTINGS}}\n\nFor the developer: Element contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nIn Figma:\n- Draw the resting state as a frame and the end state as a second frame; link them with Smart Animate to show the motion in a prototype.\n- Put the settings above in the frame's notes or Dev Mode annotations so the developer matches them.\n- Link https://enrichr.dev/elements/skew-hover-cards.html in the handoff: the live demo and the copy-ready code are there. Developers can paste the prompts for Claude, Cursor or v0 from the Export menu.\nNothing is copied from another designer's file; this is original code from Enrichr.",
    "framer": "Add the \"Skew hover cards\" element to Framer as a code component. Framer code components are React, so wrap the vanilla code like this. Check it in the Framer editor, as Framer's component API can change.\n\nThis is the \"Skew hover cards\" element from the Enrichr Library: Three cards that bend, twist and tilt in 3D under the pointer, each with its own personality, and settle back flat when you leave.\nPage: https://enrichr.dev/elements/skew-hover-cards.html\nMachine-readable spec: https://enrichr.dev/elements/skew-hover-cards.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\n1. In Framer: Assets > Code > New component. Name it SkewHoverCards.\n2. Paste the JavaScript below into a separate code file named skew-hover-cards.js in the same project, with  export { mount };  and  export const markup = \"<the markup string>\";  added. Put the CSS into the component as a <style> tag.\n3. Component:\n```tsx\nimport { addPropertyControls, ControlType } from \"framer\"\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./skew-hover-cards\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function SkewHoverCards(props: any) {\n  const ref = useRef<HTMLDivElement>(null);\n  const fx = useRef<{ update: (o: object) => void; destroy: () => void } | null>(null);\n  useEffect(() => {\n    const root = ref.current;\n    if (!root) return;\n    root.innerHTML = markup;\n    fx.current = mount(root, props);\n    return () => { fx.current?.destroy(); fx.current = null; root.innerHTML = \"\"; };\n  }, []);\n  useEffect(() => { fx.current?.update(props); }, [JSON.stringify(props)]);\n  return <div ref={ref} />;\n}\n\naddPropertyControls(SkewHoverCards, {\n  strength: { type: ControlType.Number, title: \"Strength\", min: 0, max: 2, step: 0.05, defaultValue: 1 },\n  settle: { type: ControlType.Number, title: \"Settle time\", min: 0.2, max: 2, step: 0.05, defaultValue: 0.8 },\n  background: { type: ControlType.Color, title: \"Background\", defaultValue: \"#0c1e18\" },\n  card: { type: ControlType.Color, title: \"Card colour\", defaultValue: \"#173b2e\" },\n  accent: { type: ControlType.Color, title: \"Accent\", defaultValue: \"#e6ff55\" },\n  text: { type: ControlType.Color, title: \"Text colour\", defaultValue: \"#fbf8f1\" },\n})\n```\n4. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "webflow": "Add the \"Skew hover cards\" element to a Webflow site with an Embed element. Test it on the published or preview site: scripts in embeds may not run inside the Designer canvas.\n\nThis is the \"Skew hover cards\" element from the Enrichr Library: Three cards that bend, twist and tilt in 3D under the pointer, each with its own personality, and settle back flat when you leave.\nPage: https://enrichr.dev/elements/skew-hover-cards.html\nMachine-readable spec: https://enrichr.dev/elements/skew-hover-cards.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\n1. Add an Embed element where it should appear. Paste a <style> block with the CSS, one container <div id=\"enrichr-skew-hover-cards\"></div>, and a <script> block with the JavaScript followed by:\n   mount(document.getElementById(\"enrichr-skew-hover-cards\"), { ...your settings... });\n   (set the container's innerHTML to the markup first, as in the contract).\n2. Embed elements have a size limit (check Webflow's current number). If the code is longer, host the JS and CSS as files and link them from Custom code in the page settings, then keep only the container and the mount call in the Embed.\n3. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}"
  },
  "exportTools": [
    "claude",
    "chatgpt",
    "cursor",
    "v0",
    "lovable",
    "bolt",
    "replit",
    "figma",
    "framer",
    "webflow"
  ],
  "accessibility": "The cards are plain text, not controls, so they take no focus and the words read normally. The decorative glyphs and the puzzle mark are hidden from assistive technology. With prefers-reduced-motion the cards stay flat and only the hover glow changes.",
  "performance": "Nothing runs until a card is hovered; then one requestAnimationFrame loop writes a single transform per moving card and stops once every card is flat. The cards use will-change: transform so the bend is composited.",
  "dependencies": [],
  "codepen": "https://codepen.io/Enrichr-Dev/pen/xbqmJMr",
  "source": {
    "markup": "<div class=\"ef-shc\">\n  <div class=\"ef-shc__grid\">\n    <div class=\"ef-shc__card\">\n      <span class=\"ef-shc__pill\"><span class=\"ef-shc__glyph\" aria-hidden=\"true\">&#10022;</span> Skew</span>\n      <span class=\"ef-shc__label\">hover &middot; tilt</span>\n      <svg class=\"ef-shc__mark\" viewBox=\"0 0 50 50\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"m34.213 25.361 c0 2.655 1.381 4.808 3.086 4.808 0.781 0 1.494 -0.452 2.038 -1.198 0.267 -0.366 0.688 -0.589 1.142 -0.589 h0.054 c0.774 0 1.401 0.627 1.401 1.401 v10.65 h-10.651 c-0.774 0 -1.401 0.627 -1.401 1.401 v0.054 c0 0.453 0.222 0.874 0.589 1.141 0.746 0.544 1.198 1.257 1.198 2.038 0 1.705 -2.152 3.086 -4.808 3.086 -2.655 0 -4.808 -1.381 -4.808 -3.086 0 -0.781 0.452 -1.494 1.198 -2.038 0.366 -0.267 0.589 -0.688 0.589 -1.142 v-0.054 c0 -0.774 -0.627 -1.401 -1.401 -1.401 h-10.65 v-10.651 c0 -0.774 -0.627 -1.401 -1.401 -1.401 h-0.054 c-0.453 0 -0.875 0.222 -1.142 0.589 -0.543 0.746 -1.257 1.198 -2.038 1.198 -1.705 0 -3.086 -2.152 -3.086 -4.808 0 -2.655 1.381 -4.808 3.086 -4.808 0.781 0 1.495 0.452 2.038 1.198 0.267 0.366 0.688 0.589 1.141 0.589 h0.054 c0.774 0 1.401 -0.627 1.401 -1.401 v-10.65 h10.65 c0.774 0 1.401 -0.627 1.401 -1.401 v-0.054 c0 -0.453 -0.222 -0.875 -0.589 -1.142 -0.746 -0.543 -1.198 -1.257 -1.198 -2.038 0 -1.705 2.152 -3.086 4.808 -3.086 2.655 0 4.808 1.381 4.808 3.086 0 0.781 -0.452 1.495 -1.198 2.038 -0.366 0.267 -0.589 0.688 -0.589 1.141 v0.054 c0 0.774 0.627 1.401 1.401 1.401 h10.65 v10.65 c0 0.774 -0.627 1.401 -1.401 1.401 h-0.053 c-0.453 0 -0.874 -0.222 -1.141 -0.589 -0.544 -0.746 -1.257 -1.198 -2.038 -1.198 -1.705 0 -3.086 2.152 -3.086 4.808 z\"/></svg>\n    </div>\n    <div class=\"ef-shc__card\">\n      <span class=\"ef-shc__pill\"><span class=\"ef-shc__glyph\" aria-hidden=\"true\">&#9672;</span> Mouse</span>\n      <span class=\"ef-shc__label\">hover &middot; twist</span>\n      <svg class=\"ef-shc__mark\" viewBox=\"0 0 50 50\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"m34.213 25.361 c0 2.655 1.381 4.808 3.086 4.808 0.781 0 1.494 -0.452 2.038 -1.198 0.267 -0.366 0.688 -0.589 1.142 -0.589 h0.054 c0.774 0 1.401 0.627 1.401 1.401 v10.65 h-10.651 c-0.774 0 -1.401 0.627 -1.401 1.401 v0.054 c0 0.453 0.222 0.874 0.589 1.141 0.746 0.544 1.198 1.257 1.198 2.038 0 1.705 -2.152 3.086 -4.808 3.086 -2.655 0 -4.808 -1.381 -4.808 -3.086 0 -0.781 0.452 -1.494 1.198 -2.038 0.366 -0.267 0.589 -0.688 0.589 -1.142 v-0.054 c0 -0.774 -0.627 -1.401 -1.401 -1.401 h-10.65 v-10.651 c0 -0.774 -0.627 -1.401 -1.401 -1.401 h-0.054 c-0.453 0 -0.875 0.222 -1.142 0.589 -0.543 0.746 -1.257 1.198 -2.038 1.198 -1.705 0 -3.086 -2.152 -3.086 -4.808 0 -2.655 1.381 -4.808 3.086 -4.808 0.781 0 1.495 0.452 2.038 1.198 0.267 0.366 0.688 0.589 1.141 0.589 h0.054 c0.774 0 1.401 -0.627 1.401 -1.401 v-10.65 h10.65 c0.774 0 1.401 -0.627 1.401 -1.401 v-0.054 c0 -0.453 -0.222 -0.875 -0.589 -1.142 -0.746 -0.543 -1.198 -1.257 -1.198 -2.038 0 -1.705 2.152 -3.086 4.808 -3.086 2.655 0 4.808 1.381 4.808 3.086 0 0.781 -0.452 1.495 -1.198 2.038 -0.366 0.267 -0.589 0.688 -0.589 1.141 v0.054 c0 0.774 0.627 1.401 1.401 1.401 h10.65 v10.65 c0 0.774 -0.627 1.401 -1.401 1.401 h-0.053 c-0.453 0 -0.874 -0.222 -1.141 -0.589 -0.544 -0.746 -1.257 -1.198 -2.038 -1.198 -1.705 0 -3.086 2.152 -3.086 4.808 z\"/></svg>\n    </div>\n    <div class=\"ef-shc__card\">\n      <span class=\"ef-shc__pill\"><span class=\"ef-shc__glyph\" aria-hidden=\"true\">&#9670;</span> 3D</span>\n      <span class=\"ef-shc__label\">hover &middot; rotate</span>\n      <svg class=\"ef-shc__mark\" viewBox=\"0 0 50 50\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"m34.213 25.361 c0 2.655 1.381 4.808 3.086 4.808 0.781 0 1.494 -0.452 2.038 -1.198 0.267 -0.366 0.688 -0.589 1.142 -0.589 h0.054 c0.774 0 1.401 0.627 1.401 1.401 v10.65 h-10.651 c-0.774 0 -1.401 0.627 -1.401 1.401 v0.054 c0 0.453 0.222 0.874 0.589 1.141 0.746 0.544 1.198 1.257 1.198 2.038 0 1.705 -2.152 3.086 -4.808 3.086 -2.655 0 -4.808 -1.381 -4.808 -3.086 0 -0.781 0.452 -1.494 1.198 -2.038 0.366 -0.267 0.589 -0.688 0.589 -1.142 v-0.054 c0 -0.774 -0.627 -1.401 -1.401 -1.401 h-10.65 v-10.651 c0 -0.774 -0.627 -1.401 -1.401 -1.401 h-0.054 c-0.453 0 -0.875 0.222 -1.142 0.589 -0.543 0.746 -1.257 1.198 -2.038 1.198 -1.705 0 -3.086 -2.152 -3.086 -4.808 0 -2.655 1.381 -4.808 3.086 -4.808 0.781 0 1.495 0.452 2.038 1.198 0.267 0.366 0.688 0.589 1.141 0.589 h0.054 c0.774 0 1.401 -0.627 1.401 -1.401 v-10.65 h10.65 c0.774 0 1.401 -0.627 1.401 -1.401 v-0.054 c0 -0.453 -0.222 -0.875 -0.589 -1.142 -0.746 -0.543 -1.198 -1.257 -1.198 -2.038 0 -1.705 2.152 -3.086 4.808 -3.086 2.655 0 4.808 1.381 4.808 3.086 0 0.781 -0.452 1.495 -1.198 2.038 -0.366 0.267 -0.589 0.688 -0.589 1.141 v0.054 c0 0.774 0.627 1.401 1.401 1.401 h10.65 v10.65 c0 0.774 -0.627 1.401 -1.401 1.401 h-0.053 c-0.453 0 -0.874 -0.222 -1.141 -0.589 -0.544 -0.746 -1.257 -1.198 -2.038 -1.198 -1.705 0 -3.086 2.152 -3.086 4.808 z\"/></svg>\n    </div>\n  </div>\n  <p class=\"ef-shc__info\"><span class=\"ef-shc__dot\" aria-hidden=\"true\">&#11044;</span>hover each card &middot; independent 3D skew<span class=\"ef-shc__dot\" aria-hidden=\"true\">&#11044;</span></p>\n</div>",
    "css": "/* Enrichr Library · https://enrichr.dev */\n.ef-shc { --ef-shc-bg: #0c1e18; --ef-shc-card: #173b2e; --ef-shc-acc: #e6ff55; --ef-shc-ink: #fbf8f1; position: relative; box-sizing: border-box; width: 100%; height: 100%; min-height: 30rem; flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 1.5rem; overflow: hidden; border-radius: 1rem; background: linear-gradient(145deg, color-mix(in srgb, var(--ef-shc-bg) 58%, #000), var(--ef-shc-bg)); font-family: \"Parkinsans\", \"Space Grotesk\", system-ui, sans-serif; }\n.ef-shc .ef-shc__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; width: 100%; max-width: 780px; margin: 0 auto; perspective: 1000px; }\n.ef-shc .ef-shc__card { position: relative; box-sizing: border-box; aspect-ratio: 3 / 4; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.2rem; border: 1px solid color-mix(in srgb, var(--ef-shc-ink) 4%, transparent); border-radius: 2.4rem; background: linear-gradient(160deg, var(--ef-shc-card), color-mix(in srgb, var(--ef-shc-card) 58%, #000)); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), inset 0 1px 2px color-mix(in srgb, var(--ef-shc-ink) 4%, transparent); color: var(--ef-shc-ink); font-size: 1.4rem; font-weight: 600; letter-spacing: 0.03em; text-shadow: 0 4px 10px rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); cursor: default; transform-style: preserve-3d; transform-origin: 50% 50%; will-change: transform; transition: box-shadow 0.25s ease; touch-action: pan-y; }\n.ef-shc .ef-shc__card:hover { border-color: color-mix(in srgb, var(--ef-shc-ink) 8%, transparent); box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 20px color-mix(in srgb, var(--ef-shc-acc) 8%, transparent); }\n.ef-shc .ef-shc__pill { padding: 0.4rem 1.4rem; border: 1px solid color-mix(in srgb, var(--ef-shc-ink) 5%, transparent); border-radius: 60px; background: color-mix(in srgb, var(--ef-shc-ink) 3%, transparent); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); font-size: 1.2rem; line-height: 1.5; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; pointer-events: none; }\n.ef-shc .ef-shc__label { margin-top: 0.8rem; text-align: center; font-size: 0.7rem; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.35; pointer-events: none; }\n.ef-shc .ef-shc__mark { position: absolute; right: 1.8rem; bottom: 1.6rem; width: 2rem; height: 2rem; color: var(--ef-shc-acc); opacity: 0.14; pointer-events: none; transition: opacity 0.3s; }\n.ef-shc .ef-shc__info { position: absolute; bottom: 2rem; left: 50%; margin: 0; padding: 0.5rem 2rem; border: 1px solid color-mix(in srgb, var(--ef-shc-ink) 4%, transparent); border-radius: 60px; background: color-mix(in srgb, color-mix(in srgb, var(--ef-shc-bg) 45%, #000) 80%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6); color: color-mix(in srgb, var(--ef-shc-ink) 70%, var(--ef-shc-bg)); font-family: \"Instrument Sans\", system-ui, sans-serif; font-size: 0.85rem; line-height: 1.5; letter-spacing: 0.02em; white-space: nowrap; opacity: 1; transform: translateX(-50%); pointer-events: none; }\n.ef-shc .ef-shc__dot { display: inline-block; margin: 0 0.4rem; color: var(--ef-shc-acc); font-style: normal; }\n.ef-shc.is-narrow .ef-shc__grid { gap: 1rem; max-width: 380px; }\n.ef-shc.is-narrow .ef-shc__card { border-radius: 1.8rem; font-size: 1.1rem; }\n.ef-shc.is-narrow .ef-shc__pill { padding: 0.2rem 1rem; font-size: 0.9rem; }\n.ef-shc.is-narrow .ef-shc__mark { right: 1.4rem; bottom: 1.2rem; width: 1.4rem; height: 1.4rem; }\n.ef-shc.is-narrow .ef-shc__info { padding: 0.3rem 1.2rem; font-size: 0.7rem; white-space: normal; text-align: center; width: max-content; max-width: calc(100% - 2rem); box-sizing: border-box; }\n.ef-shc.is-tiny .ef-shc__pill { padding: 0.15rem 0.6rem; font-size: 0.72rem; letter-spacing: 0.04em; }\n.ef-shc.is-tiny .ef-shc__card { padding: 0.5rem; }\n.ef-shc.is-tiny .ef-shc__label { font-size: 0.55rem; letter-spacing: 0.04em; white-space: nowrap; }\n.ef-shc.is-tiny .ef-shc__mark { right: 0.9rem; bottom: 0.8rem; width: 1rem; height: 1rem; }",
    "js": "// Enrichr Library · https://enrichr.dev\n// Skew hover cards: three cards that bend in 3D only while the pointer is over them. Each frame, the pointer's place\n// inside the hovered card (-0.5 to 0.5 across and down) is mapped straight to a skew (up to 16 and 10 degrees at the\n// edges), a twist, a tilt around both axes and a slight push in, all behind a 900 px perspective inside a\n// 1000 px perspective row. Each card has its own personality: a stronger response and a small fixed lean per position.\n// There is no easing on the way in, the card follows the pointer directly; leaving lets it settle back to flat over\n// 0.8 s on a power3 out curve (0.7 s for every card when the window loses focus). Touch works as a short tap-and-settle.\n// Nothing runs until a card is hovered. Reduced motion: the cards stay flat and only the hover glow changes.\n// mount(root, { strength (1 is the pen), settle (seconds to fall back), background, card, accent, text })\nfunction mount(root, o) {\n  var reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n  var box = root.querySelector(\".ef-shc\");\n  var cards = [].slice.call(root.querySelectorAll(\".ef-shc__card\"));\n  var ZERO = { skx: 0, sky: 0, rz: 0, rx: 0, ry: 0, s: 1 };\n  var st = cards.map(function () { return { hov: false, mx: 0, my: 0, v: Object.assign({}, ZERO), tw: null }; });\n  var opts = {}, raf = 0, last = 0, ro = null, offs = [], destroyed = false;\n\n  function num(v, d) { v = Number(v); return isFinite(v) ? v : d; }\n  function clamp(v) { return v < -0.5 ? -0.5 : v > 0.5 ? 0.5 : v; }\n  function p3o(p) { return 1 - Math.pow(1 - p, 4); } // GSAP power3.out\n\n  // the pen's mapping from pointer offset to pose, card by card\n  function pose(i) {\n    var ox = st[i].mx, oy = st[i].my;\n    var k = (1 + 0.2 * (i % 3)) * opts.strength;\n    var dist = Math.abs(ox) + Math.abs(oy);\n    var fx = 0.08 * (i - 1), fy = 0.06 * (i * 1.2);\n    return {\n      skx: ox * 32 * k + fx * 2,\n      sky: oy * 20 * k + fy * 2,\n      rz: (ox * 14 + oy * 8) * k + i * 0.5,\n      rx: oy * 22 * k + fy * 3,\n      ry: ox * 26 * k + fx * 3,\n      s: 1 + dist * 0.12 * k * 0.6 + 0.01 * (i - 1)\n    };\n  }\n  function paint(i) {\n    var v = st[i].v;\n    cards[i].style.transform = \"perspective(900px) rotate(\" + v.rz.toFixed(3) + \"deg) rotateY(\" + v.ry.toFixed(3) + \"deg) rotateX(\" + v.rx.toFixed(3) +\n      \"deg) skew(\" + v.skx.toFixed(3) + \"deg,\" + v.sky.toFixed(3) + \"deg) scale(\" + v.s.toFixed(4) + \")\";\n  }\n  function settle(i, dur) {\n    var s = st[i];\n    s.hov = false;\n    s.tw = { from: Object.assign({}, s.v), t: 0, d: dur };\n    kick();\n  }\n\n  function loop(now) {\n    raf = 0;\n    var dt = Math.min(0.1, (now - last) / 1000 || 0); last = now;\n    var busy = false;\n    for (var i = 0; i < cards.length; i++) {\n      var s = st[i];\n      if (s.hov) { s.tw = null; s.v = pose(i); paint(i); busy = true; }\n      else if (s.tw) {\n        s.tw.t += dt;\n        var p = Math.min(1, s.tw.t / s.tw.d), e = p3o(p);\n        for (var key in ZERO) s.v[key] = s.tw.from[key] + (ZERO[key] - s.tw.from[key]) * e;\n        paint(i);\n        if (p >= 1) { s.tw = null; cards[i].style.transform = \"\"; } else busy = true;\n      }\n    }\n    if (busy && !document.hidden) raf = requestAnimationFrame(loop);\n  }\n  function kick() { if (!raf && !destroyed && !reduce) { last = performance.now(); raf = requestAnimationFrame(loop); } }\n\n  function offset(card, e) {\n    var r = card.getBoundingClientRect();\n    return [(e.clientX - r.left) / r.width - 0.5, (e.clientY - r.top) / r.height - 0.5];\n  }\n  if (!reduce) {\n    cards.forEach(function (card, i) {\n      var s = st[i];\n      function enter(e) { var p = offset(card, e); s.hov = true; s.mx = p[0]; s.my = p[1]; kick(); }\n      function move(e) { if (!s.hov) return; var p = offset(card, e); s.mx = clamp(p[0]); s.my = clamp(p[1]); kick(); }\n      function leave() { if (s.hov) settle(i, opts.settle); }\n      card.addEventListener(\"pointerenter\", enter);\n      card.addEventListener(\"pointermove\", move);\n      card.addEventListener(\"pointerleave\", leave);\n      card.addEventListener(\"pointercancel\", leave);\n      offs.push(function () {\n        card.removeEventListener(\"pointerenter\", enter); card.removeEventListener(\"pointermove\", move);\n        card.removeEventListener(\"pointerleave\", leave); card.removeEventListener(\"pointercancel\", leave);\n      });\n    });\n    var onBlur = function () { cards.forEach(function (c, i) { if (st[i].hov || st[i].tw || cards[i].style.transform) settle(i, opts.settle * 0.875); }); };\n    window.addEventListener(\"blur\", onBlur);\n    offs.push(function () { window.removeEventListener(\"blur\", onBlur); });\n  }\n\n  function size() {\n    var W = box.clientWidth;\n    box.classList.toggle(\"is-narrow\", W < 600);\n    box.classList.toggle(\"is-tiny\", W < 420);\n  }\n  function update(partial) {\n    opts = Object.assign({ strength: 1, settle: 0.8, background: \"#0c1e18\", card: \"#173b2e\", accent: \"#e6ff55\", text: \"#fbf8f1\" }, opts, partial || {});\n    opts.strength = Math.max(0, num(opts.strength, 1)); opts.settle = Math.max(0.05, num(opts.settle, 0.8));\n    box.style.setProperty(\"--ef-shc-bg\", opts.background);\n    box.style.setProperty(\"--ef-shc-card\", opts.card);\n    box.style.setProperty(\"--ef-shc-acc\", opts.accent);\n    box.style.setProperty(\"--ef-shc-ink\", opts.text);\n    if (destroyed) return;\n    size();\n  }\n\n  update(o);\n  if (\"ResizeObserver\" in window) { ro = new ResizeObserver(function () { if (!destroyed) size(); }); ro.observe(box); }\n  return {\n    update: update,\n    destroy: function () {\n      destroyed = true; cancelAnimationFrame(raf); raf = 0;\n      offs.forEach(function (f) { f(); }); offs = [];\n      if (ro) ro.disconnect();\n      cards.forEach(function (c) { c.style.transform = \"\"; });\n    }\n  };\n}"
  }
}