{
  "id": "iridescence-sheen",
  "kind": "element",
  "title": "Iridescent sheen in brand greens",
  "summary": "A soft, flowing thin-film colour shift made in a WebGL shader and kept to the brand greens, lime and cream, with the pointer acting as a moving light and puzzle pieces floating on top.",
  "url": "https://enrichr.dev/elements/iridescence-sheen.html",
  "section": "background",
  "techniques": [
    "webgl",
    "pointer-interaction"
  ],
  "stack": [
    "WebGL",
    "GLSL",
    "Vanilla JS",
    "CSS"
  ],
  "frameworks": [
    "React",
    "Next.js",
    "Vanilla"
  ],
  "mood": [
    "fluid",
    "soft",
    "polished"
  ],
  "intents": [
    "iridescent gradient background",
    "thin film shimmer shader",
    "pearlescent webgl background",
    "pointer light sheen",
    "soft green flowing gradient"
  ],
  "status": "tested",
  "params": [
    {
      "key": "text",
      "label": "Caption",
      "type": "text",
      "value": "Quiet colour, always moving"
    },
    {
      "key": "palette",
      "label": "Palette",
      "type": "select",
      "options": [
        "lime",
        "forest",
        "cream"
      ],
      "value": "lime"
    },
    {
      "key": "speed",
      "label": "Flow speed",
      "type": "range",
      "min": 0,
      "max": 3,
      "step": 0.1,
      "value": 1
    },
    {
      "key": "scale",
      "label": "Pattern scale",
      "type": "range",
      "min": 0.5,
      "max": 4,
      "step": 0.1,
      "value": 1.8
    },
    {
      "key": "light",
      "label": "Pointer light",
      "type": "range",
      "min": 0,
      "max": 1,
      "step": 0.05,
      "value": 0.7
    }
  ],
  "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 \"Iridescent sheen in brand greens\" element to this project.\n\nThis is the \"Iridescent sheen in brand greens\" element from the Enrichr Library: A soft, flowing thin-film colour shift made in a WebGL shader and kept to the brand greens, lime and cream, with the pointer acting as a moving light and puzzle pieces floating on top.\nPage: https://enrichr.dev/elements/iridescence-sheen.html\nMachine-readable spec: https://enrichr.dev/elements/iridescence-sheen.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/iridescence-sheen.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 \"Iridescent sheen in brand greens\" 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 \"Iridescent sheen in brand greens\" element from the Enrichr Library: A soft, flowing thin-film colour shift made in a WebGL shader and kept to the brand greens, lime and cream, with the pointer acting as a moving light and puzzle pieces floating on top.\nPage: https://enrichr.dev/elements/iridescence-sheen.html\nMachine-readable spec: https://enrichr.dev/elements/iridescence-sheen.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 \"Iridescent sheen in brand greens\" element to this codebase.\n\nThis is the \"Iridescent sheen in brand greens\" element from the Enrichr Library: A soft, flowing thin-film colour shift made in a WebGL shader and kept to the brand greens, lime and cream, with the pointer acting as a moving light and puzzle pieces floating on top.\nPage: https://enrichr.dev/elements/iridescence-sheen.html\nMachine-readable spec: https://enrichr.dev/elements/iridescence-sheen.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-iridescence-sheen.mdc so the rule stays with the project:\n---\ndescription: How to use the Enrichr Iridescent sheen in brand greens 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 \"Iridescent sheen in brand greens\" element. Tailwind is available but this component needs no utility classes.\n\nThis is the \"Iridescent sheen in brand greens\" element from the Enrichr Library: A soft, flowing thin-film colour shift made in a WebGL shader and kept to the brand greens, lime and cream, with the pointer acting as a moving light and puzzle pieces floating on top.\nPage: https://enrichr.dev/elements/iridescence-sheen.html\nMachine-readable spec: https://enrichr.dev/elements/iridescence-sheen.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- iridescence-sheen.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 \"./iridescence-sheen\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function IridescenceSheen(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 \"Iridescent sheen in brand greens\" element to this React + Vite + TypeScript + Tailwind project. Do not install any packages.\n\nThis is the \"Iridescent sheen in brand greens\" element from the Enrichr Library: A soft, flowing thin-film colour shift made in a WebGL shader and kept to the brand greens, lime and cream, with the pointer acting as a moving light and puzzle pieces floating on top.\nPage: https://enrichr.dev/elements/iridescence-sheen.html\nMachine-readable spec: https://enrichr.dev/elements/iridescence-sheen.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- iridescence-sheen.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/IridescenceSheen.tsx):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./iridescence-sheen\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function IridescenceSheen(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 \"Iridescent sheen in brand greens\" element.\n\nThis is the \"Iridescent sheen in brand greens\" element from the Enrichr Library: A soft, flowing thin-film colour shift made in a WebGL shader and kept to the brand greens, lime and cream, with the pointer acting as a moving light and puzzle pieces floating on top.\nPage: https://enrichr.dev/elements/iridescence-sheen.html\nMachine-readable spec: https://enrichr.dev/elements/iridescence-sheen.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), iridescence-sheen.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 \"Iridescent sheen in brand greens\" element. No packages, no server code.\n\nThis is the \"Iridescent sheen in brand greens\" element from the Enrichr Library: A soft, flowing thin-film colour shift made in a WebGL shader and kept to the brand greens, lime and cream, with the pointer acting as a moving light and puzzle pieces floating on top.\nPage: https://enrichr.dev/elements/iridescence-sheen.html\nMachine-readable spec: https://enrichr.dev/elements/iridescence-sheen.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 iridescence-sheen.js and then main.js), style.css (the CSS below), iridescence-sheen.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 \"Iridescent sheen in brand greens\" 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 \"Iridescent sheen in brand greens\" element from the Enrichr Library: A soft, flowing thin-film colour shift made in a WebGL shader and kept to the brand greens, lime and cream, with the pointer acting as a moving light and puzzle pieces floating on top.\nPage: https://enrichr.dev/elements/iridescence-sheen.html\nMachine-readable spec: https://enrichr.dev/elements/iridescence-sheen.json\n\nWhat it does: A full-screen triangle runs a fragment shader. Layered noise, warped by a second noise field, stands in for film thickness. A cosine of that thickness produces repeating bands, and the band value is looked up on a seven-stop ramp built only from the brand colours (ink, deep green, mid green, lime, cream), so the colour shifts like a thin film but never leaves the palette. The pointer position is a light: it adds to the thickness near the cursor, which slides the bands, and adds a soft lime highlight. The pointer is eased so the light drifts rather than snaps. The wrapper has a CSS gradient behind the canvas, so if WebGL is unavailable the canvas is hidden and a slowly shifting gradient shows instead. Three puzzle-piece SVGs float above, nudged a few pixels by the pointer.\nAccessibility: The canvas and puzzle pieces are decorative and hidden from assistive tech. With prefers-reduced-motion the shader draws one still frame and the pieces stop floating. The caption sits on a text shadow; check contrast on the cream palette against your own text colour.\n\nTunable settings:\n- Caption: text, default Quiet colour, always moving\n- Palette: select (i / o / r), default lime\n- Flow speed: range 0 to 3, step 0.1, default 1\n- Pattern scale: range 0.5 to 4, step 0.1, default 1.8\n- Pointer light: range 0 to 1, step 0.05, default 0.7\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/iridescence-sheen.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 \"Iridescent sheen in brand greens\" 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 \"Iridescent sheen in brand greens\" element from the Enrichr Library: A soft, flowing thin-film colour shift made in a WebGL shader and kept to the brand greens, lime and cream, with the pointer acting as a moving light and puzzle pieces floating on top.\nPage: https://enrichr.dev/elements/iridescence-sheen.html\nMachine-readable spec: https://enrichr.dev/elements/iridescence-sheen.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 IridescenceSheen.\n2. Paste the JavaScript below into a separate code file named iridescence-sheen.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 \"./iridescence-sheen\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function IridescenceSheen(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(IridescenceSheen, {\n  text: { type: ControlType.String, title: \"Caption\", defaultValue: \"Quiet colour, always moving\" },\n  palette: { type: ControlType.Enum, title: \"Palette\", options: [\"l\",\"f\",\"c\"], optionTitles: [\"i\",\"o\",\"r\"], defaultValue: \"lime\" },\n  speed: { type: ControlType.Number, title: \"Flow speed\", min: 0, max: 3, step: 0.1, defaultValue: 1 },\n  scale: { type: ControlType.Number, title: \"Pattern scale\", min: 0.5, max: 4, step: 0.1, defaultValue: 1.8 },\n  light: { type: ControlType.Number, title: \"Pointer light\", min: 0, max: 1, step: 0.05, defaultValue: 0.7 },\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 \"Iridescent sheen in brand greens\" 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 \"Iridescent sheen in brand greens\" element from the Enrichr Library: A soft, flowing thin-film colour shift made in a WebGL shader and kept to the brand greens, lime and cream, with the pointer acting as a moving light and puzzle pieces floating on top.\nPage: https://enrichr.dev/elements/iridescence-sheen.html\nMachine-readable spec: https://enrichr.dev/elements/iridescence-sheen.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-iridescence-sheen\"></div>, and a <script> block with the JavaScript followed by:\n   mount(document.getElementById(\"enrichr-iridescence-sheen\"), { ...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 canvas and puzzle pieces are decorative and hidden from assistive tech. With prefers-reduced-motion the shader draws one still frame and the pieces stop floating. The caption sits on a text shadow; check contrast on the cream palette against your own text colour.",
  "performance": "One draw call per frame with a four-octave noise, at up to 1.5x pixel ratio. It stops when scrolled off-screen and the WebGL context is released on destroy. On weak GPUs lower the pattern scale or the canvas size.",
  "dependencies": [],
  "codepen": "https://codepen.io/Enrichr-Dev/pen/XJMoBvM",
  "source": {
    "markup": "<div class=\"ef-irs\">\n  <div class=\"ef-irs__wrap\">\n    <canvas class=\"ef-irs__cv\" aria-hidden=\"true\"></canvas>\n    <svg class=\"ef-irs__defs\" width=\"0\" height=\"0\" aria-hidden=\"true\" focusable=\"false\" style=\"position:absolute\">\n      <symbol id=\"irs-puzzlePiece1\" viewBox=\"1513.7 1453.9 322.3 322.3\"><path fill=\"currentColor\" 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\"/></symbol>\n      <symbol id=\"irs-puzzlePiece4\" viewBox=\"1423.36 860.8 503.07 322.3\"><path fill=\"currentColor\" 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\"/></symbol>\n      <symbol id=\"irs-puzzlePiece8\" viewBox=\"1513.7 166.86 322.3 503.06\"><path fill=\"currentColor\" 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\"/></symbol>\n    </svg>\n    <div class=\"ef-irs__art\" aria-hidden=\"true\">\n      <svg class=\"ef-irs__pz ef-irs__pz--a\" viewBox=\"0 0 1 1\" preserveAspectRatio=\"xMidYMid meet\"><use href=\"#irs-puzzlePiece1\" width=\"1\" height=\"1\"/></svg>\n      <svg class=\"ef-irs__pz ef-irs__pz--b\" viewBox=\"0 0 1 1\" preserveAspectRatio=\"xMidYMid meet\"><use href=\"#irs-puzzlePiece4\" width=\"1\" height=\"1\"/></svg>\n      <svg class=\"ef-irs__pz ef-irs__pz--c\" viewBox=\"0 0 1 1\" preserveAspectRatio=\"xMidYMid meet\"><use href=\"#irs-puzzlePiece8\" width=\"1\" height=\"1\"/></svg>\n    </div>\n    <p class=\"ef-irs__txt\"></p>\n  </div>\n</div>",
    "css": "/* Enrichr Library · https://enrichr.dev */\n.ef-irs { width: 100%; height: 100%; min-height: 18rem; }\n.ef-irs__wrap { position: relative; box-sizing: border-box; width: 100%; height: 100%; min-height: 18rem; overflow: hidden; border-radius: 1rem; background: linear-gradient(135deg, #005236 0%, #2f7d5b 38%, #c6f26b 70%, #fbf8f1 100%); color: #fbf8f1; font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif; isolation: isolate; }\n.ef-irs__cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }\n.ef-irs.is-nogl .ef-irs__cv { display: none; }\n.ef-irs.is-nogl .ef-irs__wrap { animation: ef-irs-fb 9s ease-in-out infinite alternate; background-size: 200% 200%; }\n.ef-irs__art { position: absolute; inset: 0; pointer-events: none; }\n.ef-irs__pz { position: absolute; display: block; color: var(--ef-pz, #fbf8f1); opacity: 0.88; filter: drop-shadow(0 10px 14px rgba(12, 30, 24, 0.35)); animation: ef-irs-float 7s ease-in-out infinite; transform: translate(var(--px, 0px), var(--py, 0px)) rotate(var(--r, 0deg)); will-change: transform; }\n.ef-irs__pz--a { width: 5.2rem; height: 5.2rem; left: 12%; top: 16%; --r: -12deg; }\n.ef-irs__pz--b { width: 8.4rem; height: 5.4rem; right: 9%; top: 22%; --r: 9deg; animation-delay: -2.4s; color: var(--ef-pz2, #e6ff55); }\n.ef-irs__pz--c { width: 4.2rem; height: 6.6rem; left: 24%; bottom: 10%; --r: 14deg; animation-delay: -4.6s; color: var(--ef-pz3, #0c1e18); }\n.ef-irs__txt { position: absolute; left: 1.4rem; right: 1.4rem; bottom: 1.2rem; margin: 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; color: #fbf8f1; text-shadow: 0 2px 14px rgba(12, 30, 24, 0.55); pointer-events: none; }\n.ef-irs__txt:empty { display: none; }\n@keyframes ef-irs-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -0.7rem; } }\n@keyframes ef-irs-fb { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }\n@media (prefers-reduced-motion: reduce) { .ef-irs__pz, .ef-irs.is-nogl .ef-irs__wrap { animation: none; } }",
    "js": "// Enrichr Library · https://enrichr.dev\n// Iridescence sheen: a soft thin-film colour shift made in a raw WebGL fragment shader, kept inside the brand greens, lime and cream.\n// A flowing noise field acts as film thickness; the pointer is a light that bends the viewing angle and adds a highlight.\n// Falls back to a CSS gradient without WebGL. Reduced motion draws a single still frame. Pauses off-screen.\n// mount(root, { text, speed (0-3), scale (0.5-4), light (0-1), palette (\"lime\"|\"forest\"|\"cream\") })\nfunction mount(root, o) {\n  var reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n  var host = root.querySelector(\".ef-irs\");\n  var wrap = root.querySelector(\".ef-irs__wrap\");\n  var cv = root.querySelector(\".ef-irs__cv\");\n  var txt = root.querySelector(\".ef-irs__txt\");\n  var pz = root.querySelectorAll(\".ef-irs__pz\");\n  var opts = {}, gl = null, prog = null, U = {}, raf = 0, visible = true, dead = false;\n  var t0 = performance.now(), tAcc = 0, last = t0;\n  var ptr = { x: 0.5, y: 0.5, tx: 0.5, ty: 0.5 };\n  var PAL = { lime: [0.1, 0.92], forest: [0.04, 0.6], cream: [0.45, 1.0] };\n\n  var VS = \"attribute vec2 p;void main(){gl_Position=vec4(p,0.,1.);}\";\n  var FS = [\n    \"precision mediump float;\",\n    \"uniform vec2 uRes;uniform float uT;uniform vec2 uP;uniform float uScale;uniform float uLight;uniform vec2 uPal;\",\n    \"vec3 ink=vec3(.047,.118,.094);vec3 g1=vec3(0.,.322,.212);vec3 g2=vec3(.039,.42,.275);vec3 g3=vec3(.184,.49,.357);\",\n    \"vec3 l1=vec3(.776,.949,.42);vec3 l2=vec3(.902,1.,.333);vec3 cr=vec3(.984,.973,.945);\",\n    // brand ramp: ink > deep green > green > mid green > soft lime > lime > cream\n    \"vec3 ramp(float t){t=clamp(t,0.,1.)*6.;\",\n    \" if(t<1.)return mix(ink,g1,t);if(t<2.)return mix(g1,g2,t-1.);if(t<3.)return mix(g2,g3,t-2.);\",\n    \" if(t<4.)return mix(g3,l1,t-3.);if(t<5.)return mix(l1,l2,t-4.);return mix(l2,cr,t-5.);}\",\n    \"float h(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);}\",\n    \"float n(vec2 p){vec2 i=floor(p),f=fract(p);f=f*f*(3.-2.*f);\",\n    \" return mix(mix(h(i),h(i+vec2(1,0)),f.x),mix(h(i+vec2(0,1)),h(i+vec2(1,1)),f.x),f.y);}\",\n    \"float fbm(vec2 p){float a=.5,s=0.;for(int i=0;i<4;i++){s+=a*n(p);p=p*2.03+vec2(1.7,9.2);a*=.5;}return s;}\",\n    \"void main(){\",\n    \" vec2 uv=gl_FragCoord.xy/uRes;vec2 q=(uv-.5)*vec2(uRes.x/uRes.y,1.)*uScale;\",\n    \" vec2 w=vec2(fbm(q+vec2(0.,uT*.12)),fbm(q+vec2(5.2,1.3)-uT*.1));\",\n    \" float thick=fbm(q+2.2*w+uT*.05);\",\n    // light vector from pointer: acts like viewing angle\n    \" vec2 lv=uv-uP;float d=length(lv*vec2(uRes.x/uRes.y,1.));\",\n    \" float ang=(1.-smoothstep(0.,.9,d))*uLight;\",\n    \" float film=thick*1.6+ang*.9+w.x*.5;\",\n    // thin-film: cosine bands remapped into the brand ramp only\n    \" float band=.5+.5*cos(6.2831*film);\",\n    \" vec3 c=ramp(mix(uPal.x,uPal.y,band));\",\n    \" c+=l2*pow(max(0.,1.-d*2.2),3.)*uLight*.28;\",\n    \" c=mix(c,cr,smoothstep(.55,1.,band)*.18*(.4+uLight));\",\n    \" float v=smoothstep(1.2,.2,length(uv-.5));c*=.72+.28*v;\",\n    \" gl_FragColor=vec4(c,1.);}\"\n  ].join(\"\\n\");\n\n  function sh(type, src) {\n    var s = gl.createShader(type);\n    gl.shaderSource(s, src); gl.compileShader(s);\n    return gl.getShaderParameter(s, gl.COMPILE_STATUS) ? s : null;\n  }\n  function init() {\n    try { gl = cv.getContext(\"webgl\", { antialias: false, alpha: false }) || cv.getContext(\"experimental-webgl\"); } catch (e) { gl = null; }\n    if (!gl) return false;\n    var v = sh(gl.VERTEX_SHADER, VS), f = sh(gl.FRAGMENT_SHADER, FS);\n    if (!v || !f) { gl = null; return false; }\n    prog = gl.createProgram();\n    gl.attachShader(prog, v); gl.attachShader(prog, f); gl.linkProgram(prog);\n    if (!gl.getProgramParameter(prog, gl.LINK_STATUS)) { gl = null; return false; }\n    gl.useProgram(prog);\n    var b = gl.createBuffer();\n    gl.bindBuffer(gl.ARRAY_BUFFER, b);\n    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 3, -1, -1, 3]), gl.STATIC_DRAW);\n    var loc = gl.getAttribLocation(prog, \"p\");\n    gl.enableVertexAttribArray(loc);\n    gl.vertexAttribPointer(loc, 2, gl.FLOAT, false, 0, 0);\n    [\"uRes\", \"uT\", \"uP\", \"uScale\", \"uLight\", \"uPal\"].forEach(function (k) { U[k] = gl.getUniformLocation(prog, k); });\n    return true;\n  }\n  function size() {\n    var r = wrap.getBoundingClientRect();\n    var dpr = Math.min(window.devicePixelRatio || 1, 1.5);\n    var w = Math.max(2, Math.round(r.width * dpr)), h = Math.max(2, Math.round(r.height * dpr));\n    if (cv.width !== w || cv.height !== h) { cv.width = w; cv.height = h; }\n    if (gl) gl.viewport(0, 0, w, h);\n  }\n  function draw() {\n    if (!gl) return;\n    var pal = PAL[opts.palette] || PAL.lime;\n    gl.uniform2f(U.uRes, cv.width, cv.height);\n    gl.uniform1f(U.uT, tAcc);\n    gl.uniform2f(U.uP, ptr.x, ptr.y);\n    gl.uniform1f(U.uScale, opts.scale);\n    gl.uniform1f(U.uLight, opts.light);\n    gl.uniform2f(U.uPal, pal[0], pal[1]);\n    gl.drawArrays(gl.TRIANGLES, 0, 3);\n  }\n  function frame(now) {\n    raf = 0;\n    if (dead || !visible) return;\n    var dt = Math.min(0.05, (now - last) / 1000); last = now;\n    tAcc += dt * opts.speed;\n    ptr.x += (ptr.tx - ptr.x) * 0.08; ptr.y += (ptr.ty - ptr.y) * 0.08;\n    var px = (ptr.x - 0.5) * 2, py = (ptr.y - 0.5) * 2;\n    for (var i = 0; i < pz.length; i++) {\n      var k = (i + 1) * 7;\n      pz[i].style.setProperty(\"--px\", (px * k).toFixed(1) + \"px\");\n      pz[i].style.setProperty(\"--py\", (-py * k).toFixed(1) + \"px\");\n    }\n    draw();\n    raf = requestAnimationFrame(frame);\n  }\n  function start() { if (!raf && !reduce && !dead && visible) { last = performance.now(); raf = requestAnimationFrame(frame); } }\n  function stop() { if (raf) { cancelAnimationFrame(raf); raf = 0; } }\n  function still() { if (reduce) { size(); draw(); } }\n\n  function onMove(e) {\n    var r = wrap.getBoundingClientRect();\n    ptr.tx = (e.clientX - r.left) / r.width;\n    ptr.ty = 1 - (e.clientY - r.top) / r.height;\n  }\n  function onLeave() { ptr.tx = 0.5; ptr.ty = 0.5; }\n\n  var io = new IntersectionObserver(function (es) {\n    visible = es[0].isIntersecting;\n    if (visible) start(); else stop();\n  });\n  var ro = new ResizeObserver(function () { size(); still(); });\n  var ok = init();\n  if (!ok) host.classList.add(\"is-nogl\");\n  else {\n    wrap.addEventListener(\"pointermove\", onMove);\n    wrap.addEventListener(\"pointerleave\", onLeave);\n    io.observe(wrap); ro.observe(wrap);\n  }\n\n  function update(next) {\n    opts = Object.assign({ text: \"Quiet colour, always moving\", speed: 1, scale: 1.8, light: 0.7, palette: \"lime\", accent: \"#fbf8f1\" }, opts, next || {});\n    opts.speed = Math.max(0, Math.min(3, +opts.speed));\n    opts.scale = Math.max(0.5, Math.min(4, +opts.scale));\n    opts.light = Math.max(0, Math.min(1, +opts.light));\n    txt.textContent = opts.text;\n    host.style.setProperty(\"--ef-pz\", opts.accent);\n    if (ok) { size(); still(); }\n  }\n  update(o);\n  if (ok) start();\n  return {\n    update: update,\n    destroy: function () {\n      dead = true; stop();\n      wrap.removeEventListener(\"pointermove\", onMove);\n      wrap.removeEventListener(\"pointerleave\", onLeave);\n      io.disconnect(); ro.disconnect();\n      if (gl) { var x = gl.getExtension(\"WEBGL_lose_context\"); if (x) x.loseContext(); }\n    }\n  };\n}"
  }
}