{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero-dot-globe",
  "type": "registry:component",
  "title": "Hero Dot Globe",
  "description": "A pure black hero with a huge canvas sphere of thousands of tiny dots that spins on a tilted axis, leans toward the pointer and carries a bright belt drifting the other way. Sparse mono details frame a bottom-aligned headline and an install command.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "hero",
    "hero",
    "globe",
    "canvas",
    "dots",
    "landing",
    "developer"
  ],
  "docs": "https://hyperblur.dev/effects/hero-dot-globe",
  "files": [
    {
      "path": "registry/hyperblur/hero-dot-globe.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/hero-dot-globe.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface HeroDotGlobeLink {\n  label: string;\n  href: string;\n}\n\nexport interface HeroDotGlobeProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  title?: string;\n  subtitle?: string;\n  caption?: string;\n  command?: string;\n  primaryCta?: HeroDotGlobeLink | null;\n  brand?: string;\n  nav?: HeroDotGlobeLink[];\n  navCta?: HeroDotGlobeLink | null;\n  learnMore?: HeroDotGlobeLink | null;\n  accent?: string;\n  density?: number;\n  speed?: number;\n  headingAs?: \"h1\" | \"h2\";\n  onSearch?: () => void;\n}\n\nconst css = `\n@keyframes hb-zc-up {\n  from { opacity: 0; transform: translate3d(0, 14px, 0); }\n  to { opacity: 1; transform: translate3d(0, 0, 0); }\n}\n@keyframes hb-zc-bob {\n  0%, 100% { transform: translate3d(0, 0, 0); }\n  50% { transform: translate3d(0, 4px, 0); }\n}\n.hb-zc {\n  --hb-zc-accent: #ffb84d;\n  --hb-zc-ink: #140d02;\n  --hb-zc-mono: ui-monospace, \"Geist Mono\", SFMono-Regular, Menlo, Consolas, monospace;\n  position: relative;\n  isolation: isolate;\n  box-sizing: border-box;\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  min-height: 620px;\n  overflow: hidden;\n  container-type: inline-size;\n  background:\n    radial-gradient(60% 50% at 50% 42%, color-mix(in srgb, var(--hb-zc-accent) 6%, transparent), transparent 70%),\n    #020202;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-zc *, .hb-zc *::before, .hb-zc *::after { box-sizing: border-box; }\n.hb-zc-canvas {\n  position: absolute;\n  inset: 0;\n  z-index: 0;\n  display: block;\n  width: 100%;\n  height: 100%;\n  pointer-events: none;\n}\n.hb-zc::after {\n  content: \"\";\n  position: absolute;\n  inset: auto 0 0;\n  z-index: 1;\n  height: 52%;\n  pointer-events: none;\n  background: linear-gradient(to top, #020202 0%, rgba(2, 2, 2, .86) 38%, rgba(2, 2, 2, 0) 100%);\n}\n.hb-zc-bar {\n  position: relative;\n  z-index: 2;\n  display: grid;\n  grid-template-columns: 1fr auto 1fr;\n  align-items: center;\n  gap: 16px;\n  width: 100%;\n  max-width: 1120px;\n  margin: 0 auto;\n  padding: 18px 32px;\n}\n.hb-zc-brand {\n  display: inline-flex;\n  align-items: center;\n  gap: 9px;\n  justify-self: start;\n  color: #f4f4f4;\n  font-size: 14px;\n  font-weight: 600;\n  letter-spacing: -.01em;\n  text-decoration: none;\n  border-radius: 6px;\n}\n.hb-zc-mark { flex: none; color: var(--hb-zc-accent); }\n.hb-zc-links {\n  display: flex;\n  align-items: center;\n  gap: 4px;\n  margin: 0;\n  padding: 0;\n  list-style: none;\n}\n.hb-zc-link {\n  display: inline-flex;\n  padding: 6px 12px;\n  border-radius: 999px;\n  color: #8f8f8f;\n  font-family: var(--hb-zc-mono);\n  font-size: 12px;\n  letter-spacing: .02em;\n  text-decoration: none;\n  transition: color .2s ease, background-color .2s ease;\n}\n.hb-zc-link:hover { color: #ededed; background: rgba(255, 255, 255, .05); }\n.hb-zc-tools {\n  display: flex;\n  align-items: center;\n  justify-self: end;\n  gap: 8px;\n}\n.hb-zc-search {\n  display: inline-grid;\n  place-items: center;\n  width: 32px;\n  height: 32px;\n  padding: 0;\n  border: 0;\n  border-radius: 999px;\n  background: transparent;\n  color: #8f8f8f;\n  cursor: pointer;\n  transition: color .2s ease, background-color .2s ease;\n}\n.hb-zc-search:hover { color: #ededed; background: rgba(255, 255, 255, .06); }\n.hb-zc-outline {\n  display: inline-flex;\n  align-items: center;\n  height: 32px;\n  padding: 0 14px;\n  border: 1px solid rgba(255, 255, 255, .16);\n  border-radius: 999px;\n  color: #ededed;\n  font-family: var(--hb-zc-mono);\n  font-size: 12px;\n  letter-spacing: .02em;\n  text-decoration: none;\n  white-space: nowrap;\n  transition: border-color .2s ease, background-color .2s ease;\n}\n.hb-zc-outline:hover { border-color: rgba(255, 255, 255, .34); background: rgba(255, 255, 255, .04); }\n.hb-zc-stage {\n  position: relative;\n  z-index: 2;\n  flex: 1 1 auto;\n  min-height: 240px;\n}\n.hb-zc-foot {\n  position: relative;\n  z-index: 2;\n  display: grid;\n  grid-template-columns: minmax(0, 1fr) auto;\n  align-items: end;\n  gap: 28px 40px;\n  width: 100%;\n  max-width: 1120px;\n  margin: 0 auto;\n  padding: 0 32px 76px;\n}\n.hb-zc-copy { min-width: 0; }\n.hb-zc-title {\n  max-width: 11em;\n  margin: 0;\n  color: #f5f5f5;\n  font-size: clamp(28px, 5.4cqi, 56px);\n  font-weight: 700;\n  line-height: 1.02;\n  letter-spacing: -.045em;\n  text-wrap: balance;\n  animation: hb-zc-up .8s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-zc-sub {\n  max-width: 34em;\n  margin: 16px 0 0;\n  color: #8f8f8f;\n  font-size: 15px;\n  line-height: 1.55;\n  text-wrap: pretty;\n  animation: hb-zc-up .8s .08s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-zc-side {\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  gap: 12px;\n  min-width: 0;\n  animation: hb-zc-up .8s .16s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-zc-caption {\n  margin: 0;\n  color: #6f6f6f;\n  font-family: var(--hb-zc-mono);\n  font-size: 11.5px;\n  letter-spacing: .04em;\n}\n.hb-zc-caption b { color: var(--hb-zc-accent); font-weight: 500; }\n.hb-zc-row {\n  display: flex;\n  align-items: stretch;\n  gap: 8px;\n  max-width: 100%;\n}\n.hb-zc-cmd {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  min-width: 0;\n  height: 42px;\n  padding: 0 6px 0 14px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 10px;\n  background: rgba(14, 14, 14, .82);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);\n  -webkit-backdrop-filter: blur(8px);\n  backdrop-filter: blur(8px);\n}\n.hb-zc-prompt { flex: none; color: var(--hb-zc-accent); font-family: var(--hb-zc-mono); font-size: 12px; }\n.hb-zc-code {\n  min-width: 0;\n  overflow: hidden;\n  color: #d6d6d6;\n  font-family: var(--hb-zc-mono);\n  font-size: 12px;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n}\n.hb-zc-copybtn {\n  position: relative;\n  display: inline-grid;\n  flex: none;\n  place-items: center;\n  width: 30px;\n  height: 30px;\n  padding: 0;\n  border: 0;\n  border-radius: 7px;\n  background: transparent;\n  color: #8f8f8f;\n  cursor: pointer;\n  transition: color .2s ease, background-color .2s ease;\n}\n.hb-zc-copybtn:hover { color: #ededed; background: rgba(255, 255, 255, .07); }\n.hb-zc-copybtn[data-done=\"true\"] { color: var(--hb-zc-accent); }\n.hb-zc-cta {\n  display: inline-flex;\n  flex: none;\n  align-items: center;\n  justify-content: center;\n  gap: 6px;\n  height: 42px;\n  padding: 0 14px 0 18px;\n  border-radius: 10px;\n  background: var(--hb-zc-accent);\n  color: var(--hb-zc-ink);\n  font-size: 14px;\n  font-weight: 600;\n  letter-spacing: -.01em;\n  text-decoration: none;\n  white-space: nowrap;\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 28px -10px var(--hb-zc-accent);\n  transition: filter .2s ease, transform .2s ease;\n}\n.hb-zc-cta:hover { filter: brightness(1.08); }\n.hb-zc-cta svg { transition: transform .2s ease; }\n.hb-zc-cta:hover svg { transform: translateX(2px); }\n.hb-zc-more {\n  position: absolute;\n  left: 50%;\n  bottom: 18px;\n  z-index: 2;\n  display: inline-flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 2px;\n  padding: 4px 8px;\n  border-radius: 6px;\n  color: #6f6f6f;\n  font-family: var(--hb-zc-mono);\n  font-size: 10.5px;\n  letter-spacing: .12em;\n  text-transform: uppercase;\n  text-decoration: none;\n  transform: translateX(-50%);\n  transition: color .2s ease;\n}\n.hb-zc-more:hover { color: #ededed; }\n.hb-zc-more svg { animation: hb-zc-bob 1.8s ease-in-out infinite; }\n.hb-zc a:focus-visible, .hb-zc button:focus-visible {\n  outline: 2px solid var(--hb-zc-accent);\n  outline-offset: 2px;\n}\n.hb-zc-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  overflow: hidden;\n  clip: rect(0 0 0 0);\n  white-space: nowrap;\n}\n@container (max-width: 760px) {\n  .hb-zc-foot { grid-template-columns: minmax(0, 1fr); padding: 0 24px 72px; }\n  .hb-zc-bar { padding: 16px 24px; }\n}\n@container (max-width: 640px) {\n  .hb-zc-bar { grid-template-columns: 1fr auto; }\n  .hb-zc-links, .hb-zc-search { display: none; }\n  .hb-zc-stage { min-height: calc(80cqi + 24px); }\n  .hb-zc-sub { font-size: 14px; }\n  .hb-zc-side, .hb-zc-row { align-self: stretch; }\n  .hb-zc-row { flex-direction: column; }\n  .hb-zc-cta { width: 100%; }\n}\n@container (max-width: 360px) {\n  .hb-zc-bar { padding: 14px 18px; }\n  .hb-zc-foot { padding: 0 18px 68px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-zc-title, .hb-zc-sub, .hb-zc-side, .hb-zc-more svg { animation: none; }\n  .hb-zc-link, .hb-zc-search, .hb-zc-outline, .hb-zc-copybtn, .hb-zc-cta, .hb-zc-cta svg, .hb-zc-more { transition: none; }\n  .hb-zc-cta:hover svg { transform: none; }\n}\n`;\n\nconst defaultNav: HeroDotGlobeLink[] = [\n  { label: \"Docs\", href: \"#\" },\n  { label: \"Examples\", href: \"#\" },\n  { label: \"Kit\", href: \"#\" },\n];\nconst defaultNavCta: HeroDotGlobeLink = { label: \"Sign in\", href: \"#\" };\nconst defaultPrimary: HeroDotGlobeLink = { label: \"Get started\", href: \"#\" };\nconst defaultMore: HeroDotGlobeLink = { label: \"Learn more\", href: \"#\" };\n\nconst TAU = Math.PI * 2;\nconst GOLDEN = Math.PI * (3 - Math.sqrt(5));\nconst WARM: [number, number, number] = [255, 243, 224];\nconst ALPHAS = [0.08, 0.2, 0.36, 0.55, 0.76, 0.96];\nconst TONES = 4;\n\nfunction hash(i: number, salt: number) {\n  let x = (Math.imul(i + 1, 0x9e3779b1) ^ Math.imul(salt + 11, 0x85ebca6b)) >>> 0;\n  x = Math.imul((x >>> 16) ^ x, 0x45d9f3b) >>> 0;\n  x = Math.imul((x >>> 16) ^ x, 0x45d9f3b) >>> 0;\n  x = ((x >>> 16) ^ x) >>> 0;\n  return x / 4294967296;\n}\n\nfunction hexRgb(value: string): [number, number, number] | null {\n  const m = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(value.trim());\n  if (!m) return null;\n  let h = m[1];\n  if (h.length === 3) h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2];\n  const n = parseInt(h, 16);\n  return [(n >> 16) & 255, (n >> 8) & 255, n & 255];\n}\n\nfunction resolveRgb(value: string, ctx: CanvasRenderingContext2D): [number, number, number] {\n  const direct = hexRgb(value);\n  if (direct) return direct;\n  ctx.fillStyle = \"#ffb84d\";\n  ctx.fillStyle = value;\n  const out = String(ctx.fillStyle);\n  const hex = hexRgb(out);\n  if (hex) return hex;\n  const nums = out.match(/[\\d.]+/g);\n  if (nums && nums.length >= 3) return [Number(nums[0]), Number(nums[1]), Number(nums[2])];\n  return [255, 184, 77];\n}\n\nfunction inkFor(accent: string) {\n  const rgb = hexRgb(accent);\n  if (!rgb) return \"#140d02\";\n  const lum = (0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]) / 255;\n  return lum > 0.55 ? \"#140d02\" : \"#ffffff\";\n}\n\nfunction Mark() {\n  return (\n    <svg className=\"hb-zc-mark\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n      <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeDasharray=\"1.4 2.2\" strokeLinecap=\"round\" />\n      <ellipse cx=\"12\" cy=\"12\" rx=\"9\" ry=\"3.2\" stroke=\"currentColor\" strokeWidth=\"1.6\" transform=\"rotate(-18 12 12)\" />\n      <circle cx=\"12\" cy=\"12\" r=\"2.2\" fill=\"currentColor\" />\n    </svg>\n  );\n}\n\nexport function HeroDotGlobe({\n  title = \"Build interfaces that move people.\",\n  subtitle = \"Motion-ready React components you install with one command and own as plain source. No runtime, no lock-in.\",\n  caption = \"v3.2 · 240+ components · MIT licensed\",\n  command = \"npx shadcn@latest add https://hyperblur.dev/r/hero-dot-globe.json\",\n  primaryCta = defaultPrimary,\n  brand = \"Orbitkit\",\n  nav = defaultNav,\n  navCta = defaultNavCta,\n  learnMore = defaultMore,\n  accent = \"#ffb84d\",\n  density = 1,\n  speed = 1,\n  headingAs = \"h1\",\n  onSearch,\n  className = \"\",\n  style,\n  ...rest\n}: HeroDotGlobeProps) {\n  const rootRef = React.useRef<HTMLElement>(null);\n  const canvasRef = React.useRef<HTMLCanvasElement>(null);\n  const stageRef = React.useRef<HTMLDivElement>(null);\n  const timerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n  const [copied, setCopied] = React.useState(false);\n\n  React.useEffect(() => {\n    const root = rootRef.current;\n    const canvas = canvasRef.current;\n    const stage = stageRef.current;\n    const ctx = canvas?.getContext(\"2d\");\n    if (!root || !canvas || !stage || !ctx) return;\n    const reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n    const mult = Math.min(2, Math.max(0.2, Number.isFinite(density) ? density : 1));\n    const pace = Math.max(0, Number.isFinite(speed) ? speed : 1);\n\n    const nBase = Math.round(6400 * mult);\n    const nBand = Math.round(1500 * mult);\n    const nDust = Math.round(240 * Math.min(1.4, mult));\n    const total = nBase + nBand;\n\n    const bx = new Float32Array(nBase);\n    const by = new Float32Array(nBase);\n    const bz = new Float32Array(nBase);\n    const bs = new Float32Array(total);\n    for (let i = 0; i < nBase; i++) {\n      const yy = 1 - (2 * (i + 0.5)) / nBase;\n      const r = Math.sqrt(Math.max(0, 1 - yy * yy));\n      const th = i * GOLDEN;\n      bx[i] = Math.cos(th) * r;\n      by[i] = yy;\n      bz[i] = Math.sin(th) * r;\n      bs[i] = 0.75 + hash(i, 3) * 0.45;\n    }\n    const lat = new Float32Array(nBand);\n    const lon = new Float32Array(nBand);\n    for (let j = 0; j < nBand; j++) {\n      const g = hash(j, 21) + hash(j, 22) + hash(j, 23) - 1.5;\n      lat[j] = g * 0.16;\n      lon[j] = hash(j, 24) * TAU;\n      bs[nBase + j] = 0.8 + hash(j, 25) * 0.5;\n    }\n    const da = new Float32Array(nDust);\n    const dr = new Float32Array(nDust);\n    const dz = new Float32Array(nDust);\n    const dp = new Float32Array(nDust);\n    const dt = new Float32Array(nDust);\n    for (let k = 0; k < nDust; k++) {\n      da[k] = hash(k, 41) * TAU;\n      const u = hash(k, 42);\n      dr[k] = 1.08 + u * u * 1.25;\n      dz[k] = 0.25 + hash(k, 43) * 0.75;\n      dp[k] = hash(k, 44) * TAU;\n      dt[k] = 0.4 + hash(k, 45) * 1.4;\n    }\n\n    const sx = new Float32Array(total);\n    const sy = new Float32Array(total);\n    const ss = new Float32Array(total);\n    const bucket = new Uint8Array(total);\n    const order = new Int32Array(total);\n    const buckets = ALPHAS.length * TONES;\n    const counts = new Int32Array(buckets);\n    const starts = new Int32Array(buckets);\n\n    const acc = resolveRgb(accent, ctx);\n    const fills: string[] = [];\n    for (let b = 0; b < ALPHAS.length; b++) {\n      for (let t = 0; t < TONES; t++) {\n        const m = t / (TONES - 1);\n        const r = Math.round(WARM[0] + (acc[0] - WARM[0]) * m);\n        const g = Math.round(WARM[1] + (acc[1] - WARM[1]) * m);\n        const bl = Math.round(WARM[2] + (acc[2] - WARM[2]) * m);\n        fills.push(`rgba(${r}, ${g}, ${bl}, ${ALPHAS[b].toFixed(3)})`);\n      }\n    }\n    const glowA = `rgba(${acc[0]}, ${acc[1]}, ${acc[2]}, 0.10)`;\n    const glowB = `rgba(${acc[0]}, ${acc[1]}, ${acc[2]}, 0)`;\n\n    let w = 0;\n    let h = 0;\n    let cx = 0;\n    let cy = 0;\n    let R = 0;\n    let dpr = 1;\n    let visible = true;\n    let raf = 0;\n    let last = 0;\n    let time = 0;\n    let pointer = false;\n    let ptx = 0;\n    let pty = 0;\n    let curX = 0;\n    let curY = 0;\n\n    function layout() {\n      if (!root || !canvas || !stage || !ctx) return;\n      const rect = root.getBoundingClientRect();\n      w = rect.width;\n      h = rect.height;\n      dpr = Math.min(2, window.devicePixelRatio || 1);\n      canvas.width = Math.max(1, Math.round(w * dpr));\n      canvas.height = Math.max(1, Math.round(h * dpr));\n      cx = w / 2;\n      if (w < 640) {\n        const st = stage.getBoundingClientRect();\n        R = w * 0.38;\n        cy = st.top - rect.top + st.height / 2;\n      } else {\n        R = Math.min(w * 0.3, h * 0.42);\n        cy = h * 0.44;\n      }\n    }\n\n    function draw() {\n      if (!ctx || !w || !h) return;\n      ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n      ctx.clearRect(0, 0, w, h);\n\n      const glow = ctx.createRadialGradient(cx, cy, R * 0.2, cx, cy, R * 1.45);\n      glow.addColorStop(0, glowA);\n      glow.addColorStop(1, glowB);\n      ctx.fillStyle = glow;\n      ctx.fillRect(0, 0, w, h);\n\n      const spin = time * 0.09 * pace + curX * 0.45;\n      const drift = -time * 0.16 * pace;\n      const tiltX = 0.34 + curY * 0.3;\n      const tiltZ = 0.4;\n      const cY = Math.cos(spin);\n      const sY = Math.sin(spin);\n      const cX = Math.cos(tiltX);\n      const sX = Math.sin(tiltX);\n      const cZ = Math.cos(tiltZ);\n      const sZ = Math.sin(tiltZ);\n      const ox = curX * R * 0.05;\n      const oy = curY * R * 0.04;\n\n      counts.fill(0);\n      for (let i = 0; i < total; i++) {\n        let x: number;\n        let y: number;\n        let z: number;\n        let band = 0;\n        if (i < nBase) {\n          x = bx[i];\n          y = by[i];\n          z = bz[i];\n        } else {\n          const j = i - nBase;\n          const lo = lon[j] + drift;\n          const cl = Math.cos(lat[j]);\n          x = Math.cos(lo) * cl;\n          y = Math.sin(lat[j]);\n          z = Math.sin(lo) * cl;\n          band = 1 - Math.min(1, Math.abs(lat[j]) / 0.16);\n        }\n        const x1 = x * cY + z * sY;\n        const z1 = -x * sY + z * cY;\n        const y2 = y * cX - z1 * sX;\n        const z2 = y * sX + z1 * cX;\n        const x3 = x1 * cZ - y2 * sZ;\n        const y3 = x1 * sZ + y2 * cZ;\n        const p = 1 + z2 * 0.07;\n        sx[i] = cx + ox + x3 * R * p;\n        sy[i] = cy + oy - y3 * R * p;\n        const front = (z2 + 1) * 0.5;\n        const rim = z2 > -0.08 ? Math.exp(-(z2 * z2) / 0.01) : 0;\n        let b = 0.04 + 0.62 * front * front + 0.5 * rim + band * (0.18 + 0.32 * front);\n        if (b > 0.999) b = 0.999;\n        const bi = Math.floor(b * ALPHAS.length);\n        const rr = x3 * x3 + y3 * y3;\n        let ti = Math.floor(rr * rr * TONES);\n        if (ti >= TONES) ti = TONES - 1;\n        let s = bs[i] * (0.62 + 0.55 * front + 0.25 * rim);\n        if (s > 1.4) s = 1.4;\n        if (s < 0.6) s = 0.6;\n        ss[i] = s;\n        const k = bi * TONES + ti;\n        bucket[i] = k;\n        counts[k]++;\n      }\n      let acc0 = 0;\n      for (let k = 0; k < buckets; k++) {\n        starts[k] = acc0;\n        acc0 += counts[k];\n      }\n      for (let i = 0; i < total; i++) order[starts[bucket[i]]++] = i;\n\n      let pos = 0;\n      for (let k = 0; k < buckets; k++) {\n        const n = counts[k];\n        if (!n) continue;\n        ctx.fillStyle = fills[k];\n        ctx.beginPath();\n        for (let q = pos; q < pos + n; q++) {\n          const i = order[q];\n          const s = ss[i];\n          ctx.rect(sx[i] - s / 2, sy[i] - s / 2, s, s);\n        }\n        ctx.fill();\n        pos += n;\n      }\n\n      ctx.fillStyle = \"rgb(236, 226, 210)\";\n      const swirl = time * 0.012 * pace;\n      for (let k = 0; k < nDust; k++) {\n        const a = da[k] + swirl * (1.6 - dr[k] * 0.5);\n        const px = cx + Math.cos(a) * dr[k] * R + curX * dz[k] * 18;\n        const py = cy + Math.sin(a) * dr[k] * R * 0.92 + curY * dz[k] * 12;\n        if (px < -4 || px > w + 4 || py < -4 || py > h + 4) continue;\n        const twinkle = reduce ? 1 : 0.55 + 0.45 * Math.sin(time * dt[k] + dp[k]);\n        ctx.globalAlpha = (0.08 + 0.32 * dz[k]) * twinkle;\n        const s = 0.6 + dz[k] * 0.7;\n        ctx.fillRect(px - s / 2, py - s / 2, s, s);\n      }\n      ctx.globalAlpha = 1;\n    }\n\n    function frame(now: number) {\n      raf = 0;\n      const step = last ? Math.min(0.05, (now - last) / 1000) : 0;\n      last = now;\n      time += step;\n      let tx = ptx;\n      let ty = pty;\n      if (!pointer) {\n        tx = Math.sin(time * 0.21) * 0.45;\n        ty = Math.sin(time * 0.13 + 1.2) * 0.25;\n      }\n      const ease = Math.min(1, step * 2.4);\n      curX += (tx - curX) * ease;\n      curY += (ty - curY) * ease;\n      draw();\n      schedule();\n    }\n\n    function schedule() {\n      if (reduce || raf || !visible || document.hidden) return;\n      raf = requestAnimationFrame(frame);\n    }\n\n    function stop() {\n      if (raf) cancelAnimationFrame(raf);\n      raf = 0;\n      last = 0;\n    }\n\n    function onMove(e: PointerEvent) {\n      if (!root) return;\n      const rect = root.getBoundingClientRect();\n      pointer = true;\n      ptx = Math.max(-1, Math.min(1, ((e.clientX - rect.left) / rect.width) * 2 - 1));\n      pty = Math.max(-1, Math.min(1, ((e.clientY - rect.top) / rect.height) * 2 - 1));\n    }\n    function onLeave() {\n      pointer = false;\n    }\n    function onVisibility() {\n      if (document.hidden) stop();\n      else schedule();\n    }\n\n    layout();\n    draw();\n\n    const ro = new ResizeObserver(() => {\n      layout();\n      draw();\n    });\n    ro.observe(root);\n    const io = new IntersectionObserver((entries) => {\n      visible = entries[0]?.isIntersecting ?? true;\n      if (visible) schedule();\n      else stop();\n    });\n    io.observe(root);\n    root.addEventListener(\"pointermove\", onMove);\n    root.addEventListener(\"pointerleave\", onLeave);\n    document.addEventListener(\"visibilitychange\", onVisibility);\n    schedule();\n\n    return () => {\n      stop();\n      ro.disconnect();\n      io.disconnect();\n      root.removeEventListener(\"pointermove\", onMove);\n      root.removeEventListener(\"pointerleave\", onLeave);\n      document.removeEventListener(\"visibilitychange\", onVisibility);\n    };\n  }, [accent, density, speed]);\n\n  React.useEffect(() => {\n    return () => {\n      if (timerRef.current) clearTimeout(timerRef.current);\n    };\n  }, []);\n\n  function copy() {\n    navigator.clipboard?.writeText(command).catch(() => undefined);\n    setCopied(true);\n    if (timerRef.current) clearTimeout(timerRef.current);\n    timerRef.current = setTimeout(() => setCopied(false), 1600);\n  }\n\n  const Heading = headingAs;\n  const vars = { \"--hb-zc-accent\": accent, \"--hb-zc-ink\": inkFor(accent), ...style } as React.CSSProperties;\n\n  return (\n    <section ref={rootRef} className={`hb-zc ${className}`} style={vars} {...rest}>\n      <style href=\"hb-hero-dot-globe\" precedence=\"default\">{css}</style>\n      <canvas ref={canvasRef} className=\"hb-zc-canvas\" aria-hidden=\"true\" />\n      <header className=\"hb-zc-bar\">\n        <a className=\"hb-zc-brand\" href=\"#\">\n          <Mark />\n          <span>{brand}</span>\n        </a>\n        {nav.length ? (\n          <nav aria-label=\"Primary\">\n            <ul className=\"hb-zc-links\">\n              {nav.map((item) => (\n                <li key={item.label}>\n                  <a className=\"hb-zc-link\" href={item.href}>\n                    {item.label}\n                  </a>\n                </li>\n              ))}\n            </ul>\n          </nav>\n        ) : (\n          <span />\n        )}\n        <div className=\"hb-zc-tools\">\n          <button type=\"button\" className=\"hb-zc-search\" aria-label=\"Search\" onClick={onSearch}>\n            <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden=\"true\">\n              <circle cx=\"11\" cy=\"11\" r=\"6.5\" />\n              <path d=\"M16 16l4.5 4.5\" />\n            </svg>\n          </button>\n          {navCta ? (\n            <a className=\"hb-zc-outline\" href={navCta.href}>\n              {navCta.label}\n            </a>\n          ) : null}\n        </div>\n      </header>\n      <div ref={stageRef} className=\"hb-zc-stage\" aria-hidden=\"true\" />\n      <div className=\"hb-zc-foot\">\n        <div className=\"hb-zc-copy\">\n          <Heading className=\"hb-zc-title\">{title}</Heading>\n          {subtitle ? <p className=\"hb-zc-sub\">{subtitle}</p> : null}\n        </div>\n        {caption || command || primaryCta ? (\n          <div className=\"hb-zc-side\">\n            {caption ? <p className=\"hb-zc-caption\">{caption}</p> : null}\n            {command || primaryCta ? (\n              <div className=\"hb-zc-row\">\n                {command ? (\n                  <div className=\"hb-zc-cmd\">\n                    <span className=\"hb-zc-prompt\" aria-hidden=\"true\">$</span>\n                    <code className=\"hb-zc-code\">{command}</code>\n                    <button type=\"button\" className=\"hb-zc-copybtn\" data-done={copied} onClick={copy} aria-label={copied ? \"Copied\" : \"Copy command\"}>\n                      {copied ? (\n                        <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                          <path d=\"M5 12.5l4.5 4.5L19 7.5\" />\n                        </svg>\n                      ) : (\n                        <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.9\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                          <rect x=\"8.5\" y=\"8.5\" width=\"11\" height=\"11\" rx=\"2.2\" />\n                          <path d=\"M15.5 8.5V6.7a2.2 2.2 0 0 0-2.2-2.2H6.7a2.2 2.2 0 0 0-2.2 2.2v6.6a2.2 2.2 0 0 0 2.2 2.2h1.8\" />\n                        </svg>\n                      )}\n                      <span className=\"hb-zc-sr\" aria-live=\"polite\">{copied ? \"Copied\" : \"\"}</span>\n                    </button>\n                  </div>\n                ) : null}\n                {primaryCta ? (\n                  <a className=\"hb-zc-cta\" href={primaryCta.href}>\n                    {primaryCta.label}\n                    <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                      <path d=\"M9 6l6 6-6 6\" />\n                    </svg>\n                  </a>\n                ) : null}\n              </div>\n            ) : null}\n          </div>\n        ) : null}\n      </div>\n      {learnMore ? (\n        <a className=\"hb-zc-more\" href={learnMore.href}>\n          <span>{learnMore.label}</span>\n          <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n            <path d=\"M6 9l6 6 6-6\" />\n          </svg>\n        </a>\n      ) : null}\n    </section>\n  );\n}\n"
    }
  ]
}