{
  "id": "parallax-pattern-sections",
  "kind": "element",
  "title": "Parallax pattern sections",
  "summary": "Full-height sections whose patterned backgrounds drift slower than the page, so each headline floats over a deeper layer.",
  "url": "https://enrichr.dev/elements/parallax-pattern-sections.html",
  "section": "page",
  "techniques": [
    "scroll-driven",
    "parallax"
  ],
  "stack": [
    "Vanilla JS",
    "CSS"
  ],
  "frameworks": [
    "React",
    "Next.js",
    "Vanilla"
  ],
  "mood": [
    "bold",
    "playful"
  ],
  "intents": [
    "parallax background sections",
    "scroll parallax section backgrounds",
    "background moves slower than content",
    "full screen parallax headline sections",
    "pattern background parallax on scroll"
  ],
  "status": "tested",
  "params": [
    {
      "key": "titles",
      "label": "Headlines (comma separated)",
      "type": "text",
      "value": "Parallax sections, Patterns drift slower, Headlines float above, Keep scrolling"
    },
    {
      "key": "pattern",
      "label": "Pattern",
      "type": "select",
      "options": [
        [
          "mixed",
          "Mixed"
        ],
        [
          "dots",
          "Dots"
        ],
        [
          "stripes",
          "Stripes"
        ],
        [
          "grid",
          "Grid"
        ],
        [
          "checker",
          "Checker"
        ],
        [
          "rings",
          "Rings"
        ]
      ],
      "value": "mixed"
    },
    {
      "key": "depth",
      "label": "Depth (% of section height)",
      "type": "range",
      "min": 0,
      "max": 60,
      "step": 5,
      "value": 25
    },
    {
      "key": "height",
      "label": "Section height (px)",
      "type": "range",
      "min": 220,
      "max": 640,
      "step": 20,
      "value": 360
    },
    {
      "key": "accent",
      "label": "Accent colour",
      "type": "color",
      "value": "#e6ff55"
    },
    {
      "key": "background",
      "label": "Background",
      "type": "color",
      "value": "#0c1e18"
    }
  ],
  "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 \"Parallax pattern sections\" element to this project.\n\nThis is the \"Parallax pattern sections\" element from the Enrichr Library: Full-height sections whose patterned backgrounds drift slower than the page, so each headline floats over a deeper layer.\nPage: https://enrichr.dev/elements/parallax-pattern-sections.html\nMachine-readable spec: https://enrichr.dev/elements/parallax-pattern-sections.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/parallax-pattern-sections.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 \"Parallax pattern sections\" 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 \"Parallax pattern sections\" element from the Enrichr Library: Full-height sections whose patterned backgrounds drift slower than the page, so each headline floats over a deeper layer.\nPage: https://enrichr.dev/elements/parallax-pattern-sections.html\nMachine-readable spec: https://enrichr.dev/elements/parallax-pattern-sections.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 \"Parallax pattern sections\" element to this codebase.\n\nThis is the \"Parallax pattern sections\" element from the Enrichr Library: Full-height sections whose patterned backgrounds drift slower than the page, so each headline floats over a deeper layer.\nPage: https://enrichr.dev/elements/parallax-pattern-sections.html\nMachine-readable spec: https://enrichr.dev/elements/parallax-pattern-sections.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-parallax-pattern-sections.mdc so the rule stays with the project:\n---\ndescription: How to use the Enrichr Parallax pattern sections 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 \"Parallax pattern sections\" element. Tailwind is available but this component needs no utility classes.\n\nThis is the \"Parallax pattern sections\" element from the Enrichr Library: Full-height sections whose patterned backgrounds drift slower than the page, so each headline floats over a deeper layer.\nPage: https://enrichr.dev/elements/parallax-pattern-sections.html\nMachine-readable spec: https://enrichr.dev/elements/parallax-pattern-sections.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- parallax-pattern-sections.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 \"./parallax-pattern-sections\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function ParallaxPatternSections(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 \"Parallax pattern sections\" element to this React + Vite + TypeScript + Tailwind project. Do not install any packages.\n\nThis is the \"Parallax pattern sections\" element from the Enrichr Library: Full-height sections whose patterned backgrounds drift slower than the page, so each headline floats over a deeper layer.\nPage: https://enrichr.dev/elements/parallax-pattern-sections.html\nMachine-readable spec: https://enrichr.dev/elements/parallax-pattern-sections.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- parallax-pattern-sections.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/ParallaxPatternSections.tsx):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./parallax-pattern-sections\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function ParallaxPatternSections(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 \"Parallax pattern sections\" element.\n\nThis is the \"Parallax pattern sections\" element from the Enrichr Library: Full-height sections whose patterned backgrounds drift slower than the page, so each headline floats over a deeper layer.\nPage: https://enrichr.dev/elements/parallax-pattern-sections.html\nMachine-readable spec: https://enrichr.dev/elements/parallax-pattern-sections.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), parallax-pattern-sections.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 \"Parallax pattern sections\" element. No packages, no server code.\n\nThis is the \"Parallax pattern sections\" element from the Enrichr Library: Full-height sections whose patterned backgrounds drift slower than the page, so each headline floats over a deeper layer.\nPage: https://enrichr.dev/elements/parallax-pattern-sections.html\nMachine-readable spec: https://enrichr.dev/elements/parallax-pattern-sections.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 parallax-pattern-sections.js and then main.js), style.css (the CSS below), parallax-pattern-sections.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 \"Parallax pattern sections\" 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 \"Parallax pattern sections\" element from the Enrichr Library: Full-height sections whose patterned backgrounds drift slower than the page, so each headline floats over a deeper layer.\nPage: https://enrichr.dev/elements/parallax-pattern-sections.html\nMachine-readable spec: https://enrichr.dev/elements/parallax-pattern-sections.json\n\nWhat it does: Each section holds a pattern layer that is taller than the section by the depth amount above and below. On every scroll, from the page or any scrolling parent, one animation frame reads each visible section's position and works out how far it has travelled through the viewport: 0 as its top meets the bottom of the screen, 1 as its bottom leaves the top. The layer is shifted with translate3d from minus to plus the depth across that journey, so it moves slower than the page and never shows an edge. The patterns are CSS gradients: dots, diagonal stripes, a grid, a checkerboard and rings.\nAccessibility: Each section is a labelled region with a real heading, and the patterns are decorative and hidden from assistive technology. Headlines sit on a solid plate so they stay readable over any pattern. With prefers-reduced-motion the backgrounds stay still and no scroll work is done.\n\nTunable settings:\n- Headlines (comma separated): text, default Parallax sections, Patterns drift slower, Headlines float above, Keep scrolling\n- Pattern: select (Mixed / Dots / Stripes / Grid / Checker / Rings), default mixed\n- Depth (% of section height): range 0 to 60, step 5, default 25\n- Section height (px): range 220 to 640, step 20, default 360\n- Accent colour: color, default #e6ff55\n- Background: color, default #0c1e18\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/parallax-pattern-sections.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 \"Parallax pattern sections\" 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 \"Parallax pattern sections\" element from the Enrichr Library: Full-height sections whose patterned backgrounds drift slower than the page, so each headline floats over a deeper layer.\nPage: https://enrichr.dev/elements/parallax-pattern-sections.html\nMachine-readable spec: https://enrichr.dev/elements/parallax-pattern-sections.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 ParallaxPatternSections.\n2. Paste the JavaScript below into a separate code file named parallax-pattern-sections.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 \"./parallax-pattern-sections\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function ParallaxPatternSections(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(ParallaxPatternSections, {\n  titles: { type: ControlType.String, title: \"Headlines (comma separated)\", defaultValue: \"Parallax sections, Patterns drift slower, Headlines float above, Keep scrolling\" },\n  pattern: { type: ControlType.Enum, title: \"Pattern\", options: [\"mixed\",\"dots\",\"stripes\",\"grid\",\"checker\",\"rings\"], optionTitles: [\"Mixed\",\"Dots\",\"Stripes\",\"Grid\",\"Checker\",\"Rings\"], defaultValue: \"mixed\" },\n  depth: { type: ControlType.Number, title: \"Depth\", min: 0, max: 60, step: 5, defaultValue: 25 },\n  height: { type: ControlType.Number, title: \"Section height\", min: 220, max: 640, step: 20, defaultValue: 360 },\n  accent: { type: ControlType.Color, title: \"Accent colour\", defaultValue: \"#e6ff55\" },\n  background: { type: ControlType.Color, title: \"Background\", defaultValue: \"#0c1e18\" },\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 \"Parallax pattern sections\" 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 \"Parallax pattern sections\" element from the Enrichr Library: Full-height sections whose patterned backgrounds drift slower than the page, so each headline floats over a deeper layer.\nPage: https://enrichr.dev/elements/parallax-pattern-sections.html\nMachine-readable spec: https://enrichr.dev/elements/parallax-pattern-sections.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-parallax-pattern-sections\"></div>, and a <script> block with the JavaScript followed by:\n   mount(document.getElementById(\"enrichr-parallax-pattern-sections\"), { ...your settings... });\n   (set the container's innerHTML to the markup first, as in the contract).\n2. Embed elements have a size limit (check Webflow's current number). If the code is longer, host the JS and CSS as files and link them from Custom code in the page settings, then keep only the container and the mount call in the Embed.\n3. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}"
  },
  "exportTools": [
    "claude",
    "chatgpt",
    "cursor",
    "v0",
    "lovable",
    "bolt",
    "replit",
    "figma",
    "framer",
    "webflow"
  ],
  "accessibility": "Each section is a labelled region with a real heading, and the patterns are decorative and hidden from assistive technology. Headlines sit on a solid plate so they stay readable over any pattern. With prefers-reduced-motion the backgrounds stay still and no scroll work is done.",
  "performance": "Scroll events only schedule a frame, so nothing runs while the page is still, and work stops when the block is off screen. Each frame reads one bounding box per visible section and writes one transform, which the browser composites without layout. No images are loaded.",
  "dependencies": [],
  "source": {
    "markup": "<div class=\"ef-pps\"></div>",
    "css": "/* Enrichr Library · https://enrichr.dev */\n.ef-pps { --ef-pps-bg: #0c1e18; --ef-pps-acc: #e6ff55; --ef-pps-mid: color-mix(in srgb, var(--ef-pps-bg) 55%, #005236); width: 100%; font-family: \"Helvetica Neue\", Arial, \"Segoe UI\", system-ui, sans-serif; background: var(--ef-pps-bg); container-type: inline-size; }\n.ef-pps__sec { position: relative; height: var(--ef-pps-h, 360px); display: flex; align-items: center; justify-content: center; overflow: hidden; isolation: isolate; }\n.ef-pps__bg { position: absolute; left: 0; right: 0; top: calc(var(--ef-pps-k, 80px) * -1); bottom: calc(var(--ef-pps-k, 80px) * -1); z-index: -1; will-change: transform; background-color: var(--ef-pps-mid); }\n.ef-pps__bg--dots { background-image: radial-gradient(var(--ef-pps-acc) 18%, transparent 21%); background-size: 44px 44px; }\n.ef-pps__bg--stripes { background-color: var(--ef-pps-bg); background-image: repeating-linear-gradient(45deg, var(--ef-pps-acc) 0 8px, transparent 8px 48px); }\n.ef-pps__bg--grid { background-image: linear-gradient(color-mix(in srgb, var(--ef-pps-acc) 70%, #fff) 3px, transparent 3px), linear-gradient(90deg, color-mix(in srgb, var(--ef-pps-acc) 70%, #fff) 3px, transparent 3px); background-size: 64px 64px; }\n.ef-pps__bg--checker { background-color: var(--ef-pps-bg); background-image: conic-gradient(var(--ef-pps-mid) 25%, transparent 0 50%, var(--ef-pps-mid) 0 75%, transparent 0); background-size: 72px 72px; }\n.ef-pps__bg--rings { background-color: var(--ef-pps-bg); background-image: repeating-radial-gradient(circle at 50% 50%, var(--ef-pps-acc) 0 4px, transparent 4px 34px); }\n.ef-pps__copy { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: 0 1rem; text-align: center; }\n.ef-pps__n { font: 600 0.72rem/1 ui-monospace, \"SFMono-Regular\", Menlo, monospace; letter-spacing: 0.12em; color: var(--ef-pps-bg); background: var(--ef-pps-acc); padding: 0.35rem 0.6rem; border-radius: 999px; }\n.ef-pps__t { margin: 0; padding: 0.06em 0.28em 0; font-size: clamp(1.6rem, 7.5cqi, 5.5rem); font-weight: 900; line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; color: var(--ef-pps-acc); background: var(--ef-pps-bg); box-decoration-break: clone; -webkit-box-decoration-break: clone; }\n@media (prefers-reduced-motion: reduce) { .ef-pps__bg { transform: none !important; } }",
    "js": "// Enrichr Library · https://enrichr.dev\n// Parallax pattern sections: full-height sections whose patterned backgrounds drift slower than the page, so each headline\n// seems to float over a deeper layer. The pattern layer is taller than its section and is moved with translate3d by how far\n// the section has travelled through the viewport. Scroll events (from the page or any scrolling parent) schedule one frame;\n// nothing runs while the page is still. Patterns are CSS gradients, so there are no images to load.\n// mount(root, { titles (comma separated), pattern (\"mixed\", \"dots\", \"stripes\", \"grid\", \"checker\", \"rings\"),\n//               depth (0-60, % of the section height the background lags), height (section height in px), accent, background })\nfunction mount(root, o) {\n  var reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n  var box = root.querySelector(\".ef-pps\");\n  var PATTERNS = [\"dots\", \"stripes\", \"grid\", \"checker\", \"rings\"];\n  var opts = {}, secs = [], raf = 0, visible = true, io = null, K = 0;\n\n  function build() {\n    box.textContent = \"\";\n    secs = [];\n    var titles = String(opts.titles).split(\",\").map(function (t) { return t.trim(); }).filter(Boolean).slice(0, 8);\n    if (!titles.length) titles = [\"Scroll down\"];\n    titles.forEach(function (t, i) {\n      var s = document.createElement(\"section\");\n      s.className = \"ef-pps__sec\";\n      s.setAttribute(\"aria-label\", t);\n      var bg = document.createElement(\"div\");\n      var p = opts.pattern === \"mixed\" ? PATTERNS[i % PATTERNS.length] : opts.pattern;\n      bg.className = \"ef-pps__bg ef-pps__bg--\" + (PATTERNS.indexOf(p) < 0 ? \"dots\" : p);\n      bg.setAttribute(\"aria-hidden\", \"true\");\n      var copy = document.createElement(\"div\"); copy.className = \"ef-pps__copy\";\n      var n = document.createElement(\"span\"); n.className = \"ef-pps__n\"; n.setAttribute(\"aria-hidden\", \"true\");\n      n.textContent = String(i + 1).padStart(2, \"0\") + \" / \" + String(titles.length).padStart(2, \"0\");\n      var h = document.createElement(\"h3\"); h.className = \"ef-pps__t\"; h.textContent = t;\n      copy.appendChild(n); copy.appendChild(h);\n      s.appendChild(bg); s.appendChild(copy);\n      box.appendChild(s);\n      secs.push({ el: s, bg: bg, last: null });\n    });\n  }\n  function draw() {\n    raf = 0;\n    if (!visible || reduce || !K) return;\n    var vh = window.innerHeight || document.documentElement.clientHeight || 800;\n    secs.forEach(function (s) {\n      var r = s.el.getBoundingClientRect();\n      if (r.bottom < -K || r.top > vh + K) return;\n      // 0 when the section's top meets the bottom of the screen, 1 when its bottom leaves the top.\n      var p = Math.min(1, Math.max(0, (vh - r.top) / (vh + r.height)));\n      var y = Math.round((p - 0.5) * 2 * K * 10) / 10;\n      if (y !== s.last) { s.last = y; s.bg.style.transform = \"translate3d(0,\" + y + \"px,0)\"; }\n    });\n  }\n  function kick() { if (!raf) raf = requestAnimationFrame(draw); }\n\n  function update(next) {\n    opts = Object.assign({ titles: \"Parallax sections, Patterns drift slower, Headlines float above, Keep scrolling\", pattern: \"mixed\", depth: 25, height: 360, accent: \"#e6ff55\", background: \"#0c1e18\" }, opts, next || {});\n    opts.depth = Math.min(60, Math.max(0, Number(opts.depth) || 0));\n    opts.height = Math.max(160, Number(opts.height) || 360);\n    K = Math.round(opts.height * opts.depth / 100);\n    box.style.setProperty(\"--ef-pps-h\", opts.height + \"px\");\n    box.style.setProperty(\"--ef-pps-k\", K + \"px\");\n    box.style.setProperty(\"--ef-pps-acc\", opts.accent);\n    box.style.setProperty(\"--ef-pps-bg\", opts.background);\n    build();\n    kick();\n  }\n  update(o);\n  if (!reduce) {\n    window.addEventListener(\"scroll\", kick, { passive: true, capture: true });\n    window.addEventListener(\"resize\", kick);\n    if (\"IntersectionObserver\" in window) { io = new IntersectionObserver(function (e) { visible = e[0].isIntersecting; if (visible) kick(); }, { rootMargin: \"120px 0px\" }); io.observe(box); }\n  }\n  return {\n    update: update,\n    destroy: function () {\n      if (raf) cancelAnimationFrame(raf); raf = 0;\n      if (io) io.disconnect();\n      window.removeEventListener(\"scroll\", kick, { capture: true });\n      window.removeEventListener(\"resize\", kick);\n    }\n  };\n}"
  }
}