{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "about-growth-timeline",
  "type": "registry:component",
  "title": "About Growth Timeline",
  "description": "A company story told as milestones that reveal while scrolling, beside a sticky panel whose headcount chart draws up to the active year and whose number counts to match. Chart points and cards can also be clicked.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "about",
    "about",
    "timeline",
    "scroll",
    "chart",
    "sticky",
    "section"
  ],
  "docs": "https://hyperblur.dev/effects/about-growth-timeline",
  "files": [
    {
      "path": "registry/hyperblur/about-growth-timeline.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/about-growth-timeline.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface AboutGrowthMilestone {\n  year: string;\n  title: string;\n  text: string;\n  headcount: number;\n  tag: string;\n}\n\nexport interface AboutGrowthTimelineProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  milestones?: AboutGrowthMilestone[];\n  defaultActive?: number;\n  metricLabel?: string;\n  onMilestoneChange?: (index: number) => void;\n  accent?: string;\n}\n\nconst defaultMilestones: AboutGrowthMilestone[] = [\n  { year: \"2019\", title: \"Two people and a spare bedroom\", text: \"Lea and Marten ship the first sync engine for field crews. Twelve customers pay by bank transfer.\", headcount: 2, tag: \"Founded\" },\n  { year: \"2020\", title: \"Offline mode that actually works\", text: \"Crews in the Alps keep working with no signal. Revenue triples while everyone else is pausing hiring.\", headcount: 9, tag: \"Seed, 3.2M\" },\n  { year: \"2021\", title: \"First office in Ghent\", text: \"A converted textile mill with too many stairs. Support moves in-house and response time drops to 40 minutes.\", headcount: 24, tag: \"Office\" },\n  { year: \"2022\", title: \"Platform for partners\", text: \"The public API opens. Forty integrations arrive in six months, most built by customers themselves.\", headcount: 51, tag: \"Series A\" },\n  { year: \"2024\", title: \"Profitable, on purpose\", text: \"We slow hiring, fix the roadmap and break even in Q3 without cutting a single role.\", headcount: 78, tag: \"Break-even\" },\n  { year: \"2026\", title: \"Eleven countries, one calm team\", text: \"Over 3,400 companies schedule their crews with us. Still no open-plan office, still no weekend deploys.\", headcount: 112, tag: \"Today\" },\n];\n\nconst css = `\n@keyframes hb-wd4-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }\n.hb-wd4 {\n  --hb-wd4-accent: #8b5cf6;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  container-type: inline-size;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-wd4 *, .hb-wd4 *::before, .hb-wd4 *::after { box-sizing: border-box; }\n.hb-wd4-in { max-width: 1120px; margin: 0 auto; padding: 72px 20px 96px; display: grid; gap: 36px; }\n@container (min-width: 860px) { .hb-wd4-in { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; } }\n.hb-wd4-side { display: grid; gap: 22px; }\n@container (min-width: 860px) { .hb-wd4-side { position: sticky; top: 24px; } }\n.hb-wd4-eyebrow { font: 500 12px/1 var(--font-mono, monospace); letter-spacing: 0.08em; text-transform: uppercase; color: var(--hb-wd4-accent); }\n.hb-wd4-title { margin: 12px 0 10px; font: 600 clamp(30px, 4.4cqw, 46px)/1.04 var(--font-grotesk, inherit); letter-spacing: -0.03em; }\n.hb-wd4-sub { margin: 0; color: #8f8f8f; font-size: 15px; line-height: 1.6; max-width: 42ch; }\n.hb-wd4-panel { position: relative; border-radius: 20px; border: 1px solid rgba(255,255,255,0.08); background: linear-gradient(180deg, #131313, #0e0e0e); padding: 20px 20px 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); overflow: hidden; }\n.hb-wd4-panel::before { content: \"\"; position: absolute; inset: -40% -20% auto auto; width: 70%; height: 90%; background: radial-gradient(closest-side, color-mix(in srgb, var(--hb-wd4-accent) 22%, transparent), transparent); pointer-events: none; }\n.hb-wd4-readout { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }\n.hb-wd4-year { font: 600 clamp(44px, 7cqw, 68px)/0.9 var(--font-grotesk, inherit); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }\n.hb-wd4-count { text-align: right; }\n.hb-wd4-count b { display: block; font: 600 30px/1 var(--font-grotesk, inherit); font-variant-numeric: tabular-nums; color: var(--hb-wd4-accent); }\n.hb-wd4-count span { font: 500 11px/1 var(--font-mono, monospace); color: #8f8f8f; letter-spacing: 0.08em; text-transform: uppercase; }\n.hb-wd4-live { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font: 500 11px/1 var(--font-mono, monospace); color: #a1a1a1; }\n.hb-wd4-live::before { content: \"\"; width: 6px; height: 6px; border-radius: 50%; background: var(--hb-wd4-accent); animation: hb-wd4-blink 1.6s ease-in-out infinite; }\n.hb-wd4-chart { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; }\n.hb-wd4-clip { transition: width 0.9s cubic-bezier(0.65, 0, 0.35, 1); }\n.hb-wd4-node { transition: r 0.4s cubic-bezier(0.34, 1.5, 0.5, 1), fill 0.3s ease; cursor: pointer; }\n.hb-wd4-node:focus-visible { outline: none; stroke: #fff; stroke-width: 2; }\n.hb-wd4-axis { font: 500 10px var(--font-mono, monospace); fill: #5f5f5f; }\n.hb-wd4-axis[data-on=\"true\"] { fill: #ededed; }\n.hb-wd4-list { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 14px; }\n.hb-wd4-list::before { content: \"\"; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04)); }\n.hb-wd4-item { position: relative; padding-left: 48px; opacity: 0.38; transform: translateY(10px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }\n.hb-wd4-item[data-seen=\"true\"] { opacity: 0.62; transform: none; }\n.hb-wd4-item[data-active=\"true\"] { opacity: 1; }\n.hb-wd4-bullet { position: absolute; left: 8px; top: 22px; width: 15px; height: 15px; border-radius: 50%; background: #0a0a0a; border: 2px solid #3a3a3a; transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.5, 0.5, 1); }\n.hb-wd4-item[data-active=\"true\"] .hb-wd4-bullet { border-color: var(--hb-wd4-accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--hb-wd4-accent) 20%, transparent); transform: scale(1.1); }\n.hb-wd4-card { appearance: none; width: 100%; text-align: left; font-family: inherit; color: inherit; display: grid; gap: 8px; padding: 18px 20px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.06); background: #101010; cursor: pointer; transition: border-color 0.3s ease, background-color 0.3s ease; }\n.hb-wd4-card:hover { border-color: rgba(255,255,255,0.14); }\n.hb-wd4-item[data-active=\"true\"] .hb-wd4-card { border-color: color-mix(in srgb, var(--hb-wd4-accent) 45%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--hb-wd4-accent) 7%, #121212), #101010); }\n.hb-wd4-card:focus-visible { outline: 2px solid var(--hb-wd4-accent); outline-offset: 3px; }\n.hb-wd4-meta { display: flex; align-items: center; gap: 10px; }\n.hb-wd4-meta b { font: 600 13px/1 var(--font-mono, monospace); color: #a1a1a1; }\n.hb-wd4-tag { font: 500 11px/1 inherit; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,0.06); color: #cfcfcf; }\n.hb-wd4-item[data-active=\"true\"] .hb-wd4-tag { background: color-mix(in srgb, var(--hb-wd4-accent) 22%, transparent); color: #fff; }\n.hb-wd4-meta small { margin-left: auto; font: 500 11px/1 var(--font-mono, monospace); color: #6f6f6f; }\n.hb-wd4-h { display: block; font: 600 18px/1.25 var(--font-grotesk, inherit); letter-spacing: -0.015em; }\n.hb-wd4-p { display: block; font-size: 14px; line-height: 1.6; color: #9a9a9a; }\n@media (prefers-reduced-motion: reduce) {\n  .hb-wd4 *, .hb-wd4 *::before, .hb-wd4 *::after { animation: none !important; transition: none !important; }\n  .hb-wd4-item { transform: none; opacity: 1; }\n}\n`;\n\nfunction useTween(target: number) {\n  const [v, setV] = React.useState(target);\n  const from = React.useRef(target);\n  React.useEffect(() => {\n    if (window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches) {\n      from.current = target;\n      const id = requestAnimationFrame(() => setV(target));\n      return () => cancelAnimationFrame(id);\n    }\n    const start = performance.now();\n    const a = from.current;\n    let raf = 0;\n    const step = (t: number) => {\n      const k = Math.min(1, (t - start) / 900);\n      const e = 1 - Math.pow(1 - k, 3);\n      const cur = a + (target - a) * e;\n      from.current = cur;\n      setV(cur);\n      if (k < 1) raf = requestAnimationFrame(step);\n    };\n    raf = requestAnimationFrame(step);\n    return () => cancelAnimationFrame(raf);\n  }, [target]);\n  return Math.round(v);\n}\n\nexport function AboutGrowthTimeline({\n  eyebrow = \"Our story\",\n  title = \"Seven years, grown one careful hire at a time\",\n  subtitle = \"Scroll through the moments that shaped Fieldline. The chart follows along, so you can see the team grow with each chapter.\",\n  milestones = defaultMilestones,\n  defaultActive = 2,\n  metricLabel = \"people on the team\",\n  onMilestoneChange,\n  accent = \"#8b5cf6\",\n  className = \"\",\n  style,\n  ...rest\n}: AboutGrowthTimelineProps) {\n  const uid = React.useId().replace(/:/g, \"\");\n  const [active, setActive] = React.useState(Math.min(defaultActive, milestones.length - 1));\n  const [seen, setSeen] = React.useState<Set<number>>(() => new Set(Array.from({ length: Math.min(defaultActive, milestones.length - 1) + 1 }, (_, i) => i)));\n  const items = React.useRef<(HTMLLIElement | null)[]>([]);\n  const cb = React.useRef(onMilestoneChange);\n  React.useEffect(() => {\n    cb.current = onMilestoneChange;\n  });\n\n  React.useEffect(() => {\n    if (typeof IntersectionObserver === \"undefined\") return;\n    const io = new IntersectionObserver(\n      (entries) => {\n        for (const e of entries) {\n          if (!e.isIntersecting) continue;\n          const i = Number((e.target as HTMLElement).dataset.index);\n          setSeen((s) => (s.has(i) ? s : new Set(s).add(i)));\n          setActive((a) => {\n            if (a !== i) cb.current?.(i);\n            return i;\n          });\n        }\n      },\n      { rootMargin: \"-45% 0px -45% 0px\" },\n    );\n    items.current.forEach((el) => el && io.observe(el));\n    return () => io.disconnect();\n  }, [milestones.length]);\n\n  const select = (i: number) => {\n    setActive(i);\n    setSeen((s) => new Set(s).add(i));\n    onMilestoneChange?.(i);\n  };\n\n  const W = 480;\n  const H = 190;\n  const pad = 14;\n  const max = Math.max(...milestones.map((m) => m.headcount)) * 1.1;\n  const pts = milestones.map((m, i) => [pad + (i * (W - pad * 2)) / Math.max(1, milestones.length - 1), H - 22 - (m.headcount / max) * (H - 44)] as const);\n  let line = `M${pts[0][0].toFixed(1)} ${pts[0][1].toFixed(1)}`;\n  for (let i = 1; i < pts.length; i++) {\n    const [x0, y0] = pts[i - 1];\n    const [x1, y1] = pts[i];\n    const mx = ((x0 + x1) / 2).toFixed(1);\n    line += ` C${mx} ${y0.toFixed(1)} ${mx} ${y1.toFixed(1)} ${x1.toFixed(1)} ${y1.toFixed(1)}`;\n  }\n  const area = `${line} L${pts[pts.length - 1][0].toFixed(1)} ${H - 22} L${pts[0][0].toFixed(1)} ${H - 22}Z`;\n  const clipW = (pts[active][0] + 6).toFixed(1);\n  const count = useTween(milestones[active].headcount);\n\n  return (\n    <section className={`hb-wd4 ${className}`} style={{ \"--hb-wd4-accent\": accent, ...style } as React.CSSProperties} {...rest}>\n      <style href=\"hb-about-growth-timeline\" precedence=\"default\">{css}</style>\n      <div className=\"hb-wd4-in\">\n        <div className=\"hb-wd4-side\">\n          <div>\n            <div className=\"hb-wd4-eyebrow\">{eyebrow}</div>\n            <h2 className=\"hb-wd4-title\">{title}</h2>\n            <p className=\"hb-wd4-sub\">{subtitle}</p>\n          </div>\n          <div className=\"hb-wd4-panel\">\n            <div className=\"hb-wd4-readout\" aria-live=\"polite\">\n              <div>\n                <div className=\"hb-wd4-year\">{milestones[active].year}</div>\n                <span className=\"hb-wd4-live\">{milestones[active].tag}</span>\n              </div>\n              <div className=\"hb-wd4-count\">\n                <b>{count}</b>\n                <span>{metricLabel}</span>\n              </div>\n            </div>\n            <svg className=\"hb-wd4-chart\" viewBox={`0 0 ${W} ${H}`} role=\"group\" aria-label=\"Team growth by year\">\n              <defs>\n                <linearGradient id={`hb-wd4-fill-${uid}`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n                  <stop offset=\"0\" stopColor=\"var(--hb-wd4-accent)\" stopOpacity=\"0.45\" />\n                  <stop offset=\"1\" stopColor=\"var(--hb-wd4-accent)\" stopOpacity=\"0\" />\n                </linearGradient>\n                <clipPath id={`hb-wd4-clip-${uid}`}>\n                  <rect className=\"hb-wd4-clip\" x=\"0\" y=\"0\" height={H} style={{ width: `${clipW}px` }} />\n                </clipPath>\n              </defs>\n              {[0.25, 0.5, 0.75].map((g) => (\n                <line key={g} x1={pad} x2={W - pad} y1={(22 + g * (H - 44)).toFixed(1)} y2={(22 + g * (H - 44)).toFixed(1)} stroke=\"rgba(255,255,255,0.05)\" strokeDasharray=\"3 5\" />\n              ))}\n              <path d={line} fill=\"none\" stroke=\"rgba(255,255,255,0.1)\" strokeWidth=\"2\" strokeDasharray=\"4 6\" />\n              <g clipPath={`url(#hb-wd4-clip-${uid})`}>\n                <path d={area} fill={`url(#hb-wd4-fill-${uid})`} />\n                <path d={line} fill=\"none\" stroke=\"var(--hb-wd4-accent)\" strokeWidth=\"2.5\" strokeLinecap=\"round\" />\n              </g>\n              <line x1={pts[active][0].toFixed(1)} x2={pts[active][0].toFixed(1)} y1={pts[active][1].toFixed(1)} y2={H - 22} stroke=\"var(--hb-wd4-accent)\" strokeOpacity=\"0.4\" strokeDasharray=\"2 3\" style={{ transition: \"all 0.9s cubic-bezier(0.65,0,0.35,1)\" }} />\n              {pts.map(([x, y], i) => (\n                <g key={i}>\n                  <circle\n                    className=\"hb-wd4-node\"\n                    cx={x.toFixed(1)}\n                    cy={y.toFixed(1)}\n                    r={i === active ? 7 : 4}\n                    fill={i <= active ? \"var(--hb-wd4-accent)\" : \"#2a2a2a\"}\n                    stroke=\"#0e0e0e\"\n                    strokeWidth=\"3\"\n                    tabIndex={0}\n                    role=\"button\"\n                    aria-label={`${milestones[i].year}: ${milestones[i].headcount} people`}\n                    onClick={() => select(i)}\n                    onKeyDown={(e) => {\n                      if (e.key === \"Enter\" || e.key === \" \") {\n                        e.preventDefault();\n                        select(i);\n                      }\n                    }}\n                  />\n                  <text className=\"hb-wd4-axis\" data-on={i === active} x={x.toFixed(1)} y={H - 4} textAnchor={i === 0 ? \"start\" : i === pts.length - 1 ? \"end\" : \"middle\"}>\n                    {milestones[i].year}\n                  </text>\n                </g>\n              ))}\n            </svg>\n          </div>\n        </div>\n        <ol className=\"hb-wd4-list\">\n          {milestones.map((m, i) => (\n            <li\n              key={m.year + m.title}\n              ref={(el) => {\n                items.current[i] = el;\n              }}\n              data-index={i}\n              className=\"hb-wd4-item\"\n              data-seen={seen.has(i)}\n              data-active={i === active}\n            >\n              <span className=\"hb-wd4-bullet\" aria-hidden=\"true\" />\n              <button type=\"button\" className=\"hb-wd4-card\" aria-current={i === active ? \"step\" : undefined} onClick={() => select(i)}>\n                <span className=\"hb-wd4-meta\">\n                  <b>{m.year}</b>\n                  <span className=\"hb-wd4-tag\">{m.tag}</span>\n                  <small>{m.headcount} people</small>\n                </span>\n                <span className=\"hb-wd4-h\">{m.title}</span>\n                <span className=\"hb-wd4-p\">{m.text}</span>\n              </button>\n            </li>\n          ))}\n        </ol>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}