{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"lighting-shop-footer-wordmark-tilts-under-a-pointer-lamp","type":"registry:block","title":"Lighting Shop Footer With Tilting Wordmark","description":"","dependencies":[],"files":[{"path":"components/we-inc/lighting-shop-footer-wordmark-tilts-under-a-pointer-lamp.tsx","type":"registry:component","content":"import { useEffect, useRef } from \"react\";\nimport type { CSSProperties } from \"react\";\n\nconst TILT = 16; // largest turn of the word, in degrees\nconst DEPTH = 26; // how far the shadow falls away, in px\nconst EASE = 0.08; // smoothing: lower is lazier\n\n// Same markup, styles and script as the plain HTML version.\nconst STYLES = `\n/* Change these: background, text, muted text, rule colour, accent (links' focus ring and highlights). */\n  .w4tlt { --w4tlt-bg: #e5e6e1; --w4tlt-ink: #22252a; --w4tlt-muted: #4b5159; --w4tlt-line: #cdd0ca; --w4tlt-accent: #8a5730; }\n  .w4tlt { position: relative; overflow: hidden; background: var(--w4tlt-bg); color: var(--w4tlt-ink); font-family: ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif; padding: 72px clamp(20px, 4vw, 56px) 24px; }\n  .w4tlt *, .w4tlt *::before, .w4tlt *::after { box-sizing: border-box; }\n  .w4tlt-in { max-width: 1240px; margin: 0 auto; }\n  .w4tlt-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px 40px; }\n  .w4tlt-brand { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }\n  .w4tlt-blurb { margin: 12px 0 0; max-width: 32ch; font-size: 15px; line-height: 1.6; color: var(--w4tlt-muted); }\n  .w4tlt-addr { margin: 16px 0 0; font-style: normal; font-size: 14px; line-height: 1.65; color: var(--w4tlt-muted); }\n  .w4tlt-col h2 { margin: 0 0 6px; font-size: 12px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--w4tlt-muted); }\n  .w4tlt-col ul, .w4tlt-legal ul { list-style: none; margin: 0; padding: 0; }\n  .w4tlt-col a, .w4tlt-legal a { display: inline-flex; align-items: center; min-height: 40px; color: inherit; text-decoration: none; font-size: 15px; border-radius: 3px; }\n  .w4tlt-col a:hover, .w4tlt-legal a:hover { text-decoration: underline; text-underline-offset: 4px; }\n  .w4tlt a:focus-visible { outline: 2px solid var(--w4tlt-accent); outline-offset: 3px; }\n  .w4tlt-big { container-type: inline-size; margin: 56px 0 0; }\n  .w4tlt-legal { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 24px; margin-top: 24px; padding-top: 6px; border-top: 1px solid var(--w4tlt-line); font-size: 13px; color: var(--w4tlt-muted); }\n  .w4tlt-legal p { margin: 10px 0; }\n  .w4tlt-legal ul { display: flex; flex-wrap: wrap; gap: 0 20px; }\n  .w4tlt-legal a { font-size: 13px; }\n  .w4tlt-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }\n  @media (max-width: 760px) {\n    .w4tlt { padding-top: 56px; }\n    .w4tlt-top { grid-template-columns: 1fr 1fr; gap: 24px 20px; }\n    .w4tlt-lead { grid-column: 1 / -1; }\n  }\n  /* Change these: wordmark size and the warm glow colour behind it. */\n  .w4tlt { --w4tlt-size: 30cqi; --w4tlt-glow: rgba(255, 214, 160, .75); }\n  .w4tlt-stage { position: relative; display: grid; place-items: center; perspective: 1100px; padding: 2cqi 0 4cqi; }\n  .w4tlt-glow { position: absolute; left: 50%; top: 50%; width: 46cqi; height: 46cqi; margin: -23cqi 0 0 -23cqi; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, var(--w4tlt-glow), rgba(255, 214, 160, 0)); will-change: transform; }\n  .w4tlt-word, .w4tlt-shadow { grid-area: 1 / 1; white-space: nowrap; font: 800 var(--w4tlt-size)/.9 ui-sans-serif, system-ui, -apple-system, \"Helvetica Neue\", Arial, sans-serif; letter-spacing: -.06em; padding: 0 .04em; will-change: transform; }\n  .w4tlt-word { position: relative; color: var(--w4tlt-ink); }\n  .w4tlt-shadow { color: rgba(34, 37, 42, .3); filter: blur(12px); transform: translate(0, 20px); }\n  .w4tlt-hint { margin: 0; text-align: center; font-size: 14px; color: var(--w4tlt-muted); }\n  @media (prefers-reduced-motion: reduce) { .w4tlt-word, .w4tlt-glow { transform: none !important; } .w4tlt-shadow { transform: translate(0, 20px) !important; } }\n`;\n\nexport default function LightingShopFooterWordmarkTilts() {\n  const ref = useRef<HTMLElement>(null);\n  useEffect(() => {\n    const root: any = ref.current;\n    if (!root) return;\n    if (matchMedia(\"(prefers-reduced-motion: reduce)\").matches) return;\n    var stage = root.querySelector(\".w4tlt-stage\");\n    var word = root.querySelector(\".w4tlt-word\"), shadow = root.querySelector(\".w4tlt-shadow\"), glow = root.querySelector(\".w4tlt-glow\");\n    var tx = 0, ty = 0, x = 0, y = 0, live = false, frame = 0;\n    function clamp(v) { return Math.max(-1, Math.min(1, v)); }\n    function tick(t) {\n      /* idle demo: the lamp wanders in a slow loop until a real mouse arrives */\n      if (!live) { tx = Math.sin(t / 2600) * 0.75; ty = Math.sin(t / 1700) * 0.55; }\n      x += (tx - x) * EASE; y += (ty - y) * EASE;\n      word.style.transform = \"rotateY(\" + (x * TILT).toFixed(2) + \"deg) rotateX(\" + (-y * TILT * 0.6).toFixed(2) + \"deg)\";\n      shadow.style.transform = \"translate(\" + (-x * DEPTH).toFixed(1) + \"px,\" + (20 - y * DEPTH * 0.6).toFixed(1) + \"px) rotateY(\" + (x * TILT).toFixed(2) + \"deg)\";\n      glow.style.transform = \"translate(\" + (x * 34).toFixed(1) + \"cqi,\" + (y * 8).toFixed(1) + \"cqi)\";\n      frame = requestAnimationFrame(tick);\n    }\n    function move(e) {\n      if (e.pointerType !== \"mouse\") return;\n      var r = stage.getBoundingClientRect();\n      live = true;\n      tx = clamp(((e.clientX - r.left) / r.width) * 2 - 1);\n      ty = clamp(((e.clientY - r.top) / r.height) * 2 - 1);\n    }\n    function leave() { live = false; }\n    var io = new IntersectionObserver(function (en) {\n      cancelAnimationFrame(frame); frame = 0;\n      if (en[0].isIntersecting) frame = requestAnimationFrame(tick);\n    });\n    io.observe(root);\n    root.addEventListener(\"pointermove\", move);\n    root.addEventListener(\"pointerleave\", leave);\n    return function () {\n      cancelAnimationFrame(frame); io.disconnect();\n      root.removeEventListener(\"pointermove\", move);\n      root.removeEventListener(\"pointerleave\", leave);\n    };\n  }, []);\n\n  return (\n    <footer className=\"w4tlt\" ref={ref}>\n      <style>{STYLES}</style>\n      <div className=\"w4tlt-in\">\n        <div className=\"w4tlt-top\">\n          <div className=\"w4tlt-lead\">\n            <p className=\"w4tlt-brand\">Lumen Hall</p>\n            <p className=\"w4tlt-blurb\">\n              Restored pendant lamps, rewired desk lights and made-to-order shades in linen and card.\n            </p>\n            <address className=\"w4tlt-addr\">\n              Arch 7, Bermondsey Viaduct, London SE1\n              <br />\n              Showroom open Tuesday to Saturday\n              <br />\n              020 7946 0731\n            </address>\n          </div>\n          <div className=\"w4tlt-col\">\n            <h2>Lights</h2>\n            <ul>\n              <li>\n                <a href=\"#\">Pendants</a>\n              </li>\n              <li>\n                <a href=\"#\">Desk lamps</a>\n              </li>\n              <li>\n                <a href=\"#\">Wall lights</a>\n              </li>\n              <li>\n                <a href=\"#\">Shades</a>\n              </li>\n            </ul>\n          </div>\n          <div className=\"w4tlt-col\">\n            <h2>Services</h2>\n            <ul>\n              <li>\n                <a href=\"#\">Rewiring</a>\n              </li>\n              <li>\n                <a href=\"#\">Bulb advice</a>\n              </li>\n              <li>\n                <a href=\"#\">Trade accounts</a>\n              </li>\n            </ul>\n          </div>\n          <div className=\"w4tlt-col\">\n            <h2>Showroom</h2>\n            <ul>\n              <li>\n                <a href=\"#\">Visit</a>\n              </li>\n              <li>\n                <a href=\"#\">Events</a>\n              </li>\n              <li>\n                <a href=\"#\">Contact</a>\n              </li>\n            </ul>\n          </div>\n        </div>\n        <div className=\"w4tlt-big\">\n          <div className=\"w4tlt-stage\" aria-hidden=\"true\">\n            <span className=\"w4tlt-glow\" />\n            <span className=\"w4tlt-shadow\">lumen</span>\n            <span className=\"w4tlt-word\">lumen</span>\n          </div>\n          <p className=\"w4tlt-hint\">\n            Every lamp is tested on the bench before it leaves the arch.\n          </p>\n        </div>\n        <div className=\"w4tlt-legal\">\n          <p>\n            © 2026 Lumen Hall Lighting Ltd. Lamps restored in south London.\n          </p>\n          <ul>\n            <li>\n              <a href=\"#\">Privacy</a>\n            </li>\n            <li>\n              <a href=\"#\">Delivery</a>\n            </li>\n            <li>\n              <a href=\"#\">Returns</a>\n            </li>\n          </ul>\n        </div>\n      </div>\n    </footer>\n  );\n}\n"}]}
