{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "proof-case-studies",
  "type": "registry:component",
  "title": "Case Study Cards",
  "description": "Three case study cards with a wordmark, an industry tag and one big result that counts up on scroll. Hovering a card lifts the number and slides the customer quote up from below.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "social-proof",
    "case studies",
    "metrics",
    "count up",
    "testimonials",
    "hover",
    "cards"
  ],
  "docs": "https://hyperblur.dev/effects/proof-case-studies",
  "files": [
    {
      "path": "registry/hyperblur/proof-case-studies.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/proof-case-studies.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface ProofCaseStudy {\n  company: string;\n  industry: string;\n  value: number;\n  decimals?: number;\n  prefix?: string;\n  suffix?: string;\n  metricLabel: string;\n  quote: string;\n  author: string;\n  role: string;\n  href?: string;\n  mark?: \"ring\" | \"bolt\" | \"wave\" | \"grid\" | \"leaf\" | \"spark\";\n}\n\nexport interface ProofCaseStudiesProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  studies?: ProofCaseStudy[];\n  cta?: { label: string; href: string };\n  defaultActive?: number;\n  accent?: string;\n  onStudyClick?: (study: ProofCaseStudy, index: number) => void;\n}\n\nconst defaultStudies: ProofCaseStudy[] = [\n  {\n    company: \"Halvard\",\n    industry: \"Logistics\",\n    value: 3.4,\n    decimals: 1,\n    suffix: \"x\",\n    metricLabel: \"faster dispatch planning\",\n    quote: \"We replaced four spreadsheets and a nightly script. Planners now finish the morning route in twenty minutes instead of an hour.\",\n    author: \"Ines Duarte\",\n    role: \"VP Operations\",\n    href: \"#\",\n    mark: \"wave\",\n  },\n  {\n    company: \"Lumen Bank\",\n    industry: \"Fintech\",\n    value: 41,\n    suffix: \"%\",\n    metricLabel: \"fewer support tickets\",\n    quote: \"Customers find answers before they ever reach us. The drop in tickets paid for the rollout in the first quarter.\",\n    author: \"Daniel Okafor\",\n    role: \"Head of Customer Experience\",\n    href: \"#\",\n    mark: \"ring\",\n  },\n  {\n    company: \"Northpeak\",\n    industry: \"Retail\",\n    value: 2.8,\n    decimals: 1,\n    prefix: \"$\",\n    suffix: \"M\",\n    metricLabel: \"added annual revenue\",\n    quote: \"Checkout went from five steps to two. Conversion on mobile climbed every single week after launch.\",\n    author: \"Sofia Brandt\",\n    role: \"Director of Ecommerce\",\n    href: \"#\",\n    mark: \"bolt\",\n  },\n];\n\nconst css = `\n.hb-yj3 {\n  --hb-yj3-accent: #a78bfa;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  overflow: hidden;\n  isolation: isolate;\n  container-type: inline-size;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-yj3 *, .hb-yj3 *::before, .hb-yj3 *::after { box-sizing: border-box; }\n.hb-yj3::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n  background:\n    radial-gradient(60% 40% at 50% 0%, color-mix(in srgb, var(--hb-yj3-accent) 12%, transparent), transparent 70%),\n    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 100% 64px;\n  -webkit-mask: linear-gradient(180deg, #000, transparent 85%);\n  mask: linear-gradient(180deg, #000, transparent 85%);\n  pointer-events: none;\n}\n.hb-yj3-inner { max-width: 1120px; margin: 0 auto; padding: 72px 20px; }\n@container (min-width: 760px) { .hb-yj3-inner { padding: 100px 32px; } }\n.hb-yj3-head {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: flex-end;\n  justify-content: space-between;\n  gap: 20px 40px;\n  margin-bottom: 44px;\n}\n.hb-yj3-eyebrow {\n  margin: 0 0 14px;\n  color: var(--hb-yj3-accent);\n  font: 500 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;\n  letter-spacing: .14em;\n  text-transform: uppercase;\n}\n.hb-yj3-title {\n  margin: 0;\n  max-width: 560px;\n  font-size: clamp(30px, 4.6cqw, 46px);\n  line-height: 1.06;\n  letter-spacing: -.03em;\n  font-weight: 650;\n  text-wrap: balance;\n}\n.hb-yj3-sub { margin: 14px 0 0; max-width: 520px; color: #8f8f8f; font-size: 16px; line-height: 1.6; }\n.hb-yj3-link {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  color: #ededed;\n  font-size: 14px;\n  font-weight: 500;\n  text-decoration: none;\n  border-bottom: 1px solid rgba(255, 255, 255, .2);\n  padding-bottom: 4px;\n  transition: border-color .2s ease, gap .2s ease;\n}\n.hb-yj3-link:hover { border-color: var(--hb-yj3-accent); gap: 12px; }\n.hb-yj3-grid { display: grid; gap: 16px; }\n@container (min-width: 620px) { .hb-yj3-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n@container (min-width: 900px) { .hb-yj3-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }\n.hb-yj3-card {\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  min-height: 380px;\n  padding: 26px;\n  overflow: hidden;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 20px;\n  background:\n    radial-gradient(120% 70% at 100% 0%, color-mix(in srgb, var(--hb-yj3-accent) 9%, transparent), transparent 60%),\n    linear-gradient(180deg, #141414, #0e0e0e);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);\n  color: inherit;\n  text-decoration: none;\n  cursor: pointer;\n  transition: border-color .3s ease, transform .4s cubic-bezier(.2, .8, .2, 1);\n}\n.hb-yj3-card:focus-visible { outline: 2px solid var(--hb-yj3-accent); outline-offset: 3px; }\n.hb-yj3-on { border-color: color-mix(in srgb, var(--hb-yj3-accent) 40%, rgba(255, 255, 255, .08)); transform: translateY(-4px); }\n.hb-yj3-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }\n.hb-yj3-word {\n  display: inline-flex;\n  align-items: center;\n  gap: 9px;\n  font-size: 19px;\n  font-weight: 700;\n  letter-spacing: -.03em;\n}\n.hb-yj3-word svg { width: 22px; height: 22px; color: var(--hb-yj3-accent); }\n.hb-yj3-tag {\n  padding: 5px 10px;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 999px;\n  color: #8f8f8f;\n  font-size: 12px;\n}\n.hb-yj3-metric {\n  margin: auto 0 0;\n  padding-top: 48px;\n  font-size: clamp(56px, 8cqw, 84px);\n  line-height: .95;\n  letter-spacing: -.05em;\n  font-weight: 600;\n  font-variant-numeric: tabular-nums;\n  background: linear-gradient(180deg, #fff 30%, #8f8f8f);\n  -webkit-background-clip: text;\n  background-clip: text;\n  color: transparent;\n  transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s ease;\n  transform-origin: left bottom;\n}\n.hb-yj3-label { margin: 10px 0 0; color: #a1a1a1; font-size: 15px; transition: opacity .3s ease; }\n.hb-yj3-on .hb-yj3-metric { transform: translateY(-150px) scale(.62); }\n.hb-yj3-on .hb-yj3-label { opacity: 0; }\n.hb-yj3-quote {\n  position: absolute;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  padding: 22px 26px 24px;\n  border-top: 1px solid rgba(255, 255, 255, .08);\n  background: linear-gradient(180deg, rgba(20, 20, 20, .92), #101010);\n  backdrop-filter: blur(8px);\n  transform: translateY(101%);\n  transition: transform .5s cubic-bezier(.2, .8, .2, 1);\n}\n.hb-yj3-on .hb-yj3-quote { transform: translateY(0); }\n.hb-yj3-quote blockquote {\n  margin: 0;\n  color: #ededed;\n  font-size: 15px;\n  line-height: 1.55;\n}\n.hb-yj3-quote blockquote::before { content: \"\\\\201C\"; color: var(--hb-yj3-accent); margin-right: 2px; }\n.hb-yj3-who { display: flex; align-items: center; gap: 10px; margin-top: 16px; }\n.hb-yj3-av {\n  display: grid;\n  place-items: center;\n  width: 34px;\n  height: 34px;\n  border-radius: 50%;\n  background: linear-gradient(135deg, var(--hb-yj3-accent), color-mix(in srgb, var(--hb-yj3-accent) 30%, #111));\n  color: #0a0a0a;\n  font-size: 12px;\n  font-weight: 700;\n}\n.hb-yj3-who strong { display: block; font-size: 13px; font-weight: 600; }\n.hb-yj3-who span { color: #8f8f8f; font-size: 12px; }\n.hb-yj3-read {\n  margin-left: auto;\n  display: grid;\n  place-items: center;\n  width: 32px;\n  height: 32px;\n  border-radius: 50%;\n  border: 1px solid rgba(255, 255, 255, .12);\n  color: #ededed;\n}\n.hb-yj3-dots { display: flex; gap: 6px; margin-top: 14px; }\n.hb-yj3-dots i { width: 18px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .1); transition: background .3s ease; }\n.hb-yj3-on .hb-yj3-dots i:first-child { background: var(--hb-yj3-accent); }\n@media (prefers-reduced-motion: reduce) {\n  .hb-yj3 *, .hb-yj3 *::before, .hb-yj3 *::after { animation: none !important; transition: none !important; }\n}\n`;\n\nfunction Mark({ kind }: { kind: NonNullable<ProofCaseStudy[\"mark\"]> }) {\n  const common = { fill: \"none\", stroke: \"currentColor\", strokeWidth: 2, strokeLinecap: \"round\" as const, strokeLinejoin: \"round\" as const };\n  return (\n    <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n      {kind === \"ring\" ? <><circle cx=\"12\" cy=\"12\" r=\"8\" {...common} /><circle cx=\"12\" cy=\"12\" r=\"3\" fill=\"currentColor\" /></> : null}\n      {kind === \"bolt\" ? <path d=\"M13 3 5 13h6l-1 8 8-10h-6l1-8Z\" {...common} /> : null}\n      {kind === \"wave\" ? <path d=\"M3 9c3-3 6 3 9 0s6 3 9 0M3 15c3-3 6 3 9 0s6 3 9 0\" {...common} /> : null}\n      {kind === \"grid\" ? <path d=\"M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z\" {...common} /> : null}\n      {kind === \"leaf\" ? <path d=\"M5 19C5 10 10 5 20 4c-1 10-6 15-15 15Zm0 0 7-7\" {...common} /> : null}\n      {kind === \"spark\" ? <path d=\"M12 3v6m0 6v6M3 12h6m6 0h6M6 6l3 3m6 6 3 3M18 6l-3 3m-6 6-3 3\" {...common} /> : null}\n    </svg>\n  );\n}\n\nfunction initials(name: string) {\n  return name\n    .split(\" \")\n    .map((p) => p[0])\n    .join(\"\")\n    .slice(0, 2)\n    .toUpperCase();\n}\n\nexport function ProofCaseStudies({\n  eyebrow = \"Case studies\",\n  title = \"Teams that switched, and the numbers that followed\",\n  subtitle = \"Real results from operations, support and growth teams after their first ninety days.\",\n  studies = defaultStudies,\n  cta = { label: \"Read all customer stories\", href: \"#\" },\n  defaultActive = 1,\n  accent = \"#a78bfa\",\n  onStudyClick,\n  className,\n  style,\n  ...rest\n}: ProofCaseStudiesProps) {\n  const [active, setActive] = React.useState<number>(defaultActive);\n  const [progress, setProgress] = React.useState(0);\n  const rootRef = React.useRef<HTMLElement>(null);\n\n  React.useEffect(() => {\n    const el = rootRef.current;\n    if (!el) return;\n    const reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n    let raf = 0;\n    const run = () => {\n      if (reduce) {\n        setProgress(1);\n        return;\n      }\n      const t0 = performance.now();\n      const tick = (t: number) => {\n        const p = Math.min(1, (t - t0) / 1400);\n        setProgress(1 - Math.pow(1 - p, 3));\n        if (p < 1) raf = requestAnimationFrame(tick);\n      };\n      raf = requestAnimationFrame(tick);\n    };\n    const io = new IntersectionObserver(\n      (entries) => {\n        if (entries.some((e) => e.isIntersecting)) {\n          io.disconnect();\n          run();\n        }\n      },\n      { threshold: 0.2 },\n    );\n    io.observe(el);\n    return () => {\n      io.disconnect();\n      cancelAnimationFrame(raf);\n    };\n  }, []);\n\n  return (\n    <section\n      ref={rootRef}\n      className={[\"hb-yj3\", className].filter(Boolean).join(\" \")}\n      style={{ \"--hb-yj3-accent\": accent, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-proof-case-studies\" precedence=\"default\">{css}</style>\n      <div className=\"hb-yj3-inner\">\n        <div className=\"hb-yj3-head\">\n          <div>\n            {eyebrow ? <p className=\"hb-yj3-eyebrow\">{eyebrow}</p> : null}\n            <h2 className=\"hb-yj3-title\">{title}</h2>\n            {subtitle ? <p className=\"hb-yj3-sub\">{subtitle}</p> : null}\n          </div>\n          {cta ? (\n            <a className=\"hb-yj3-link\" href={cta.href}>\n              {cta.label}\n              <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n                <path d=\"M3 8h10m-4-4 4 4-4 4\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n              </svg>\n            </a>\n          ) : null}\n        </div>\n        <div className=\"hb-yj3-grid\" onPointerLeave={() => setActive(defaultActive)}>\n          {studies.map((s, i) => {\n            const on = active === i;\n            const shown = (s.value * progress).toFixed(s.decimals ?? 0);\n            return (\n              <a\n                key={s.company + i}\n                className={on ? \"hb-yj3-card hb-yj3-on\" : \"hb-yj3-card\"}\n                href={s.href ?? \"#\"}\n                onPointerEnter={() => setActive(i)}\n                onFocus={() => setActive(i)}\n                onClick={() => onStudyClick?.(s, i)}\n                aria-label={`${s.company}: ${s.prefix ?? \"\"}${s.value}${s.suffix ?? \"\"} ${s.metricLabel}. Read the case study.`}\n              >\n                <div className=\"hb-yj3-top\">\n                  <span className=\"hb-yj3-word\">\n                    <Mark kind={s.mark ?? \"ring\"} />\n                    {s.company}\n                  </span>\n                  <span className=\"hb-yj3-tag\">{s.industry}</span>\n                </div>\n                <p className=\"hb-yj3-metric\" aria-hidden=\"true\">\n                  {s.prefix}\n                  {shown}\n                  {s.suffix}\n                </p>\n                <p className=\"hb-yj3-label\">{s.metricLabel}</p>\n                <div className=\"hb-yj3-dots\" aria-hidden=\"true\">\n                  <i />\n                  <i />\n                  <i />\n                </div>\n                <div className=\"hb-yj3-quote\">\n                  <blockquote>{s.quote}</blockquote>\n                  <div className=\"hb-yj3-who\">\n                    <span className=\"hb-yj3-av\">{initials(s.author)}</span>\n                    <div>\n                      <strong>{s.author}</strong>\n                      <span>\n                        {s.role}, {s.company}\n                      </span>\n                    </div>\n                    <span className=\"hb-yj3-read\" aria-hidden=\"true\">\n                      <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\">\n                        <path d=\"M5 11 11 5M6 5h5v5\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                      </svg>\n                    </span>\n                  </div>\n                </div>\n              </a>\n            );\n          })}\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}