{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "contact-split-form",
  "type": "registry:component",
  "title": "Contact Split Form",
  "description": "A two-column contact section: email, live chat and office hours cards on the left, a validated form with a topic select and a character counter inside a rotating border beam on the right.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "contact",
    "contact",
    "form",
    "support",
    "split",
    "textarea",
    "section"
  ],
  "docs": "https://hyperblur.dev/effects/contact-split-form",
  "files": [
    {
      "path": "registry/hyperblur/contact-split-form.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/contact-split-form.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface ContactSplitFormLink {\n  label: string;\n  href: string;\n}\n\nexport interface ContactSplitFormMethod {\n  icon: \"email\" | \"chat\" | \"calendar\" | \"phone\";\n  title: string;\n  description: string;\n  status?: string;\n  action: ContactSplitFormLink;\n}\n\nexport interface ContactSplitFormValues {\n  name: string;\n  email: string;\n  company: string;\n  topic: string;\n  message: string;\n}\n\nexport interface ContactSplitFormProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\" | \"onSubmit\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  methods?: ContactSplitFormMethod[];\n  topics?: string[];\n  maxLength?: number;\n  responseNote?: string;\n  onSubmit?: (values: ContactSplitFormValues) => void | Promise<unknown>;\n  accent?: string;\n}\n\nconst css = `\n@property --hb-kf5-angle { syntax: \"<angle>\"; inherits: false; initial-value: 0deg; }\n@keyframes hb-kf5-beam { to { --hb-kf5-angle: 360deg; } }\n@keyframes hb-kf5-ping {\n  0% { transform: scale(1); opacity: .7; }\n  100% { transform: scale(2.6); opacity: 0; }\n}\n@keyframes hb-kf5-rise {\n  from { opacity: 0; translate: 0 14px; }\n  to { opacity: 1; translate: 0 0; }\n}\n@keyframes hb-kf5-in {\n  from { opacity: 0; transform: translate3d(0, 6px, 0); }\n  to { opacity: 1; transform: translate3d(0, 0, 0); }\n}\n@keyframes hb-kf5-spin { to { transform: rotate(360deg); } }\n@keyframes hb-kf5-draw { to { stroke-dashoffset: 0; } }\n@keyframes hb-kf5-pop {\n  0% { opacity: 0; transform: scale(.5); }\n  70% { transform: scale(1.06); }\n  100% { opacity: 1; transform: scale(1); }\n}\n.hb-kf5 {\n  --hb-kf5-accent: #ff6b4a;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  padding: 72px 16px;\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-kf5 *, .hb-kf5 *::before, .hb-kf5 *::after { box-sizing: border-box; }\n.hb-kf5::before {\n  content: \"\";\n  position: absolute;\n  right: -10%;\n  bottom: -30%;\n  z-index: -1;\n  width: 70%;\n  height: 90%;\n  border-radius: 50%;\n  background: radial-gradient(closest-side, color-mix(in srgb, var(--hb-kf5-accent) 13%, transparent), transparent);\n}\n.hb-kf5-inner { display: grid; grid-template-columns: 1fr; gap: 44px; max-width: 1120px; margin: 0 auto; }\n.hb-kf5-left { display: flex; flex-direction: column; min-width: 0; }\n.hb-kf5-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--hb-kf5-accent); font-size: 13px; font-weight: 600; }\n.hb-kf5-eyebrow::before { content: \"\"; width: 18px; height: 1px; background: currentColor; }\n.hb-kf5-title { margin: 0; max-width: 14ch; font-size: clamp(32px, 6cqw, 52px); font-weight: 650; line-height: 1.02; letter-spacing: -.04em; text-wrap: balance; }\n.hb-kf5-sub { max-width: 440px; margin: 16px 0 32px; color: #8f8f8f; font-size: 16px; line-height: 1.6; }\n.hb-kf5-methods { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }\n.hb-kf5-method {\n  position: relative;\n  display: grid;\n  grid-template-columns: auto 1fr;\n  align-items: center;\n  gap: 14px;\n  padding: 16px;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 16px;\n  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01));\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);\n  animation: hb-kf5-rise .6s cubic-bezier(.2, .8, .2, 1) both;\n  animation-delay: calc(var(--hb-kf5-i) * 90ms);\n  transition: border-color .25s ease, transform .25s ease, background .25s ease;\n}\n.hb-kf5-method:hover { border-color: color-mix(in srgb, var(--hb-kf5-accent) 40%, rgba(255, 255, 255, .08)); background: rgba(255, 255, 255, .035); transform: translateX(4px); }\n.hb-kf5-icon {\n  display: grid;\n  place-items: center;\n  width: 42px;\n  height: 42px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 12px;\n  background: linear-gradient(160deg, #1d1d1d, #121212);\n  color: var(--hb-kf5-accent);\n}\n.hb-kf5-mbody { display: flex; flex-direction: column; gap: 3px; min-width: 0; }\n.hb-kf5-mtitle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }\n.hb-kf5-mdesc { color: #8f8f8f; font-size: 13px; line-height: 1.45; }\n.hb-kf5-status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(74, 222, 128, .1); color: #86efac; font-size: 11px; font-weight: 550; }\n.hb-kf5-dot { position: relative; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; }\n.hb-kf5-dot::after { content: \"\"; position: absolute; inset: 0; border-radius: inherit; background: #4ade80; animation: hb-kf5-ping 1.8s ease-out infinite; }\n.hb-kf5-mlink {\n  justify-self: start;\n  margin-top: 6px;\n  color: #ededed;\n  font-size: 13px;\n  font-weight: 550;\n  text-decoration: none;\n  border-radius: 4px;\n}\n.hb-kf5-mlink::after { content: \"\"; position: absolute; inset: 0; border-radius: 16px; }\n.hb-kf5-mlink span { display: inline-block; transition: transform .2s ease; }\n.hb-kf5-method:hover .hb-kf5-mlink span { transform: translateX(3px); }\n.hb-kf5-mlink:focus-visible { outline: none; }\n.hb-kf5-mlink:focus-visible::after { outline: 2px solid var(--hb-kf5-accent); outline-offset: 2px; }\n.hb-kf5-shell {\n  position: relative;\n  min-width: 0;\n  padding: 1px;\n  border-radius: 24px;\n  background: conic-gradient(from var(--hb-kf5-angle), rgba(255, 255, 255, .08) 0deg, rgba(255, 255, 255, .08) 250deg, var(--hb-kf5-accent) 310deg, #ffd2c4 330deg, rgba(255, 255, 255, .08) 360deg);\n  animation: hb-kf5-beam 6s linear infinite;\n}\n.hb-kf5-card {\n  position: relative;\n  height: 100%;\n  padding: 24px 20px;\n  border-radius: 23px;\n  background: linear-gradient(180deg, #131313, #0e0e0e);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);\n}\n.hb-kf5-form { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 0; }\n.hb-kf5-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }\n.hb-kf5-field[data-wide=\"true\"] { grid-column: 1 / -1; }\n.hb-kf5-lrow { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }\n.hb-kf5-label { font-size: 13px; font-weight: 550; color: #d4d4d4; }\n.hb-kf5-opt { color: #6f6f6f; font-size: 12px; font-weight: 400; }\n.hb-kf5-input, .hb-kf5-select, .hb-kf5-area {\n  display: block;\n  width: 100%;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 12px;\n  background: #0a0a0a;\n  color: #ededed;\n  font: inherit;\n  font-size: 14px;\n  outline: none;\n  transition: border-color .18s ease, box-shadow .18s ease;\n}\n.hb-kf5-input, .hb-kf5-select { height: 44px; padding: 0 14px; }\n.hb-kf5-select {\n  appearance: none;\n  padding-right: 38px;\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%238f8f8f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5l3-3'/%3E%3C/svg%3E\");\n  background-repeat: no-repeat;\n  background-position: right 14px center;\n  cursor: pointer;\n}\n.hb-kf5-select option { background: #111; color: #ededed; }\n.hb-kf5-area { min-height: 132px; padding: 12px 14px; line-height: 1.55; resize: vertical; }\n.hb-kf5-input::placeholder, .hb-kf5-area::placeholder { color: #565656; }\n.hb-kf5-input:hover, .hb-kf5-select:hover, .hb-kf5-area:hover { border-color: rgba(255, 255, 255, .18); }\n.hb-kf5-input:focus, .hb-kf5-select:focus, .hb-kf5-area:focus { border-color: var(--hb-kf5-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hb-kf5-accent) 20%, transparent); }\n.hb-kf5 [aria-invalid=\"true\"] { border-color: #f87171; }\n.hb-kf5 [aria-invalid=\"true\"]:focus { box-shadow: 0 0 0 4px rgba(248, 113, 113, .18); }\n.hb-kf5-count { color: #6f6f6f; font-size: 12px; font-variant-numeric: tabular-nums; transition: color .2s ease; }\n.hb-kf5-count[data-tone=\"warn\"] { color: #fbbf24; }\n.hb-kf5-count[data-tone=\"over\"] { color: #f87171; }\n.hb-kf5-bar { height: 2px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .06); }\n.hb-kf5-bar i { display: block; height: 100%; background: var(--hb-kf5-accent); transform-origin: left; transition: transform .2s ease, background .2s ease; }\n.hb-kf5-bar[data-tone=\"warn\"] i { background: #fbbf24; }\n.hb-kf5-bar[data-tone=\"over\"] i { background: #f87171; }\n.hb-kf5-err { margin: 0; color: #fca5a5; font-size: 12px; animation: hb-kf5-in .2s ease both; }\n.hb-kf5-submit-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; grid-column: 1 / -1; margin-top: 4px; }\n.hb-kf5-note { display: inline-flex; align-items: center; gap: 8px; color: #8f8f8f; font-size: 13px; }\n.hb-kf5-btn {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  gap: 10px;\n  height: 46px;\n  padding: 0 22px;\n  border: 0;\n  border-radius: 999px;\n  background: var(--hb-kf5-accent);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 30px -12px var(--hb-kf5-accent);\n  color: #1f0802;\n  font: inherit;\n  font-size: 14px;\n  font-weight: 650;\n  cursor: pointer;\n  transition: filter .2s ease, transform .2s ease;\n}\n.hb-kf5-btn:hover:not(:disabled) { filter: brightness(1.08); }\n.hb-kf5-btn:active:not(:disabled) { transform: translateY(1px); }\n.hb-kf5-btn:disabled { cursor: progress; opacity: .85; }\n.hb-kf5-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }\n.hb-kf5-btn svg { transition: transform .2s ease; }\n.hb-kf5-btn:hover:not(:disabled) svg { transform: translate(2px, -2px); }\n.hb-kf5-spin { width: 15px; height: 15px; border: 2px solid rgba(31, 8, 2, .3); border-top-color: #1f0802; border-radius: 50%; animation: hb-kf5-spin .7s linear infinite; }\n.hb-kf5-alert { grid-column: 1 / -1; margin: 0; padding: 10px 12px; border: 1px solid rgba(248, 113, 113, .3); border-radius: 10px; background: rgba(248, 113, 113, .08); color: #fecaca; font-size: 13px; }\n.hb-kf5-done { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 420px; padding: 24px; text-align: center; animation: hb-kf5-in .4s ease both; }\n.hb-kf5-ok {\n  display: grid;\n  place-items: center;\n  width: 64px;\n  height: 64px;\n  margin-bottom: 8px;\n  border-radius: 50%;\n  background: color-mix(in srgb, var(--hb-kf5-accent) 16%, transparent);\n  box-shadow: 0 0 0 10px color-mix(in srgb, var(--hb-kf5-accent) 6%, transparent);\n  color: var(--hb-kf5-accent);\n  animation: hb-kf5-pop .5s cubic-bezier(.2, .9, .3, 1.2) both;\n}\n.hb-kf5-ok path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: hb-kf5-draw .4s .25s ease forwards; }\n.hb-kf5-done h3 { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -.02em; outline: none; }\n.hb-kf5-done p { max-width: 360px; margin: 0 0 12px; color: #8f8f8f; font-size: 14px; line-height: 1.6; }\n.hb-kf5-done strong { color: #ededed; font-weight: 550; overflow-wrap: anywhere; }\n.hb-kf5-ghost { height: 40px; padding: 0 18px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; background: transparent; color: #ededed; font: inherit; font-size: 13px; cursor: pointer; }\n.hb-kf5-ghost:hover { background: rgba(255, 255, 255, .05); }\n.hb-kf5-ghost:focus-visible { outline: 2px solid var(--hb-kf5-accent); outline-offset: 2px; }\n.hb-kf5-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }\n@container (min-width: 560px) {\n  .hb-kf5-form { grid-template-columns: 1fr 1fr; }\n  .hb-kf5-card { padding: 32px; }\n}\n@container (min-width: 900px) {\n  .hb-kf5 { padding: 112px 32px; }\n  .hb-kf5-inner { grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-kf5-shell, .hb-kf5-method, .hb-kf5-dot::after, .hb-kf5-err, .hb-kf5-done, .hb-kf5-ok, .hb-kf5-ok path { animation: none; }\n  .hb-kf5-ok path { stroke-dashoffset: 0; }\n  .hb-kf5-method, .hb-kf5-input, .hb-kf5-select, .hb-kf5-area, .hb-kf5-btn, .hb-kf5-btn svg, .hb-kf5-bar i, .hb-kf5-mlink span { transition: none; }\n  .hb-kf5-spin { animation-duration: 2s; }\n}\n`;\n\nconst defaultMethods: ContactSplitFormMethod[] = [\n  {\n    icon: \"email\",\n    title: \"Email support\",\n    description: \"support@northwind.io, answered within 4 hours on weekdays.\",\n    action: { label: \"Write to us\", href: \"mailto:support@northwind.io\" },\n  },\n  {\n    icon: \"chat\",\n    title: \"Live chat\",\n    description: \"Talk to an engineer, Monday to Friday, 8:00 to 20:00 CET.\",\n    status: \"3 online\",\n    action: { label: \"Start a chat\", href: \"#chat\" },\n  },\n  {\n    icon: \"calendar\",\n    title: \"Office hours\",\n    description: \"Open video call every Tuesday at 16:00 CET. Bring your questions.\",\n    action: { label: \"Book a slot\", href: \"#office-hours\" },\n  },\n];\n\nconst defaultTopics = [\"Sales and pricing\", \"Technical support\", \"Partnerships\", \"Billing\", \"Press\", \"Something else\"];\nconst emailPattern = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]{2,}$/;\n\nfunction wait(result: unknown) {\n  return result instanceof Promise ? result : new Promise((resolve) => setTimeout(resolve, 1000));\n}\n\nfunction MethodIcon({ icon }: { icon: ContactSplitFormMethod[\"icon\"] }) {\n  const common = { width: 20, height: 20, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 1.7, strokeLinecap: \"round\" as const, strokeLinejoin: \"round\" as const, \"aria-hidden\": true };\n  if (icon === \"chat\") {\n    return (\n      <svg {...common}>\n        <path d=\"M4 5.5A2.5 2.5 0 0 1 6.5 3h11A2.5 2.5 0 0 1 20 5.5v8a2.5 2.5 0 0 1-2.5 2.5H10l-4.5 4v-4h0A1.5 1.5 0 0 1 4 14.5v-9Z\" />\n        <path d=\"M8.5 9.5h.01M12 9.5h.01M15.5 9.5h.01\" strokeWidth=\"2.4\" />\n      </svg>\n    );\n  }\n  if (icon === \"calendar\") {\n    return (\n      <svg {...common}>\n        <rect x=\"3.5\" y=\"5\" width=\"17\" height=\"15.5\" rx=\"2.5\" />\n        <path d=\"M3.5 10h17M8 3v4M16 3v4M8 14h3\" />\n      </svg>\n    );\n  }\n  if (icon === \"phone\") {\n    return (\n      <svg {...common}>\n        <path d=\"M5 4h3.5l1.5 4.5-2 1.5a11 11 0 0 0 6 6l1.5-2 4.5 1.5V19a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2Z\" />\n      </svg>\n    );\n  }\n  return (\n    <svg {...common}>\n      <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2.5\" />\n      <path d=\"m4 7 8 6 8-6\" />\n    </svg>\n  );\n}\n\nexport function ContactSplitForm({\n  eyebrow = \"Contact\",\n  title = \"Talk to the people who build it\",\n  subtitle = \"No ticket mazes and no bots. Every message lands with someone on the Northwind team who can actually fix things.\",\n  methods = defaultMethods,\n  topics = defaultTopics,\n  maxLength = 1000,\n  responseNote = \"We reply within one business day\",\n  onSubmit,\n  accent = \"#ff6b4a\",\n  className = \"\",\n  style,\n  ...rest\n}: ContactSplitFormProps) {\n  const uid = React.useId();\n  const [values, setValues] = React.useState<ContactSplitFormValues>({ name: \"\", email: \"\", company: \"\", topic: \"\", message: \"\" });\n  const [touched, setTouched] = React.useState<Record<string, boolean>>({});\n  const [submitted, setSubmitted] = React.useState(false);\n  const [status, setStatus] = React.useState<\"idle\" | \"loading\" | \"success\">(\"idle\");\n  const [formError, setFormError] = React.useState(\"\");\n  const formRef = React.useRef<HTMLFormElement>(null);\n  const doneRef = React.useRef<HTMLHeadingElement>(null);\n  const moved = React.useRef(false);\n\n  React.useEffect(() => {\n    if (!moved.current) return;\n    moved.current = false;\n    if (status === \"success\") doneRef.current?.focus();\n    else formRef.current?.querySelector<HTMLInputElement>(\"input\")?.focus();\n  }, [status]);\n\n  const length = values.message.length;\n  const errors: Partial<Record<keyof ContactSplitFormValues, string>> = {};\n  if (values.name.trim().length < 2) errors.name = \"Tell us your name.\";\n  if (!values.email.trim()) errors.email = \"Enter an email so we can reply.\";\n  else if (!emailPattern.test(values.email.trim())) errors.email = \"That email looks incomplete.\";\n  if (!values.topic) errors.topic = \"Pick the topic closest to your question.\";\n  if (values.message.trim().length < 20) errors.message = \"Add a little more detail, at least 20 characters.\";\n  else if (length > maxLength) errors.message = `Keep it under ${maxLength} characters.`;\n\n  const tone = length > maxLength ? \"over\" : length > maxLength * 0.9 ? \"warn\" : undefined;\n  const loading = status === \"loading\";\n\n  function set<K extends keyof ContactSplitFormValues>(key: K, value: string) {\n    setValues((v) => ({ ...v, [key]: value }));\n  }\n\n  function shown(key: keyof ContactSplitFormValues) {\n    return (touched[key] || submitted) && errors[key] ? errors[key] : \"\";\n  }\n\n  function a11y(key: keyof ContactSplitFormValues, extra?: string) {\n    const message = shown(key);\n    const ids = [message ? `${uid}-${key}-err` : \"\", extra ?? \"\"].filter(Boolean).join(\" \");\n    return { \"aria-invalid\": message ? true : undefined, \"aria-describedby\": ids || undefined } as const;\n  }\n\n  function blur(key: keyof ContactSplitFormValues) {\n    return () => setTouched((t) => ({ ...t, [key]: true }));\n  }\n\n  function errorText(key: keyof ContactSplitFormValues) {\n    const message = shown(key);\n    return message ? (\n      <p className=\"hb-kf5-err\" id={`${uid}-${key}-err`}>\n        {message}\n      </p>\n    ) : null;\n  }\n\n  async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {\n    event.preventDefault();\n    if (loading) return;\n    setSubmitted(true);\n    setFormError(\"\");\n    if (Object.keys(errors).length) {\n      window.requestAnimationFrame(() => formRef.current?.querySelector<HTMLElement>('[aria-invalid=\"true\"]')?.focus());\n      return;\n    }\n    setStatus(\"loading\");\n    try {\n      await wait(\n        onSubmit?.({\n          name: values.name.trim(),\n          email: values.email.trim(),\n          company: values.company.trim(),\n          topic: values.topic,\n          message: values.message.trim(),\n        }),\n      );\n      moved.current = true;\n      setStatus(\"success\");\n    } catch (error) {\n      setStatus(\"idle\");\n      setFormError(error instanceof Error && error.message ? error.message : \"Your message didn't go through. Please try again.\");\n    }\n  }\n\n  function reset() {\n    moved.current = true;\n    setValues({ name: values.name, email: values.email, company: values.company, topic: \"\", message: \"\" });\n    setTouched({});\n    setSubmitted(false);\n    setStatus(\"idle\");\n  }\n\n  const vars = { \"--hb-kf5-accent\": accent, ...style } as React.CSSProperties;\n  const firstName = values.name.trim().split(\" \")[0];\n\n  return (\n    <section className={`hb-kf5 ${className}`} style={vars} aria-labelledby={`${uid}-title`} {...rest}>\n      <style href=\"hb-contact-split-form\" precedence=\"default\">{css}</style>\n      <div className=\"hb-kf5-inner\">\n        <div className=\"hb-kf5-left\">\n          {eyebrow ? <p className=\"hb-kf5-eyebrow\">{eyebrow}</p> : null}\n          <h2 className=\"hb-kf5-title\" id={`${uid}-title`}>\n            {title}\n          </h2>\n          {subtitle ? <p className=\"hb-kf5-sub\">{subtitle}</p> : null}\n          <ul className=\"hb-kf5-methods\">\n            {methods.map((method, i) => (\n              <li className=\"hb-kf5-method\" key={method.title} style={{ \"--hb-kf5-i\": i } as React.CSSProperties}>\n                <span className=\"hb-kf5-icon\">\n                  <MethodIcon icon={method.icon} />\n                </span>\n                <span className=\"hb-kf5-mbody\">\n                  <span className=\"hb-kf5-mtitle\">\n                    {method.title}\n                    {method.status ? (\n                      <span className=\"hb-kf5-status\">\n                        <span className=\"hb-kf5-dot\" aria-hidden=\"true\" />\n                        {method.status}\n                      </span>\n                    ) : null}\n                  </span>\n                  <span className=\"hb-kf5-mdesc\">{method.description}</span>\n                  <a className=\"hb-kf5-mlink\" href={method.action.href}>\n                    {method.action.label} <span aria-hidden=\"true\">&rarr;</span>\n                  </a>\n                </span>\n              </li>\n            ))}\n          </ul>\n        </div>\n        <div className=\"hb-kf5-shell\">\n          <div className=\"hb-kf5-card\">\n            {status === \"success\" ? (\n              <div className=\"hb-kf5-done\" role=\"status\">\n                <span className=\"hb-kf5-ok\" aria-hidden=\"true\">\n                  <svg width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n                    <path d=\"M5 12.5l4.5 4.5L19 7.5\" />\n                  </svg>\n                </span>\n                <h3 ref={doneRef} tabIndex={-1}>\n                  Message sent{firstName ? `, ${firstName}` : \"\"}\n                </h3>\n                <p>\n                  Thanks for reaching out about {values.topic.toLowerCase()}. We&apos;ll reply to <strong>{values.email.trim()}</strong> within one business day.\n                </p>\n                <button type=\"button\" className=\"hb-kf5-ghost\" onClick={reset}>\n                  Send another message\n                </button>\n              </div>\n            ) : (\n              <form ref={formRef} className=\"hb-kf5-form\" noValidate onSubmit={handleSubmit} aria-busy={loading || undefined}>\n                {formError ? (\n                  <p className=\"hb-kf5-alert\" role=\"alert\">\n                    {formError}\n                  </p>\n                ) : null}\n                <div className=\"hb-kf5-field\">\n                  <label className=\"hb-kf5-label\" htmlFor={`${uid}-name`}>\n                    Full name\n                  </label>\n                  <input id={`${uid}-name`} className=\"hb-kf5-input\" autoComplete=\"name\" placeholder=\"Maya Lindqvist\" value={values.name} disabled={loading} onChange={(e) => set(\"name\", e.target.value)} onBlur={blur(\"name\")} {...a11y(\"name\")} />\n                  {errorText(\"name\")}\n                </div>\n                <div className=\"hb-kf5-field\">\n                  <label className=\"hb-kf5-label\" htmlFor={`${uid}-email`}>\n                    Work email\n                  </label>\n                  <input id={`${uid}-email`} className=\"hb-kf5-input\" type=\"email\" autoComplete=\"email\" placeholder=\"maya@company.com\" value={values.email} disabled={loading} onChange={(e) => set(\"email\", e.target.value)} onBlur={blur(\"email\")} {...a11y(\"email\")} />\n                  {errorText(\"email\")}\n                </div>\n                <div className=\"hb-kf5-field\">\n                  <div className=\"hb-kf5-lrow\">\n                    <label className=\"hb-kf5-label\" htmlFor={`${uid}-company`}>\n                      Company\n                    </label>\n                    <span className=\"hb-kf5-opt\">Optional</span>\n                  </div>\n                  <input id={`${uid}-company`} className=\"hb-kf5-input\" autoComplete=\"organization\" placeholder=\"Fernhill Studio\" value={values.company} disabled={loading} onChange={(e) => set(\"company\", e.target.value)} />\n                </div>\n                <div className=\"hb-kf5-field\">\n                  <label className=\"hb-kf5-label\" htmlFor={`${uid}-topic`}>\n                    Topic\n                  </label>\n                  <select id={`${uid}-topic`} className=\"hb-kf5-select\" value={values.topic} disabled={loading} onChange={(e) => set(\"topic\", e.target.value)} onBlur={blur(\"topic\")} {...a11y(\"topic\")}>\n                    <option value=\"\" disabled>\n                      Choose a topic\n                    </option>\n                    {topics.map((topic) => (\n                      <option key={topic} value={topic}>\n                        {topic}\n                      </option>\n                    ))}\n                  </select>\n                  {errorText(\"topic\")}\n                </div>\n                <div className=\"hb-kf5-field\" data-wide=\"true\">\n                  <div className=\"hb-kf5-lrow\">\n                    <label className=\"hb-kf5-label\" htmlFor={`${uid}-message`}>\n                      How can we help?\n                    </label>\n                    <span className=\"hb-kf5-count\" id={`${uid}-count`} data-tone={tone}>\n                      {length} / {maxLength}\n                    </span>\n                  </div>\n                  <textarea\n                    id={`${uid}-message`}\n                    className=\"hb-kf5-area\"\n                    placeholder=\"We're moving 40 projects from another tool and want to keep our history. What does migration look like?\"\n                    value={values.message}\n                    disabled={loading}\n                    onChange={(e) => set(\"message\", e.target.value)}\n                    onBlur={blur(\"message\")}\n                    {...a11y(\"message\", `${uid}-count`)}\n                  />\n                  <div className=\"hb-kf5-bar\" data-tone={tone} aria-hidden=\"true\">\n                    <i style={{ transform: `scaleX(${Math.min(1, length / maxLength).toFixed(3)})` }} />\n                  </div>\n                  {errorText(\"message\")}\n                </div>\n                <div className=\"hb-kf5-submit-row\">\n                  <span className=\"hb-kf5-note\">\n                    <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" aria-hidden=\"true\">\n                      <circle cx=\"8\" cy=\"8\" r=\"6\" />\n                      <path d=\"M8 5v3l2 1.5\" />\n                    </svg>\n                    {responseNote}\n                  </span>\n                  <button type=\"submit\" className=\"hb-kf5-btn\" disabled={loading}>\n                    {loading ? <span className=\"hb-kf5-spin\" aria-hidden=\"true\" /> : null}\n                    {loading ? \"Sending\" : \"Send message\"}\n                    {loading ? null : (\n                      <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.9\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                        <path d=\"M4.5 11.5 11.5 4.5M5.5 4.5h6v6\" />\n                      </svg>\n                    )}\n                  </button>\n                </div>\n                <span className=\"hb-kf5-sr\" role=\"status\">\n                  {loading ? \"Sending your message\" : \"\"}\n                </span>\n              </form>\n            )}\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}