{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"ardent-footer","type":"registry:component","title":"Ardent Footer","description":"A black footer with a closing call, link columns and the brand set edge to edge across the bottom in rising heat haze.","dependencies":[],"registryDependencies":[],"files":[{"path":"components/viberdy/ardent-footer.tsx","content":"\"use client\";\n\nimport { useEffect, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from \"react\";\nimport type { CSSProperties } from \"react\";\n\n\n/** Safety orange as a field colour. Black on it reads at 6.3:1. */\nconst HV_ORANGE = \"#FF5B14\";\n\n/** The hot highlight, for orange marks on black. */\nconst HV_HOT = \"#FF7A1A\";\n\nconst HV_BLACK = \"#0B0A09\";\n\nconst HV_BONE = \"#EFEBE4\";\n\n/**\n * The display face: Archivo's width axis does the shouting (wdth 62..125).\n * Load it as a variable font with the width axis and expose it as --font-hv,\n * e.g. in Next: Archivo({ subsets: [\"latin\"], axes: [\"wdth\"], variable: \"--font-hv\" }).\n */\nconst HV_DISPLAY = 'var(--font-hv, \"Archivo\"), \"Archivo\", \"Arial Narrow\", ui-sans-serif, system-ui, sans-serif';\n\n/** Labels and readouts: Geist Mono as --font-hv-mono (any monospace works). */\nconst HV_MONO = 'var(--font-hv-mono, \"Geist Mono\"), \"Geist Mono\", ui-monospace, \"SFMono-Regular\", Menlo, monospace';\n\nconst hvClamp = (v: number, a = 0, b = 1) => (v < a ? a : v > b ? b : v);\n\nfunction hvReducedSub(fn: () => void) {\n  if (typeof window === \"undefined\" || typeof window.matchMedia !== \"function\") return () => {};\n  const mq = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n  mq.addEventListener(\"change\", fn);\n  return () => mq.removeEventListener(\"change\", fn);\n}\n\nconst hvReducedSnap = () => typeof window !== \"undefined\" && typeof window.matchMedia === \"function\" && window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n\n/** True when the reader asked for reduced motion. Live: follows the system setting as it changes. */\nfunction useHvReduced(): boolean {\n  return useSyncExternalStore(hvReducedSub, hvReducedSnap, () => false);\n}\n\n/**\n * The scrolling box an element lives in: the nearest ancestor that actually\n * scrolls, or null for the window. Resolved on every frame, because a box only\n * becomes a scroller once its content is taller than it.\n */\nfunction hvScrollParent(el: Element | null): HTMLElement | null {\n  let n = el?.parentElement ?? null;\n  while (n && n !== document.body && n !== document.documentElement) {\n    const oy = getComputedStyle(n).overflowY;\n    if ((oy === \"auto\" || oy === \"scroll\" || oy === \"overlay\") && n.scrollHeight > n.clientHeight + 1) return n;\n    n = n.parentElement;\n  }\n  return null;\n}\n\n/** Links built from props: https, http, mailto, same-site paths and anchors only (tabs and newlines stripped, backslashes refused). */\nfunction hvSafeHref(href: string): string {\n  const h = href.replace(/[\\t\\n\\r]/g, \"\").trim();\n  if (!h || h.includes(String.fromCharCode(92))) return \"#\";\n  if (h.startsWith(\"#\") || (h.startsWith(\"/\") && !h.startsWith(\"//\"))) return h;\n  return /^(https?:|mailto:)/i.test(h) ? h : \"#\";\n}\n\n/** Scroll whatever scrolls the link to a same-page anchor ([data-hv-anchor]); anything else is left to the browser. */\nfunction hvGo(e: { currentTarget: HTMLAnchorElement; preventDefault: () => void }) {\n  const href = e.currentTarget.getAttribute(\"href\") ?? \"\";\n  if (!href.startsWith(\"#\") || href.length < 2) return;\n  const root = e.currentTarget.closest(\"[data-hv-site]\") ?? document;\n  const target = root.querySelector<HTMLElement>('[data-hv-anchor=\"' + CSS.escape(href.slice(1)) + '\"]');\n  if (!target) return;\n  e.preventDefault();\n  const sp = hvScrollParent(target);\n  const smooth: ScrollBehavior = hvReducedSnap() ? \"auto\" : \"smooth\";\n  if (sp) sp.scrollTo({ top: sp.scrollTop + target.getBoundingClientRect().top - sp.getBoundingClientRect().top, behavior: smooth });\n  else window.scrollTo({ top: window.scrollY + target.getBoundingClientRect().top, behavior: smooth });\n}\n\n/**\n * The kit's scoped CSS: one focus ring (2px, offset 3px, in the ink of the\n * ground it sits on), tabular figures, the press, and transitions off for\n * anything a frame loop writes.\n */\nconst HV_CSS =\n  \".hv-scope{--hv-ring:\" + HV_HOT + \"}\" +\n  \".hv-scope[data-hv-ground=orange],.hv-scope [data-hv-ground=orange]{--hv-ring:\" + HV_BLACK + \"}\" +\n  \".hv-scope[data-hv-ground=bone],.hv-scope [data-hv-ground=bone]{--hv-ring:\" + HV_BLACK + \"}\" +\n  \".hv-scope :focus-visible{outline:2px solid var(--hv-ring)!important;outline-offset:3px!important}\" +\n  \".hv-scope .hv-num{font-variant-numeric:tabular-nums}\" +\n  \".hv-scope [data-hv-live]{transition:none!important}\" +\n  \".hv-scope .hv-press{transition:transform 160ms cubic-bezier(.2,.8,.2,1),background-color 160ms,color 160ms}\" +\n  \".hv-scope .hv-press:active{transform:scale(.97)}\" +\n  \".hv-scope .hv-arr{transition:transform 220ms cubic-bezier(.2,.8,.2,1)}.hv-scope a:hover .hv-arr,.hv-scope button:hover .hv-arr{transform:translateX(3px)}\" +\n  \"@media (prefers-reduced-motion:reduce){.hv-scope .hv-press,.hv-scope .hv-arr{transition:none}}\";\n\n/** The kit's arrow: slides on hover. */\nfunction HvArrow({ size = 14 }: { size?: number }) {\n  return (\n    <svg className=\"hv-arr\" width={size} height={size} viewBox=\"0 0 14 14\" aria-hidden>\n      <path d=\"M2 7h9M7.5 3.5L11 7l-3.5 3.5\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"square\" />\n    </svg>\n  );\n}\n\nexport interface HeatHazeHeadingProps {\n  text?: string;\n  /** Heading level for the page outline. */\n  as?: \"h1\" | \"h2\" | \"h3\" | \"p\";\n  /** The ground it sits on: orange type on black, or black type on orange. */\n  ground?: \"black\" | \"orange\";\n  /** How hard the air shimmers at rest, 0..1. The pointer adds more where it is. */\n  intensity?: number;\n  /** Width axis, 62 (condensed) to 125 (wide). */\n  width?: number;\n  className?: string;\n  style?: CSSProperties;\n}\n\n/**\n * HeatHazeHeading — a line of type that sits in rising heat.\n *\n * The type is SVG text fitted to its box (the viewBox is the text's own\n * bounds, so it always runs edge to edge). An SVG filter pushes it through a\n * turbulence field, and that field rises: the filtered group is moved up\n * every frame while the text inside is moved back down, so the text stays\n * put and only the air moves through it. The pointer turns the heat up.\n * Reduced motion: crisp, still type.\n */\nexport function HeatHazeHeading({ text = \"Ardent\", as: Tag = \"h2\", ground = \"black\", intensity = 0.5, width = 72, className = \"\", style }: HeatHazeHeadingProps) {\n  const id = useId().replace(/:/g, \"\");\n  const svgRef = useRef<SVGSVGElement>(null);\n  const textRef = useRef<SVGTextElement>(null);\n  const gRef = useRef<SVGGElement>(null);\n  const filterRef = useRef<SVGFilterElement>(null);\n  const mapRef = useRef<SVGFEDisplacementMapElement>(null);\n  // A first guess at the text's bounds (cap height ~145 of 200, ~0.62em per letter at wdth 100), replaced once measured.\n  const [box, setBox] = useState<[number, number, number, number]>(() => [0, -146, Math.max(1, text.length) * 124 * (hvClamp(width, 62, 125) / 100), 148]);\n  const boxRef = useRef(box);\n  useEffect(() => {\n    boxRef.current = box;\n  }, [box]);\n  const reduced = useHvReduced();\n  const live = useRef({ intensity, heat: 0, ptr: 0 });\n  useEffect(() => {\n    live.current.intensity = intensity;\n  });\n\n  // Fit the viewBox to the text's own bounds, again once the face has loaded.\n  useLayoutEffect(() => {\n    const t = textRef.current;\n    if (!t) return;\n    let alive = true;\n    const fit = () => {\n      if (!alive) return;\n      try {\n        const b = t.getBBox();\n        if (b.width > 0) setBox([b.x, b.y, b.width, b.height]);\n      } catch {\n        // not rendered yet\n      }\n    };\n    fit();\n    document.fonts?.ready.then(fit);\n    return () => {\n      alive = false;\n    };\n  }, [text, width]);\n\n  useEffect(() => {\n    const svg = svgRef.current;\n    const g = gRef.current;\n    const t = textRef.current;\n    const f = filterRef.current;\n    const map = mapRef.current;\n    if (!svg || !g || !t || !f || !map) return;\n    if (reduced) {\n      map.setAttribute(\"scale\", \"0\");\n      g.removeAttribute(\"transform\");\n      t.removeAttribute(\"transform\");\n      return;\n    }\n    let raf = 0;\n    let on = false;\n    let last = 0;\n    let rise = 0;\n    const L = live.current;\n    const frame = (now: number) => {\n      raf = 0;\n      if (!on) return;\n      if (last && now - last < 30) {\n        raf = requestAnimationFrame(frame);\n        return;\n      }\n      const dt = last ? Math.min(0.06, (now - last) / 1000) : 0;\n      last = now;\n      const [, by, , bh] = boxRef.current;\n      // The air rises a little under one line height a second.\n      rise += dt * bh * 0.55;\n      L.heat += (L.ptr - L.heat) * Math.min(1, dt * 4);\n      g.setAttribute(\"transform\", \"translate(0 \" + (-rise).toFixed(2) + \")\");\n      t.setAttribute(\"transform\", \"translate(0 \" + rise.toFixed(2) + \")\");\n      f.setAttribute(\"y\", (by - bh * 0.3 + rise).toFixed(2));\n      map.setAttribute(\"scale\", (bh * (0.01 * hvClamp(L.intensity * 4) + 0.032 * hvClamp(L.intensity) + 0.06 * L.heat)).toFixed(2));\n      raf = requestAnimationFrame(frame);\n    };\n    const io = new IntersectionObserver((es) => {\n      on = !!es[es.length - 1]?.isIntersecting;\n      last = 0;\n      if (on && !raf) raf = requestAnimationFrame(frame);\n    });\n    io.observe(svg);\n    const move = (e: PointerEvent) => {\n      const r = svg.getBoundingClientRect();\n      const dx = (e.clientX - hvClamp(e.clientX, r.left, r.right)) / Math.max(1, r.height);\n      const dy = (e.clientY - hvClamp(e.clientY, r.top, r.bottom)) / Math.max(1, r.height);\n      L.ptr = Math.exp(-(dx * dx + dy * dy) * 3);\n    };\n    const leave = () => {\n      L.ptr = 0;\n    };\n    window.addEventListener(\"pointermove\", move, { passive: true });\n    document.documentElement.addEventListener(\"pointerleave\", leave);\n    return () => {\n      on = false;\n      if (raf) cancelAnimationFrame(raf);\n      io.disconnect();\n      window.removeEventListener(\"pointermove\", move);\n      document.documentElement.removeEventListener(\"pointerleave\", leave);\n    };\n  }, [reduced]);\n\n  const [bx, by, bw, bh] = box;\n  const fill = ground === \"black\" ? HV_ORANGE : HV_BLACK;\n  const base = ground === \"black\" ? \"#FF9A4D\" : \"#3A1200\";\n  return (\n    <Tag className={\"hv-scope m-0 w-full \" + className} style={{ fontFamily: HV_DISPLAY, ...style }}>\n      <span className=\"sr-only\">{text}</span>\n      <svg ref={svgRef} aria-hidden viewBox={bx + \" \" + (by - bh * 0.06) + \" \" + bw + \" \" + bh * 1.12} className=\"block h-auto w-full overflow-visible\" preserveAspectRatio=\"xMidYMid meet\">\n        <defs>\n          <linearGradient id={id + \"g\"} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n            <stop offset=\"0\" stopColor={fill} />\n            <stop offset=\"0.84\" stopColor={fill} />\n            <stop offset=\"1\" stopColor={base} />\n          </linearGradient>\n          <filter ref={filterRef} id={id + \"f\"} filterUnits=\"userSpaceOnUse\" primitiveUnits=\"userSpaceOnUse\" x={bx - bh * 0.3} y={by - bh * 0.3} width={bw + bh * 0.6} height={bh * 1.6} colorInterpolationFilters=\"sRGB\">\n            <feTurbulence type=\"fractalNoise\" baseFrequency={(1.4 / bh).toFixed(5) + \" \" + (5.2 / bh).toFixed(5)} numOctaves={2} seed={7} result=\"air\" />\n            <feDisplacementMap ref={mapRef} in=\"SourceGraphic\" in2=\"air\" scale={reduced ? 0 : bh * 0.06} xChannelSelector=\"R\" yChannelSelector=\"G\" />\n          </filter>\n        </defs>\n        <g ref={gRef} filter={\"url(#\" + id + \"f)\"}>\n          <text\n            ref={textRef}\n            x=\"0\"\n            y=\"0\"\n            fill={\"url(#\" + id + \"g)\"}\n            style={{ fontFamily: HV_DISPLAY, fontWeight: 900, fontSize: 200, letterSpacing: \"-0.02em\", textTransform: \"uppercase\", fontVariationSettings: '\"wdth\" ' + hvClamp(width, 62, 125) }}\n          >\n            {text}\n          </text>\n        </g>\n      </svg>\n    </Tag>\n  );\n}\n\nexport interface ArdentFooterProps {\n  brand?: string;\n  call?: string;\n  cta?: { label: string; href: string };\n  columns?: { title: string; links: { label: string; href: string }[] }[];\n  note?: string;\n  className?: string;\n  style?: CSSProperties;\n}\n\n/**\n * ArdentFooter — black ground, the brand set edge to edge in heat haze.\n */\nexport function ArdentFooter({\n  brand = \"Ardent\",\n  call = \"Bring your stage. We'll light it.\",\n  cta = { label: \"Book a test fire\", href: \"#book\" },\n  columns = [\n    { title: \"Engine\", links: [{ label: \"R-9 overview\", href: \"#top\" }, { label: \"Rated figures\", href: \"#specs\" }, { label: \"Exploded view\", href: \"#engine\" }] },\n    { title: \"Launch\", links: [{ label: \"Manifest\", href: \"#manifest\" }, { label: \"Rideshare\", href: \"#book\" }, { label: \"Dedicated\", href: \"#book\" }] },\n    { title: \"Contact\", links: [{ label: \"Request a hot fire\", href: \"#request\" }, { label: \"launch@ardent.example\", href: \"mailto:launch@ardent.example\" }] },\n  ],\n  note = \"© 2026 Ardent Propulsion. Figures are rated, not promised.\",\n  className = \"\",\n  style,\n}: ArdentFooterProps) {\n  return (\n    <footer data-hv-ground=\"black\" className={\"hv-scope @container relative w-full overflow-hidden \" + className} style={{ background: HV_BLACK, color: HV_BONE, fontFamily: HV_DISPLAY, ...style }}>\n      <style>{HV_CSS}</style>\n      <div className=\"mx-auto w-full px-5 pt-20 @3xl:px-[4cqw] @3xl:pt-28\">\n        <div className=\"grid grid-cols-1 gap-12 @3xl:grid-cols-[minmax(0,1.3fr)_minmax(0,2fr)]\">\n          <div className=\"flex flex-col items-start gap-6\">\n            <p className=\"m-0 text-[clamp(34px,9cqw,44px)] uppercase leading-[0.9] @3xl:text-[clamp(40px,3.8cqw,64px)]\" style={{ fontWeight: 900, fontVariationSettings: '\"wdth\" 72' }}>\n              {call}\n            </p>\n            <a href={hvSafeHref(cta.href)} onClick={hvGo} className=\"hv-press inline-flex h-12 items-center gap-2.5 px-6 text-[15px] font-bold uppercase tracking-[0.04em] no-underline\" style={{ background: HV_ORANGE, color: HV_BLACK }}>\n              {cta.label}\n              <HvArrow />\n            </a>\n          </div>\n          <div className=\"grid grid-cols-2 gap-8 @3xl:grid-cols-3\">\n            {columns.map((c) => (\n              <nav key={c.title} aria-label={c.title} className=\"flex flex-col gap-3\">\n                <p className=\"m-0 text-[11px] uppercase tracking-[0.16em]\" style={{ fontFamily: HV_MONO, opacity: 0.55 }}>\n                  {c.title}\n                </p>\n                <ul className=\"m-0 flex list-none flex-col gap-2 p-0\">\n                  {c.links.map((l) => (\n                    <li key={l.label}>\n                      <a href={hvSafeHref(l.href)} onClick={hvGo} className=\"text-[15px] no-underline decoration-2 underline-offset-4 hover:underline\" style={{ color: \"inherit\", fontWeight: 500, textDecorationColor: HV_ORANGE }}>\n                        {l.label}\n                      </a>\n                    </li>\n                  ))}\n                </ul>\n              </nav>\n            ))}\n          </div>\n        </div>\n        <div className=\"mt-16 flex items-center justify-between gap-4 py-5 text-[11px] uppercase tracking-[0.14em] @3xl:mt-24\" style={{ fontFamily: HV_MONO, boxShadow: \"inset 0 1px 0 rgba(239,235,228,.2)\", opacity: 0.7 }}>\n          <span>{note}</span>\n          <a href=\"#top\" onClick={hvGo} className=\"no-underline hover:underline\" style={{ color: \"inherit\" }}>\n            Back to top ↑\n          </a>\n        </div>\n      </div>\n      <div className=\"px-3 pb-2 @3xl:px-[1.5cqw]\">\n        <HeatHazeHeading text={brand} as=\"p\" ground=\"black\" intensity={0.45} width={104} />\n      </div>\n    </footer>\n  );\n}\n","type":"registry:component","target":"components/viberdy/ardent-footer.tsx"}],"meta":{"tier":"free","tags":["footer","wordmark","links","heat","svg filter","orange","dark mode"],"href":"https://viberdy.dev/library/ardent-footer","aiPrompt":"Build ArdentFooter, the closing section of a safety-orange site, on warm black. Style: Hi-Vis. Fixed palette, no theming: safety orange #FF5B14 as a flat field (black on it is 6.3:1; dim text on orange stays at 75%+ black), hot orange #FF7A1A for marks on black, warm black #0B0A09, bone #EFEBE4. Type: Archivo variable (wght 100-900, wdth 62-125) loaded with its wdth axis (next/font: Archivo({ subsets: [\"latin\"], axes: [\"wdth\"], variable: \"--font-hv\" })) and read as var(--font-hv, \"Archivo\"), display at weight 850-900, wdth 62-80, uppercase, line-height 0.84-0.9; Geist Mono (var(--font-hv-mono)) for labels at 11-12.5px, uppercase, tracking 0.12-0.16em. Square corners everywhere. Every section root carries data-hv-ground=\"black\" | \"orange\" | \"bone\". One focus ring: 2px solid, offset 3px, hot orange on black and black on orange or bone. Scroll-told parts are driven by one number p (0..1) that chases the measured scroll with v += (target - v) * 0.16 per frame, written straight to the DOM (no React state per frame); a capture-phase scroll listener on document hears any scroller, so it works on a page and inside a scrolling box. Reduced motion shows the settled end state. Links go through a safe-href helper (https, http, mailto, same-site paths and anchors only; backslashes refused). React 19, Tailwind v4 with container queries (@container on the root, @3xl = 768px for the desktop layout). No three.js, no images.\n\nTop grid (desktop 1.3fr / 2fr): a closing line \"Bring your stage. We'll light it.\" at clamp(40px, 3.8cqw, 64px) weight 900 wdth 72 and a 48px orange CTA \"Book a test fire\"; three link columns (Engine, Launch, Contact) as labelled nav landmarks with mono 11px titles, 15px links underlined in orange on hover, every href through the safe-href helper. Then a mono fine-print row with a 1px top rule: \"© 2026 Ardent Propulsion. Figures are rated, not promised.\" and \"Back to top ↑\". Across the very bottom, the brand set edge to edge with the Heat Haze Heading (orange on black, intensity 0.45, wdth 104). Props: brand, call, cta, columns, note.","license":"https://viberdy.dev/license"}}