{
  "id": "glow-orb",
  "kind": "element",
  "title": "Glow orb that swells at the pointer",
  "summary": "A soft, pulsing, 3D-looking orb built from layered radial gradients and a noise-wobbled edge that swells and tilts its highlight toward the pointer.",
  "url": "https://enrichr.dev/elements/glow-orb.html",
  "section": "background",
  "techniques": [
    "pointer-interaction"
  ],
  "stack": [
    "Vanilla JS",
    "Canvas 2D"
  ],
  "frameworks": [
    "React",
    "Next.js",
    "Vanilla"
  ],
  "mood": [
    "modern",
    "polished",
    "playful"
  ],
  "intents": [
    "glowing orb background",
    "pulsing 3d sphere canvas",
    "orb reacts to mouse",
    "soft gradient blob hero",
    "ai assistant orb animation"
  ],
  "status": "tested",
  "params": [
    {
      "key": "accent",
      "label": "Glow colour",
      "type": "color",
      "value": "#e6ff55"
    },
    {
      "key": "size",
      "label": "Orb size",
      "type": "range",
      "min": 0.3,
      "max": 0.9,
      "step": 0.05,
      "value": 0.55
    },
    {
      "key": "pulse",
      "label": "Pulse",
      "type": "range",
      "min": 0,
      "max": 1,
      "step": 0.05,
      "value": 0.6
    },
    {
      "key": "wobble",
      "label": "Edge wobble",
      "type": "range",
      "min": 0,
      "max": 1,
      "step": 0.05,
      "value": 0.6
    },
    {
      "key": "swell",
      "label": "Pointer swell",
      "type": "range",
      "min": 0,
      "max": 1,
      "step": 0.05,
      "value": 0.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 \"Glow orb that swells at the pointer\" element to this project.\n\nThis is the \"Glow orb that swells at the pointer\" element from the Enrichr Library: A soft, pulsing, 3D-looking orb built from layered radial gradients and a noise-wobbled edge that swells and tilts its highlight toward the pointer.\nPage: https://enrichr.dev/elements/glow-orb.html\nMachine-readable spec: https://enrichr.dev/elements/glow-orb.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/glow-orb.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 \"Glow orb that swells at the pointer\" 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 \"Glow orb that swells at the pointer\" element from the Enrichr Library: A soft, pulsing, 3D-looking orb built from layered radial gradients and a noise-wobbled edge that swells and tilts its highlight toward the pointer.\nPage: https://enrichr.dev/elements/glow-orb.html\nMachine-readable spec: https://enrichr.dev/elements/glow-orb.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 \"Glow orb that swells at the pointer\" element to this codebase.\n\nThis is the \"Glow orb that swells at the pointer\" element from the Enrichr Library: A soft, pulsing, 3D-looking orb built from layered radial gradients and a noise-wobbled edge that swells and tilts its highlight toward the pointer.\nPage: https://enrichr.dev/elements/glow-orb.html\nMachine-readable spec: https://enrichr.dev/elements/glow-orb.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-glow-orb.mdc so the rule stays with the project:\n---\ndescription: How to use the Enrichr Glow orb that swells at the pointer 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 \"Glow orb that swells at the pointer\" element. Tailwind is available but this component needs no utility classes.\n\nThis is the \"Glow orb that swells at the pointer\" element from the Enrichr Library: A soft, pulsing, 3D-looking orb built from layered radial gradients and a noise-wobbled edge that swells and tilts its highlight toward the pointer.\nPage: https://enrichr.dev/elements/glow-orb.html\nMachine-readable spec: https://enrichr.dev/elements/glow-orb.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- glow-orb.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 \"./glow-orb\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function GlowOrb(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 \"Glow orb that swells at the pointer\" element to this React + Vite + TypeScript + Tailwind project. Do not install any packages.\n\nThis is the \"Glow orb that swells at the pointer\" element from the Enrichr Library: A soft, pulsing, 3D-looking orb built from layered radial gradients and a noise-wobbled edge that swells and tilts its highlight toward the pointer.\nPage: https://enrichr.dev/elements/glow-orb.html\nMachine-readable spec: https://enrichr.dev/elements/glow-orb.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- glow-orb.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/GlowOrb.tsx):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./glow-orb\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function GlowOrb(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 \"Glow orb that swells at the pointer\" element.\n\nThis is the \"Glow orb that swells at the pointer\" element from the Enrichr Library: A soft, pulsing, 3D-looking orb built from layered radial gradients and a noise-wobbled edge that swells and tilts its highlight toward the pointer.\nPage: https://enrichr.dev/elements/glow-orb.html\nMachine-readable spec: https://enrichr.dev/elements/glow-orb.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), glow-orb.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 \"Glow orb that swells at the pointer\" element. No packages, no server code.\n\nThis is the \"Glow orb that swells at the pointer\" element from the Enrichr Library: A soft, pulsing, 3D-looking orb built from layered radial gradients and a noise-wobbled edge that swells and tilts its highlight toward the pointer.\nPage: https://enrichr.dev/elements/glow-orb.html\nMachine-readable spec: https://enrichr.dev/elements/glow-orb.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 glow-orb.js and then main.js), style.css (the CSS below), glow-orb.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 \"Glow orb that swells at the pointer\" 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 \"Glow orb that swells at the pointer\" element from the Enrichr Library: A soft, pulsing, 3D-looking orb built from layered radial gradients and a noise-wobbled edge that swells and tilts its highlight toward the pointer.\nPage: https://enrichr.dev/elements/glow-orb.html\nMachine-readable spec: https://enrichr.dev/elements/glow-orb.json\n\nWhat it does: Each frame the orb outline is traced as a closed path whose radius is nudged by a few summed sine waves, so the edge breathes like a soft blob. That path becomes a clip, and inside it stack radial gradients: a green body lit from a movable point, three slow drifting light bands added with the lighter blend, a dark underside, a thin rim light, and a cream specular spot. The pointer position eases into a highlight offset and a swell amount that grows as the pointer nears the centre, which inflates the radius and strengthens the halo. A small puzzle piece sits on the orb and shifts a little with the highlight.\nAccessibility: The canvas and puzzle piece are decorative and hidden from assistive tech. Reduced motion draws one still frame, and the pointer simply re-draws that frame without any loop or easing. Touch pointers are ignored, and nothing flashes or strobes.\n\nTunable settings:\n- Glow colour: color, default #e6ff55\n- Orb size: range 0.3 to 0.9, step 0.05, default 0.55\n- Pulse: range 0 to 1, step 0.05, default 0.6\n- Edge wobble: range 0 to 1, step 0.05, default 0.6\n- Pointer swell: range 0 to 1, step 0.05, default 0.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/glow-orb.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 \"Glow orb that swells at the pointer\" 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 \"Glow orb that swells at the pointer\" element from the Enrichr Library: A soft, pulsing, 3D-looking orb built from layered radial gradients and a noise-wobbled edge that swells and tilts its highlight toward the pointer.\nPage: https://enrichr.dev/elements/glow-orb.html\nMachine-readable spec: https://enrichr.dev/elements/glow-orb.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 GlowOrb.\n2. Paste the JavaScript below into a separate code file named glow-orb.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 \"./glow-orb\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function GlowOrb(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(GlowOrb, {\n  accent: { type: ControlType.Color, title: \"Glow colour\", defaultValue: \"#e6ff55\" },\n  size: { type: ControlType.Number, title: \"Orb size\", min: 0.3, max: 0.9, step: 0.05, defaultValue: 0.55 },\n  pulse: { type: ControlType.Number, title: \"Pulse\", min: 0, max: 1, step: 0.05, defaultValue: 0.6 },\n  wobble: { type: ControlType.Number, title: \"Edge wobble\", min: 0, max: 1, step: 0.05, defaultValue: 0.6 },\n  swell: { type: ControlType.Number, title: \"Pointer swell\", min: 0, max: 1, step: 0.05, defaultValue: 0.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 \"Glow orb that swells at the pointer\" 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 \"Glow orb that swells at the pointer\" element from the Enrichr Library: A soft, pulsing, 3D-looking orb built from layered radial gradients and a noise-wobbled edge that swells and tilts its highlight toward the pointer.\nPage: https://enrichr.dev/elements/glow-orb.html\nMachine-readable spec: https://enrichr.dev/elements/glow-orb.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-glow-orb\"></div>, and a <script> block with the JavaScript followed by:\n   mount(document.getElementById(\"enrichr-glow-orb\"), { ...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 piece are decorative and hidden from assistive tech. Reduced motion draws one still frame, and the pointer simply re-draws that frame without any loop or easing. Touch pointers are ignored, and nothing flashes or strobes.",
  "performance": "One canvas, about a dozen gradient fills per frame, no per-pixel work, so it is cheap. The loop pauses off-screen, the canvas is capped at 2x pixel ratio, and a ResizeObserver keeps it sized to its parent.",
  "dependencies": [],
  "source": {
    "markup": "<div class=\"ef-glo\">\n  <div class=\"ef-glo__wrap\">\n    <canvas class=\"ef-glo__cv\" aria-hidden=\"true\"></canvas>\n    <svg class=\"ef-glo__piece\" viewBox=\"1513.7 1453.9 322.3 322.3\" aria-hidden=\"true\" focusable=\"false\"><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\"/></svg>\n  </div>\n</div>",
    "css": "/* Enrichr Library · https://enrichr.dev */\n.ef-glo { width: 100%; height: 100%; }\n.ef-glo__wrap { position: relative; box-sizing: border-box; width: 100%; min-height: 20rem; height: 100%; border-radius: 1rem; overflow: hidden; background: #0c1e18; font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif; }\n.ef-glo__cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }\n.ef-glo__piece { position: absolute; left: 50%; top: 50%; width: 3.4rem; height: 3.4rem; margin: -1.7rem 0 0 -1.7rem; color: #fbf8f1; opacity: 0.6; pointer-events: none; transform: translate(var(--px, 0px), var(--py, 0px)) scale(var(--ps, 1)); filter: drop-shadow(0 2px 6px rgba(12, 30, 24, 0.5)); }",
    "js": "// Enrichr Library · https://enrichr.dev\n// Glow orb: a soft, pulsing, 3D-looking sphere in canvas 2D (an original build, not a port). The silhouette is displaced by layered sine noise,\n// then filled with stacked radial gradients (body, drifting light bands, shadow, rim light, specular). The pointer makes it swell and slides the highlight.\n// Reduced motion draws one still frame. Pauses off-screen.\n// mount(root, { background, accent, size (0.3-0.9), pulse (0-1), wobble (0-1), swell (0-1) })\nfunction mount(root, o) {\n  var reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n  var wrap = root.querySelector(\".ef-glo__wrap\");\n  var cv = root.querySelector(\".ef-glo__cv\");\n  var piece = root.querySelector(\".ef-glo__piece\");\n  var ctx = cv.getContext(\"2d\");\n  var opts = {}, W = 0, H = 0, dpr = 1, raf = 0, visible = true, dead = false;\n  var hx = 0, hy = 0, thx = 0, thy = 0, sw = 0, tsw = 0, clock = 0, last = 0;\n\n  function rgba(hex, a) {\n    var h = hex.replace(\"#\", \"\");\n    if (h.length === 3) h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2];\n    var n = parseInt(h, 16);\n    return \"rgba(\" + (n >> 16) + \",\" + ((n >> 8) & 255) + \",\" + (n & 255) + \",\" + a + \")\";\n  }\n  function size() {\n    var rc = wrap.getBoundingClientRect();\n    W = Math.max(40, rc.width); H = Math.max(40, rc.height);\n    dpr = Math.min(window.devicePixelRatio || 1, 2);\n    cv.width = Math.round(W * dpr); cv.height = Math.round(H * dpr);\n    draw();\n  }\n\n  function draw() {\n    ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n    ctx.globalAlpha = 1;\n    ctx.fillStyle = opts.background;\n    ctx.fillRect(0, 0, W, H);\n    var cx = W / 2, cy = H / 2, m = Math.min(W, H);\n    var breathe = 1 + Math.sin(clock * 1.6) * 0.035 * opts.pulse;\n    var R = m * opts.size * 0.5 * breathe * (1 + sw * 0.16 * opts.swell);\n    var halo = ctx.createRadialGradient(cx, cy, R * 0.6, cx, cy, R * 1.9);\n    halo.addColorStop(0, rgba(opts.accent, 0.3 + sw * 0.2 * opts.swell)); halo.addColorStop(0.45, \"rgba(47,125,91,0.14)\"); halo.addColorStop(1, \"rgba(12,30,24,0)\");\n    ctx.fillStyle = halo; ctx.fillRect(0, 0, W, H);\n    var N = 96, amp = R * 0.03 * opts.wobble * (1 + sw * 0.8);\n    ctx.beginPath();\n    for (var i = 0; i <= N; i++) {\n      var a = i / N * Math.PI * 2;\n      var d = Math.sin(a * 3 + clock * 1.1) * 0.5 + Math.sin(a * 5 - clock * 1.7 + 1.3) * 0.3 + Math.sin(a * 2 + clock * 0.7 + 4) * 0.35;\n      var r = R + d * amp;\n      var x = cx + Math.cos(a) * r, y = cy + Math.sin(a) * r;\n      if (i) ctx.lineTo(x, y); else ctx.moveTo(x, y);\n    }\n    ctx.closePath();\n    ctx.save();\n    ctx.clip();\n    var bx0 = cx - R * 1.4, by0 = cy - R * 1.4, bs = R * 2.8;\n    var lx = cx + hx * R * 0.45, ly = cy + hy * R * 0.45 - R * 0.15;\n    var body = ctx.createRadialGradient(lx, ly, R * 0.05, cx, cy, R * 1.15);\n    body.addColorStop(0, \"#c6f26b\"); body.addColorStop(0.28, \"#2f7d5b\"); body.addColorStop(0.62, \"#0a6b46\"); body.addColorStop(1, \"#005236\");\n    ctx.fillStyle = body; ctx.fillRect(bx0, by0, bs, bs);\n    ctx.globalCompositeOperation = \"lighter\";\n    for (var k = 0; k < 3; k++) {\n      var ph = clock * (0.35 + k * 0.17) + k * 2.1;\n      var bx = cx + Math.cos(ph) * R * 0.45 - hx * R * 0.12, by = cy + Math.sin(ph * 1.3) * R * 0.4 - hy * R * 0.12;\n      var bg = ctx.createRadialGradient(bx, by, 0, bx, by, R * (0.55 + k * 0.12));\n      bg.addColorStop(0, rgba(k === 1 ? \"#c6f26b\" : opts.accent, 0.2)); bg.addColorStop(1, rgba(opts.accent, 0));\n      ctx.fillStyle = bg; ctx.fillRect(bx0, by0, bs, bs);\n    }\n    ctx.globalCompositeOperation = \"source-over\";\n    var sh = ctx.createRadialGradient(cx - hx * R * 0.3, cy - hy * R * 0.3 - R * 0.2, R * 0.5, cx, cy, R * 1.12);\n    sh.addColorStop(0, \"rgba(12,30,24,0)\"); sh.addColorStop(1, \"rgba(12,30,24,0.62)\");\n    ctx.fillStyle = sh; ctx.fillRect(bx0, by0, bs, bs);\n    var rim = ctx.createRadialGradient(cx, cy, R * 0.82, cx, cy, R * 1.02);\n    rim.addColorStop(0, rgba(opts.accent, 0)); rim.addColorStop(1, rgba(opts.accent, 0.42));\n    ctx.fillStyle = rim; ctx.fillRect(bx0, by0, bs, bs);\n    var sx = cx + hx * R * 0.5 - R * 0.28, sy = cy + hy * R * 0.5 - R * 0.38;\n    var sp = ctx.createRadialGradient(sx, sy, 0, sx, sy, R * (0.42 + sw * 0.12));\n    sp.addColorStop(0, \"rgba(251,248,241,0.9)\"); sp.addColorStop(0.35, \"rgba(230,255,85,0.35)\"); sp.addColorStop(1, \"rgba(230,255,85,0)\");\n    ctx.fillStyle = sp; ctx.fillRect(bx0, by0, bs, bs);\n    ctx.restore();\n    piece.style.setProperty(\"--px\", (hx * R * 0.12).toFixed(1) + \"px\");\n    piece.style.setProperty(\"--py\", (hy * R * 0.12).toFixed(1) + \"px\");\n    piece.style.setProperty(\"--ps\", (R / (m * 0.275)).toFixed(3));\n    piece.style.opacity = String(0.55 + sw * 0.3);\n  }\n\n  function frame(t) {\n    raf = 0;\n    if (dead || !visible) return;\n    var dt = last ? Math.min(0.05, (t - last) / 1000) : 0.016; last = t;\n    clock += dt;\n    var k = Math.min(1, dt * 5);\n    hx += (thx - hx) * k; hy += (thy - hy) * k; sw += (tsw - sw) * k;\n    draw();\n    raf = requestAnimationFrame(frame);\n  }\n  function start() { if (!reduce && !raf && visible && !dead) { last = 0; raf = requestAnimationFrame(frame); } }\n\n  function pm(e) {\n    if (e.pointerType === \"touch\") return;\n    var r = wrap.getBoundingClientRect();\n    var nx = ((e.clientX - r.left) / r.width - 0.5) * 2, ny = ((e.clientY - r.top) / r.height - 0.5) * 2;\n    thx = Math.max(-1, Math.min(1, nx)); thy = Math.max(-1, Math.min(1, ny));\n    tsw = Math.max(0, 1 - Math.sqrt(nx * nx + ny * ny) / 1.2);\n    if (reduce) { hx = thx; hy = thy; sw = tsw; draw(); }\n  }\n  function pl() { thx = 0; thy = 0; tsw = 0; if (reduce) { hx = 0; hy = 0; sw = 0; draw(); } }\n  wrap.addEventListener(\"pointermove\", pm);\n  wrap.addEventListener(\"pointerleave\", pl);\n\n  var io = null, ro = null;\n  if (window.IntersectionObserver) {\n    io = new IntersectionObserver(function (es) {\n      visible = es[es.length - 1].isIntersecting;\n      if (visible) start(); else if (raf) { cancelAnimationFrame(raf); raf = 0; }\n    });\n    io.observe(wrap);\n  }\n  if (window.ResizeObserver) { ro = new ResizeObserver(size); ro.observe(wrap); }\n\n  function update(next) {\n    opts = Object.assign({ background: \"#0c1e18\", accent: \"#e6ff55\", size: 0.55, pulse: 0.6, wobble: 0.6, swell: 0.6 }, opts, next || {});\n    wrap.style.background = opts.background;\n    piece.style.color = \"#fbf8f1\";\n    if (W) draw();\n  }\n  update(o);\n  size();\n  start();\n  return {\n    update: update,\n    destroy: function () {\n      dead = true;\n      if (raf) cancelAnimationFrame(raf);\n      raf = 0;\n      wrap.removeEventListener(\"pointermove\", pm);\n      wrap.removeEventListener(\"pointerleave\", pl);\n      if (io) io.disconnect();\n      if (ro) ro.disconnect();\n    }\n  };\n}"
  }
}