{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "notfound-glitch",
  "type": "registry:component",
  "title": "404 Glitch",
  "description": "A split 404 page with a giant code torn by chromatic glitch slices, a scanline sweep and a terminal log that types out the failed request.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "not-found",
    "404",
    "error page",
    "glitch",
    "terminal",
    "typewriter",
    "scanlines"
  ],
  "docs": "https://hyperblur.dev/effects/notfound-glitch",
  "files": [
    {
      "path": "registry/hyperblur/notfound-glitch.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/notfound-glitch.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface NotfoundGlitchLink {\n  label: string;\n  href: string;\n}\n\nexport interface NotfoundGlitchProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  code?: string;\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  lines?: string[];\n  primary?: NotfoundGlitchLink;\n  secondary?: NotfoundGlitchLink;\n  onReport?: () => void;\n  accent?: string;\n}\n\nconst css = `\n.hb-kg1 {\n  --hb-kg1-accent: #ff3864;\n  --hb-kg1-cyan: #22d3ee;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  overflow: hidden;\n  isolation: isolate;\n  container-type: inline-size;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-kg1 *, .hb-kg1 *::before, .hb-kg1 *::after { box-sizing: border-box; }\n.hb-kg1::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  z-index: -2;\n  background:\n    radial-gradient(60% 70% at 18% 40%, color-mix(in srgb, var(--hb-kg1-accent) 16%, transparent), transparent 70%),\n    radial-gradient(50% 60% at 85% 80%, color-mix(in srgb, var(--hb-kg1-cyan) 9%, transparent), transparent 70%),\n    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 100% 48px,\n    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 48px 100%;\n  -webkit-mask-image: radial-gradient(80% 90% at 50% 50%, #000 40%, transparent 100%);\n  mask-image: radial-gradient(80% 90% at 50% 50%, #000 40%, transparent 100%);\n}\n.hb-kg1::after {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  z-index: 3;\n  pointer-events: none;\n  background:\n    linear-gradient(to bottom, transparent 0, rgba(255, 255, 255, .05) 50%, transparent 100%) 0 -30% / 100% 140px no-repeat,\n    repeating-linear-gradient(to bottom, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px);\n  animation: hb-kg1-sweep 6s linear infinite;\n}\n.hb-kg1-inner {\n  display: grid;\n  gap: 40px;\n  max-width: 1120px;\n  margin: 0 auto;\n  padding: 72px 20px;\n  align-items: center;\n}\n.hb-kg1-stage {\n  position: relative;\n  display: flex;\n  justify-content: center;\n}\n.hb-kg1-code {\n  position: relative;\n  margin: 0;\n  font-size: clamp(120px, 34cqi, 300px);\n  font-weight: 800;\n  line-height: .82;\n  letter-spacing: -.07em;\n  color: #f5f5f5;\n  text-shadow: 0 0 40px rgba(255, 255, 255, .08);\n  animation: hb-kg1-jitter 4.2s steps(1) infinite;\n  user-select: none;\n}\n.hb-kg1-code::before, .hb-kg1-code::after {\n  content: attr(data-text);\n  position: absolute;\n  inset: 0;\n  mix-blend-mode: screen;\n  pointer-events: none;\n}\n.hb-kg1-code::before {\n  color: var(--hb-kg1-accent);\n  transform: translateX(-4px);\n  clip-path: inset(12% 0 64% 0);\n  animation: hb-kg1-slice-a 2.8s steps(1) infinite;\n}\n.hb-kg1-code::after {\n  color: var(--hb-kg1-cyan);\n  transform: translateX(4px);\n  clip-path: inset(58% 0 18% 0);\n  animation: hb-kg1-slice-b 2.3s steps(1) infinite;\n}\n.hb-kg1-shadow {\n  position: absolute;\n  left: 50%;\n  bottom: -18px;\n  width: 70%;\n  height: 26px;\n  transform: translateX(-50%);\n  background: radial-gradient(closest-side, color-mix(in srgb, var(--hb-kg1-accent) 40%, transparent), transparent);\n  filter: blur(8px);\n  opacity: .7;\n}\n.hb-kg1-copy { min-width: 0; text-align: center; }\n.hb-kg1-eyebrow {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  height: 28px;\n  padding: 0 12px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 999px;\n  background: rgba(255, 255, 255, .03);\n  color: #a1a1a1;\n  font-family: ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace;\n  font-size: 11px;\n  letter-spacing: .08em;\n  text-transform: uppercase;\n}\n.hb-kg1-dot {\n  width: 6px;\n  height: 6px;\n  border-radius: 50%;\n  background: var(--hb-kg1-accent);\n  box-shadow: 0 0 10px var(--hb-kg1-accent);\n  animation: hb-kg1-blink 1.2s steps(1) infinite;\n}\n.hb-kg1-title {\n  margin: 18px 0 0;\n  font-size: clamp(28px, 4.4cqi, 44px);\n  font-weight: 650;\n  line-height: 1.08;\n  letter-spacing: -.03em;\n  text-wrap: balance;\n}\n.hb-kg1-sub {\n  margin: 14px auto 0;\n  max-width: 460px;\n  color: #8f8f8f;\n  font-size: 16px;\n  line-height: 1.6;\n  text-wrap: pretty;\n}\n.hb-kg1-term {\n  margin: 26px auto 0;\n  max-width: 480px;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 14px;\n  background: linear-gradient(180deg, #131313, #0d0d0d);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 24px 60px -30px rgba(0, 0, 0, .9);\n  text-align: left;\n  overflow: hidden;\n}\n.hb-kg1-bar {\n  display: flex;\n  align-items: center;\n  gap: 6px;\n  height: 34px;\n  padding: 0 14px;\n  border-bottom: 1px solid rgba(255, 255, 255, .06);\n  color: #6b6b6b;\n  font-size: 11px;\n}\n.hb-kg1-bar i {\n  width: 9px;\n  height: 9px;\n  border-radius: 50%;\n  background: #2a2a2a;\n}\n.hb-kg1-bar span { margin-left: auto; font-family: ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace; }\n.hb-kg1-body {\n  padding: 14px 16px 16px;\n  font-family: ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace;\n  font-size: clamp(11px, 2.9cqi, 13px);\n  line-height: 1.75;\n}\n.hb-kg1-line { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; color: #a1a1a1; }\n.hb-kg1-line:first-child { color: #ededed; }\n.hb-kg1-line:nth-child(2) { color: var(--hb-kg1-accent); }\n.hb-kg1-typed {\n  display: inline-block;\n  max-width: 100%;\n  overflow: hidden;\n  vertical-align: bottom;\n  white-space: pre;\n  width: 0;\n  animation: hb-kg1-type calc(var(--hb-kg1-n) * 38ms) steps(var(--hb-kg1-n), end) var(--hb-kg1-d) forwards;\n}\n.hb-kg1-prompt { color: #ededed; opacity: 0; animation: hb-kg1-show .01s linear var(--hb-kg1-d) forwards; }\n.hb-kg1-caret {\n  display: inline-block;\n  width: .6em;\n  height: 1.1em;\n  margin-left: 2px;\n  vertical-align: -.2em;\n  background: #ededed;\n  animation: hb-kg1-blink 1s steps(1) infinite;\n}\n.hb-kg1-actions {\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: center;\n  gap: 10px;\n  margin-top: 28px;\n}\n.hb-kg1-btn {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  gap: 8px;\n  min-height: 44px;\n  padding: 0 20px;\n  border: 1px solid transparent;\n  border-radius: 999px;\n  font: inherit;\n  font-size: 14px;\n  font-weight: 600;\n  text-decoration: none;\n  white-space: nowrap;\n  cursor: pointer;\n  transition: transform .2s cubic-bezier(.2, .8, .2, 1), background-color .2s ease, border-color .2s ease, box-shadow .2s ease;\n}\n.hb-kg1-btn:focus-visible { outline: 2px solid var(--hb-kg1-accent); outline-offset: 3px; }\n.hb-kg1-btn svg { width: 16px; height: 16px; flex: none; }\n.hb-kg1-primary { background: #ededed; color: #0a0a0a; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); }\n.hb-kg1-primary:hover { transform: translateY(-1px); background: #fff; box-shadow: 0 10px 30px -12px rgba(255, 255, 255, .5); }\n.hb-kg1-ghost { border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .03); color: #ededed; }\n.hb-kg1-ghost:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--hb-kg1-accent) 60%, transparent); background: color-mix(in srgb, var(--hb-kg1-accent) 10%, transparent); }\n@container (min-width: 760px) {\n  .hb-kg1-inner { grid-template-columns: 1.05fr 1fr; gap: 56px; padding: 96px 40px; }\n  .hb-kg1-code { font-size: clamp(160px, 23cqi, 280px); }\n  .hb-kg1-copy { text-align: left; }\n  .hb-kg1-sub, .hb-kg1-term { margin-left: 0; }\n  .hb-kg1-actions { justify-content: flex-start; }\n}\n@keyframes hb-kg1-slice-a {\n  0% { clip-path: inset(12% 0 64% 0); transform: translateX(-4px); }\n  14% { clip-path: inset(44% 0 38% 0); transform: translateX(-10px); }\n  28% { clip-path: inset(70% 0 8% 0); transform: translateX(3px); }\n  42% { clip-path: inset(4% 0 86% 0); transform: translateX(-6px); }\n  56% { clip-path: inset(30% 0 52% 0); transform: translateX(8px); }\n  70% { clip-path: inset(82% 0 2% 0); transform: translateX(-3px); }\n  84% { clip-path: inset(20% 0 66% 0); transform: translateX(-12px); }\n}\n@keyframes hb-kg1-slice-b {\n  0% { clip-path: inset(58% 0 18% 0); transform: translateX(4px); }\n  18% { clip-path: inset(8% 0 78% 0); transform: translateX(9px); }\n  36% { clip-path: inset(36% 0 46% 0); transform: translateX(-5px); }\n  54% { clip-path: inset(74% 0 6% 0); transform: translateX(12px); }\n  72% { clip-path: inset(22% 0 60% 0); transform: translateX(-8px); }\n  90% { clip-path: inset(48% 0 34% 0); transform: translateX(5px); }\n}\n@keyframes hb-kg1-jitter {\n  0%, 46%, 50%, 88%, 92%, 100% { transform: none; }\n  47% { transform: translate(-3px, 1px) skewX(-6deg); }\n  48% { transform: translate(4px, -1px) skewX(4deg); }\n  89% { transform: translate(2px, 0) skewX(8deg); }\n  90% { transform: translate(-2px, 1px); }\n}\n@keyframes hb-kg1-type { to { width: calc(var(--hb-kg1-n) * 1ch); } }\n@keyframes hb-kg1-show { to { opacity: 1; } }\n@keyframes hb-kg1-blink { 0% { opacity: 1; } 50% { opacity: 0; } }\n@keyframes hb-kg1-sweep { from { background-position: 0 -140px, 0 0; } to { background-position: 0 calc(100% + 140px), 0 0; } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-kg1::after, .hb-kg1-code, .hb-kg1-code::before, .hb-kg1-code::after, .hb-kg1-dot, .hb-kg1-caret { animation: none; }\n  .hb-kg1-typed { animation: none; width: auto; }\n  .hb-kg1-prompt { animation: none; opacity: 1; }\n  .hb-kg1-btn { transition: none; }\n  .hb-kg1-btn:hover { transform: none; }\n}\n`;\n\nfunction ArrowLeft() {\n  return (\n    <svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n      <path d=\"M10 3.5 5.5 8l4.5 4.5\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n    </svg>\n  );\n}\n\nfunction FlagIcon() {\n  return (\n    <svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n      <path d=\"M3.5 14V2.5m0 0h7.2l-1.4 2.6 1.4 2.6H3.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n    </svg>\n  );\n}\n\nexport function NotfoundGlitch({\n  code = \"404\",\n  eyebrow = \"Error 404 · signal lost\",\n  title = \"This page slipped through the cracks\",\n  subtitle = \"The link may be broken, or the page was moved during our last deploy. Head back home, or tell us where you found it.\",\n  lines = [\"$ open /reports/q3-legacy\", \"HTTP/2 404  route not found\", \"hint: moved or never existed\"],\n  primary = { label: \"Back to home\", href: \"/\" },\n  secondary = { label: \"Report broken link\", href: \"mailto:support@northwind.app?subject=Broken%20link\" },\n  onReport,\n  accent = \"#ff3864\",\n  className = \"\",\n  style,\n  ...rest\n}: NotfoundGlitchProps) {\n  const uid = React.useId();\n  const vars = { \"--hb-kg1-accent\": accent, ...style } as React.CSSProperties;\n  const timed = lines.reduce<{ line: string; start: number }[]>((acc, line) => {\n    const prev = acc[acc.length - 1];\n    const start = prev ? prev.start + prev.line.length * 0.038 + 0.35 : 0.5;\n    return [...acc, { line, start }];\n  }, []);\n  const last = timed[timed.length - 1];\n  const delay = last ? last.start + last.line.length * 0.038 + 0.35 : 0.5;\n\n  return (\n    <section className={`hb-kg1 ${className}`} style={vars} aria-labelledby={`${uid}-title`} {...rest}>\n      <style href=\"hb-notfound-glitch\" precedence=\"default\">{css}</style>\n      <div className=\"hb-kg1-inner\">\n        <div className=\"hb-kg1-stage\" aria-hidden=\"true\">\n          <p className=\"hb-kg1-code\" data-text={code}>{code}</p>\n          <span className=\"hb-kg1-shadow\" />\n        </div>\n        <div className=\"hb-kg1-copy\">\n          <span className=\"hb-kg1-eyebrow\"><span className=\"hb-kg1-dot\" />{eyebrow}</span>\n          <h1 id={`${uid}-title`} className=\"hb-kg1-title\">{title}</h1>\n          {subtitle && <p className=\"hb-kg1-sub\">{subtitle}</p>}\n          {lines.length > 0 && (\n            <div className=\"hb-kg1-term\" role=\"log\" aria-label=\"Request log\">\n              <div className=\"hb-kg1-bar\" aria-hidden=\"true\"><i /><i /><i /><span>zsh · northwind</span></div>\n              <div className=\"hb-kg1-body\">\n                {timed.map(({ line, start }, i) => (\n                  <span key={i} className=\"hb-kg1-line\">\n                    <span\n                      className=\"hb-kg1-typed\"\n                      style={{ \"--hb-kg1-n\": line.length, \"--hb-kg1-d\": `${start.toFixed(2)}s` } as React.CSSProperties}\n                    >\n                      {line}\n                    </span>\n                  </span>\n                ))}\n                <span className=\"hb-kg1-line\" aria-hidden=\"true\">\n                  <span className=\"hb-kg1-prompt\" style={{ \"--hb-kg1-d\": `${delay.toFixed(2)}s` } as React.CSSProperties}>\n                    $<span className=\"hb-kg1-caret\" />\n                  </span>\n                </span>\n              </div>\n            </div>\n          )}\n          <div className=\"hb-kg1-actions\">\n            <a className=\"hb-kg1-btn hb-kg1-primary\" href={primary.href}><ArrowLeft />{primary.label}</a>\n            <a className=\"hb-kg1-btn hb-kg1-ghost\" href={secondary.href} onClick={onReport}><FlagIcon />{secondary.label}</a>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}