{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero-dot-saturn",
  "type": "registry:component",
  "title": "Hero Dot Saturn",
  "description": "Giant halftone planet in ink dots on warm paper cream, with terracotta rings that pass behind and in front of the centered serif headline; bar with centered brand and links split left and right.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "hero",
    "hero",
    "saturn",
    "planet",
    "halftone",
    "canvas",
    "dots"
  ],
  "docs": "https://hyperblur.dev/effects/hero-dot-saturn",
  "files": [
    {
      "path": "registry/hyperblur/hero-dot-saturn.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/hero-dot-saturn.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface HeroDotSaturnLink {\n  label: string;\n  href: string;\n}\n\nexport interface HeroDotSaturnProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  title?: string;\n  subtitle?: string;\n  caption?: string;\n  command?: string;\n  primaryCta?: HeroDotSaturnLink | null;\n  brand?: string;\n  nav?: HeroDotSaturnLink[];\n  navCta?: HeroDotSaturnLink | null;\n  learnMore?: HeroDotSaturnLink | null;\n  accent?: string;\n  density?: number;\n  speed?: number;\n  ringTilt?: number;\n  bands?: number;\n  headingAs?: \"h1\" | \"h2\";\n  onSearch?: () => void;\n}\n\ntype HeroLink = HeroDotSaturnLink;\n\nconst css = `\n@keyframes hb-hh1-up {\n  from { opacity: 0; transform: translate3d(0, 14px, 0); }\n  to { opacity: 1; transform: translate3d(0, 0, 0); }\n}\n.hb-hh1 {\n  --hb-hh1-accent: #c2542d;\n  --hb-hh1-ink: #ffffff;\n  --hb-hh1-fg: #1b1712;\n  --hb-hh1-mute: rgba(27, 23, 18, .62);\n  --hb-hh1-line: rgba(27, 23, 18, .24);\n  --hb-hh1-panel: rgba(239, 231, 214, .82);\n  --hb-hh1-align: center;\n  --hb-hh1-paper: #efe7d6;\n  --hb-hh1-mono: var(--font-mono, ui-monospace, 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: 720px;\n  overflow: hidden;\n  container-type: inline-size;\n  background: radial-gradient(55% 60% at 50% 50%, #f5eedf, var(--hb-hh1-paper) 75%);\n  color: var(--hb-hh1-fg);\n  font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);\n  -webkit-font-smoothing: antialiased;\n}\n.hb-hh1 *, .hb-hh1 *::before, .hb-hh1 *::after { box-sizing: border-box; }\n.hb-hh1-canvas { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; pointer-events: none; }\n.hb-hh1-canvas[data-front=\"true\"] { z-index: 3; }\n.hb-hh1-bar {\n  position: relative; z-index: 4; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 36px;\n  width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 40px; pointer-events: none;\n}\n.hb-hh1-bar > * { pointer-events: auto; }\n.hb-hh1-brand {\n  display: inline-flex; align-items: center; gap: 10px; color: var(--hb-hh1-fg); text-decoration: none;\n  font-family: var(--font-serif, \"Iowan Old Style\", \"Palatino Linotype\", Georgia, serif); font-size: 22px; font-weight: 700; letter-spacing: -.02em;\n}\n.hb-hh1-mark { flex: none; color: var(--hb-hh1-accent); }\n.hb-hh1-side-l, .hb-hh1-side-r { display: flex; align-items: center; gap: 28px; min-width: 0; }\n.hb-hh1-side-l { justify-content: flex-end; }\n.hb-hh1-side-r { justify-content: flex-start; }\n.hb-hh1-links { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }\n.hb-hh1-link { color: var(--hb-hh1-mute); font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; transition: color .2s ease; }\n.hb-hh1-link:hover { color: var(--hb-hh1-fg); }\n.hb-hh1-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }\n.hb-hh1-outline {\n  display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid var(--hb-hh1-fg); border-radius: 8px;\n  color: var(--hb-hh1-fg); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color .2s ease, color .2s ease;\n}\n.hb-hh1-outline:hover { background: var(--hb-hh1-fg); color: var(--hb-hh1-paper); }\n.hb-hh1-search { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--hb-hh1-fg); cursor: pointer; }\n.hb-hh1-search:hover { background: rgba(27, 23, 18, .08); }\n.hb-hh1-main {\n  position: relative; z-index: 2; flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;\n  width: 100%; max-width: 940px; margin: 0 auto; padding: 8px 32px 64px; text-align: center;\n}\n.hb-hh1-title {\n  max-width: 12em; margin: 0 0 clamp(26px, 3.4cqi, 50px); color: var(--hb-hh1-fg);\n  font-family: var(--font-serif, \"Iowan Old Style\", \"Palatino Linotype\", Georgia, serif);\n  font-size: clamp(34px, 6.4cqi, 92px); font-weight: 700; line-height: .98; letter-spacing: -.045em; text-wrap: balance;\n  text-shadow: 0 0 28px var(--hb-hh1-paper), 0 0 12px var(--hb-hh1-paper), 0 0 3px var(--hb-hh1-paper);\n  animation: hb-hh1-up .8s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-hh1-sub {\n  max-width: 34em; margin: 0; color: var(--hb-hh1-fg); font-size: 16px; font-weight: 500; line-height: 1.5; text-wrap: pretty;\n  text-shadow: 0 0 18px var(--hb-hh1-paper), 0 0 8px var(--hb-hh1-paper);\n  animation: hb-hh1-up .8s .08s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-hh1-sub, .hb-hh1-more, .hb-hh1-caption { background: rgba(239, 231, 214, .8); padding: 3px 10px; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; text-shadow: none; }\n.hb-hh1-side { animation: hb-hh1-up .8s .16s cubic-bezier(.2, .7, .2, 1) both; }\n.hb-hh1-more { color: var(--hb-hh1-fg); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--hb-hh1-accent); text-decoration-thickness: 2px; }\n.hb-hh1 .hb-hh1-cta { background: var(--hb-hh1-fg); color: var(--hb-hh1-paper); }\n.hb-hh1 .hb-hh1-cmd { background: var(--hb-hh1-paper); border-color: var(--hb-hh1-fg); }\n.hb-hh1 .hb-hh1-prompt { color: var(--hb-hh1-accent); }\n.hb-hh1 .hb-hh1-caption { color: var(--hb-hh1-fg); text-shadow: 0 0 10px var(--hb-hh1-paper); }\n.hb-hh1-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; align-items: var(--hb-hh1-align, flex-start); }\n.hb-hh1-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; max-width: 100%; justify-content: var(--hb-hh1-align, flex-start); }\n.hb-hh1-cta {\n  display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 6px;\n  height: 44px; padding: 0 16px 0 20px; border-radius: 8px;\n  background: var(--hb-hh1-accent); color: var(--hb-hh1-ink);\n  font-size: 14px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; white-space: nowrap;\n  transition: filter .2s ease, transform .2s ease;\n}\n.hb-hh1-cta:hover { filter: brightness(1.08); }\n.hb-hh1-cta svg { transition: transform .2s ease; }\n.hb-hh1-cta:hover svg { transform: translateX(2px); }\n.hb-hh1-cmd {\n  display: flex; align-items: center; gap: 8px; min-width: 0; height: 44px; padding: 0 6px 0 14px;\n  border: 1px solid var(--hb-hh1-line); border-radius: 8px; background: var(--hb-hh1-panel);\n  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);\n}\n.hb-hh1-prompt { flex: none; color: var(--hb-hh1-accent); font-family: var(--hb-hh1-mono); font-size: 12px; }\n.hb-hh1-code { min-width: 0; overflow: hidden; color: var(--hb-hh1-fg); font-family: var(--hb-hh1-mono); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }\n.hb-hh1-copybtn {\n  display: inline-grid; flex: none; place-items: center; width: 30px; height: 30px; padding: 0;\n  border: 0; border-radius: 6px; background: transparent; color: var(--hb-hh1-mute); cursor: pointer;\n  transition: color .2s ease, background-color .2s ease;\n}\n.hb-hh1-copybtn:hover { color: var(--hb-hh1-fg); background: var(--hb-hh1-line); }\n.hb-hh1-copybtn[data-done=\"true\"] { color: var(--hb-hh1-accent); }\n.hb-hh1-caption { margin: 0; color: var(--hb-hh1-mute); font-family: var(--hb-hh1-mono); font-size: 11.5px; letter-spacing: .04em; }\n.hb-hh1-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }\n.hb-hh1 a:focus-visible, .hb-hh1 button:focus-visible { outline: 2px solid var(--hb-hh1-accent); outline-offset: 2px; }\n\n@container (max-width: 860px) {\n  .hb-hh1-bar { gap: 16px; padding: 18px 24px; }\n  .hb-hh1-side-l .hb-hh1-links, .hb-hh1-side-r .hb-hh1-links { gap: 16px; }\n}\n@container (max-width: 700px) {\n  .hb-hh1-side-l, .hb-hh1-side-r .hb-hh1-links, .hb-hh1-outline { display: none; }\n  .hb-hh1-bar { grid-template-columns: 1fr auto 1fr; }\n  .hb-hh1-main { padding: 16px 20px 40px; gap: 18px; justify-content: center; }\n  .hb-hh1-sub { font-size: 14.5px; }\n  .hb-hh1-side, .hb-hh1-row { align-self: stretch; }\n  .hb-hh1-row { flex-direction: column; }\n  .hb-hh1-cta { width: 100%; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-hh1-title, .hb-hh1-sub, .hb-hh1-sub, .hb-hh1-more, .hb-hh1-caption { background: rgba(239, 231, 214, .8); padding: 3px 10px; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; text-shadow: none; }\n.hb-hh1-side { animation: none; }\n  .hb-hh1-link, .hb-hh1-cta, .hb-hh1-cta svg, .hb-hh1-copybtn, .hb-hh1-outline { transition: none; }\n}\n`;\n\nconst defaultNav: HeroDotSaturnLink[] = [\n  { label: \"Journal\", href: \"#\" },\n  { label: \"Studio\", href: \"#\" },\n  { label: \"Pricing\", href: \"#\" },\n];\nconst defaultNavCta: HeroDotSaturnLink = { label: \"Get started\", href: \"#\" };\nconst defaultPrimary: HeroDotSaturnLink = { label: \"Start building\", href: \"#\" };\nconst defaultMore: HeroDotSaturnLink = { label: \"Read the story\", href: \"#\" };\n\nconst TAU = Math.PI * 2;\nconst GOLDEN = Math.PI * (3 - Math.sqrt(5));\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, fallback: [number, number, number]): [number, number, number] {\n  const direct = hexRgb(value);\n  if (direct) return direct;\n  ctx.fillStyle = \"#000000\";\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 fallback;\n}\n\nfunction inkFor(accent: string, dark: string) {\n  const rgb = hexRgb(accent);\n  if (!rgb) return dark;\n  const lum = (0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]) / 255;\n  return lum > 0.55 ? dark : \"#ffffff\";\n}\n\nfunction clampNum(v: number, lo: number, hi: number, fallback: number) {\n  if (!Number.isFinite(v)) return fallback;\n  return Math.min(hi, Math.max(lo, v));\n}\n\nfunction useCopy(command: string) {\n  const timerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n  const [copied, setCopied] = React.useState(false);\n  React.useEffect(() => {\n    return () => {\n      if (timerRef.current) clearTimeout(timerRef.current);\n    };\n  }, []);\n  const copy = React.useCallback(() => {\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  }, [command]);\n  return { copied, copy };\n}\n\nfunction SearchIcon() {\n  return (\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  );\n}\n\nfunction Actions({\n  caption,\n  command,\n  primaryCta,\n  copied,\n  onCopy,\n}: {\n  caption: string;\n  command: string;\n  primaryCta: HeroLink | null;\n  copied: boolean;\n  onCopy: () => void;\n}) {\n  if (!caption && !command && !primaryCta) return null;\n  return (\n    <div className=\"hb-hh1-side\">\n      {command || primaryCta ? (\n        <div className=\"hb-hh1-row\">\n          {primaryCta ? (\n            <a className=\"hb-hh1-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          {command ? (\n            <div className=\"hb-hh1-cmd\">\n              <span className=\"hb-hh1-prompt\" aria-hidden=\"true\">$</span>\n              <code className=\"hb-hh1-code\">{command}</code>\n              <button type=\"button\" className=\"hb-hh1-copybtn\" data-done={copied} onClick={onCopy} 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\" />\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-hh1-sr\" aria-live=\"polite\">{copied ? \"Copied\" : \"\"}</span>\n              </button>\n            </div>\n          ) : null}\n        </div>\n      ) : null}\n      {caption ? <p className=\"hb-hh1-caption\">{caption}</p> : null}\n    </div>\n  );\n}\n\n\nconst INK: [number, number, number] = [27, 23, 18];\nconst RING_DEFS = [\n  { a: 1.3, b: 1.52, density: 9000, tone: 0, gap: 0 },\n  { a: 1.6, b: 1.9, density: 9000, tone: 1, gap: 0 },\n  { a: 2.0, b: 2.1, density: 9000, tone: 0, gap: 1 },\n];\n\nfunction Mark() {\n  return (\n    <svg className=\"hb-hh1-mark\" width=\"26\" height=\"26\" viewBox=\"0 0 28 28\" fill=\"none\" aria-hidden=\"true\">\n      <circle cx=\"14\" cy=\"14\" r=\"6\" fill=\"currentColor\" />\n      <ellipse cx=\"14\" cy=\"14\" rx=\"12.5\" ry=\"4.2\" transform=\"rotate(-18 14 14)\" stroke=\"currentColor\" strokeWidth=\"1.6\" />\n    </svg>\n  );\n}\n\nexport function HeroDotSaturn({\n  title = \"Build products with their own gravity.\",\n  subtitle = \"Interfaces that pull people in and keep them in orbit. Ship the source, own every line, and tune the motion to your brand.\",\n  caption = \"3 rings · 15,000 dots · zero dependencies\",\n  command = \"npx shadcn@latest add https://hyperblur.dev/r/hero-dot-saturn.json\",\n  brand = \"Annulus\",\n  accent = \"#c2542d\",\n  primaryCta = defaultPrimary,\n  nav = defaultNav,\n  navCta = defaultNavCta,\n  learnMore = defaultMore,\n  density = 1,\n  speed = 1,\n  ringTilt = 0.45,\n  bands = 9,\n  headingAs = \"h1\",\n  onSearch,\n  className = \"\",\n  style,\n  ...rest\n}: HeroDotSaturnProps) {\n  const rootRef = React.useRef<HTMLElement>(null);\n  const backRef = React.useRef<HTMLCanvasElement>(null);\n  const frontRef = React.useRef<HTMLCanvasElement>(null);\n  const mainRef = React.useRef<HTMLDivElement>(null);\n  const { copied, copy } = useCopy(command);\n\n  React.useEffect(() => {\n    const root = rootRef.current;\n    const back = backRef.current;\n    const front = frontRef.current;\n    const main = mainRef.current;\n    const backCtx = back?.getContext(\"2d\");\n    const frontCtx = front?.getContext(\"2d\");\n    if (!root || !back || !front || !main || !backCtx || !frontCtx) return;\n    const cb: CanvasRenderingContext2D = backCtx;\n    const cf: CanvasRenderingContext2D = frontCtx;\n    const reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n    const mult = clampNum(density, 0.2, 2, 1);\n    const pace = clampNum(speed, 0, 4, 1);\n    const ratio = clampNum(ringTilt * 0.38, 0.06, 0.9, 0.17);\n    const pitch = Math.asin(ratio);\n    const nBands = clampNum(bands, 1, 24, 9);\n    const roll = -0.12;\n    const cP = Math.cos(pitch);\n    const sP = Math.sin(pitch);\n    const cR = Math.cos(roll);\n    const sR = Math.sin(roll);\n\n    const nSphere = Math.round(8000 * mult);\n    const sx0 = new Float32Array(nSphere);\n    const sy0 = new Float32Array(nSphere);\n    const sz0 = new Float32Array(nSphere);\n    const sBand = new Float32Array(nSphere);\n    const sRnd = new Float32Array(nSphere);\n    for (let i = 0; i < nSphere; i++) {\n      const y = Math.max(-1, Math.min(1, 1 - (2 * (i + 0.5)) / nSphere + (hash(i, 7) - 0.5) * (1.4 / Math.sqrt(nSphere))));\n      const r = Math.sqrt(1 - y * y);\n      const th = i * GOLDEN + (hash(i, 9) - 0.5) * (5 / Math.sqrt(nSphere));\n      sx0[i] = Math.cos(th) * r;\n      sy0[i] = y;\n      sz0[i] = Math.sin(th) * r;\n      sBand[i] = Math.sin(Math.asin(y) * nBands * 1.0 + 0.6);\n      sRnd[i] = hash(i, 5);\n    }\n\n    const rs: number[] = [];\n    const ra: number[] = [];\n    const rz: number[] = [];\n    const rc: number[] = [];\n    for (let k = 0; k < RING_DEFS.length; k++) {\n      const def = RING_DEFS[k];\n      const cnt = Math.round(((def.a + def.b) / 2) * (def.b - def.a) * def.density * mult);\n      for (let j = 0; j < cnt; j++) {\n        const u = hash(j, 40 + k);\n        const rad = def.a + (def.b - def.a) * u;\n        const ang = hash(j, 50 + k) * TAU;\n        if (def.gap && Math.sin(ang * 36) < -0.2) continue;\n        rs.push(rad);\n        ra.push(ang);\n        rz.push(0.7 + hash(j, 60 + k) * 0.8);\n        rc.push(def.tone === 1 ? (hash(j, 70 + k) < 0.16 ? 1 : 0) : 1);\n      }\n    }\n    const nRing = rs.length;\n    const ringR = Float32Array.from(rs);\n    const ringA = Float32Array.from(ra);\n    const ringS = Float32Array.from(rz);\n    const ringC = Uint8Array.from(rc);\n\n    const nDust = 160;\n    const total = nSphere + nRing;\n    const X = new Float32Array(total);\n    const Y = new Float32Array(total);\n    const Rr = new Float32Array(total);\n    const Bk = new Int8Array(total);\n\n    const acc = resolveRgb(accent, cb, [194, 84, 45]);\n    const inkFill = (a: number) => `rgba(${INK[0]}, ${INK[1]}, ${INK[2]}, ${a})`;\n    const accFill = (a: number) => `rgba(${acc[0]}, ${acc[1]}, ${acc[2]}, ${a})`;\n    const levels = [0.4, 0.7, 0.96];\n    const fills: string[] = [];\n    for (let c = 0; c < 2; c++) for (let l = 0; l < 3; l++) fills.push(c ? accFill(levels[l]) : inkFill(levels[l]));\n\n    let w = 0;\n    let h = 0;\n    let dpr = 1;\n    let cx = 0;\n    let cy = 0;\n    let R = 100;\n    let unit = 1;\n    let visible = true;\n    let raf = 0;\n    let last = 0;\n    let time = reduce ? 6 : 0;\n\n    function layout() {\n      if (!root || !back || !front || !main) return;\n      const rect = root.getBoundingClientRect();\n      w = rect.width;\n      h = rect.height;\n      dpr = Math.min(2, window.devicePixelRatio || 1);\n      for (const c of [back, front]) {\n        c.width = Math.max(1, Math.round(w * dpr));\n        c.height = Math.max(1, Math.round(h * dpr));\n      }\n      const small = w < 700;\n      const t = main.querySelector(\".hb-hh1-title\");\n      const tr = t ? t.getBoundingClientRect() : null;\n      const mid = tr ? tr.top - rect.top + tr.height / 2 : h / 2;\n      R = small ? Math.min(w * 0.4, h * 0.22) : Math.min(h * 0.34, w * 0.27);\n      cx = w / 2;\n      cy = mid + R * 0.07;\n      unit = Math.max(0.5, Math.min(1.5, R / 300));\n    }\n\n    function draw() {\n      if (!w || !h) return;\n      for (const c of [cb, cf]) {\n        c.setTransform(dpr, 0, 0, dpr, 0, 0);\n        c.clearRect(0, 0, w, h);\n      }\n      cb.fillStyle = inkFill(0.2);\n      for (let k = 0; k < nDust; k++) {\n        const x = hash(k, 81) * w;\n        const y = hash(k, 82) * h;\n        const tw = reduce ? 1 : 0.6 + 0.4 * Math.sin(time * 0.8 + hash(k, 83) * TAU);\n        cb.globalAlpha = tw;\n        cb.fillRect(x, y, 1.6, 1.6);\n      }\n      cb.globalAlpha = 1;\n      const spin = time * 0.1 * pace;\n      const cS = Math.cos(spin);\n      const sS = Math.sin(spin);\n      const lx = -0.5;\n      const ly = 0.42;\n      const lz = 0.76;\n      const base = R * 0.0092;\n      for (let i = 0; i < nSphere; i++) {\n        const x0 = sx0[i] * cS + sz0[i] * sS;\n        const z0 = -sx0[i] * sS + sz0[i] * cS;\n        const y0 = sy0[i];\n        const y1 = y0 * cP - z0 * sP;\n        const z1 = y0 * sP + z0 * cP;\n        if (z1 < 0.02) {\n          Bk[i] = -1;\n          continue;\n        }\n        const x2 = x0 * cR - y1 * sR;\n        const y2 = x0 * sR + y1 * cR;\n        const lam = Math.max(0, x2 * lx + y2 * ly + z1 * lz);\n        const shade = 1 - lam;\n        const band = sBand[i];\n        const rr = base * (0.22 + 1.15 * shade * shade + 0.25 * shade) * (0.8 + 0.3 * band) * (0.45 + 0.55 * Math.sqrt(z1));\n        X[i] = cx + x2 * R;\n        Y[i] = cy - y2 * R;\n        Rr[i] = rr;\n        const terra = band > 0.9 && sRnd[i] < 0.55 ? 1 : 0;\n        Bk[i] = terra * 3 + (shade > 0.55 ? 2 : shade > 0.28 ? 1 : 0);\n        if (rr < 0.28) Bk[i] = -1;\n      }\n      const dotBase = Math.max(0.9, 1.45 * unit);\n      for (let j = 0; j < nRing; j++) {\n        const i = nSphere + j;\n        const rad = ringR[j];\n        const ang = ringA[j] + time * 0.09 * pace * (1.7 / Math.pow(rad, 1.5));\n        const x0 = Math.cos(ang) * rad;\n        const z0 = Math.sin(ang) * rad;\n        const y1 = -z0 * sP;\n        const z1 = z0 * cP;\n        const x2 = x0 * cR - y1 * sR;\n        const y2 = x0 * sR + y1 * cR;\n        const px = cx + x2 * R;\n        const py = cy - y2 * R;\n        const frontSide = z1 >= 0;\n        if (!frontSide && Math.hypot(x2, y2) < 0.99) {\n          Bk[i] = -1;\n          continue;\n        }\n        Rr[i] = dotBase * ringS[j] * (frontSide ? 1.1 : 0.85);\n        X[i] = px;\n        Y[i] = py;\n        const lv = frontSide ? 2 : 1;\n        const col = ringC[j] ? 3 : 0;\n        Bk[i] = (frontSide ? 6 : 0) + col + lv;\n      }\n      cf.fillStyle = \"#efe7d6\";\n      cf.beginPath();\n      for (let i = nSphere; i < total; i++) {\n        if (Bk[i] < 6) continue;\n        const r = Rr[i] + 1.6;\n        cf.moveTo(X[i] + r, Y[i]);\n        cf.arc(X[i], Y[i], r, 0, TAU);\n      }\n      cf.fill();\n      for (let k = 0; k < 12; k++) {\n        const c = k >= 6 ? cf : cb;\n        const kk = k % 6;\n        c.fillStyle = fills[kk];\n        c.beginPath();\n        let any = false;\n        for (let i = 0; i < total; i++) {\n          if (Bk[i] !== k) continue;\n          const r = Rr[i];\n          c.moveTo(X[i] + r, Y[i]);\n          c.arc(X[i], Y[i], r, 0, TAU);\n          any = true;\n        }\n        if (any) c.fill();\n      }\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      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 onVisibility() {\n      if (document.hidden) stop();\n      else schedule();\n    }\n\n    layout();\n    draw();\n    const ro = new ResizeObserver(() => {\n      layout();\n      draw();\n    });\n    ro.observe(root);\n    ro.observe(main);\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    document.addEventListener(\"visibilitychange\", onVisibility);\n    schedule();\n\n    return () => {\n      stop();\n      ro.disconnect();\n      io.disconnect();\n      document.removeEventListener(\"visibilitychange\", onVisibility);\n    };\n  }, [accent, density, speed, ringTilt, bands]);\n\n  const Heading = headingAs;\n  const vars = { \"--hb-hh1-accent\": accent, \"--hb-hh1-ink\": inkFor(accent, \"#1b1712\"), ...style } as React.CSSProperties;\n  const split = Math.ceil(nav.length / 2);\n  const leftNav = nav.slice(0, split);\n  const rightNav = nav.slice(split);\n\n  return (\n    <section ref={rootRef} className={`hb-hh1 ${className}`} style={vars} {...rest}>\n      <style href=\"hb-hero-dot-saturn\" precedence=\"default\">{css}</style>\n      <canvas ref={backRef} className=\"hb-hh1-canvas\" aria-hidden=\"true\" />\n      <header className=\"hb-hh1-bar\">\n        <div className=\"hb-hh1-side-l\">\n          {leftNav.length ? (\n            <nav aria-label=\"Primary\">\n              <ul className=\"hb-hh1-links\">\n                {leftNav.map((item) => (\n                  <li key={item.label}>\n                    <a className=\"hb-hh1-link\" href={item.href}>\n                      {item.label}\n                    </a>\n                  </li>\n                ))}\n              </ul>\n            </nav>\n          ) : null}\n        </div>\n        <a className=\"hb-hh1-brand\" href=\"#\">\n          <Mark />\n          <span>{brand}</span>\n        </a>\n        <div className=\"hb-hh1-side-r\">\n          {rightNav.length ? (\n            <nav aria-label=\"Secondary\">\n              <ul className=\"hb-hh1-links\">\n                {rightNav.map((item) => (\n                  <li key={item.label}>\n                    <a className=\"hb-hh1-link\" href={item.href}>\n                      {item.label}\n                    </a>\n                  </li>\n                ))}\n              </ul>\n            </nav>\n          ) : null}\n          <div className=\"hb-hh1-tools\">\n            {navCta ? (\n              <a className=\"hb-hh1-outline\" href={navCta.href}>\n                {navCta.label}\n              </a>\n            ) : null}\n            <button type=\"button\" className=\"hb-hh1-search\" aria-label=\"Search\" onClick={onSearch}>\n              <SearchIcon />\n            </button>\n          </div>\n        </div>\n      </header>\n      <div ref={mainRef} className=\"hb-hh1-main\">\n        <Heading className=\"hb-hh1-title\">{title}</Heading>\n        {subtitle ? <p className=\"hb-hh1-sub\">{subtitle}</p> : null}\n        <Actions caption={caption} command={command} primaryCta={primaryCta} copied={copied} onCopy={copy} />\n        {learnMore ? (\n          <a className=\"hb-hh1-more\" href={learnMore.href}>\n            {learnMore.label}\n          </a>\n        ) : null}\n      </div>\n      <canvas ref={frontRef} className=\"hb-hh1-canvas\" data-front=\"true\" aria-hidden=\"true\" />\n    </section>\n  );\n}\n"
    }
  ]
}