{
  "id": "rotated-reveal-overlays",
  "kind": "element",
  "title": "Rotated reveal overlays",
  "summary": "A page-transition style where rotated colour panels sweep across the stage to cover one scene, then carry on to reveal the next, driven by buttons, dots and arrow keys.",
  "url": "https://enrichr.dev/elements/rotated-reveal-overlays.html",
  "section": "page",
  "techniques": [
    "reveal",
    "stagger"
  ],
  "stack": [
    "Vanilla JS",
    "CSS",
    "Web Animations API"
  ],
  "frameworks": [
    "React",
    "Next.js",
    "Vanilla"
  ],
  "mood": [
    "bold",
    "kinetic",
    "confident"
  ],
  "intents": [
    "page transition rotated panels",
    "diagonal wipe transition",
    "overlay reveal between sections",
    "staggered panel page transition",
    "scene change wipe"
  ],
  "status": "tested",
  "params": [
    {
      "key": "accent",
      "label": "Accent colour",
      "type": "color",
      "value": "#e6ff55"
    },
    {
      "key": "angle",
      "label": "Angle (deg)",
      "type": "range",
      "min": 0,
      "max": 60,
      "step": 1,
      "value": 24
    },
    {
      "key": "panels",
      "label": "Panels",
      "type": "range",
      "min": 2,
      "max": 8,
      "step": 1,
      "value": 5
    },
    {
      "key": "duration",
      "label": "Duration (ms)",
      "type": "range",
      "min": 400,
      "max": 2400,
      "step": 100,
      "value": 1100
    },
    {
      "key": "stagger",
      "label": "Stagger (ms)",
      "type": "range",
      "min": 0,
      "max": 200,
      "step": 10,
      "value": 70
    }
  ],
  "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 \"Rotated reveal overlays\" element to this project.\n\nThis is the \"Rotated reveal overlays\" element from the Enrichr Library: A page-transition style where rotated colour panels sweep across the stage to cover one scene, then carry on to reveal the next, driven by buttons, dots and arrow keys.\nPage: https://enrichr.dev/elements/rotated-reveal-overlays.html\nMachine-readable spec: https://enrichr.dev/elements/rotated-reveal-overlays.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/rotated-reveal-overlays.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 \"Rotated reveal overlays\" 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 \"Rotated reveal overlays\" element from the Enrichr Library: A page-transition style where rotated colour panels sweep across the stage to cover one scene, then carry on to reveal the next, driven by buttons, dots and arrow keys.\nPage: https://enrichr.dev/elements/rotated-reveal-overlays.html\nMachine-readable spec: https://enrichr.dev/elements/rotated-reveal-overlays.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 \"Rotated reveal overlays\" element to this codebase.\n\nThis is the \"Rotated reveal overlays\" element from the Enrichr Library: A page-transition style where rotated colour panels sweep across the stage to cover one scene, then carry on to reveal the next, driven by buttons, dots and arrow keys.\nPage: https://enrichr.dev/elements/rotated-reveal-overlays.html\nMachine-readable spec: https://enrichr.dev/elements/rotated-reveal-overlays.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-rotated-reveal-overlays.mdc so the rule stays with the project:\n---\ndescription: How to use the Enrichr Rotated reveal overlays 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 \"Rotated reveal overlays\" element. Tailwind is available but this component needs no utility classes.\n\nThis is the \"Rotated reveal overlays\" element from the Enrichr Library: A page-transition style where rotated colour panels sweep across the stage to cover one scene, then carry on to reveal the next, driven by buttons, dots and arrow keys.\nPage: https://enrichr.dev/elements/rotated-reveal-overlays.html\nMachine-readable spec: https://enrichr.dev/elements/rotated-reveal-overlays.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- rotated-reveal-overlays.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 \"./rotated-reveal-overlays\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function RotatedRevealOverlays(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 \"Rotated reveal overlays\" element to this React + Vite + TypeScript + Tailwind project. Do not install any packages.\n\nThis is the \"Rotated reveal overlays\" element from the Enrichr Library: A page-transition style where rotated colour panels sweep across the stage to cover one scene, then carry on to reveal the next, driven by buttons, dots and arrow keys.\nPage: https://enrichr.dev/elements/rotated-reveal-overlays.html\nMachine-readable spec: https://enrichr.dev/elements/rotated-reveal-overlays.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- rotated-reveal-overlays.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/RotatedRevealOverlays.tsx):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./rotated-reveal-overlays\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function RotatedRevealOverlays(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 \"Rotated reveal overlays\" element.\n\nThis is the \"Rotated reveal overlays\" element from the Enrichr Library: A page-transition style where rotated colour panels sweep across the stage to cover one scene, then carry on to reveal the next, driven by buttons, dots and arrow keys.\nPage: https://enrichr.dev/elements/rotated-reveal-overlays.html\nMachine-readable spec: https://enrichr.dev/elements/rotated-reveal-overlays.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), rotated-reveal-overlays.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 \"Rotated reveal overlays\" element. No packages, no server code.\n\nThis is the \"Rotated reveal overlays\" element from the Enrichr Library: A page-transition style where rotated colour panels sweep across the stage to cover one scene, then carry on to reveal the next, driven by buttons, dots and arrow keys.\nPage: https://enrichr.dev/elements/rotated-reveal-overlays.html\nMachine-readable spec: https://enrichr.dev/elements/rotated-reveal-overlays.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 rotated-reveal-overlays.js and then main.js), style.css (the CSS below), rotated-reveal-overlays.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 \"Rotated reveal overlays\" 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 \"Rotated reveal overlays\" element from the Enrichr Library: A page-transition style where rotated colour panels sweep across the stage to cover one scene, then carry on to reveal the next, driven by buttons, dots and arrow keys.\nPage: https://enrichr.dev/elements/rotated-reveal-overlays.html\nMachine-readable spec: https://enrichr.dev/elements/rotated-reveal-overlays.json\n\nWhat it does: A sweep layer larger than the stage holds a row of panels and is rotated by the angle setting, so the panels travel on a diagonal. To change scene the panels slide in from one side with a stagger until the stage is fully covered. Only then is the active scene swapped, and a second animation slides the panels out the other side to uncover the new scene. Both phases use the Web Animations API on transform, and the second phase starts when the first has finished, so the swap is never visible. Going back runs the same sweep in the opposite direction. Input is ignored while a transition is running.\nAccessibility: The stage is focusable and left and right arrow keys, the buttons and the dots all change scene. Only the active scene is visible to assistive tech because the others are hidden. Reduced motion skips the sweep and swaps scenes instantly. The panels are decorative and hidden from screen readers.\n\nTunable settings:\n- Accent colour: color, default #e6ff55\n- Angle (deg): range 0 to 60, step 1, default 24\n- Panels: range 2 to 8, step 1, default 5\n- Duration (ms): range 400 to 2400, step 100, default 1100\n- Stagger (ms): range 0 to 200, step 10, default 70\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/rotated-reveal-overlays.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 \"Rotated reveal overlays\" 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 \"Rotated reveal overlays\" element from the Enrichr Library: A page-transition style where rotated colour panels sweep across the stage to cover one scene, then carry on to reveal the next, driven by buttons, dots and arrow keys.\nPage: https://enrichr.dev/elements/rotated-reveal-overlays.html\nMachine-readable spec: https://enrichr.dev/elements/rotated-reveal-overlays.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 RotatedRevealOverlays.\n2. Paste the JavaScript below into a separate code file named rotated-reveal-overlays.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 \"./rotated-reveal-overlays\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function RotatedRevealOverlays(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(RotatedRevealOverlays, {\n  accent: { type: ControlType.Color, title: \"Accent colour\", defaultValue: \"#e6ff55\" },\n  angle: { type: ControlType.Number, title: \"Angle\", min: 0, max: 60, step: 1, defaultValue: 24 },\n  panels: { type: ControlType.Number, title: \"Panels\", min: 2, max: 8, step: 1, defaultValue: 5 },\n  duration: { type: ControlType.Number, title: \"Duration\", min: 400, max: 2400, step: 100, defaultValue: 1100 },\n  stagger: { type: ControlType.Number, title: \"Stagger\", min: 0, max: 200, step: 10, defaultValue: 70 },\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 \"Rotated reveal overlays\" 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 \"Rotated reveal overlays\" element from the Enrichr Library: A page-transition style where rotated colour panels sweep across the stage to cover one scene, then carry on to reveal the next, driven by buttons, dots and arrow keys.\nPage: https://enrichr.dev/elements/rotated-reveal-overlays.html\nMachine-readable spec: https://enrichr.dev/elements/rotated-reveal-overlays.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-rotated-reveal-overlays\"></div>, and a <script> block with the JavaScript followed by:\n   mount(document.getElementById(\"enrichr-rotated-reveal-overlays\"), { ...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 stage is focusable and left and right arrow keys, the buttons and the dots all change scene. Only the active scene is visible to assistive tech because the others are hidden. Reduced motion skips the sweep and swaps scenes instantly. The panels are decorative and hidden from screen readers.",
  "performance": "Only transforms animate and each panel is its own compositor layer for the length of the transition. With 8 panels this is light; the sweep layer is cleaned up once the animation ends.",
  "dependencies": [],
  "source": {
    "markup": "<div class=\"ef-rro\">\n  <div class=\"ef-rro__stage\" tabindex=\"0\" role=\"group\" aria-label=\"Scene transitions. Use the left and right arrow keys or the buttons.\">\n    <section class=\"ef-rro__scene ef-rro__scene--a is-active\" data-i=\"0\" aria-label=\"Scene 1 of 3\">\n      <svg class=\"ef-rro__art\" viewBox=\"1513.7 1453.9 322.3 322.3\" aria-hidden=\"true\"><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 class=\"ef-rro__txt\"><span class=\"ef-rro__k\">Scene 01</span><h3 class=\"ef-rro__t\">Fold</h3><p class=\"ef-rro__p\">Pieces meet at the edge.</p></div>\n    </section>\n    <section class=\"ef-rro__scene ef-rro__scene--b\" data-i=\"1\" aria-label=\"Scene 2 of 3\">\n      <svg class=\"ef-rro__art\" viewBox=\"1423.36 860.8 503.07 322.3\" aria-hidden=\"true\"><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\"/></svg>\n      <div class=\"ef-rro__txt\"><span class=\"ef-rro__k\">Scene 02</span><h3 class=\"ef-rro__t\">Signal</h3><p class=\"ef-rro__p\">One bright joint in the dark.</p></div>\n    </section>\n    <section class=\"ef-rro__scene ef-rro__scene--c\" data-i=\"2\" aria-label=\"Scene 3 of 3\">\n      <svg class=\"ef-rro__art\" viewBox=\"1513.7 166.86 322.3 503.06\" aria-hidden=\"true\"><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\"/></svg>\n      <div class=\"ef-rro__txt\"><span class=\"ef-rro__k\">Scene 03</span><h3 class=\"ef-rro__t\">Canopy</h3><p class=\"ef-rro__p\">Everything fits, finally.</p></div>\n    </section>\n    <div class=\"ef-rro__sweep\" aria-hidden=\"true\"></div>\n    <div class=\"ef-rro__ui\">\n      <button type=\"button\" class=\"ef-rro__btn\" data-d=\"-1\" aria-label=\"Previous scene\">&#8249;</button>\n      <div class=\"ef-rro__dots\"></div>\n      <button type=\"button\" class=\"ef-rro__btn\" data-d=\"1\" aria-label=\"Next scene\">&#8250;</button>\n    </div>\n  </div>\n</div>",
    "css": "/* Enrichr Library · https://enrichr.dev */\n.ef-rro { width: 100%; }\n.ef-rro__stage { position: relative; box-sizing: border-box; width: 100%; height: 22rem; border-radius: 1rem; overflow: hidden; isolation: isolate; font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif; background: #0c1e18; outline: none; }\n.ef-rro__stage:focus-visible { box-shadow: inset 0 0 0 3px var(--ef-acc, #e6ff55); }\n.ef-rro__scene { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 1.6rem 1.6rem 4.2rem; visibility: hidden; }\n.ef-rro__scene.is-active { visibility: visible; }\n.ef-rro__scene--a { background: #fbf8f1; color: #0c1e18; }\n.ef-rro__scene--a .ef-rro__art { color: #005236; }\n.ef-rro__scene--b { background: #0c1e18; color: #fbf8f1; }\n.ef-rro__scene--b .ef-rro__art { color: #e6ff55; }\n.ef-rro__scene--c { background: linear-gradient(150deg, #0a6b46, #005236); color: #fbf8f1; }\n.ef-rro__scene--c .ef-rro__art { color: #c6f26b; }\n.ef-rro__art { position: absolute; right: 8%; top: 12%; width: 46%; height: 62%; display: block; }\n.ef-rro__txt { position: relative; max-width: 60%; }\n.ef-rro__k { display: block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.75; }\n.ef-rro__t { margin: 0.25rem 0 0; font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }\n.ef-rro__p { margin: 0.5rem 0 0; font-size: 0.9rem; opacity: 0.8; }\n.ef-rro__sweep { position: absolute; left: -60%; top: -60%; width: 220%; height: 220%; display: flex; pointer-events: none; transform: rotate(var(--ef-rot, 24deg)); z-index: 2; }\n.ef-rro__pan { flex: 1 1 0; margin-left: -1px; transform: translateY(102%); will-change: transform; }\n.ef-rro__ui { position: absolute; left: 0.8rem; right: 0.8rem; bottom: 0.8rem; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; z-index: 3; }\n.ef-rro__btn { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; background: #0c1e18; color: #fbf8f1; box-shadow: 0 0 0 1px rgba(251, 248, 241, 0.25); font-size: 1.4rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 0.12rem; transition: background 200ms, color 200ms; }\n.ef-rro__btn:hover { background: var(--ef-acc, #e6ff55); color: #0c1e18; }\n.ef-rro__btn:focus-visible, .ef-rro__dot:focus-visible { outline: 2px solid var(--ef-acc, #e6ff55); outline-offset: 2px; }\n.ef-rro__dots { display: flex; gap: 0.5rem; padding: 0.45rem 0.7rem; border-radius: 999px; background: #0c1e18; box-shadow: 0 0 0 1px rgba(251, 248, 241, 0.25); }\n.ef-rro__dot { width: 0.6rem; height: 0.6rem; padding: 0; border: 0; border-radius: 50%; background: rgba(251, 248, 241, 0.45); cursor: pointer; transition: background 200ms, transform 200ms; }\n.ef-rro__dot.is-on { background: var(--ef-acc, #e6ff55); transform: scale(1.3); }\n@media (prefers-reduced-motion: reduce) { .ef-rro__btn, .ef-rro__dot { transition: none; } }",
    "js": "// Enrichr Library · https://enrichr.dev\n// Rotated reveal overlays: a page-transition style. A set of rotated panels sweeps across the stage to cover the current scene, the scene\n// underneath is swapped while it is fully hidden, then the panels carry on and reveal the next one. Buttons, dots and the arrow keys\n// trigger it. Built with the Web Animations API on transforms only. Reduced motion swaps scenes instantly.\n// An original rebuild from the general idea of rotated page-transition panels.\n// mount(root, { accent, angle (deg), panels (2-8), duration (ms), stagger (ms) })\nfunction mount(root, o) {\n  var reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n  var stage = root.querySelector(\".ef-rro__stage\");\n  var sweep = root.querySelector(\".ef-rro__sweep\");\n  var dotsEl = root.querySelector(\".ef-rro__dots\");\n  var scenes = Array.prototype.slice.call(root.querySelectorAll(\".ef-rro__scene\"));\n  var opts = {}, offs = [], pans = [], dots = [], anims = [], cur = 0, busy = false, dead = false, gen = 0;\n\n  function listen(el, ev, fn) { el.addEventListener(ev, fn); offs.push(function () { el.removeEventListener(ev, fn); }); }\n  function colours() { return [\"#005236\", opts.accent, \"#0a6b46\", \"#c6f26b\", \"#0c1e18\", \"#2f7d5b\", \"#fbf8f1\", \"#e6ff55\"]; }\n  function build() {\n    sweep.textContent = \"\";\n    pans = [];\n    var c = colours();\n    for (var i = 0; i < opts.panels; i++) {\n      var p = document.createElement(\"div\");\n      p.className = \"ef-rro__pan\";\n      p.style.background = c[i % c.length];\n      sweep.appendChild(p);\n      pans.push(p);\n    }\n  }\n  function mark() {\n    scenes.forEach(function (s, i) { s.classList.toggle(\"is-active\", i === cur); });\n    dots.forEach(function (d, i) { d.classList.toggle(\"is-on\", i === cur); d.setAttribute(\"aria-current\", i === cur ? \"true\" : \"false\"); });\n  }\n  function run(from, to, ease, delayStep, dur) {\n    return Promise.all(pans.map(function (p, i) {\n      var a = p.animate([{ transform: \"translateY(\" + from + \")\" }, { transform: \"translateY(\" + to + \")\" }], { duration: dur, delay: i * delayStep, easing: ease, fill: \"forwards\" });\n      anims.push(a);\n      return a.finished;\n    }));\n  }\n  function clearAnims() { anims.forEach(function (a) { try { a.cancel(); } catch (e) {} }); anims = []; }\n  function go(to) {\n    to = (to + scenes.length) % scenes.length;\n    if (busy || to === cur) return;\n    var dir = (to > cur || (cur === scenes.length - 1 && to === 0)) ? 1 : -1;\n    if (cur === 0 && to === scenes.length - 1) dir = -1;\n    if (reduce || !pans[0] || !pans[0].animate) { cur = to; mark(); return; }\n    busy = true;\n    var my = ++gen;\n    var half = opts.duration / 2;\n    var inFrom = dir > 0 ? \"102%\" : \"-102%\", outTo = dir > 0 ? \"-102%\" : \"102%\";\n    run(inFrom, \"0%\", \"cubic-bezier(.7,0,.2,1)\", opts.stagger, half).then(function () {\n      if (dead || my !== gen) throw 0;\n      cur = to; mark();\n      return run(\"0%\", outTo, \"cubic-bezier(.7,0,.2,1)\", opts.stagger, half);\n    }).then(function () {\n      if (dead || my !== gen) return;\n      clearAnims(); busy = false;\n    }).catch(function () { if (my === gen) { clearAnims(); busy = false; } });\n  }\n  function onKey(e) {\n    if (e.key === \"ArrowRight\") { e.preventDefault(); go(cur + 1); }\n    else if (e.key === \"ArrowLeft\") { e.preventDefault(); go(cur - 1); }\n  }\n  scenes.forEach(function (s, i) {\n    var d = document.createElement(\"button\");\n    d.type = \"button\"; d.className = \"ef-rro__dot\";\n    d.setAttribute(\"aria-label\", \"Go to scene \" + (i + 1));\n    listen(d, \"click\", function () { go(i); });\n    dotsEl.appendChild(d); dots.push(d);\n  });\n  Array.prototype.forEach.call(root.querySelectorAll(\".ef-rro__btn\"), function (b) {\n    listen(b, \"click\", function () { go(cur + Number(b.getAttribute(\"data-d\"))); });\n  });\n  listen(stage, \"keydown\", onKey);\n\n  function update(next) {\n    var prev = opts;\n    opts = Object.assign({ accent: \"#e6ff55\", angle: 24, panels: 5, duration: 1100, stagger: 70 }, opts, next || {});\n    opts.panels = Math.max(2, Math.min(8, Math.round(opts.panels)));\n    stage.style.setProperty(\"--ef-acc\", opts.accent);\n    stage.style.setProperty(\"--ef-rot\", opts.angle + \"deg\");\n    if (prev.panels !== opts.panels || prev.accent !== opts.accent) { if (busy) { gen++; clearAnims(); busy = false; } build(); }\n    mark();\n  }\n  update(o);\n  return {\n    update: update,\n    destroy: function () {\n      dead = true; gen++; clearAnims();\n      offs.forEach(function (f) { f(); }); offs = [];\n    }\n  };\n}"
  }
}