{
  "id": "image-trail-intro",
  "kind": "element",
  "title": "Image trail intro",
  "summary": "An intro where gradient tiles are emitted along the pointer, or along a looping path when idle, stack and fade, and then the headline slides in.",
  "url": "https://enrichr.dev/elements/image-trail-intro.html",
  "section": "hero",
  "techniques": [
    "pointer-interaction",
    "reveal",
    "stagger"
  ],
  "stack": [
    "Vanilla JS",
    "CSS"
  ],
  "frameworks": [
    "React",
    "Next.js",
    "Vanilla"
  ],
  "mood": [
    "playful",
    "energetic",
    "cinematic"
  ],
  "intents": [
    "image trail on mouse move",
    "cursor image trail intro",
    "pointer trail hero intro",
    "images follow cursor then reveal headline",
    "intro animation with trailing tiles"
  ],
  "status": "tested",
  "params": [
    {
      "key": "accent",
      "label": "Accent colour",
      "type": "color",
      "value": "#e6ff55"
    },
    {
      "key": "tileSize",
      "label": "Tile size (px)",
      "type": "range",
      "min": 60,
      "max": 200,
      "step": 5,
      "value": 110
    },
    {
      "key": "spacing",
      "label": "Spacing (px)",
      "type": "range",
      "min": 30,
      "max": 160,
      "step": 5,
      "value": 70
    },
    {
      "key": "life",
      "label": "Lifetime (ms)",
      "type": "range",
      "min": 600,
      "max": 3000,
      "step": 100,
      "value": 1600
    },
    {
      "key": "revealAfter",
      "label": "Reveal after (tiles)",
      "type": "range",
      "min": 4,
      "max": 24,
      "step": 1,
      "value": 10
    }
  ],
  "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 \"Image trail intro\" element to this project.\n\nThis is the \"Image trail intro\" element from the Enrichr Library: An intro where gradient tiles are emitted along the pointer, or along a looping path when idle, stack and fade, and then the headline slides in.\nPage: https://enrichr.dev/elements/image-trail-intro.html\nMachine-readable spec: https://enrichr.dev/elements/image-trail-intro.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/image-trail-intro.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 \"Image trail intro\" 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 \"Image trail intro\" element from the Enrichr Library: An intro where gradient tiles are emitted along the pointer, or along a looping path when idle, stack and fade, and then the headline slides in.\nPage: https://enrichr.dev/elements/image-trail-intro.html\nMachine-readable spec: https://enrichr.dev/elements/image-trail-intro.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 \"Image trail intro\" element to this codebase.\n\nThis is the \"Image trail intro\" element from the Enrichr Library: An intro where gradient tiles are emitted along the pointer, or along a looping path when idle, stack and fade, and then the headline slides in.\nPage: https://enrichr.dev/elements/image-trail-intro.html\nMachine-readable spec: https://enrichr.dev/elements/image-trail-intro.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-image-trail-intro.mdc so the rule stays with the project:\n---\ndescription: How to use the Enrichr Image trail intro 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 \"Image trail intro\" element. Tailwind is available but this component needs no utility classes.\n\nThis is the \"Image trail intro\" element from the Enrichr Library: An intro where gradient tiles are emitted along the pointer, or along a looping path when idle, stack and fade, and then the headline slides in.\nPage: https://enrichr.dev/elements/image-trail-intro.html\nMachine-readable spec: https://enrichr.dev/elements/image-trail-intro.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- image-trail-intro.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 \"./image-trail-intro\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function ImageTrailIntro(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 \"Image trail intro\" element to this React + Vite + TypeScript + Tailwind project. Do not install any packages.\n\nThis is the \"Image trail intro\" element from the Enrichr Library: An intro where gradient tiles are emitted along the pointer, or along a looping path when idle, stack and fade, and then the headline slides in.\nPage: https://enrichr.dev/elements/image-trail-intro.html\nMachine-readable spec: https://enrichr.dev/elements/image-trail-intro.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- image-trail-intro.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/ImageTrailIntro.tsx):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./image-trail-intro\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function ImageTrailIntro(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 \"Image trail intro\" element.\n\nThis is the \"Image trail intro\" element from the Enrichr Library: An intro where gradient tiles are emitted along the pointer, or along a looping path when idle, stack and fade, and then the headline slides in.\nPage: https://enrichr.dev/elements/image-trail-intro.html\nMachine-readable spec: https://enrichr.dev/elements/image-trail-intro.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), image-trail-intro.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 \"Image trail intro\" element. No packages, no server code.\n\nThis is the \"Image trail intro\" element from the Enrichr Library: An intro where gradient tiles are emitted along the pointer, or along a looping path when idle, stack and fade, and then the headline slides in.\nPage: https://enrichr.dev/elements/image-trail-intro.html\nMachine-readable spec: https://enrichr.dev/elements/image-trail-intro.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 image-trail-intro.js and then main.js), style.css (the CSS below), image-trail-intro.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 \"Image trail intro\" 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 \"Image trail intro\" element from the Enrichr Library: An intro where gradient tiles are emitted along the pointer, or along a looping path when idle, stack and fade, and then the headline slides in.\nPage: https://enrichr.dev/elements/image-trail-intro.html\nMachine-readable spec: https://enrichr.dev/elements/image-trail-intro.json\n\nWhat it does: A fixed pool of tiles sits inside the stage. On pointer move the script measures how far the pointer has travelled since the last tile and, once that passes the spacing value, takes the next tile from the pool, drops it at the pointer with a small random tilt and gives it a higher z-index so newer tiles stack on top. A single requestAnimationFrame loop ages every live tile: it scales and fades in quickly, holds, then shrinks and fades out over the final part of its life. If the pointer has been still for under a second the loop emits tiles along a Lissajous path instead, so the intro plays on touch screens and when nobody is moving the mouse. After a set number of tiles have been emitted, a class is added to the root and the headline words slide up from behind a clipped mask with a CSS transition staggered by a custom property.\nAccessibility: The headline is real text in the page from the start; it is only masked visually, so assistive tech reads it straight away. A Skip intro button, which becomes Replay intro, lets keyboard users reveal and restart the sequence without a pointer. The tiles are decorative and hidden from assistive tech. With reduced motion there is no emission or movement: a still cluster of tiles is shown and the headline appears at once. Check the headline contrast against your own tile colours.\n\nTunable settings:\n- Accent colour: color, default #e6ff55\n- Tile size (px): range 60 to 200, step 5, default 110\n- Spacing (px): range 30 to 160, step 5, default 70\n- Lifetime (ms): range 600 to 3000, step 100, default 1600\n- Reveal after (tiles): range 4 to 24, step 1, default 10\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/image-trail-intro.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 \"Image trail intro\" 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 \"Image trail intro\" element from the Enrichr Library: An intro where gradient tiles are emitted along the pointer, or along a looping path when idle, stack and fade, and then the headline slides in.\nPage: https://enrichr.dev/elements/image-trail-intro.html\nMachine-readable spec: https://enrichr.dev/elements/image-trail-intro.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 ImageTrailIntro.\n2. Paste the JavaScript below into a separate code file named image-trail-intro.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 \"./image-trail-intro\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function ImageTrailIntro(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(ImageTrailIntro, {\n  accent: { type: ControlType.Color, title: \"Accent colour\", defaultValue: \"#e6ff55\" },\n  tileSize: { type: ControlType.Number, title: \"Tile size\", min: 60, max: 200, step: 5, defaultValue: 110 },\n  spacing: { type: ControlType.Number, title: \"Spacing\", min: 30, max: 160, step: 5, defaultValue: 70 },\n  life: { type: ControlType.Number, title: \"Lifetime\", min: 600, max: 3000, step: 100, defaultValue: 1600 },\n  revealAfter: { type: ControlType.Number, title: \"Reveal after\", min: 4, max: 24, step: 1, defaultValue: 10 },\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 \"Image trail intro\" 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 \"Image trail intro\" element from the Enrichr Library: An intro where gradient tiles are emitted along the pointer, or along a looping path when idle, stack and fade, and then the headline slides in.\nPage: https://enrichr.dev/elements/image-trail-intro.html\nMachine-readable spec: https://enrichr.dev/elements/image-trail-intro.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-image-trail-intro\"></div>, and a <script> block with the JavaScript followed by:\n   mount(document.getElementById(\"enrichr-image-trail-intro\"), { ...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 headline is real text in the page from the start; it is only masked visually, so assistive tech reads it straight away. A Skip intro button, which becomes Replay intro, lets keyboard users reveal and restart the sequence without a pointer. The tiles are decorative and hidden from assistive tech. With reduced motion there is no emission or movement: a still cluster of tiles is shown and the headline appears at once. Check the headline contrast against your own tile colours.",
  "performance": "The tiles are reused from a pool of 18, so nothing is created or removed while it plays. Only transform and opacity change. The animation loop pauses when the stage scrolls out of view and is cancelled on destroy. Large photos as tile backgrounds will cost more than gradients, so size them to the tile.",
  "dependencies": [],
  "source": {
    "markup": "<div class=\"ef-iti\">\n  <div class=\"ef-iti__stage\">\n    <div class=\"ef-iti__pool\" aria-hidden=\"true\"></div>\n    <p class=\"ef-iti__hint\" aria-hidden=\"true\">Move your pointer</p>\n    <h2 class=\"ef-iti__h\"><span class=\"ef-iti__w\"><span class=\"ef-iti__wi\" style=\"--i:0\">Make</span></span> <span class=\"ef-iti__w\"><span class=\"ef-iti__wi\" style=\"--i:1\">something</span></span> <span class=\"ef-iti__w\"><span class=\"ef-iti__wi\" style=\"--i:2\">worth</span></span> <span class=\"ef-iti__w\"><span class=\"ef-iti__wi\" style=\"--i:3\">keeping</span></span></h2>\n    <button class=\"ef-iti__btn\" type=\"button\">Skip intro</button>\n  </div>\n</div>",
    "css": "/* Enrichr Library · https://enrichr.dev */\n.ef-iti { width: 100%; }\n.ef-iti__stage { box-sizing: border-box; position: relative; width: 100%; min-height: 22rem; border-radius: 1rem; overflow: hidden; display: flex; align-items: center; justify-content: center; font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif; color: #fbf8f1; isolation: isolate; }\n.ef-iti__pool { position: absolute; inset: 0; pointer-events: none; z-index: 1; }\n.ef-iti__tile { isolation: isolate; position: absolute; left: 0; top: 0; border-radius: 0.6rem; opacity: 0; pointer-events: none; will-change: transform, opacity; box-shadow: 0 12px 20px -10px rgba(0, 0, 0, 0.6); overflow: hidden; }\n.ef-iti__tile::after { content: \"\"; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 40%, rgba(0, 0, 0, 0.35)); }\n.ef-iti__hint { position: absolute; z-index: 2; left: 0; right: 0; top: 50%; margin: 0; text-align: center; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.75; transform: translateY(-50%); transition: opacity 400ms; pointer-events: none; }\n.ef-iti.is-revealed .ef-iti__hint { opacity: 0; }\n.ef-iti__h { position: relative; z-index: 3; margin: 0; padding: 0 1.2rem; max-width: 30rem; text-align: center; font-size: clamp(1.9rem, 6vw, 3.2rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; pointer-events: none; text-shadow: 0 2px 18px rgba(12, 30, 24, 0.55); }\n.ef-iti__w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; }\n.ef-iti__wi { display: inline-block; transform: translateY(115%); transition: transform 800ms cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i, 0) * 90ms); }\n.ef-iti.is-revealed .ef-iti__wi { transform: translateY(0); }\n.ef-iti__btn { position: absolute; z-index: 4; right: 0.9rem; bottom: 0.9rem; padding: 0.45rem 0.85rem; border: 1px solid rgba(251, 248, 241, 0.4); border-radius: 999px; background: rgba(12, 30, 24, 0.55); color: inherit; font: inherit; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; cursor: pointer; transition: background 200ms, color 200ms; }\n.ef-iti__btn:hover { background: var(--ef-acc, #e6ff55); color: #0c1e18; }\n.ef-iti__btn:focus-visible { outline: 2px solid var(--ef-acc, #e6ff55); outline-offset: 2px; }\n@media (prefers-reduced-motion: reduce) { .ef-iti__wi { transition: none; transform: none; } .ef-iti__hint { display: none; } }",
    "js": "// Enrichr Library · https://enrichr.dev\n// Image trail intro: gradient tiles are emitted along the pointer (or along a looping path when nothing is moving), stack, then shrink and fade.\n// After enough tiles have been emitted the headline words slide up and reveal. A Skip / Replay button gives keyboard users the same result.\n// One rAF loop moves a fixed pool of tiles and only runs while the stage is on screen. Reduced motion shows a still cluster and the headline at once.\n// mount(root, { background, accent, tileSize (px), spacing (px), life (ms), revealAfter (tiles) })\nfunction mount(root, o) {\n  var reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n  var stage = root.querySelector(\".ef-iti__stage\");\n  var pool = root.querySelector(\".ef-iti__pool\");\n  var btn = root.querySelector(\".ef-iti__btn\");\n  var root_ = root.querySelector(\".ef-iti\");\n  var POOL = 18;\n  var opts = {}, tiles = [], next = 0, z = 1, emitted = 0, revealed = false;\n  var raf = 0, onScreen = true, io = null, dead = false, last = null, pointerAt = -1e9, t0 = 0, lastNow = 0, W = 0, H = 0;\n\n  // Enrichr puzzle-piece artwork, inlined so the code stays portable. piece(i, accent) returns a decorative <svg> string (viewBox + one path,\n  // currentColor fill), a different piece, size, rotation and crop per index. It sits behind the card text and never takes pointer events.\n  var PIECES = [[\"1513.7 1453.9 322.3 322.3\",\"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\"],[\"1423.36 860.8 503.07 322.3\",\"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\"],[\"1513.7 166.86 322.3 503.06\",\"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  var PLAY = [[38, -12, 95, 16, 0, 0.92], [-30, 28, 150, -22, \"#2f7d5b\", 0.95], [-8, -30, 80, 32, \"#c6f26b\", 0.8], [30, 34, 110, -8, \"#0a6b46\", 0.95], [-24, -10, 135, 12, \"#fbf8f1\", 0.2], [46, 20, 90, -28, 0, 0.85]];\n  function piece(i, a) {\n    var p = PIECES[(i + Math.floor(i / 3)) % 3], s = PLAY[i % 6];\n    return '<svg viewBox=\"' + p[0] + '\" aria-hidden=\"true\" focusable=\"false\" style=\"position:absolute;z-index:-1;pointer-events:none;height:auto;left:' + s[0] + '%;top:' + s[1] + '%;width:' + s[2] + '%;transform:rotate(' + s[3] + 'deg);color:' + (s[4] || a || \"#e6ff55\") + ';opacity:' + s[5] + '\"><path fill=\"currentColor\" d=\"' + p[1] + '\"/></svg>';\n  }\n\n  function art(i, a) {\n    var c = \"#fbf8f1\", d = \"#0c1e18\", p = i % 6;\n    if (p === 0) return \"radial-gradient(circle at 68% 30%, \" + a + \" 0 18%, transparent 19%), linear-gradient(160deg, #005236, \" + d + \")\";\n    if (p === 1) return \"conic-gradient(from 210deg at 35% 65%, #005236, \" + a + \", \" + c + \", #005236)\";\n    if (p === 2) return \"repeating-linear-gradient(120deg, #005236 0 9px, \" + d + \" 9px 18px)\";\n    if (p === 3) return \"radial-gradient(circle at 30% 35%, \" + a + \" 0 20%, transparent 21%), radial-gradient(circle at 62% 62%, \" + c + \" 0 20%, transparent 21%), linear-gradient(200deg, #0a6b46, \" + d + \")\";\n    if (p === 4) return \"linear-gradient(\" + c + \", \" + c + \") 50% 62% / 70% 36% no-repeat, linear-gradient(190deg, #005236, \" + a + \")\";\n    return \"radial-gradient(circle, \" + a + \" 0 2px, transparent 2.5px) 0 0 / 12px 12px, linear-gradient(145deg, #005236, \" + d + \")\";\n  }\n  function measure() { var r = stage.getBoundingClientRect(); W = r.width; H = r.height; }\n\n  function build() {\n    pool.textContent = \"\"; tiles = [];\n    for (var i = 0; i < POOL; i++) {\n      var el = document.createElement(\"div\");\n      el.className = \"ef-iti__tile\";\n      el.style.background = art(i, opts.accent);\n      el.insertAdjacentHTML(\"afterbegin\", piece(i, opts.accent));\n      pool.appendChild(el);\n      tiles.push({ el: el, x: 0, y: 0, r: 0, born: 0, live: false });\n    }\n    next = 0;\n    if (reduce) still();\n  }\n  function size() { var s = opts.tileSize; tiles.forEach(function (t) { t.el.style.width = s + \"px\"; t.el.style.height = (s * 1.25) + \"px\"; }); }\n  function place(t, scale, op) {\n    var s = opts.tileSize;\n    t.el.style.opacity = op.toFixed(3);\n    t.el.style.transform = \"translate3d(\" + (t.x - s / 2).toFixed(1) + \"px,\" + (t.y - s * 0.625).toFixed(1) + \"px,0) rotate(\" + t.r.toFixed(1) + \"deg) scale(\" + scale.toFixed(3) + \")\";\n  }\n  // reduced motion: a static, overlapping cluster, no movement\n  function still() {\n    measure();\n    var pts = [[0.2, 0.3, -8], [0.8, 0.28, 6], [0.14, 0.72, 5], [0.84, 0.7, -5], [0.5, 0.86, 3]];\n    tiles.forEach(function (t, i) {\n      if (i >= pts.length) { t.el.style.opacity = \"0\"; return; }\n      t.x = pts[i][0] * W; t.y = pts[i][1] * H; t.r = pts[i][2];\n      place(t, 0.9, 0.9);\n    });\n  }\n  function emit(x, y) {\n    var t = tiles[next]; next = (next + 1) % POOL;\n    t.x = x; t.y = y; t.r = (Math.random() - 0.5) * 22; t.born = lastNow; t.live = true;\n    t.el.style.zIndex = String(z++);\n    if (z > 1e6) z = 1;\n    last = { x: x, y: y };\n    emitted++;\n    if (!revealed && emitted >= opts.revealAfter) reveal();\n  }\n  function reveal() {\n    revealed = true;\n    root_.classList.add(\"is-revealed\");\n    btn.textContent = \"Replay intro\";\n  }\n  function replay() {\n    revealed = false; emitted = 0; last = null;\n    root_.classList.remove(\"is-revealed\");\n    btn.textContent = \"Skip intro\";\n    tiles.forEach(function (t) { t.live = false; t.el.style.opacity = \"0\"; });\n    if (reduce) { still(); reveal(); }\n  }\n  function onBtn() {\n    if (revealed) replay(); else reveal();\n  }\n\n  function onMove(e) {\n    if (reduce) return;\n    var r = stage.getBoundingClientRect();\n    var x = e.clientX - r.left, y = e.clientY - r.top;\n    pointerAt = performance.now();\n    if (!last || Math.hypot(x - last.x, y - last.y) >= opts.spacing) emit(x, y);\n  }\n  function tick(now) {\n    raf = 0;\n    if (dead) return;\n    lastNow = now;\n    if (!t0) t0 = now;\n    // idle: follow a looping path across the stage\n    if (!reduce && now - pointerAt > 900) {\n      var k = (now - t0) / 1000;\n      var x = W * (0.5 + 0.34 * Math.cos(k * 1.3)), y = H * (0.5 + 0.3 * Math.sin(k * 1.9 + 0.6));\n      if (!last || Math.hypot(x - last.x, y - last.y) >= opts.spacing) emit(x, y);\n    }\n    for (var i = 0; i < tiles.length; i++) {\n      var t = tiles[i];\n      if (!t.live) continue;\n      var p = (now - t.born) / opts.life;\n      if (p >= 1) { t.live = false; t.el.style.opacity = \"0\"; continue; }\n      var inP = Math.min(p / 0.18, 1), e = 1 - Math.pow(1 - inP, 3);\n      var out = p < 0.6 ? 0 : (p - 0.6) / 0.4;\n      place(t, (0.55 + 0.45 * e) * (1 - 0.25 * out), 1 - out);\n    }\n    schedule();\n  }\n  function schedule() { if (!raf && !dead && !reduce && onScreen) raf = requestAnimationFrame(tick); }\n\n  function update(nextO) {\n    var prev = opts;\n    opts = Object.assign({ background: \"#0c1e18\", accent: \"#e6ff55\", tileSize: 110, spacing: 70, life: 1600, revealAfter: 10 }, opts, nextO || {});\n    stage.style.background = opts.background;\n    stage.style.setProperty(\"--ef-acc\", opts.accent);\n    if (prev.accent !== opts.accent || !tiles.length) build();\n    size();\n    if (reduce) still();\n  }\n  function destroy() {\n    dead = true;\n    if (raf) cancelAnimationFrame(raf);\n    raf = 0;\n    stage.removeEventListener(\"pointermove\", onMove);\n    btn.removeEventListener(\"click\", onBtn);\n    if (io) io.disconnect(); else window.removeEventListener(\"resize\", measure);\n    if (ro) ro.disconnect();\n  }\n\n  var ro = null;\n  stage.addEventListener(\"pointermove\", onMove);\n  btn.addEventListener(\"click\", onBtn);\n  if (window.ResizeObserver) { ro = new ResizeObserver(function () { measure(); if (reduce) still(); }); ro.observe(stage); } else window.addEventListener(\"resize\", measure);\n  if (window.IntersectionObserver) {\n    io = new IntersectionObserver(function (en) { onScreen = en[en.length - 1].isIntersecting; if (onScreen) schedule(); });\n    io.observe(stage);\n  }\n  measure();\n  update(o);\n  if (reduce) reveal(); else schedule();\n  return { update: update, destroy: destroy };\n}"
  }
}