{
  "id": "lookbook-hover-wipes",
  "kind": "element",
  "title": "Lookbook hover wipes (4 effects)",
  "summary": "A lookbook grid where hovering a look wipes in a colour card, with buttons to choose four effects: Sweep, Reach, Peel and Glass.",
  "url": "https://enrichr.dev/elements/lookbook-hover-wipes.html",
  "section": "gallery",
  "techniques": [
    "pointer-interaction",
    "reveal"
  ],
  "stack": [
    "Vanilla JS",
    "CSS",
    "SVG"
  ],
  "frameworks": [
    "React",
    "Next.js",
    "Vanilla"
  ],
  "mood": [
    "polished",
    "modern",
    "playful"
  ],
  "intents": [
    "image hover card reveal",
    "clip path wipe hover from entry side",
    "peel corner hover effect",
    "frosted glass hover reveal",
    "lookbook grid hover effects without webgl"
  ],
  "status": "tested",
  "params": [
    {
      "key": "accent",
      "label": "Card colour",
      "type": "color",
      "value": "#e6ff55"
    },
    {
      "key": "effect",
      "label": "Effect",
      "type": "select",
      "options": [
        [
          "sweep",
          "Sweep"
        ],
        [
          "reach",
          "Reach"
        ],
        [
          "peel",
          "Peel"
        ],
        [
          "glass",
          "Glass"
        ]
      ],
      "value": "sweep"
    },
    {
      "key": "speed",
      "label": "Speed",
      "type": "range",
      "min": 0.5,
      "max": 2,
      "step": 0.1,
      "value": 1
    },
    {
      "key": "edge",
      "label": "Sweep edge roughness",
      "type": "range",
      "min": 0,
      "max": 1,
      "step": 0.05,
      "value": 0.6
    },
    {
      "key": "looks",
      "label": "Looks",
      "type": "range",
      "min": 2,
      "max": 6,
      "step": 1,
      "value": 6
    }
  ],
  "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 \"Lookbook hover wipes (4 effects)\" element to this project.\n\nThis is the \"Lookbook hover wipes (4 effects)\" element from the Enrichr Library: A lookbook grid where hovering a look wipes in a colour card, with buttons to choose four effects: Sweep, Reach, Peel and Glass.\nPage: https://enrichr.dev/elements/lookbook-hover-wipes.html\nMachine-readable spec: https://enrichr.dev/elements/lookbook-hover-wipes.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/lookbook-hover-wipes.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 \"Lookbook hover wipes (4 effects)\" 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 \"Lookbook hover wipes (4 effects)\" element from the Enrichr Library: A lookbook grid where hovering a look wipes in a colour card, with buttons to choose four effects: Sweep, Reach, Peel and Glass.\nPage: https://enrichr.dev/elements/lookbook-hover-wipes.html\nMachine-readable spec: https://enrichr.dev/elements/lookbook-hover-wipes.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 \"Lookbook hover wipes (4 effects)\" element to this codebase.\n\nThis is the \"Lookbook hover wipes (4 effects)\" element from the Enrichr Library: A lookbook grid where hovering a look wipes in a colour card, with buttons to choose four effects: Sweep, Reach, Peel and Glass.\nPage: https://enrichr.dev/elements/lookbook-hover-wipes.html\nMachine-readable spec: https://enrichr.dev/elements/lookbook-hover-wipes.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-lookbook-hover-wipes.mdc so the rule stays with the project:\n---\ndescription: How to use the Enrichr Lookbook hover wipes (4 effects) 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 \"Lookbook hover wipes (4 effects)\" element. Tailwind is available but this component needs no utility classes.\n\nThis is the \"Lookbook hover wipes (4 effects)\" element from the Enrichr Library: A lookbook grid where hovering a look wipes in a colour card, with buttons to choose four effects: Sweep, Reach, Peel and Glass.\nPage: https://enrichr.dev/elements/lookbook-hover-wipes.html\nMachine-readable spec: https://enrichr.dev/elements/lookbook-hover-wipes.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- lookbook-hover-wipes.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 \"./lookbook-hover-wipes\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function LookbookHoverWipes(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 \"Lookbook hover wipes (4 effects)\" element to this React + Vite + TypeScript + Tailwind project. Do not install any packages.\n\nThis is the \"Lookbook hover wipes (4 effects)\" element from the Enrichr Library: A lookbook grid where hovering a look wipes in a colour card, with buttons to choose four effects: Sweep, Reach, Peel and Glass.\nPage: https://enrichr.dev/elements/lookbook-hover-wipes.html\nMachine-readable spec: https://enrichr.dev/elements/lookbook-hover-wipes.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- lookbook-hover-wipes.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/LookbookHoverWipes.tsx):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./lookbook-hover-wipes\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function LookbookHoverWipes(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 \"Lookbook hover wipes (4 effects)\" element.\n\nThis is the \"Lookbook hover wipes (4 effects)\" element from the Enrichr Library: A lookbook grid where hovering a look wipes in a colour card, with buttons to choose four effects: Sweep, Reach, Peel and Glass.\nPage: https://enrichr.dev/elements/lookbook-hover-wipes.html\nMachine-readable spec: https://enrichr.dev/elements/lookbook-hover-wipes.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), lookbook-hover-wipes.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 \"Lookbook hover wipes (4 effects)\" element. No packages, no server code.\n\nThis is the \"Lookbook hover wipes (4 effects)\" element from the Enrichr Library: A lookbook grid where hovering a look wipes in a colour card, with buttons to choose four effects: Sweep, Reach, Peel and Glass.\nPage: https://enrichr.dev/elements/lookbook-hover-wipes.html\nMachine-readable spec: https://enrichr.dev/elements/lookbook-hover-wipes.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 lookbook-hover-wipes.js and then main.js), style.css (the CSS below), lookbook-hover-wipes.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 \"Lookbook hover wipes (4 effects)\" 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 \"Lookbook hover wipes (4 effects)\" element from the Enrichr Library: A lookbook grid where hovering a look wipes in a colour card, with buttons to choose four effects: Sweep, Reach, Peel and Glass.\nPage: https://enrichr.dev/elements/lookbook-hover-wipes.html\nMachine-readable spec: https://enrichr.dev/elements/lookbook-hover-wipes.json\n\nWhat it does: This is a vanilla port of four of the original's hover ideas, with no GSAP and no WebGL. Each look is a puzzle-piece art tile with a colour card on top, and a shared requestAnimationFrame loop eases per-look numbers toward their targets. Sweep works out which side the pointer entered by and writes a clip-path polygon whose edge is a row of points with fixed noise, leaving off the far side or back the way it came. Reach gives each edge point its own chase speed toward the pointer depth. Peel clips the art against a diagonal fold line from the nearest corner and mirrors a copy of it with a reflection matrix to make the paper flap. Glass animates an inset clip-path with a growing corner radius over a blurred, translucent card.\nAccessibility: Each look is focusable, and keyboard focus brings its card in the same way hover does. The card text is always in the DOM, and clip-path only hides it visually. Effect buttons are real buttons with aria-pressed. Touch uses a tap to show and another to hide. With prefers-reduced-motion the card appears at once with no wipe. Check the card text contrast if you pick a custom card colour; the text flips between ink and cream automatically.\n\nTunable settings:\n- Card colour: color, default #e6ff55\n- Effect: select (Sweep / Reach / Peel / Glass), default sweep\n- Speed: range 0.5 to 2, step 0.1, default 1\n- Sweep edge roughness: range 0 to 1, step 0.05, default 0.6\n- Looks: range 2 to 6, step 1, default 6\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/lookbook-hover-wipes.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 \"Lookbook hover wipes (4 effects)\" 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 \"Lookbook hover wipes (4 effects)\" element from the Enrichr Library: A lookbook grid where hovering a look wipes in a colour card, with buttons to choose four effects: Sweep, Reach, Peel and Glass.\nPage: https://enrichr.dev/elements/lookbook-hover-wipes.html\nMachine-readable spec: https://enrichr.dev/elements/lookbook-hover-wipes.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 LookbookHoverWipes.\n2. Paste the JavaScript below into a separate code file named lookbook-hover-wipes.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 \"./lookbook-hover-wipes\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function LookbookHoverWipes(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(LookbookHoverWipes, {\n  accent: { type: ControlType.Color, title: \"Card colour\", defaultValue: \"#e6ff55\" },\n  effect: { type: ControlType.Enum, title: \"Effect\", options: [\"sweep\",\"reach\",\"peel\",\"glass\"], optionTitles: [\"Sweep\",\"Reach\",\"Peel\",\"Glass\"], defaultValue: \"sweep\" },\n  speed: { type: ControlType.Number, title: \"Speed\", min: 0.5, max: 2, step: 0.1, defaultValue: 1 },\n  edge: { type: ControlType.Number, title: \"Sweep edge roughness\", min: 0, max: 1, step: 0.05, defaultValue: 0.6 },\n  looks: { type: ControlType.Number, title: \"Looks\", min: 2, max: 6, step: 1, defaultValue: 6 },\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 \"Lookbook hover wipes (4 effects)\" 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 \"Lookbook hover wipes (4 effects)\" element from the Enrichr Library: A lookbook grid where hovering a look wipes in a colour card, with buttons to choose four effects: Sweep, Reach, Peel and Glass.\nPage: https://enrichr.dev/elements/lookbook-hover-wipes.html\nMachine-readable spec: https://enrichr.dev/elements/lookbook-hover-wipes.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-lookbook-hover-wipes\"></div>, and a <script> block with the JavaScript followed by:\n   mount(document.getElementById(\"enrichr-lookbook-hover-wipes\"), { ...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": "Each look is focusable, and keyboard focus brings its card in the same way hover does. The card text is always in the DOM, and clip-path only hides it visually. Effect buttons are real buttons with aria-pressed. Touch uses a tap to show and another to hide. With prefers-reduced-motion the card appears at once with no wipe. Check the card text contrast if you pick a custom card colour; the text flips between ink and cream automatically.",
  "performance": "One rAF loop runs only while a look is animating and writes clip-path and one transform. There are no images; the art is gradients and inline SVG. Glass uses backdrop-filter on the cards, which is the costliest part, so keep the grid small or switch effect if you need more tiles.",
  "dependencies": [],
  "source": {
    "markup": "<div class=\"ef-lhw\">\n  <div class=\"ef-lhw__wrap\">\n    <div class=\"ef-lhw__bar\" role=\"group\" aria-label=\"Hover effect\">\n      <button type=\"button\" class=\"ef-lhw__btn\" data-fx=\"sweep\" aria-pressed=\"true\">Sweep</button>\n      <button type=\"button\" class=\"ef-lhw__btn\" data-fx=\"reach\" aria-pressed=\"false\">Reach</button>\n      <button type=\"button\" class=\"ef-lhw__btn\" data-fx=\"peel\" aria-pressed=\"false\">Peel</button>\n      <button type=\"button\" class=\"ef-lhw__btn\" data-fx=\"glass\" aria-pressed=\"false\">Glass</button>\n    </div>\n    <ul class=\"ef-lhw__looks\"></ul>\n  </div>\n</div>",
    "css": "/* Enrichr Library · https://enrichr.dev */\n/* Adapted from https://github.com/codrops/LookbookHoverEffects (MIT) — Copyright (c) 2009 - 2026 [Codrops](https://codrops.com) */\n.ef-lhw { width: 100%; }\n.ef-lhw__wrap { --ef-acc: #e6ff55; --ef-card: #e6ff55; --ef-card-text: #0c1e18; box-sizing: border-box; width: 100%; padding: 1rem; border-radius: 1rem; font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif; color: #fbf8f1; }\n.ef-lhw__bar { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }\n.ef-lhw__btn { appearance: none; font: inherit; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #fbf8f1; background: transparent; border: 1px solid rgba(251, 248, 241, 0.35); border-radius: 999px; padding: 0.4rem 0.85rem; cursor: pointer; transition: background 200ms, color 200ms, border-color 200ms; }\n.ef-lhw__btn:hover { border-color: var(--ef-acc); }\n.ef-lhw__btn[aria-pressed=\"true\"] { background: var(--ef-acc); border-color: var(--ef-acc); color: #0c1e18; }\n.ef-lhw__btn:focus-visible { outline: 2px solid var(--ef-acc); outline-offset: 2px; }\n.ef-lhw__looks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }\n.ef-lhw__look { position: relative; margin: 0; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 0.55rem; container-type: inline-size; cursor: default; outline: none; isolation: isolate; background: #0c1e18; }\n.ef-lhw__look:focus-visible { box-shadow: 0 0 0 2px var(--ef-acc); }\n.ef-lhw__art, .ef-lhw__flap { position: absolute; inset: 0; z-index: 1; overflow: hidden; }\n.ef-lhw__art svg, .ef-lhw__flap svg { position: absolute; display: block; }\n.ef-lhw__flap { display: none; z-index: 3; transform-origin: 0 0; clip-path: polygon(0 0, 0 0, 0 0); filter: brightness(1.15) saturate(0.8); }\n.ef-lhw__flap::after { content: \"\"; position: absolute; inset: 0; background: rgba(251, 248, 241, 0.5); }\n.ef-lhw__card { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; box-sizing: border-box; padding: 9cqw; margin: 0; background: var(--ef-card); color: var(--ef-card-text); clip-path: polygon(0 0, 0 0, 0 0); }\n.ef-lhw__inner { display: flex; flex-direction: column; height: 100%; transform-origin: 50% 50%; transform: scale(var(--ef-s, 1)); }\n.ef-lhw__label { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.75; }\n.ef-lhw__num { font-family: Georgia, \"Times New Roman\", serif; font-weight: 400; font-size: 36cqw; line-height: 0.85; margin-top: 3cqw; }\n.ef-lhw__pieces { margin-top: auto; font-size: max(0.62rem, 7.4cqw); font-weight: 600; line-height: 1.3; }\n.ef-lhw__rim { position: absolute; z-index: 4; pointer-events: none; border: 1.5px solid rgba(251, 248, 241, 0.75); box-shadow: inset 0 0 14px rgba(251, 248, 241, 0.4); opacity: 0; box-sizing: border-box; }\n.ef-lhw__wrap[data-fx=\"peel\"] .ef-lhw__flap { display: block; }\n.ef-lhw__wrap[data-fx=\"peel\"] .ef-lhw__art { z-index: 2; }\n.ef-lhw__wrap[data-fx=\"peel\"] .ef-lhw__card { z-index: 1; clip-path: none; }\n.ef-lhw__wrap[data-fx=\"glass\"] .ef-lhw__card { background: color-mix(in srgb, var(--ef-card) 84%, transparent); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }\n.ef-lhw__look.is-on .ef-lhw__card { z-index: 5; clip-path: none; }\n.ef-lhw__look.is-on .ef-lhw__rim, .ef-lhw__look.is-on .ef-lhw__flap { display: none; }\n@media (prefers-reduced-motion: reduce) { .ef-lhw__btn { transition: none; } .ef-lhw__wrap .ef-lhw__inner { transform: none; } }",
    "js": "// Enrichr Library · https://enrichr.dev\n// Adapted from https://github.com/codrops/LookbookHoverEffects (MIT) — Copyright (c) 2009 - 2026 [Codrops](https://codrops.com)\n// Lookbook hover wipes: a grid of \"looks\" (puzzle-piece art on gradients). Hover or focus a look and a colour card takes it over; buttons pick\n// one of four effects. Sweep: the card wipes in from the side the pointer entered by with a frizzy edge, and leaves off the far side or back\n// the way it came. Reach: the card's edge is a row of points that chase the pointer at different speeds. Peel: the art peels back from the\n// nearest corner like a print, its mirrored flap showing paper. Glass: a frosted pane swells from the middle and squares off. Vanilla port,\n// no GSAP, WebGL or images: all motion is a requestAnimationFrame lerp writing clip-path and transform. Reduced motion shows the card at once.\n// mount(root, { background, accent (card colour), effect (sweep|reach|peel|glass), speed (0.5-2), looks (2-6), edge (0-1, jaggedness) })\nfunction mount(root, o) {\n  var reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n  var wrap = root.querySelector(\".ef-lhw__wrap\");\n  var list = root.querySelector(\".ef-lhw__looks\");\n  var btns = [].slice.call(root.querySelectorAll(\".ef-lhw__btn\"));\n  var opts = {}, looks = [], offs = [], raf = 0, last = 0;\n  var N = 14, NS = 8;\n  var PIECES = {\n    p1: { vb: \"1513.7 1453.9 322.3 322.3\", d: \"M1821 1761.2h-292.3v-111.6c0-8 6.5-14.5 14.5-14.5 4.2 0 8.2 1.9 11 5.1 7.8 8.6 19.7 13.6 32.7 11.9 16.8-2.3 30.1-16 32-32.7 2.5-22.6-15.1-41.6-37.1-41.6-11 0-20.9 4.7-27.7 12.3-2.8 3.1-6.7 4.9-10.9 4.9-8 0-14.5-6.4-14.5-14.4v-111.7h292.3v111.7c0 8-6.4 14.4-14.5 14.4-4.2 0-8.1-1.8-10.9-5-7.9-8.6-19.7-13.6-32.7-11.9-16.8 2.2-30.1 15.9-32 32.7-2.5 22.6 15.1 41.6 37.1 41.6 11 0 20.8-4.8 27.7-12.3 2.8-3.1 6.7-5 10.8-5 8.1 0 14.5 6.5 14.5 14.5z\" },\n    p4: { vb: \"1423.36 860.8 503.07 322.3\", d: \"M1821 875.8v111.6c0 8 6.5 14.5 14.5 14.5 4.2 0 8.1-1.9 10.9-5 6.8-7.5 16.7-12.3 27.7-12.3 22 0 39.6 19 37.1 41.6-1.9 16.7-15.2 30.5-32 32.7-13 1.7-24.8-3.3-32.7-11.9-2.8-3.2-6.8-5-11-5-8 0-14.5 6.4-14.5 14.4v111.7h-111.6c-8 0-14.5-6.5-14.5-14.5 0-4.2 1.9-8.2 5-11 8.7-7.9 13.7-19.7 12-32.7-2.3-16.8-16-30.1-32.8-32-22.5-2.5-41.5 15.1-41.5 37.1 0 11 4.7 20.9 12.3 27.7 3.1 2.8 4.9 6.7 4.9 10.8v0.1c0 8-6.4 14.5-14.5 14.5h-111.6v-111.7c0-8-6.4-14.4-14.5-14.4-4.1 0-8 1.8-10.8 4.9-6.9 7.6-16.7 12.3-27.7 12.3-22 0-39.6-19-37.1-41.6 1.9-16.7 15.2-30.4 32-32.7 13-1.7 24.8 3.3 32.7 11.9 2.8 3.2 6.7 5.1 10.9 5.1 8.1 0 14.5-6.5 14.5-14.5v-111.6z\" },\n    p8: { vb: \"1513.7 166.86 322.3 503.06\", d: \"M1528.7 564.5v-111.6c0-8 6.5-14.5 14.5-14.5 4.2 0 8.2 1.9 11 5 7.8 8.7 19.7 13.7 32.7 11.9 16.8-2.2 30.1-15.9 32-32.7 2.5-22.5-15.1-41.5-37.1-41.5-11 0-20.9 4.7-27.7 12.3-2.8 3.1-6.7 4.9-10.9 4.9-8 0-14.5-6.5-14.5-14.5v-111.6h111.6c8.1 0 14.5-6.5 14.5-14.5 0-4.1-1.8-8.1-4.9-10.9-7.6-6.8-12.3-16.6-12.3-27.6 0-22 19-39.6 41.5-37.1 16.8 1.8 30.5 15.2 32.8 32 1.7 12.9-3.3 24.8-12 32.7-3.1 2.8-5 6.7-5 10.9 0 8 6.5 14.5 14.5 14.5h111.6v111.6c0 8-6.4 14.5-14.5 14.5-4.2 0-8.1-1.9-10.9-5-7.9-8.7-19.7-13.6-32.7-11.9-16.8 2.2-30.1 15.9-32 32.7-2.5 22.5 15.1 41.6 37.1 41.6 11 0 20.8-4.8 27.7-12.3 2.8-3.1 6.7-5 10.8-5 8.1 0 14.5 6.5 14.5 14.5v111.6h-111.6c-8 0-14.5 6.5-14.5 14.5 0 4.2 1.9 8.1 5 10.9 7.5 6.8 12.3 16.7 12.3 27.7 0 22-19 39.5-41.6 37.1-16.8-1.9-30.5-15.3-32.7-32-1.7-13 3.3-24.9 11.9-32.7 3.1-2.9 5-6.8 5-11 0-8-6.4-14.5-14.5-14.5z\" }\n  };\n  // bg gradient, piece key, piece colour, piece css box\n  var ART = [\n    [\"radial-gradient(circle at 72% 22%, #c6f26b 0 13%, transparent 14%), linear-gradient(170deg, #0a6b46, #0c1e18)\", \"p8\", \"#fbf8f1\", \"left:6%;bottom:-8%;width:62%;transform:rotate(-8deg)\"],\n    [\"linear-gradient(200deg, #e6ff55, #c6f26b 45%, #2f7d5b)\", \"p4\", \"#0c1e18\", \"left:-12%;top:30%;width:120%;transform:rotate(6deg)\"],\n    [\"repeating-linear-gradient(115deg, #005236 0 14px, #0c1e18 14px 28px)\", \"p1\", \"#e6ff55\", \"left:14%;top:22%;width:72%;transform:rotate(14deg)\"],\n    [\"conic-gradient(from 200deg at 30% 70%, #005236, #2f7d5b, #fbf8f1, #005236)\", \"p8\", \"#0c1e18\", \"right:-6%;top:-6%;width:55%;transform:rotate(18deg)\"],\n    [\"linear-gradient(160deg, #fbf8f1, #c6f26b)\", \"p1\", \"#005236\", \"left:8%;bottom:6%;width:78%;transform:rotate(-12deg)\"],\n    [\"radial-gradient(ellipse at 30% 30%, #2f7d5b, #0c1e18 70%)\", \"p4\", \"#e6ff55\", \"left:-4%;top:40%;width:108%;transform:rotate(-5deg)\"]\n  ];\n  var TITLES = [[\"Piece 08\", \"Field edge\"], [\"Piece 04\", \"Wide cut\"], [\"Piece 01\", \"Corner set\"], [\"Piece 08\", \"Night tile\"], [\"Piece 01\", \"Soft lime\"], [\"Piece 04\", \"Deep moss\"]];\n\n  function clamp(v, a, b) { return v < a ? a : v > b ? b : v; }\n  function ease(t) { return t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2; }\n  function lum(hex) {\n    var m = /^#?([0-9a-f]{6})$/i.exec(hex || \"\");\n    if (!m) return 0.2;\n    var n = parseInt(m[1], 16);\n    return (0.299 * (n >> 16) + 0.587 * ((n >> 8) & 255) + 0.114 * (n & 255)) / 255;\n  }\n  function corner(side, d, a) {\n    d = clamp(d, 0, 1) * 100; a = clamp(a, 0, 1) * 100;\n    if (side === \"left\") return d + \"% \" + a + \"%\";\n    if (side === \"right\") return (100 - d) + \"% \" + a + \"%\";\n    if (side === \"top\") return a + \"% \" + d + \"%\";\n    return a + \"% \" + (100 - d) + \"%\";\n  }\n  function locate(L, e) {\n    var r = L.el.getBoundingClientRect();\n    var x = clamp((e.clientX - r.left) / Math.max(1, r.width), 0, 1);\n    var y = clamp((e.clientY - r.top) / Math.max(1, r.height), 0, 1);\n    var gaps = { left: x, right: 1 - x, top: y, bottom: 1 - y }, side = \"left\";\n    for (var k in gaps) if (gaps[k] < gaps[side]) side = k;\n    return { x: x, y: y, side: side };\n  }\n  function inward(p, side) { return side === \"left\" ? p.x : side === \"right\" ? 1 - p.x : side === \"top\" ? p.y : 1 - p.y; }\n  function makeArt(i, cls) {\n    var a = ART[i % ART.length], d = document.createElement(\"div\");\n    d.className = cls;\n    d.setAttribute(\"aria-hidden\", \"true\");\n    d.style.background = a[0];\n    var pc = PIECES[a[1]];\n    d.innerHTML = '<svg viewBox=\"' + pc.vb + '\" focusable=\"false\" style=\"color:' + a[2] + \";\" + a[3] + '\"><path fill=\"currentColor\" d=\"' + pc.d + '\"/></svg>';\n    return d;\n  }\n\n  function hidePoly(L) { L.card.style.clipPath = \"\"; }\n  function drawPoly(L, lead, trail) {\n    var pts = [], i;\n    for (i = 0; i < lead.length; i++) pts.push(corner(L.from, lead[i], i / (lead.length - 1)));\n    for (i = trail.length - 1; i >= 0; i--) pts.push(corner(L.from, trail[i], i / (trail.length - 1)));\n    L.card.style.clipPath = \"polygon(\" + pts.join(\",\") + \")\";\n  }\n  function edgeArr(L, v) {\n    var out = [], s = Math.sin(Math.PI * v) * opts.edge * 0.5;\n    for (var i = 0; i < N; i++) out.push(v + (L.noise[i] - 0.5) * s);\n    return out;\n  }\n  function resetL(L) {\n    L.from = null; L.lead = L.trail = L.tl = L.tt = 0; L.p = L.tp = 0; L.full = false; L.rt = 0;\n    for (var i = 0; i < NS; i++) { L.pl[i] = 0; L.pt[i] = 0; }\n    L.card.style.clipPath = \"\"; L.card.style.removeProperty(\"--ef-s\");\n    L.art.style.clipPath = \"\"; L.flap.style.clipPath = \"\"; L.flap.style.transform = \"\";\n    L.rim.style.opacity = \"0\";\n    L.el.classList.remove(\"is-on\");\n  }\n\n  // ---- effects: each step() returns true while the look still needs frames ----\n  function stepSweep(L, dt) {\n    var k = 1 - Math.exp(-dt * 7 * opts.speed);\n    L.lead += (L.tl - L.lead) * k; L.trail += (L.tt - L.trail) * k;\n    var busy = Math.abs(L.tl - L.lead) > 0.002 || Math.abs(L.tt - L.trail) > 0.002;\n    if (!busy) { L.lead = L.tl; L.trail = L.tt; }\n    if (!L.from) return false;\n    if (L.trail > 0.995 || (L.lead < 0.004 && L.tl === 0)) { resetL(L); return false; }\n    if (L.lead > 0.998 && L.trail < 0.002) L.card.style.clipPath = \"none\";\n    else drawPoly(L, edgeArr(L, L.lead), edgeArr(L, L.trail));\n    return busy;\n  }\n  function stepReach(L, dt) {\n    var busy = false, i, allT = true, allL = true;\n    for (i = 0; i < NS; i++) {\n      var kk = 1 - Math.exp(-dt * L.rate[i] * opts.speed);\n      L.pl[i] += (L.rt - L.pl[i]) * kk; L.pt[i] += (L.tt - L.pt[i]) * kk;\n      if (Math.abs(L.rt - L.pl[i]) > 0.003 || Math.abs(L.tt - L.pt[i]) > 0.003) busy = true;\n      if (L.pt[i] < 0.995) allT = false;\n      if (L.pl[i] > 0.004) allL = false;\n    }\n    if (!L.from) return false;\n    if (allT || (allL && L.rt === 0 && !L.hover)) { resetL(L); return false; }\n    var lead = [], trail = [];\n    for (i = 0; i < NS; i++) { lead.push(L.pl[i]); trail.push(L.pt[i]); }\n    drawPoly(L, lead, trail);\n    return busy;\n  }\n  function stepToggle(L, dt, rate) {\n    var k = 1 - Math.exp(-dt * rate * opts.speed);\n    L.p += (L.tp - L.p) * k;\n    var busy = Math.abs(L.tp - L.p) > 0.002;\n    if (!busy) L.p = L.tp;\n    return busy;\n  }\n  function clipHalf(poly, cx, cy, nx, ny, s, sign) {\n    var out = [], i, n = poly.length;\n    for (i = 0; i < n; i++) {\n      var a = poly[i], b = poly[(i + 1) % n];\n      var fa = sign * ((a[0] - cx) * nx + (a[1] - cy) * ny - s), fb = sign * ((b[0] - cx) * nx + (b[1] - cy) * ny - s);\n      if (fa >= 0) out.push(a);\n      if ((fa >= 0) !== (fb >= 0)) { var t = fa / (fa - fb); out.push([a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t]); }\n    }\n    return out;\n  }\n  function polyStr(p) {\n    if (p.length < 3) return \"polygon(0 0,0 0,0 0)\";\n    return \"polygon(\" + p.map(function (q) { return q[0].toFixed(1) + \"px \" + q[1].toFixed(1) + \"px\"; }).join(\",\") + \")\";\n  }\n  function stepPeel(L, dt) {\n    var busy = stepToggle(L, dt, 5);\n    if (L.p < 0.002 && L.tp === 0) { resetL(L); return false; }\n    var W = L.el.clientWidth, H = L.el.clientHeight;\n    var cx = L.cx * W, cy = L.cy * H, dx = W - 2 * cx, dy = H - 2 * cy, len = Math.hypot(dx, dy) || 1;\n    var nx = dx / len, ny = dy / len, s = ease(L.p) * len;\n    var rect = [[0, 0], [W, 0], [W, H], [0, H]];\n    L.art.style.clipPath = polyStr(clipHalf(rect, cx, cy, nx, ny, s, 1));\n    L.flap.style.clipPath = polyStr(clipHalf(rect, cx, cy, nx, ny, s, -1));\n    var kk = cx * nx + cy * ny + s;\n    L.flap.style.transform = \"matrix(\" + [1 - 2 * nx * nx, -2 * nx * ny, -2 * nx * ny, 1 - 2 * ny * ny, 2 * kk * nx, 2 * kk * ny].map(function (v) { return v.toFixed(4); }).join(\",\") + \")\";\n    return busy;\n  }\n  function stepGlass(L, dt) {\n    var busy = stepToggle(L, dt, 4.5);\n    if (L.p < 0.002 && L.tp === 0) { resetL(L); return false; }\n    var W = L.el.clientWidth, H = L.el.clientHeight, e = 1 - Math.pow(1 - L.p, 3);\n    var sz = 0.2 + 0.8 * e, ix = (1 - sz) * W / 2, iy = (1 - sz) * H / 2;\n    var r = (Math.min(W, H) / 2) * (1 - Math.pow(e, 1.6)) + 6;\n    L.card.style.clipPath = e > 0.999 ? \"none\" : \"inset(\" + iy.toFixed(1) + \"px \" + ix.toFixed(1) + \"px \" + iy.toFixed(1) + \"px \" + ix.toFixed(1) + \"px round \" + r.toFixed(1) + \"px)\";\n    L.card.style.setProperty(\"--ef-s\", (1.5 - 0.5 * e).toFixed(3));\n    L.rim.style.cssText = \"left:\" + ix.toFixed(1) + \"px;right:\" + ix.toFixed(1) + \"px;top:\" + iy.toFixed(1) + \"px;bottom:\" + iy.toFixed(1) + \"px;border-radius:\" + r.toFixed(1) + \"px;opacity:\" + (e > 0.97 ? 0 : clamp(L.p * 4, 0, 1)).toFixed(2);\n    return busy;\n  }\n  function stepLook(L, dt) {\n    var fx = opts.effect;\n    return fx === \"sweep\" ? stepSweep(L, dt) : fx === \"reach\" ? stepReach(L, dt) : fx === \"peel\" ? stepPeel(L, dt) : stepGlass(L, dt);\n  }\n  function loop(now) {\n    raf = 0;\n    var dt = Math.min(0.05, (now - last) / 1000 || 0.016);\n    last = now;\n    var busy = false;\n    for (var i = 0; i < looks.length; i++) if (stepLook(looks[i], dt)) busy = true;\n    if (busy) raf = requestAnimationFrame(loop);\n  }\n  function wake() { if (reduce) return; if (!raf) { last = performance.now(); raf = requestAnimationFrame(loop); } }\n\n  // ---- pointer / keyboard ----\n  function enter(L, p) {\n    if (reduce) { L.el.classList.add(\"is-on\"); return; }\n    var fx = opts.effect;\n    L.hover = true;\n    if (fx === \"sweep\") {\n      if (!L.from) { L.from = p.side; L.lead = L.trail = 0; }\n      L.tt = 0; L.tl = 1;\n    } else if (fx === \"reach\") {\n      if (!L.from) L.from = p.side;\n      L.full = L.full || !!p.key;\n      L.tt = 0;\n      L.rt = L.full ? 1 : inward(p, L.from);\n    } else if (fx === \"peel\") {\n      if (L.tp === 0 && L.p < 0.01) { L.cx = p.x < 0.5 ? 0 : 1; L.cy = p.y < 0.5 ? 0 : 1; }\n      L.tp = 1;\n    } else L.tp = 1;\n    wake();\n  }\n  function leave(L, p) {\n    if (reduce) { L.el.classList.remove(\"is-on\"); return; }\n    L.hover = false;\n    var fx = opts.effect;\n    if (fx === \"sweep\" || fx === \"reach\") {\n      if (!L.from) return;\n      var far = p.key ? true : inward(p, L.from) > 0.5;\n      if (fx === \"sweep\") { if (far) L.tt = 1; else L.tl = 0; }\n      else if (far) { L.rt = 1; L.tt = 1; } else L.rt = 0;\n    } else L.tp = 0;\n    wake();\n  }\n  function move(L, p) {\n    if (opts.effect !== \"reach\" || !L.hover || reduce) return;\n    if (!L.from) L.from = p.side;\n    var d = inward(p, L.from);\n    if (d > 0.5) L.full = true;\n    L.rt = L.full ? 1 : d;\n    wake();\n  }\n\n  function clearAll() { offs.forEach(function (f) { f(); }); offs = []; if (raf) cancelAnimationFrame(raf); raf = 0; }\n  function build() {\n    clearAll();\n    list.textContent = \"\";\n    looks = [];\n    for (var i = 0; i < opts.looks; i++) (function (i) {\n      var li = document.createElement(\"li\");\n      var fig = document.createElement(\"figure\");\n      fig.className = \"ef-lhw__look\";\n      fig.tabIndex = 0;\n      fig.setAttribute(\"aria-label\", \"Look \" + String(i + 1).padStart(2, \"0\") + \", \" + TITLES[i % TITLES.length][1]);\n      var art = makeArt(i, \"ef-lhw__art\"), flap = makeArt(i, \"ef-lhw__flap\");\n      var card = document.createElement(\"figcaption\");\n      card.className = \"ef-lhw__card\";\n      var t = TITLES[i % TITLES.length];\n      card.innerHTML = '<span class=\"ef-lhw__inner\"><span class=\"ef-lhw__label\">Look</span><span class=\"ef-lhw__num\">' + String(i + 1).padStart(2, \"0\") + '</span><span class=\"ef-lhw__pieces\">' + t[0] + \"<br>\" + t[1] + \"</span></span>\";\n      var rim = document.createElement(\"span\");\n      rim.className = \"ef-lhw__rim\";\n      rim.setAttribute(\"aria-hidden\", \"true\");\n      fig.appendChild(art); fig.appendChild(flap); fig.appendChild(card); fig.appendChild(rim);\n      li.appendChild(fig);\n      list.appendChild(li);\n      var L = { el: fig, art: art, flap: flap, card: card, rim: rim, from: null, lead: 0, trail: 0, tl: 0, tt: 0, p: 0, tp: 0, cx: 0, cy: 0, full: false, rt: 0, hover: false, noise: [], pl: [], pt: [], rate: [] };\n      for (var k = 0; k < N; k++) L.noise.push((Math.sin((k + 1) * 12.9898 + (i + 1) * 78.233) * 43758.5453) % 1 * 0.5 + 0.5);\n      // reach: each point has its own speed; neighbours are averaged so the edge breaks into a few uneven teeth\n      var rnd = [];\n      for (k = 0; k < NS; k++) { rnd.push(Math.abs((Math.sin((k + 3) * 4.37 + (i + 2) * 9.11) * 9371.7) % 1)); L.pl.push(0); L.pt.push(0); }\n      for (k = 0; k < NS; k++) {\n        var avg = ((rnd[k - 1] == null ? rnd[k] : rnd[k - 1]) + rnd[k] + (rnd[k + 1] == null ? rnd[k] : rnd[k + 1])) / 3;\n        L.rate.push(3 + avg * 7);\n      }\n      function pe(e) { return e.pointerType !== \"touch\"; }\n      function onEnter(e) { if (pe(e)) enter(L, locate(L, e)); }\n      function onLeave(e) { if (pe(e)) leave(L, locate(L, e)); }\n      function onMove(e) { if (pe(e)) move(L, locate(L, e)); }\n      function onUp(e) {\n        if (e.pointerType !== \"touch\") return;\n        if (L.hover || L.el.classList.contains(\"is-on\")) leave(L, locate(L, e)); else enter(L, locate(L, e));\n      }\n      function onFocus() { enter(L, { x: 0, y: 0, side: \"left\", key: true }); }\n      function onBlur() { leave(L, { x: 1, y: 1, side: \"left\", key: true }); }\n      fig.addEventListener(\"pointerenter\", onEnter);\n      fig.addEventListener(\"pointerleave\", onLeave);\n      fig.addEventListener(\"pointermove\", onMove);\n      fig.addEventListener(\"pointerup\", onUp);\n      fig.addEventListener(\"focus\", onFocus);\n      fig.addEventListener(\"blur\", onBlur);\n      offs.push(function () {\n        fig.removeEventListener(\"pointerenter\", onEnter); fig.removeEventListener(\"pointerleave\", onLeave);\n        fig.removeEventListener(\"pointermove\", onMove); fig.removeEventListener(\"pointerup\", onUp);\n        fig.removeEventListener(\"focus\", onFocus); fig.removeEventListener(\"blur\", onBlur);\n      });\n      looks.push(L);\n    })(i);\n  }\n  function setEffect(fx) {\n    opts.effect = fx;\n    wrap.setAttribute(\"data-fx\", fx);\n    btns.forEach(function (b) { b.setAttribute(\"aria-pressed\", b.getAttribute(\"data-fx\") === fx ? \"true\" : \"false\"); });\n    looks.forEach(resetL);\n  }\n  btns.forEach(function (b) {\n    function click() { setEffect(b.getAttribute(\"data-fx\")); }\n    b.addEventListener(\"click\", click);\n    offs.push(function () { b.removeEventListener(\"click\", click); });\n  });\n  // build() clears offs, so keep the button listeners separate\n  var btnOffs = offs; offs = [];\n\n  function update(next) {\n    var prev = opts;\n    opts = Object.assign({ background: \"#0c1e18\", accent: \"#e6ff55\", effect: \"sweep\", speed: 1, looks: 6, edge: 0.6 }, opts, next || {});\n    opts.speed = clamp(Number(opts.speed) || 1, 0.5, 2);\n    opts.edge = clamp(isNaN(Number(opts.edge)) ? 0.6 : Number(opts.edge), 0, 1);\n    opts.looks = clamp(Math.round(opts.looks) || 6, 2, 6);\n    if ([\"sweep\", \"reach\", \"peel\", \"glass\"].indexOf(opts.effect) < 0) opts.effect = \"sweep\";\n    wrap.style.background = opts.background;\n    wrap.style.setProperty(\"--ef-acc\", opts.accent);\n    wrap.style.setProperty(\"--ef-card\", opts.accent);\n    wrap.style.setProperty(\"--ef-card-text\", lum(opts.accent) > 0.5 ? \"#0c1e18\" : \"#fbf8f1\");\n    if (prev.looks !== opts.looks) build();\n    if (prev.effect !== opts.effect || !prev.effect) setEffect(opts.effect);\n  }\n  update(o);\n  return {\n    update: update,\n    destroy: function () {\n      clearAll();\n      btnOffs.forEach(function (f) { f(); });\n      btnOffs = [];\n      looks = [];\n    }\n  };\n}"
  }
}