{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero-type",
  "type": "registry:component",
  "title": "Hero Type",
  "description": "A typographic hero in bone on black with a giant tight headline, a rotating italic word, oversized numerals and a two-row keyword marquee.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "hero",
    "hero",
    "typography",
    "editorial",
    "marquee",
    "studio",
    "landing"
  ],
  "docs": "https://hyperblur.dev/effects/hero-type",
  "files": [
    {
      "path": "registry/hyperblur/hero-type.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/hero-type.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface HeroTypeAction {\n  label: string;\n  href: string;\n}\n\nexport interface HeroTypeStat {\n  value: string;\n  suffix?: string;\n  label: string;\n}\n\nexport interface HeroTypeProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  title?: string;\n  words?: string[];\n  subtitle?: string;\n  primaryCta?: HeroTypeAction | null;\n  secondaryCta?: HeroTypeAction | null;\n  meta?: string[];\n  stats?: HeroTypeStat[];\n  keywords?: string[];\n  secondaryKeywords?: string[];\n  interval?: number;\n  accent?: string;\n  headingAs?: \"h1\" | \"h2\";\n}\n\nconst css = `\n.hb-hrt {\n  --hb-hrt-accent: #ff4a1c;\n  --hb-hrt-bone: #ece5d8;\n  --hb-hrt-line: rgba(236, 229, 216, .14);\n  position: relative;\n  box-sizing: border-box;\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  min-height: 600px;\n  overflow: hidden;\n  isolation: isolate;\n  container-type: inline-size;\n  background: #0b0a09;\n  color: var(--hb-hrt-bone);\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-hrt *, .hb-hrt *::before, .hb-hrt *::after { box-sizing: border-box; }\n.hb-hrt-pad { padding-left: clamp(20px, 4.4cqi, 56px); padding-right: clamp(20px, 4.4cqi, 56px); }\n.hb-hrt-top {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  margin: 0;\n  padding-top: 18px;\n  padding-bottom: 16px;\n  border-bottom: 1px solid var(--hb-hrt-line);\n  color: rgba(236, 229, 216, .58);\n  font-size: 11.5px;\n  letter-spacing: .1em;\n  list-style: none;\n  text-transform: uppercase;\n}\n.hb-hrt-top li { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }\n.hb-hrt-top li:first-child { color: var(--hb-hrt-bone); font-weight: 600; }\n.hb-hrt-top li:first-child::before {\n  content: \"\";\n  width: 8px;\n  height: 8px;\n  border-radius: 50%;\n  background: var(--hb-hrt-accent);\n}\n.hb-hrt-top li:last-child::before {\n  content: \"\";\n  width: 6px;\n  height: 6px;\n  border-radius: 50%;\n  background: #6ee7a8;\n  animation: hb-hrt-pulse 2.2s ease-in-out infinite;\n}\n@keyframes hb-hrt-pulse {\n  50% { opacity: .25; }\n}\n.hb-hrt-title {\n  position: relative;\n  margin: 0;\n  padding-top: clamp(18px, 3.2cqi, 40px);\n  color: var(--hb-hrt-bone);\n  font-size: clamp(44px, 13cqi, 180px);\n  font-weight: 700;\n  line-height: .86;\n  letter-spacing: -.058em;\n  animation: hb-hrt-rise 1s cubic-bezier(.2, .8, .2, 1) both;\n}\n@keyframes hb-hrt-rise {\n  from { opacity: 0; transform: translate3d(0, .12em, 0); }\n  to { opacity: 1; transform: none; }\n}\n.hb-hrt-rot {\n  display: inline-grid;\n  padding: 0 .1em .04em 0;\n  overflow: hidden;\n  vertical-align: top;\n  color: var(--hb-hrt-accent);\n  font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);\n    font-weight: 400;\n  letter-spacing: -.03em;\n}\n.hb-hrt-w {\n  grid-area: 1 / 1;\n  opacity: 0;\n  transform: translate3d(0, 105%, 0);\n  transition: transform .75s cubic-bezier(.7, 0, .2, 1), opacity .45s ease;\n}\n.hb-hrt-w[data-state=\"on\"] { opacity: 1; transform: none; }\n.hb-hrt-w[data-state=\"off\"] { opacity: 0; transform: translate3d(0, -105%, 0); }\n.hb-hrt-mid {\n  display: grid;\n  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);\n  align-items: end;\n  gap: clamp(24px, 5cqi, 64px);\n  padding-top: clamp(22px, 3cqi, 44px);\n  padding-bottom: clamp(22px, 2.8cqi, 40px);\n}\n.hb-hrt-in {\n  animation: hb-hrt-up .8s cubic-bezier(.2, .7, .2, 1) both;\n  animation-delay: var(--hb-hrt-i, 0ms);\n}\n@keyframes hb-hrt-up {\n  from { opacity: 0; transform: translate3d(0, 14px, 0); }\n  to { opacity: 1; transform: none; }\n}\n.hb-hrt-sub {\n  max-width: 420px;\n  margin: 0;\n  color: rgba(236, 229, 216, .66);\n  font-size: clamp(15px, 1.75cqi, 17px);\n  line-height: 1.55;\n  text-wrap: pretty;\n}\n.hb-hrt-actions {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  gap: 10px 24px;\n  margin-top: 24px;\n}\n.hb-hrt-btn {\n  display: inline-flex;\n  align-items: center;\n  gap: 10px;\n  height: 48px;\n  padding: 0 8px 0 22px;\n  border-radius: 999px;\n  background: var(--hb-hrt-accent);\n  color: #0b0a09;\n  font: inherit;\n  font-size: 15px;\n  font-weight: 650;\n  text-decoration: none;\n  white-space: nowrap;\n  transition: transform .25s ease, background .25s ease;\n}\n.hb-hrt-btn:hover { background: color-mix(in srgb, var(--hb-hrt-accent) 85%, #ffffff); }\n.hb-hrt-btn:active { transform: scale(.97); }\n.hb-hrt-btn:focus-visible, .hb-hrt-link:focus-visible { outline: 2px solid var(--hb-hrt-bone); outline-offset: 4px; }\n.hb-hrt-btn span {\n  display: grid;\n  place-items: center;\n  width: 34px;\n  height: 34px;\n  border-radius: 50%;\n  background: #0b0a09;\n  color: var(--hb-hrt-accent);\n  transition: transform .35s cubic-bezier(.2, .8, .2, 1);\n}\n.hb-hrt-btn:hover span { transform: rotate(-45deg); }\n.hb-hrt-link {\n  position: relative;\n  padding: 6px 0;\n  color: var(--hb-hrt-bone);\n  font-size: 15px;\n  font-weight: 550;\n  text-decoration: none;\n  white-space: nowrap;\n}\n.hb-hrt-link::after {\n  content: \"\";\n  position: absolute;\n  left: 0;\n  right: 0;\n  bottom: 2px;\n  height: 1px;\n  background: currentColor;\n  transform-origin: right;\n  transition: transform .35s cubic-bezier(.2, .8, .2, 1);\n}\n.hb-hrt-link:hover::after { transform: scaleX(0); }\n.hb-hrt-stats {\n  display: grid;\n  grid-template-columns: repeat(3, minmax(0, 1fr));\n  margin: 0;\n  padding: 0;\n  list-style: none;\n}\n.hb-hrt-stat {\n  min-width: 0;\n  padding: 12px 0 0 clamp(10px, 1.6cqi, 18px);\n  border-top: 1px solid var(--hb-hrt-line);\n  border-left: 1px solid var(--hb-hrt-line);\n}\n.hb-hrt-num {\n  display: block;\n  color: var(--hb-hrt-bone);\n  font-size: clamp(36px, 7cqi, 104px);\n  font-weight: 600;\n  line-height: .9;\n  letter-spacing: -.065em;\n  font-variant-numeric: tabular-nums;\n  white-space: nowrap;\n}\n.hb-hrt-num sup {\n  margin-left: .04em;\n  color: var(--hb-hrt-accent);\n  font-size: .42em;\n  font-weight: 500;\n  vertical-align: .95em;\n  letter-spacing: 0;\n}\n.hb-hrt-stat-label {\n  display: block;\n  margin-top: 10px;\n  color: rgba(236, 229, 216, .55);\n  font-size: 11.5px;\n  letter-spacing: .08em;\n  text-transform: uppercase;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n.hb-hrt-marq { margin-top: auto; border-top: 1px solid var(--hb-hrt-line); }\n.hb-hrt-row {\n  display: flex;\n  overflow: hidden;\n  border-bottom: 1px solid var(--hb-hrt-line);\n  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);\n  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);\n}\n.hb-hrt-track {\n  display: flex;\n  flex: none;\n  align-items: center;\n  animation: hb-hrt-left var(--hb-hrt-speed, 38s) linear infinite;\n}\n.hb-hrt-row[data-dir=\"right\"] .hb-hrt-track { animation-name: hb-hrt-right; }\n.hb-hrt-row:hover .hb-hrt-track { animation-play-state: paused; }\n@keyframes hb-hrt-left {\n  from { transform: translate3d(0, 0, 0); }\n  to { transform: translate3d(-50%, 0, 0); }\n}\n@keyframes hb-hrt-right {\n  from { transform: translate3d(-50%, 0, 0); }\n  to { transform: translate3d(0, 0, 0); }\n}\n.hb-hrt-kw {\n  display: inline-flex;\n  align-items: center;\n  gap: clamp(16px, 2.4cqi, 30px);\n  padding: 8px clamp(8px, 1.2cqi, 15px);\n  font-size: clamp(22px, 3.7cqi, 52px);\n  font-weight: 650;\n  line-height: 1.1;\n  letter-spacing: -.04em;\n  white-space: nowrap;\n}\n.hb-hrt-row[data-dir=\"right\"] .hb-hrt-kw {\n  color: transparent;\n  -webkit-text-stroke: 1px rgba(236, 229, 216, .5);\n  font-weight: 700;\n}\n.hb-hrt-kw svg { flex: none; width: .5em; height: .5em; color: var(--hb-hrt-accent); }\n.hb-hrt-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-hrt-top li:nth-child(2), .hb-hrt-top li:nth-child(3) { display: none; }\n  .hb-hrt-mid { grid-template-columns: minmax(0, 1fr); align-items: start; }\n}\n@container (max-width: 420px) {\n  .hb-hrt-top li:last-child { display: none; }\n  .hb-hrt-actions { flex-direction: column; align-items: stretch; }\n  .hb-hrt-btn { justify-content: space-between; }\n  .hb-hrt-link { align-self: flex-start; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-hrt-title, .hb-hrt-in, .hb-hrt-track, .hb-hrt-top li:last-child::before { animation: none; }\n  .hb-hrt-w, .hb-hrt-btn, .hb-hrt-btn span, .hb-hrt-link::after { transition: none; }\n}\n`;\n\nconst defaultWords = [\"move.\", \"last.\", \"sell.\", \"matter.\"];\nconst defaultMeta = [\"Halden Studio\", \"Brand & product design\", \"Lisbon / New York\", \"Booking Q1 2027\"];\nconst defaultStats: HeroTypeStat[] = [\n  { value: \"240\", suffix: \"+\", label: \"Launches\" },\n  { value: \"12\", label: \"Years\" },\n  { value: \"38\", label: \"Awards\" },\n];\nconst defaultKeywords = [\"Brand identity\", \"Web design\", \"Product\", \"Motion\", \"Art direction\", \"Packaging\"];\nconst defaultSecondary = [\"Strategy\", \"Naming\", \"Type design\", \"Campaigns\", \"Editorial\", \"Design systems\"];\nconst defaultPrimaryCta: HeroTypeAction = { label: \"Start a project\", href: \"#\" };\nconst defaultSecondaryCta: HeroTypeAction = { label: \"See selected work\", href: \"#\" };\n\nfunction delay(ms: number) {\n  return { \"--hb-hrt-i\": `${ms}ms` } as React.CSSProperties;\n}\n\nfunction Spark() {\n  return (\n    <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n      <path d=\"M12 0l2.4 7.6L22 4.6 17.2 11 24 12l-6.8 1 4.8 6.4-7.6-3L12 24l-2.4-7.6L2 19.4 6.8 13 0 12l6.8-1L2 4.6l7.6 3z\" />\n    </svg>\n  );\n}\n\nfunction Row({ items, dir, speed }: { items: string[]; dir: \"left\" | \"right\"; speed: string }) {\n  const loop = [...items, ...items];\n  return (\n    <div className=\"hb-hrt-row\" data-dir={dir} aria-hidden=\"true\">\n      <div className=\"hb-hrt-track\" style={{ \"--hb-hrt-speed\": speed } as React.CSSProperties}>\n        {loop.map((item, i) => (\n          <span key={i} className=\"hb-hrt-kw\">\n            {item}\n            <Spark />\n          </span>\n        ))}\n      </div>\n    </div>\n  );\n}\n\nexport function HeroType({\n  title = \"Brands that\",\n  words = defaultWords,\n  subtitle = \"An independent studio building identities, websites and products for companies with something to say. Lisbon and New York, since 2014.\",\n  primaryCta = defaultPrimaryCta,\n  secondaryCta = defaultSecondaryCta,\n  meta = defaultMeta,\n  stats = defaultStats,\n  keywords = defaultKeywords,\n  secondaryKeywords = defaultSecondary,\n  interval = 2400,\n  accent = \"#ff4a1c\",\n  headingAs = \"h1\",\n  className = \"\",\n  style,\n  ...rest\n}: HeroTypeProps) {\n  const Heading = headingAs;\n  const [active, setActive] = React.useState(0);\n  const count = words.length;\n  const vars = { \"--hb-hrt-accent\": accent, ...style } as React.CSSProperties;\n\n  React.useEffect(() => {\n    if (count < 2) return;\n    const id = setInterval(() => setActive((i) => (i + 1) % count), Math.max(800, interval));\n    return () => clearInterval(id);\n  }, [count, interval]);\n\n  const current = count ? active % count : 0;\n  const previous = count ? (current - 1 + count) % count : 0;\n  const tail = secondaryKeywords.length ? secondaryKeywords : keywords;\n\n  return (\n    <section className={`hb-hrt ${className}`} style={vars} {...rest}>\n      <style href=\"hb-hero-type\" precedence=\"default\">{css}</style>\n      {meta.length > 0 ? (\n        <ul className=\"hb-hrt-top hb-hrt-pad hb-hrt-in\">\n          {meta.map((item) => (\n            <li key={item}>{item}</li>\n          ))}\n        </ul>\n      ) : null}\n      <Heading className=\"hb-hrt-title hb-hrt-pad\">\n        <span className=\"hb-hrt-sr\">{`${title} ${words.join(\" \")}`}</span>\n        <span aria-hidden=\"true\">\n          {title}{\" \"}\n          {count > 0 ? (\n            <span className=\"hb-hrt-rot\">\n              {words.map((word, i) => (\n                <span key={i} className=\"hb-hrt-w\" data-state={i === current ? \"on\" : i === previous && count > 1 ? \"off\" : \"next\"}>\n                  {word}\n                </span>\n              ))}\n            </span>\n          ) : null}\n        </span>\n      </Heading>\n      <div className=\"hb-hrt-mid hb-hrt-pad\">\n        <div className=\"hb-hrt-in\" style={delay(250)}>\n          {subtitle ? <p className=\"hb-hrt-sub\">{subtitle}</p> : null}\n          {primaryCta || secondaryCta ? (\n            <div className=\"hb-hrt-actions\">\n              {primaryCta ? (\n                <a className=\"hb-hrt-btn\" href={primaryCta.href}>\n                  {primaryCta.label}\n                  <span aria-hidden=\"true\">\n                    <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n                      <path d=\"M5 12h14M13 6l6 6-6 6\" />\n                    </svg>\n                  </span>\n                </a>\n              ) : null}\n              {secondaryCta ? (\n                <a className=\"hb-hrt-link\" href={secondaryCta.href}>\n                  {secondaryCta.label}\n                </a>\n              ) : null}\n            </div>\n          ) : null}\n        </div>\n        {stats.length > 0 ? (\n          <ul className=\"hb-hrt-stats hb-hrt-in\" style={delay(380)}>\n            {stats.map((stat) => (\n              <li key={stat.label} className=\"hb-hrt-stat\">\n                <span className=\"hb-hrt-num\">\n                  {stat.value}\n                  {stat.suffix ? <sup>{stat.suffix}</sup> : null}\n                </span>\n                <span className=\"hb-hrt-stat-label\">{stat.label}</span>\n              </li>\n            ))}\n          </ul>\n        ) : null}\n      </div>\n      {keywords.length > 0 ? (\n        <div className=\"hb-hrt-marq\">\n          <Row items={keywords} dir=\"left\" speed=\"40s\" />\n          <Row items={tail} dir=\"right\" speed=\"46s\" />\n        </div>\n      ) : null}\n    </section>\n  );\n}\n"
    }
  ]
}