{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"warning-tape-footer","type":"registry:component","title":"Warning Tape Footer","description":"A neo-brutalist footer under a strip of hazard tape you can grab and throw on its slow 48-second crawl, a sign-up that stamps the tape, and a giant wordmark whose letters press down onto their own ink plates.","dependencies":[],"registryDependencies":[],"files":[{"path":"components/viberdy/warning-tape-footer.tsx","content":"\"use client\";\n\nimport { useEffect, useId, useRef, useState } from \"react\";\nimport type { CSSProperties, FormEvent, KeyboardEvent as ReactKeyboardEvent, PointerEvent as ReactPointerEvent } from \"react\";\n\n/**\n * WarningTapeFooter — a neo-brutalist footer under a strip of hazard tape\n * you can grab, with a wordmark whose letters are keys.\n *\n * - THE TAPE runs across the top of the footer at a slight tilt, wider than\n *   the page: short phrases in heavy caps between blocks of 45-degree hazard\n *   stripes. It crawls on one slow loop (48 seconds by default, never under\n *   30). Grab it and it lifts onto a longer shadow; drag to scrub it, let go\n *   and it keeps your throw, slows under friction, then settles back into\n *   its crawl. It stops while you point at it or while it has keyboard focus,\n *   and then the arrow keys nudge it (Shift for a bigger nudge). Under\n *   reduced motion it stands still unless you drag it.\n * - THE SIGN-UP is a real form that posts and reports through a status line.\n *   When it succeeds, a label is stamped onto the tape above the form (a hard\n *   two-frame cut, no fade) and crawls away with the tape. It comes back\n *   around every loop: it is printed on the tape now.\n * - THE WORDMARK is the brand set huge and cropped by the footer's bottom\n *   edge, one key per letter. Each letter sits on its own ink plate; point at\n *   one (or tap it) and it presses down onto the plate in 100ms linear. Only\n *   the letter moves, so the shadow never interpolates. Typing a letter of\n *   the brand on the keyboard presses it too, while the footer is on screen\n *   and no field has focus.\n *\n * Link columns are split by 3px rules; a bottom bar holds the year, an\n * optional status and social links. Type reads var(--font-display),\n * var(--font-sans) and var(--font-mono), so a buyer's next/font variables\n * drop in. One accent: the tape, the brand square, the focused field and a\n * pressed letter all share it.\n *\n * Needs Tailwind v4 (on v3.4, add the @tailwindcss/container-queries plugin).\n * No dependencies beyond React.\n */\n\nconst DISPLAY = 'var(--font-display, \"Archivo\", \"Archivo Black\", \"Arial Black\", \"Helvetica Neue\", Arial, sans-serif)';\nconst SANS = 'var(--font-sans, \"Geist\", \"Inter\", \"Helvetica Neue\", Arial, sans-serif)';\nconst MONO = 'var(--font-mono, \"Geist Mono\", ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace)';\nconst HEX = /^#[0-9a-fA-F]{6}$/;\n/** Friction: seconds for a throw to lose about two thirds of its speed on its way back to the crawl. */\nconst TAU = 0.45;\n/** The ink plate under each wordmark letter, on the kit's 8px ladder step. */\nconst PLATE = 8;\n/** A space that survives inside an inline-block letter. */\nconst NBSP = String.fromCharCode(160);\n\nconst FILLS = {\n  yellow: \"#ffd23f\",\n  coral: \"#ff6b6b\",\n  blue: \"#74b9ff\",\n  lime: \"#b4f462\",\n  pink: \"#ff5fa2\",\n} as const;\n\n// Static rules only: colours arrive through custom properties set inline.\nconst WTF_CSS =\n  \".wtf-tape{box-shadow:5px 5px 0 0 var(--wtf-ink);cursor:grab;touch-action:pan-y}\" +\n  \".wtf-tape[data-grab]{cursor:grabbing;transform:translate(-2px,-2px);box-shadow:7px 7px 0 0 var(--wtf-ink)}\" +\n  \".wtf-stamp{position:absolute;top:50%;display:flex;align-items:center;height:38px;padding:0 14px;white-space:nowrap;\" +\n  \"transform:translate(-50%,-50%) rotate(-4deg);background:var(--wtf-ground);color:var(--wtf-ink);border:3px solid var(--wtf-ink);\" +\n  \"box-shadow:5px 5px 0 0 var(--wtf-ink);font-size:20px;line-height:1;text-transform:uppercase;letter-spacing:-0.01em}\" +\n  \"@keyframes wtf-slam{from{transform:translate(-50%,-50%) rotate(-4deg) scale(1.3);box-shadow:0 0 0 0 var(--wtf-ink)}\" +\n  \"to{transform:translate(-50%,-50%) rotate(-4deg);box-shadow:5px 5px 0 0 var(--wtf-ink)}}\" +\n  \"@media (prefers-reduced-motion:no-preference){.wtf-stamp{animation:wtf-slam 120ms steps(1,end) both}}\" +\n  \".wtf-word{font-kerning:none}\" +\n  \".wtf-plate,.wtf-face{display:inline-block;-webkit-text-stroke:6px var(--wtf-ink);paint-order:stroke fill}\" +\n  \".wtf-plate{color:var(--wtf-ink)}\" +\n  \".wtf-key{display:inline-block}\" +\n  \".wtf-face{color:var(--wtf-ground);transition:transform 100ms linear}\" +\n  \".wtf-key[data-down] .wtf-face{transform:translate(\" + PLATE + \"px,\" + PLATE + \"px);color:var(--wtf-fill)}\" +\n  \"@media (prefers-reduced-motion:reduce){.wtf-face{transition:none}}\";\n\nfunction own<T extends object>(map: T, key: string): key is Extract<keyof T, string> {\n  return Object.prototype.hasOwnProperty.call(map, key);\n}\n\n/** Links: strip tabs and newlines, refuse backslashes, allow http(s), mailto, tel and same-site paths. */\nfunction safeHref(raw: string) {\n  const v = raw.replace(/[\\t\\n\\r]/g, \"\").trim();\n  if (!v || v.includes(\"\\\\\")) return \"#\";\n  if (/^(https?:|mailto:|tel:)/i.test(v)) return v;\n  if (/^[/#?]/.test(v) && !/^\\/\\//.test(v)) return v;\n  return \"#\";\n}\n\nfunction reduced() {\n  return window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n}\n\n/** True while focus is somewhere text can be typed. */\nfunction isTyping(t: EventTarget | null): boolean {\n  if (!(t instanceof HTMLElement)) return false;\n  if (t.isContentEditable || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement) return true;\n  return t instanceof HTMLInputElement && !/^(button|checkbox|color|file|hidden|image|radio|range|reset|submit)$/i.test(t.type);\n}\n\nexport type TapeLink = { label: string; href: string };\nexport type TapeColumn = { title: string; links: TapeLink[] };\n\nexport type WarningTapeFooterProps = {\n  brand?: string;\n  /** Where the brand links to. */\n  home?: string;\n  tagline?: string;\n  /** The phrases on the tape. */\n  tape?: string[];\n  /** Seconds for one loop of the tape; clamped to 30 or more. */\n  speed?: number;\n  /** Tilt of the tape in degrees, -4 to 4. */\n  tilt?: number;\n  columns?: TapeColumn[];\n  social?: TapeLink[];\n  /** A short line in the bottom bar, e.g. a status. Empty hides it. */\n  status?: string;\n  /** The sign-up: called with the email once it is valid. Wire it to your real list provider (a stub loses the addresses). Omit to hide the form. */\n  onSubscribe?: (email: string) => void | Promise<void>;\n  subscribeLabel?: string;\n  /** Stamped onto the tape when a sign-up succeeds. Keep it short. Empty turns the stamp off. */\n  stamp?: string;\n  /** The brand name as a giant wordmark cropped by the bottom edge, one key per letter. */\n  wordmark?: boolean;\n  /** Typing a letter of the brand presses it on the wordmark (only while the footer is on screen and no field has focus). */\n  keys?: boolean;\n  /** Shown in the bottom bar; pass it from the server so it never goes stale. */\n  year?: number;\n  accent?: keyof typeof FILLS | string;\n  ink?: string;\n  ground?: \"cream\" | \"white\";\n  className?: string;\n};\n\n/**\n * PLACEHOLDER defaults (brand, tagline, tape, columns, social) for \"Hod\", the\n * kit's fictional branch-preview tool. Every link points at \"#\": pass your own.\n */\nconst DEFAULT_COLUMNS: TapeColumn[] = [\n  { title: \"Product\", links: [{ label: \"Previews\", href: \"#\" }, { label: \"Comments\", href: \"#\" }, { label: \"Checks\", href: \"#\" }, { label: \"Pricing\", href: \"#\" }] },\n  { title: \"Docs\", links: [{ label: \"Quickstart\", href: \"#\" }, { label: \"Frameworks\", href: \"#\" }, { label: \"CLI\", href: \"#\" }, { label: \"API\", href: \"#\" }] },\n  { title: \"Company\", links: [{ label: \"About\", href: \"#\" }, { label: \"Changelog\", href: \"#\" }, { label: \"Careers\", href: \"#\" }, { label: \"Contact\", href: \"#\" }] },\n];\n\nconst DEFAULT_SOCIAL: TapeLink[] = [\n  { label: \"GitHub\", href: \"#\" },\n  { label: \"Discord\", href: \"#\" },\n  { label: \"RSS\", href: \"#\" },\n];\n\nfunction Stripes({ ink, fill }: { ink: string; fill: string }) {\n  return (\n    <span\n      aria-hidden\n      className=\"block h-full w-[84px] shrink-0\"\n      style={{\n        background: \"repeating-linear-gradient(135deg, \" + ink + \" 0 12px, \" + fill + \" 12px 24px)\",\n        borderLeft: \"3px solid \" + ink,\n        borderRight: \"3px solid \" + ink,\n      }}\n    />\n  );\n}\n\ntype Phys = {\n  /** The track's offset along the tape, px (kept within one run). */\n  x: number;\n  /** Velocity, px per second. */\n  v: number;\n  /** The width of one run of phrases, px. */\n  w: number;\n  drag: boolean;\n  hover: boolean;\n  focus: boolean;\n  from: number;\n  x0: number;\n  trail: { a: number; t: number }[];\n  draw: () => void;\n  kick: () => void;\n};\n\nexport function WarningTapeFooter({\n  brand = \"hod\",\n  home = \"/\",\n  tagline = \"Previews for every pull request. Built by a small team that ships its own drafts first.\",\n  tape = [\"Ship the rough draft\", \"Preview every push\", \"Mind the merge\"],\n  speed = 48,\n  tilt = -2,\n  columns = DEFAULT_COLUMNS,\n  social = DEFAULT_SOCIAL,\n  status = \"\",\n  onSubscribe,\n  subscribeLabel = \"Get the changelog\",\n  stamp = \"You're in\",\n  wordmark = true,\n  keys = true,\n  year,\n  accent = \"yellow\",\n  ink = \"#000000\",\n  ground = \"cream\",\n  className = \"\",\n}: WarningTapeFooterProps) {\n  const line = HEX.test(ink) ? ink : \"#000000\";\n  const hi = own(FILLS, accent) ? FILLS[accent] : HEX.test(accent) ? accent : FILLS.yellow;\n  const bg = ground === \"white\" ? \"#ffffff\" : \"#fffdf5\";\n  const secs = Math.max(30, Number.isFinite(speed) ? speed : 48);\n  const angle = Math.max(-4, Math.min(4, Number.isFinite(tilt) ? tilt : -2));\n  const rule = \"3px solid \" + line;\n  const [sub, setSub] = useState<\"idle\" | \"busy\" | \"done\" | \"fail\">(\"idle\");\n  const [pressed, setPressed] = useState(false);\n  const [stampAt, setStampAt] = useState<number | null>(null);\n  const uid = useId();\n  const rootRef = useRef<HTMLElement>(null);\n  const tapeRef = useRef<HTMLDivElement>(null);\n  const trackRef = useRef<HTMLDivElement>(null);\n  const formRef = useRef<HTMLFormElement>(null);\n  const markRef = useRef<HTMLParagraphElement>(null);\n  const secsRef = useRef(secs);\n  const phys = useRef<Phys>({ x: 0, v: 0, w: 0, drag: false, hover: false, focus: false, from: 0, x0: 0, trail: [], draw: () => {}, kick: () => {} });\n\n  const phrases = tape.length ? tape : [\"Ship the rough draft\"];\n  const letters = Array.from(brand);\n\n  useEffect(() => {\n    secsRef.current = secs;\n    phys.current.kick();\n  }, [secs]);\n\n  // The tape's physics: one loop, running only while the tape is on screen\n  // and something is moving. Velocity eases toward a target (the crawl, or\n  // zero while held, pointed at or focused) with time constant TAU: that one\n  // rule is the throw's momentum, its friction and the return to the crawl.\n  useEffect(() => {\n    const tapeEl = tapeRef.current;\n    const track = trackRef.current;\n    if (!tapeEl || !track) return;\n    const p = phys.current;\n    const still = reduced();\n    let raf = 0;\n    let last = 0;\n    let seen = false;\n    const measure = () => {\n      const run = track.firstElementChild as HTMLElement | null;\n      p.w = run ? run.offsetWidth : 0;\n    };\n    p.draw = () => {\n      if (p.w > 0) {\n        while (p.x <= -p.w) p.x += p.w;\n        while (p.x > 0) p.x -= p.w;\n      }\n      track.style.transform = \"translate3d(\" + p.x.toFixed(2) + \"px,0,0)\";\n    };\n    const target = () => (still || p.hover || p.focus || p.drag ? 0 : -p.w / Math.max(30, secsRef.current));\n    const frame = (t: number) => {\n      raf = 0;\n      const dt = last ? Math.min(0.05, (t - last) / 1000) : 0;\n      last = t;\n      if (p.drag) {\n        last = 0;\n        return;\n      }\n      const vt = target();\n      p.v += (vt - p.v) * (1 - Math.exp(-dt / TAU));\n      p.x += p.v * dt;\n      p.draw();\n      // Idle: nothing to crawl toward and the throw has died, so stop asking for frames.\n      if (vt === 0 && Math.abs(p.v) < 1) {\n        p.v = 0;\n        last = 0;\n        return;\n      }\n      if (seen) raf = requestAnimationFrame(frame);\n      else last = 0;\n    };\n    p.kick = () => {\n      if (!raf && seen && !p.drag) raf = requestAnimationFrame(frame);\n    };\n    const ro = new ResizeObserver(() => {\n      measure();\n      p.draw();\n    });\n    ro.observe(track);\n    const io = new IntersectionObserver((es) => {\n      seen = es[es.length - 1].isIntersecting;\n      if (seen) p.kick();\n    });\n    io.observe(tapeEl);\n    measure();\n    p.draw();\n    return () => {\n      cancelAnimationFrame(raf);\n      ro.disconnect();\n      io.disconnect();\n      p.kick = () => {};\n    };\n  }, []);\n\n  // The wordmark's letters answer the keyboard too.\n  const brandKey = brand;\n  useEffect(() => {\n    const mark = markRef.current;\n    if (!mark || !keys) return;\n    let seen = false;\n    const io = new IntersectionObserver((es) => {\n      seen = es[es.length - 1].isIntersecting;\n    });\n    io.observe(mark);\n    const since = new Map<string, number>();\n    const timers = new Map<string, number>();\n    const hits = (k: string) => Array.from(mark.querySelectorAll<HTMLElement>(\".wtf-key\")).filter((el) => el.getAttribute(\"data-ch\") === k);\n    const onDown = (e: KeyboardEvent) => {\n      if (!seen || e.repeat || e.ctrlKey || e.metaKey || e.altKey || e.isComposing || isTyping(e.target) || isTyping(document.activeElement)) return;\n      const k = e.key.toLowerCase();\n      if (k.length !== 1 || k === \" \") return;\n      const els = hits(k);\n      if (!els.length) return;\n      window.clearTimeout(timers.get(k));\n      since.set(k, e.timeStamp);\n      els.forEach((el) => el.setAttribute(\"data-down\", \"\"));\n    };\n    const onUp = (e: KeyboardEvent) => {\n      const k = e.key.toLowerCase();\n      const t0 = since.get(k);\n      if (t0 === undefined) return;\n      since.delete(k);\n      // Hold long enough for the 100ms press to land, even on a quick tap.\n      timers.set(k, window.setTimeout(() => hits(k).forEach((el) => el.removeAttribute(\"data-down\")), Math.max(0, 120 - (e.timeStamp - t0))));\n    };\n    const clear = () => {\n      timers.forEach((t) => window.clearTimeout(t));\n      since.clear();\n      mark.querySelectorAll<HTMLElement>(\".wtf-key[data-down]\").forEach((el) => el.removeAttribute(\"data-down\"));\n    };\n    window.addEventListener(\"keydown\", onDown);\n    window.addEventListener(\"keyup\", onUp);\n    window.addEventListener(\"blur\", clear);\n    return () => {\n      io.disconnect();\n      window.removeEventListener(\"keydown\", onDown);\n      window.removeEventListener(\"keyup\", onUp);\n      window.removeEventListener(\"blur\", clear);\n      clear();\n    };\n  }, [keys, wordmark, brandKey]);\n\n  /** The pointer's position along the tape's tilted axis, in the footer's layout pixels. */\n  function along(e: { clientX: number; clientY: number }) {\n    const root = rootRef.current;\n    const k = root ? root.offsetWidth / (root.getBoundingClientRect().width || 1) : 1;\n    const rad = (angle * Math.PI) / 180;\n    return (e.clientX * Math.cos(rad) + e.clientY * Math.sin(rad)) * k;\n  }\n\n  function onGrab(e: ReactPointerEvent<HTMLDivElement>) {\n    if (e.pointerType === \"mouse\" && e.button !== 0) return;\n    const p = phys.current;\n    try {\n      e.currentTarget.setPointerCapture(e.pointerId);\n    } catch {\n      // A pointer that already ended cannot be captured; the drag still works.\n    }\n    const a = along(e);\n    p.drag = true;\n    p.v = 0;\n    p.from = a;\n    p.x0 = p.x;\n    p.trail = [{ a, t: e.timeStamp }];\n    e.currentTarget.setAttribute(\"data-grab\", \"\");\n  }\n  function onDrag(e: ReactPointerEvent<HTMLDivElement>) {\n    const p = phys.current;\n    if (!p.drag) return;\n    const a = along(e);\n    p.x = p.x0 + (a - p.from);\n    p.trail.push({ a, t: e.timeStamp });\n    p.trail = p.trail.filter((s) => e.timeStamp - s.t < 100);\n    p.draw();\n  }\n  function onDrop(e: ReactPointerEvent<HTMLDivElement>) {\n    const p = phys.current;\n    if (!p.drag) return;\n    p.drag = false;\n    // A throw is physical: it glides and rejoins the crawl even under the\n    // pointer. Resting the pointer on the tape again (a fresh entry) stops it.\n    p.hover = false;\n    e.currentTarget.removeAttribute(\"data-grab\");\n    const first = p.trail[0];\n    const dt = first ? (e.timeStamp - first.t) / 1000 : 0;\n    // Keep the throw: the speed of the last 100ms of the drag.\n    p.v = !reduced() && first && dt > 0.008 ? Math.max(-4000, Math.min(4000, (along(e) - first.a) / dt)) : 0;\n    p.kick();\n  }\n  function onNudge(e: ReactKeyboardEvent<HTMLDivElement>) {\n    if (e.key !== \"ArrowLeft\" && e.key !== \"ArrowRight\") return;\n    e.preventDefault();\n    const p = phys.current;\n    const dir = e.key === \"ArrowLeft\" ? -1 : 1;\n    const big = e.shiftKey ? 2.5 : 1;\n    if (reduced()) {\n      p.x += dir * 64 * big;\n      p.draw();\n      return;\n    }\n    p.v = Math.max(-3000, Math.min(3000, p.v + dir * 700 * big));\n    p.kick();\n  }\n\n  /** Where the stamp lands: on the tape, straight above the form, in one run's coordinates. */\n  function placeStamp() {\n    const p = phys.current;\n    const root = rootRef.current;\n    const tapeEl = tapeRef.current;\n    const form = formRef.current;\n    if (!stamp || !root || !tapeEl || !form || p.w <= 0) return;\n    const k = root.offsetWidth / (root.getBoundingClientRect().width || 1);\n    const t = tapeEl.getBoundingClientRect();\n    const f = form.getBoundingClientRect();\n    const onTape = (f.left + f.width / 2 - t.left) * k;\n    const inRun = (((onTape - p.x) % p.w) + p.w) % p.w;\n    // Keep it clear of the run's seam so the copy in each run lines up.\n    setStampAt(Math.max(130, Math.min(p.w - 130, inRun)));\n  }\n\n  const run = (copy: number) => (\n    <div aria-hidden className=\"relative flex h-full shrink-0 items-stretch\" key={copy}>\n      {phrases.map((ph, i) => (\n        <span key={i} className=\"flex h-full items-stretch\">\n          <span className=\"flex items-center whitespace-nowrap px-7 text-[22px] uppercase leading-none tracking-[-0.01em]\" style={{ fontFamily: DISPLAY, fontWeight: 900 }}>\n            {ph}\n          </span>\n          <Stripes ink={line} fill={hi} />\n        </span>\n      ))}\n      {stampAt !== null && stamp && (\n        <span className=\"wtf-stamp\" style={{ left: stampAt, fontFamily: DISPLAY, fontWeight: 900 }}>\n          {stamp}\n        </span>\n      )}\n    </div>\n  );\n\n  const submit = async (e: FormEvent<HTMLFormElement>) => {\n    e.preventDefault();\n    if (sub === \"busy\" || sub === \"done\" || !onSubscribe) return;\n    const email = String(new FormData(e.currentTarget).get(\"email\") ?? \"\").trim();\n    setSub(\"busy\");\n    try {\n      await onSubscribe(email);\n      setSub(\"done\");\n      placeStamp();\n    } catch {\n      setSub(\"fail\");\n    }\n  };\n\n  const press = (el: HTMLElement) => el.setAttribute(\"data-down\", \"\");\n  const lift = (el: HTMLElement) => el.removeAttribute(\"data-down\");\n\n  const linkCls =\n    \"underline-offset-[5px] hover:underline hover:decoration-[3px] focus-visible:![outline-style:dashed] focus-visible:![outline-width:3px] focus-visible:![outline-offset:3px] focus-visible:![border-radius:0]\";\n\n  return (\n    <footer\n      ref={rootRef}\n      className={\"@container relative w-full overflow-hidden \" + className}\n      style={{ \"--wtf-ink\": line, \"--wtf-fill\": hi, \"--wtf-ground\": bg, background: bg, color: line } as CSSProperties}\n    >\n      <style>{WTF_CSS}</style>\n\n      {/* The tape: wider than the page, tilted, crawling; grab it and throw it. */}\n      <div className=\"relative z-10 -mx-[4%] pt-10 pb-12\" style={{ transform: \"rotate(\" + angle + \"deg)\" }}>\n        <div\n          ref={tapeRef}\n          role=\"marquee\"\n          tabIndex={0}\n          aria-label={phrases.join(\". \")}\n          aria-describedby={uid + \"-tape\"}\n          onPointerDown={onGrab}\n          onPointerMove={onDrag}\n          onPointerUp={onDrop}\n          onPointerCancel={onDrop}\n          onPointerEnter={(e) => {\n            if (e.pointerType !== \"mouse\") return;\n            phys.current.hover = true;\n            phys.current.kick();\n          }}\n          onPointerLeave={(e) => {\n            if (e.pointerType !== \"mouse\") return;\n            phys.current.hover = false;\n            phys.current.kick();\n          }}\n          onFocus={(e) => {\n            // Keyboard focus stops the crawl; the focus a grab leaves behind does not.\n            phys.current.focus = e.currentTarget.matches(\":focus-visible\");\n            phys.current.kick();\n          }}\n          onBlur={() => {\n            phys.current.focus = false;\n            phys.current.kick();\n          }}\n          onKeyDown={onNudge}\n          className=\"wtf-tape h-[60px] select-none overflow-hidden focus-visible:![outline-style:dashed] focus-visible:![outline-width:3px] focus-visible:![outline-offset:4px] focus-visible:![border-radius:0]\"\n          style={{ background: hi, borderTop: rule, borderBottom: rule, outlineColor: line }}\n        >\n          <div ref={trackRef} className=\"flex h-full w-max will-change-transform\">\n            {run(0)}\n            {run(1)}\n          </div>\n        </div>\n        <span id={uid + \"-tape\"} className=\"sr-only\">\n          Drag the tape, or use the arrow keys, to move it. It stops while it has focus.\n        </span>\n      </div>\n\n      <div className=\"mx-auto max-w-[1200px] px-6 @3xl:px-10 @6xl:px-14\">\n        <div className=\"grid @4xl:grid-cols-[1.25fr_2fr]\" style={{ borderTop: rule, borderBottom: rule }}>\n          <div className=\"flex flex-col gap-5 py-9 @4xl:pr-10\" style={{ borderBottom: rule }}>\n            <a href={safeHref(home)} className={\"inline-flex w-fit items-center gap-2.5 text-[34px] leading-none tracking-[-0.03em] \" + linkCls} style={{ fontFamily: DISPLAY, fontWeight: 900, outlineColor: line }}>\n              <span aria-hidden className=\"size-6\" style={{ background: hi, border: rule }} />\n              {brand}\n            </a>\n            {tagline && (\n              <p className=\"max-w-[26rem] text-[16px] leading-[1.5]\" style={{ fontFamily: SANS, opacity: 0.84 }}>\n                {tagline}\n              </p>\n            )}\n            {onSubscribe && (\n              <form ref={formRef} method=\"post\" onSubmit={submit} className=\"mt-1 flex max-w-[26rem] flex-col gap-2.5\">\n                <label htmlFor={uid + \"-email\"} className=\"text-[12px] uppercase tracking-[0.08em]\" style={{ fontFamily: MONO, fontWeight: 700 }}>\n                  {subscribeLabel}\n                </label>\n                <div className=\"flex\">\n                  <input\n                    id={uid + \"-email\"}\n                    name=\"email\"\n                    type=\"email\"\n                    required\n                    maxLength={254}\n                    autoComplete=\"email\"\n                    placeholder=\"you@company.com\"\n                    readOnly={sub === \"busy\" || sub === \"done\"}\n                    className=\"h-12 min-w-0 flex-1 bg-white px-3.5 text-[15px] outline-none placeholder:opacity-45 focus:bg-[var(--wtf-fill)] focus-visible:![outline:none]\"\n                    style={{ border: rule, borderRight: 0, fontFamily: SANS, color: line }}\n                  />\n                  <button\n                    type=\"submit\"\n                    aria-disabled={sub === \"busy\" || sub === \"done\" || undefined}\n                    onPointerDown={(e) => {\n                      if (e.button === 0) setPressed(true);\n                    }}\n                    onPointerUp={() => setPressed(false)}\n                    onPointerLeave={() => setPressed(false)}\n                    className={\n                      \"h-12 shrink-0 px-5 text-[14px] uppercase tracking-[0.04em] transition-[transform,translate,box-shadow] duration-100 ease-linear motion-reduce:transition-none \" +\n                      \"focus-visible:![outline-style:dashed] focus-visible:![outline-width:3px] focus-visible:![outline-offset:4px] focus-visible:![border-radius:0] \" +\n                      (pressed ? \"translate-x-[5px] translate-y-[5px] shadow-none\" : \"shadow-[5px_5px_0_0_var(--wtf-ink)]\")\n                    }\n                    style={{ background: line, color: bg, border: rule, outlineColor: line, fontFamily: DISPLAY, fontWeight: 800 }}\n                  >\n                    {sub === \"busy\" ? \"Sending…\" : sub === \"done\" ? \"Done\" : \"Subscribe\"}\n                  </button>\n                </div>\n                <p role=\"status\" className=\"min-h-[18px] text-[12px] uppercase tracking-[0.06em]\" style={{ fontFamily: MONO }}>\n                  {sub === \"done\" ? \"You're on the list.\" : sub === \"fail\" ? \"Didn't send. Try again.\" : \"\"}\n                </p>\n              </form>\n            )}\n          </div>\n          <nav aria-label=\"Footer\" className=\"grid grid-cols-2 @2xl:grid-cols-3 @4xl:![border-left:3px_solid_var(--wtf-ink)]\">\n            {columns.map((c, i) => (\n              <div\n                key={c.title}\n                className={\"flex flex-col gap-3 px-0 py-9 @2xl:px-7 \" + (i > 0 ? \"@2xl:![border-left:3px_solid_var(--wtf-ink)]\" : \"\")}\n              >\n                <p className=\"text-[12px] uppercase tracking-[0.08em]\" style={{ fontFamily: MONO, fontWeight: 700, opacity: 0.7 }}>\n                  {c.title}\n                </p>\n                <ul className=\"flex flex-col gap-2\">\n                  {c.links.map((l) => (\n                    <li key={l.label}>\n                      <a href={safeHref(l.href)} className={\"text-[18px] leading-[1.3] tracking-[-0.01em] \" + linkCls} style={{ fontFamily: DISPLAY, fontWeight: 800, outlineColor: line }}>\n                        {l.label}\n                      </a>\n                    </li>\n                  ))}\n                </ul>\n              </div>\n            ))}\n          </nav>\n        </div>\n\n        <div className=\"flex flex-wrap items-center justify-between gap-x-8 gap-y-3 py-5 text-[12.5px] uppercase tracking-[0.08em]\" style={{ fontFamily: MONO }}>\n          <span>{\"© \" + (year ? year + \" \" : \"\") + brand}</span>\n          {status && (\n            <span className=\"inline-flex items-center gap-2\">\n              <span aria-hidden className=\"size-2.5\" style={{ background: line }} />\n              {status}\n            </span>\n          )}\n          <ul className=\"flex gap-6\">\n            {social.map((s) => (\n              <li key={s.label}>\n                <a href={safeHref(s.href)} className={linkCls} style={{ outlineColor: line }}>\n                  {s.label}\n                </a>\n              </li>\n            ))}\n          </ul>\n        </div>\n      </div>\n\n      {/* The wordmark: one key per letter, each over its own fixed ink plate. */}\n      {wordmark && (\n        <p\n          ref={markRef}\n          aria-hidden\n          className=\"wtf-word relative -mb-[0.2em] select-none whitespace-nowrap px-4 text-center text-[31cqw] leading-[0.8] tracking-[-0.06em]\"\n          style={{ fontFamily: DISPLAY, fontWeight: 900 }}\n        >\n          <span className=\"pointer-events-none absolute inset-x-0 top-0 px-4\" style={{ transform: \"translate(\" + PLATE + \"px,\" + PLATE + \"px)\" }}>\n            {letters.map((ch, i) => (\n              <span key={i} className=\"wtf-plate\">\n                {ch === \" \" ? NBSP : ch}\n              </span>\n            ))}\n          </span>\n          <span className=\"relative\">\n            {letters.map((ch, i) => (\n              <span\n                key={i}\n                className=\"wtf-key\"\n                data-ch={ch.toLowerCase()}\n                onPointerEnter={(e) => {\n                  if (e.pointerType !== \"touch\") press(e.currentTarget);\n                }}\n                onPointerLeave={(e) => {\n                  if (e.pointerType !== \"touch\") lift(e.currentTarget);\n                }}\n                onPointerDown={(e) => {\n                  if (e.pointerType === \"touch\") press(e.currentTarget);\n                }}\n                onPointerUp={(e) => {\n                  if (e.pointerType !== \"touch\") return;\n                  const el = e.currentTarget;\n                  window.setTimeout(() => lift(el), 140);\n                }}\n                onPointerCancel={(e) => lift(e.currentTarget)}\n              >\n                <span className=\"wtf-face\">{ch === \" \" ? NBSP : ch}</span>\n              </span>\n            ))}\n          </span>\n        </p>\n      )}\n    </footer>\n  );\n}\n","type":"registry:component","target":"components/viberdy/warning-tape-footer.tsx"}],"meta":{"tier":"free","tags":["footer","marquee","hazard tape","neo-brutalism","brutalist","newsletter","wordmark","draggable"],"href":"https://viberdy.dev/library/warning-tape-footer","aiPrompt":"Create a React + Tailwind v4 footer, WarningTapeFooter: a neo-brutalist footer under a strip of hazard tape you can grab and throw, whose sign-up stamps the tape, and whose giant wordmark is a row of keys that press onto their own ink plates.\n\nProps (export WarningTapeFooterProps, TapeColumn { title, links } and TapeLink { label, href }): brand (default \"hod\"), home (the brand link, default \"/\"), tagline, tape (phrases), speed (seconds per loop, clamped to 30 or more, default 48), tilt (-4 to 4 degrees, default -2), columns (default three), social, status (a short line in the bottom bar; empty hides it), onSubscribe(email) that may return a promise (omit to hide the sign-up), subscribeLabel, stamp (default \"You're in\"; empty turns it off), wordmark (default true), keys (default true: typing a letter of the brand presses it), year (no default: pass it from the server, never call new Date() in render), accent (yellow #ffd23f default, coral #ff6b6b, blue #74b9ff, lime #b4f462, pink #ff5fa2 or a regex-validated hex; own-key lookup), ink (#000), ground (cream #fffdf5 or white), className. Sanitise every href: strip tabs and newlines, refuse backslashes, allow http(s), mailto, tel and paths starting / # ? but not //.\n\nKit grammar: 3px ink borders and rules set inline, square corners, hard ink shadows with no blur (a shadow never interpolates), 100ms linear presses, stamps in hard steps(), one accent per page, type in var(--font-display, \"Archivo\", \"Archivo Black\", \"Arial Black\", …) at 800-900, var(--font-sans, …) and var(--font-mono, …) for labels. Put --wtf-ink, --wtf-fill (the accent) and --wtf-ground on the footer and keep every other state rule in one static <style> string (no user values inside it).\n\nThe tape: a 60px band in the accent with 3px ink rules top and bottom and a 5px hard shadow, inside a wrapper 4% wider than the footer on each side and rotated by tilt. It holds a track (w-max) of two identical runs; each run (relative) repeats the phrases (heavy 22px caps, 28px padding) each followed by an 84px block of 45-degree hazard stripes (repeating-linear-gradient 135deg, ink 0-12px, accent 12-24px, 3px ink sides). The band is focusable: role=\"marquee\", tabIndex 0, aria-label of the phrases, aria-describedby a visually hidden hint (\"Drag the tape, or use the arrow keys, to move it. It stops while it has focus.\"); the runs are aria-hidden. Cursor grab; while grabbed (data-grab) cursor grabbing and it lifts: translate(-2px,-2px) with the shadow at 7px, a 0ms cut. touch-action pan-y.\n\nPhysics, in one mount effect with the state in a ref (offset x in px, velocity v, run width w measured from the first run by a ResizeObserver, flags for drag, hover and keyboard focus) and draw/kick functions stored on the ref: each frame (dt clamped to 50ms) v moves toward a target with time constant 0.45s, v += (target - v) * (1 - exp(-dt / 0.45)), then x += v * dt, wrapped into (-w, 0], written as translate3d on the track. The target is -w / seconds (the crawl) or 0 while dragged, hovered by a mouse, focused from the keyboard (onFocus checks :focus-visible, so the focus a click leaves behind does not stop it) or under reduced motion. That one rule gives the throw its momentum, its friction and the ease back into the crawl. Stop requesting frames when the target is 0 and |v| < 1 (idle) or when an IntersectionObserver says the tape is off screen; kick restarts it. Drag: on pointerdown capture the pointer and record the pointer's position along the tape's tilted axis ((clientX cos a + clientY sin a) times the footer's layout-to-screen ratio); on move set x = x0 + delta and draw directly; keep the last 100ms of samples (e.timeStamp); on release set v from them (clamped to ±4000 px/s, 0 under reduced motion), clear the hover pause so the throw glides and rejoins the crawl even under the pointer, and kick. ArrowLeft/ArrowRight add ±700 px/s (×2.5 with Shift, clamped to ±3000) or jump 64px under reduced motion.\n\nThe stamp: after onSubscribe resolves, compute where the form's centre sits on the tape, convert to one run's coordinates ((onTape - x) mod w, kept 130px from the run's ends) and render the stamp in both runs at that left: absolute, centred with translate(-50%,-50%) rotate(-4deg), 38px tall, 3px ink border, the ground colour, a 5px ink shadow, 900-weight 20px caps. It arrives as a hard two-frame cut: keyframes from scale 1.3 with no shadow to its resting state, 120ms steps(1,end), only when motion is allowed. It then crawls away with the tape and comes back every loop.\n\nBelow the tape, inside max-width 1200px: a grid (from @4xl: 1.25fr and 2fr) between 3px rules: the brand (an accent square with a 3px border beside the name at 900, 34px), the tagline, and the sign-up: a real form with method post, a labelled email input (useId, required, maxLength 254, autocomplete email, fills with the accent on focus) joined to an ink submit button with a 5px shadow that lands on it when pressed; on submit prevent the default, call onSubscribe with the trimmed email, show \"Sending…\", then \"Done\" and \"You're on the list.\" in a role=\"status\" line and stamp the tape, or \"Didn't send. Try again.\"; the input becomes read-only while sending and after. Then a nav labelled Footer with the columns (mono 12px caps headings, links at 800, 18px with a 3px underline on hover), split by 3px rules from @2xl. A mono bottom bar holds \"© year brand\", the status with a square bullet, and the social links.\n\nThe wordmark (if wordmark): an aria-hidden paragraph at 900 and 31cqw (the footer is an inline-size container), leading 0.8, tracking -0.06em, font-kerning none, cropped by the footer's overflow-hidden bottom edge (margin-bottom -0.2em). It holds two identical lines of per-letter inline-block spans (spaces as a non-breaking space built with String.fromCharCode(160)): an absolute plates line (inset-x 0, same padding, pointer-events none, translate 8px 8px, letters in ink with a 6px ink -webkit-text-stroke) under a faces line where each letter is a key (data-ch = the lowercase letter) wrapping a face in the ground colour with a 6px ink stroke and paint-order stroke fill (a 3px visible outline). A key with data-down moves its face translate(8px, 8px) onto its plate in 100ms linear and fills it with the accent; the plate never moves, so the shadow never interpolates. Mouse and pen press on pointerenter and release on pointerleave; touch presses on pointerdown and releases 140ms after pointerup. Keyboard: a window keydown listener (only while the wordmark is on screen per an IntersectionObserver, no Ctrl/Meta/Alt, not composing, and neither the target nor document.activeElement a text field) presses every key whose letter matches, and keyup releases them after at least 120ms; blur releases all.\n\nWrite the focus-ring declarations as important utilities (focus-visible:![outline-style:dashed], ![outline-width:3px], ![outline-offset:4px], ![border-radius:0]) with the ring colour inline, and borders that only appear at a container width (for example @4xl:![border-left:3px_solid_var(--wtf-ink)]) as important too, so a host's unlayered :focus-visible or border-colour rule cannot repaint them. Under reduced motion the tape stands still unless dragged, throws do not glide, the stamp appears without its slam and the letters press without a transition.\n\nOutput one self-contained \"use client\" TSX file with no dependencies beyond React. Build strings with + rather than template literals.","license":"https://viberdy.dev/license"}}