{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "proof-metrics-quotes",
  "type": "registry:component",
  "title": "Proof Metrics Quotes",
  "description": "Three result cards, each with a big number that counts up when the section scrolls into view, a growing bar, a short quote and the customer behind it.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "social-proof",
    "metrics",
    "results",
    "case study",
    "count up",
    "testimonials",
    "section"
  ],
  "docs": "https://hyperblur.dev/effects/proof-metrics-quotes",
  "files": [
    {
      "path": "registry/hyperblur/proof-metrics-quotes.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/proof-metrics-quotes.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface MetricQuote {\n  value: number;\n  prefix?: string;\n  suffix?: string;\n  decimals?: number;\n  label: string;\n  quote: string;\n  name: string;\n  role: string;\n  company: string;\n}\n\nexport interface MetricsQuotesLink {\n  label: string;\n  href: string;\n}\n\nexport interface ProofMetricsQuotesProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  items?: MetricQuote[];\n  cta?: MetricsQuotesLink | null;\n  accent?: string;\n  duration?: number;\n}\n\nconst css = `\n.hb-kd4 {\n  --hb-kd4-accent: #10b981;\n  box-sizing: border-box;\n  container-type: inline-size;\n  position: relative;\n  width: 100%;\n  overflow: hidden;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-kd4 *, .hb-kd4 *::before, .hb-kd4 *::after { box-sizing: border-box; }\n.hb-kd4::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  background-image:\n    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),\n    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);\n  background-size: 56px 56px;\n  -webkit-mask-image: radial-gradient(70% 60% at 50% 0%, #000, transparent 75%);\n  mask-image: radial-gradient(70% 60% at 50% 0%, #000, transparent 75%);\n  pointer-events: none;\n}\n.hb-kd4-in {\n  position: relative;\n  max-width: 1120px;\n  margin: 0 auto;\n  padding: 96px 24px 104px;\n}\n.hb-kd4-head {\n  display: flex;\n  align-items: flex-end;\n  justify-content: space-between;\n  gap: 32px;\n  margin-bottom: 48px;\n}\n.hb-kd4-eyebrow {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  margin: 0;\n  color: var(--hb-kd4-accent);\n  font-size: 13px;\n  font-weight: 600;\n}\n.hb-kd4-eyebrow i {\n  width: 6px;\n  height: 6px;\n  border-radius: 50%;\n  background: var(--hb-kd4-accent);\n  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hb-kd4-accent) 20%, transparent);\n}\n.hb-kd4-title {\n  margin: 14px 0 0;\n  max-width: 620px;\n  font-size: clamp(28px, 4.4cqi, 44px);\n  font-weight: 600;\n  line-height: 1.08;\n  letter-spacing: -.03em;\n  text-wrap: balance;\n}\n.hb-kd4-sub { margin: 14px 0 0; max-width: 520px; color: #8f8f8f; font-size: 16px; line-height: 1.6; }\n.hb-kd4-link {\n  display: inline-flex;\n  flex: none;\n  align-items: center;\n  gap: 8px;\n  min-height: 40px;\n  padding: 0 18px;\n  border: 1px solid rgba(255, 255, 255, .12);\n  border-radius: 999px;\n  background: rgba(255, 255, 255, .04);\n  color: #ededed;\n  font-size: 14px;\n  font-weight: 500;\n  text-decoration: none;\n  transition: border-color .25s ease, background-color .25s ease;\n}\n.hb-kd4-link:hover { border-color: color-mix(in srgb, var(--hb-kd4-accent) 55%, transparent); background: color-mix(in srgb, var(--hb-kd4-accent) 10%, transparent); }\n.hb-kd4-link:focus-visible { outline: 2px solid var(--hb-kd4-accent); outline-offset: 3px; }\n.hb-kd4-link svg { width: 14px; height: 14px; transition: transform .25s ease; }\n.hb-kd4-link:hover svg { transform: translate3d(3px, 0, 0); }\n.hb-kd4-grid {\n  display: grid;\n  grid-template-columns: repeat(3, minmax(0, 1fr));\n  gap: 16px;\n  margin: 0;\n  padding: 0;\n  list-style: none;\n}\n.hb-kd4-card {\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  min-width: 0;\n  height: 100%;\n  padding: 28px;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 22px;\n  background: linear-gradient(180deg, #131313 0%, #0d0d0d 100%);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);\n  overflow: hidden;\n  transition: border-color .3s ease, transform .45s cubic-bezier(.2, .8, .2, 1);\n}\n.hb-kd4-card::before {\n  content: \"\";\n  position: absolute;\n  top: 0;\n  left: 28px;\n  right: 28px;\n  height: 1px;\n  background: linear-gradient(90deg, transparent, var(--hb-kd4-accent), transparent);\n  opacity: .7;\n}\n.hb-kd4-card::after {\n  content: \"\";\n  position: absolute;\n  inset: -40% -20% auto;\n  height: 70%;\n  background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--hb-kd4-accent) 13%, transparent), transparent 70%);\n  pointer-events: none;\n}\n.hb-kd4-card:hover { border-color: color-mix(in srgb, var(--hb-kd4-accent) 35%, rgba(255, 255, 255, .08)); transform: translate3d(0, -3px, 0); }\n.hb-kd4-num {\n  position: relative;\n  display: flex;\n  align-items: baseline;\n  margin: 0;\n  font-size: clamp(44px, 6.4cqi, 68px);\n  font-weight: 600;\n  line-height: 1;\n  letter-spacing: -.045em;\n  font-variant-numeric: tabular-nums;\n  background: linear-gradient(180deg, #ffffff 30%, color-mix(in srgb, var(--hb-kd4-accent) 40%, #9a9a9a));\n  -webkit-background-clip: text;\n  background-clip: text;\n  color: transparent;\n}\n.hb-kd4-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip: rect(0 0 0 0);\n  white-space: nowrap;\n  border: 0;\n}\n.hb-kd4-affix { font-size: .62em; letter-spacing: -.02em; }\n.hb-kd4-label { position: relative; margin: 12px 0 0; color: #bdbdbd; font-size: 15px; font-weight: 500; }\n.hb-kd4-bar {\n  position: relative;\n  height: 3px;\n  margin: 24px 0 24px;\n  border-radius: 3px;\n  background: rgba(255, 255, 255, .06);\n  overflow: hidden;\n}\n.hb-kd4-bar span {\n  position: absolute;\n  inset: 0;\n  border-radius: inherit;\n  background: linear-gradient(90deg, color-mix(in srgb, var(--hb-kd4-accent) 30%, transparent), var(--hb-kd4-accent));\n  transform-origin: left center;\n  transform: scaleX(var(--hb-kd4-w, 1));\n  transition: transform var(--hb-kd4-dur, 1.8s) cubic-bezier(.16, 1, .3, 1);\n}\n.hb-kd4[data-armed=\"true\"]:not([data-inview=\"true\"]) .hb-kd4-bar span { transform: scaleX(0); transition: none; }\n.hb-kd4-quote {\n  position: relative;\n  flex: 1;\n  margin: 0;\n  color: #d4d4d4;\n  font-size: 15px;\n  line-height: 1.6;\n  text-wrap: pretty;\n}\n.hb-kd4-who {\n  position: relative;\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  margin-top: 24px;\n}\n.hb-kd4-av {\n  display: grid;\n  flex: none;\n  place-items: center;\n  width: 38px;\n  height: 38px;\n  border-radius: 12px;\n  color: #fff;\n  font-size: 13px;\n  font-weight: 600;\n  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);\n}\n.hb-kd4-name { display: block; font-size: 14px; font-weight: 600; font-style: normal; color: #ededed; }\n.hb-kd4-role { display: block; margin-top: 2px; font-size: 12.5px; color: #8f8f8f; }\n.hb-kd4-co {\n  margin-left: auto;\n  padding: 4px 9px;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 999px;\n  color: #a1a1a1;\n  font-size: 11.5px;\n  font-weight: 600;\n  letter-spacing: .04em;\n  text-transform: uppercase;\n  white-space: nowrap;\n}\n.hb-kd4[data-armed=\"true\"] .hb-kd4-card { opacity: 0; transform: translate3d(0, 18px, 0); }\n.hb-kd4[data-armed=\"true\"][data-inview=\"true\"] .hb-kd4-card {\n  opacity: 1;\n  transform: none;\n  transition: opacity .7s ease, transform .9s cubic-bezier(.16, 1, .3, 1), border-color .3s ease;\n  transition-delay: var(--hb-kd4-delay, 0s), var(--hb-kd4-delay, 0s), 0s;\n}\n.hb-kd4[data-armed=\"true\"][data-inview=\"true\"] .hb-kd4-card:hover { transform: translate3d(0, -3px, 0); transition-delay: 0s; }\n@container (max-width: 880px) {\n  .hb-kd4-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }\n  .hb-kd4-card { padding: 24px; }\n  .hb-kd4-num { font-size: clamp(44px, 12cqi, 60px); }\n}\n@container (max-width: 640px) {\n  .hb-kd4-in { padding: 64px 16px 72px; }\n  .hb-kd4-head { flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 32px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-kd4-card, .hb-kd4-bar span, .hb-kd4-link, .hb-kd4-link svg { transition: none !important; }\n  .hb-kd4-card:hover { transform: none; }\n}\n`;\n\nconst defaultItems: MetricQuote[] = [\n  {\n    value: 3.2,\n    suffix: \"x\",\n    decimals: 1,\n    label: \"faster deploys to production\",\n    quote: \"We went from a nervous Thursday release to shipping a dozen times a day. Our on-call rotation finally sleeps through the night.\",\n    name: \"Rachel Nguyen\",\n    role: \"Director of Platform\",\n    company: \"Fernhill\",\n  },\n  {\n    value: -41,\n    suffix: \"%\",\n    label: \"churn in the first 90 days\",\n    quote: \"Onboarding emails triggered from real product usage did more for retention than two years of discount campaigns.\",\n    name: \"Jonas Lindqvist\",\n    role: \"Head of Growth\",\n    company: \"Tidewell\",\n  },\n  {\n    value: 1.8,\n    prefix: \"$\",\n    suffix: \"M\",\n    decimals: 1,\n    label: \"saved on infrastructure in year one\",\n    quote: \"Consolidating four vendors onto one bill paid for the rollout in the first quarter. Finance now forwards our dashboard around.\",\n    name: \"Imani Brooks\",\n    role: \"VP Operations\",\n    company: \"Meridian\",\n  },\n];\n\nconst tones = [\n  \"linear-gradient(135deg, #10b981, #0ea5e9)\",\n  \"linear-gradient(135deg, #f59e0b, #ef4444)\",\n  \"linear-gradient(135deg, #8b5cf6, #2f7bff)\",\n  \"linear-gradient(135deg, #ec4899, #f59e0b)\",\n];\n\nfunction initialsOf(name: string) {\n  return name\n    .split(/\\s+/)\n    .filter(Boolean)\n    .slice(0, 2)\n    .map((part) => part[0]?.toUpperCase() ?? \"\")\n    .join(\"\");\n}\n\nfunction formatValue(value: number, decimals: number) {\n  const sign = value < 0 ? \"−\" : \"\";\n  return sign + Math.abs(value).toFixed(decimals);\n}\n\nexport function ProofMetricsQuotes({\n  eyebrow = \"Customer results\",\n  title = \"The numbers our customers bring to their board meetings\",\n  subtitle = \"Measured by the teams themselves, twelve months after switching to Relay.\",\n  items = defaultItems,\n  cta = { label: \"Read the case studies\", href: \"#case-studies\" },\n  accent = \"#10b981\",\n  duration = 1.8,\n  className = \"\",\n  style,\n  ...rest\n}: ProofMetricsQuotesProps) {\n  const uid = React.useId();\n  const rootRef = React.useRef<HTMLElement>(null);\n  const signature = items.map((item) => `${item.value}:${item.decimals ?? 0}`).join(\"|\");\n\n  React.useEffect(() => {\n    const root = rootRef.current;\n    if (!root) return;\n    if (typeof window === \"undefined\" || window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches) return;\n    if (typeof IntersectionObserver === \"undefined\") return;\n    const nodes = Array.from(root.querySelectorAll<HTMLElement>(\"[data-hb-kd4-to]\"));\n    nodes.forEach((node) => {\n      node.textContent = formatValue(0, Number(node.dataset.hbKd4Dec ?? 0));\n    });\n    root.dataset.armed = \"true\";\n    let frame = 0;\n    const ms = Math.max(300, duration * 1000);\n    const run = () => {\n      const start = performance.now();\n      const tick = (now: number) => {\n        const t = Math.min(1, (now - start) / ms);\n        const eased = 1 - Math.pow(1 - t, 4);\n        nodes.forEach((node) => {\n          const to = Number(node.dataset.hbKd4To ?? 0);\n          const dec = Number(node.dataset.hbKd4Dec ?? 0);\n          node.textContent = formatValue(t >= 1 ? to : to * eased, dec);\n        });\n        if (t < 1) frame = requestAnimationFrame(tick);\n      };\n      frame = requestAnimationFrame(tick);\n    };\n    const io = new IntersectionObserver(\n      (entries) => {\n        if (entries.some((entry) => entry.isIntersecting)) {\n          root.dataset.inview = \"true\";\n          io.disconnect();\n          run();\n        }\n      },\n      { threshold: 0.15 },\n    );\n    io.observe(root);\n    return () => {\n      io.disconnect();\n      cancelAnimationFrame(frame);\n      nodes.forEach((node) => {\n        node.textContent = formatValue(Number(node.dataset.hbKd4To ?? 0), Number(node.dataset.hbKd4Dec ?? 0));\n      });\n      delete root.dataset.armed;\n      delete root.dataset.inview;\n    };\n  }, [signature, duration]);\n\n  const maxAbs = Math.max(1, ...items.map((item) => Math.abs(item.value)));\n  const vars = { \"--hb-kd4-accent\": accent, \"--hb-kd4-dur\": `${Math.max(0.3, duration).toFixed(2)}s`, ...style } as React.CSSProperties;\n\n  return (\n    <section ref={rootRef} className={`hb-kd4 ${className}`} style={vars} aria-labelledby={`${uid}-t`} {...rest}>\n      <style href=\"hb-proof-metrics-quotes\" precedence=\"default\">{css}</style>\n      <div className=\"hb-kd4-in\">\n        <header className=\"hb-kd4-head\">\n          <div>\n            {eyebrow && (\n              <p className=\"hb-kd4-eyebrow\">\n                <i aria-hidden=\"true\" />\n                {eyebrow}\n              </p>\n            )}\n            <h2 id={`${uid}-t`} className=\"hb-kd4-title\">{title}</h2>\n            {subtitle && <p className=\"hb-kd4-sub\">{subtitle}</p>}\n          </div>\n          {cta && (\n            <a className=\"hb-kd4-link\" href={cta.href}>\n              {cta.label}\n              <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                <path d=\"M3 8h10M9 4l4 4-4 4\" />\n              </svg>\n            </a>\n          )}\n        </header>\n        <ul className=\"hb-kd4-grid\">\n          {items.map((item, i) => {\n            const decimals = item.decimals ?? 0;\n            const final = `${item.prefix ?? \"\"}${formatValue(item.value, decimals)}${item.suffix ?? \"\"}`;\n            const width = (0.45 + 0.55 * (Math.abs(item.value) / maxAbs)).toFixed(3);\n            return (\n              <li key={`${item.name}-${i}`}>\n                <figure\n                  className=\"hb-kd4-card\"\n                  style={{ \"--hb-kd4-delay\": `${(i * 0.12).toFixed(2)}s`, \"--hb-kd4-w\": width } as React.CSSProperties}\n                >\n                  <p className=\"hb-kd4-num\">\n                    <span className=\"hb-kd4-sr\">{final}</span>\n                    {item.prefix && <span className=\"hb-kd4-affix\" aria-hidden=\"true\">{item.prefix}</span>}\n                    <span key={`${item.value}-${decimals}`} aria-hidden=\"true\" data-hb-kd4-to={item.value} data-hb-kd4-dec={decimals}>\n                      {formatValue(item.value, decimals)}\n                    </span>\n                    {item.suffix && <span className=\"hb-kd4-affix\" aria-hidden=\"true\">{item.suffix}</span>}\n                  </p>\n                  <p className=\"hb-kd4-label\">{item.label}</p>\n                  <div className=\"hb-kd4-bar\" aria-hidden=\"true\">\n                    <span />\n                  </div>\n                  <blockquote className=\"hb-kd4-quote\">{item.quote}</blockquote>\n                  <figcaption className=\"hb-kd4-who\">\n                    <span className=\"hb-kd4-av\" style={{ background: tones[i % tones.length] }} aria-hidden=\"true\">\n                      {initialsOf(item.name)}\n                    </span>\n                    <span>\n                      <cite className=\"hb-kd4-name\">{item.name}</cite>\n                      <span className=\"hb-kd4-role\">{item.role}</span>\n                    </span>\n                    <span className=\"hb-kd4-co\">{item.company}</span>\n                  </figcaption>\n                </figure>\n              </li>\n            );\n          })}\n        </ul>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}