{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "contact-minimal-light",
  "type": "registry:component",
  "title": "Contact Minimal Light",
  "description": "A light editorial contact section with a huge serif Let's talk headline, a fill-in-the-blanks sentence form with suggestion chips, and studio details on the side.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "contact",
    "contact",
    "form",
    "editorial",
    "serif",
    "light",
    "section"
  ],
  "docs": "https://hyperblur.dev/effects/contact-minimal-light",
  "files": [
    {
      "path": "registry/hyperblur/contact-minimal-light.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/contact-minimal-light.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface ContactMinimalLink {\n  label: string;\n  href: string;\n}\n\nexport interface ContactMinimalDetail {\n  label: string;\n  lines: string[];\n  link?: ContactMinimalLink;\n}\n\nexport interface ContactMinimalValues {\n  name: string;\n  company: string;\n  intent: string;\n  email: string;\n}\n\nexport interface ContactMinimalLightProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\" | \"onSubmit\"> {\n  studio?: string;\n  availability?: string;\n  title?: string;\n  highlight?: string;\n  suggestions?: string[];\n  details?: ContactMinimalDetail[];\n  responseNote?: string;\n  onSubmit?: (values: ContactMinimalValues) => void | Promise<unknown>;\n  accent?: string;\n}\n\nconst css = `\n@keyframes hb-kf8-letter {\n  from { opacity: 0; transform: translate3d(0, .5em, 0) rotate(4deg); }\n  to { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); }\n}\n@keyframes hb-kf8-word {\n  from { opacity: 0; filter: blur(6px); transform: translate3d(0, 10px, 0); }\n  to { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0); }\n}\n@keyframes hb-kf8-in {\n  from { opacity: 0; transform: translate3d(0, 6px, 0); }\n  to { opacity: 1; transform: translate3d(0, 0, 0); }\n}\n@keyframes hb-kf8-spin { to { transform: rotate(360deg); } }\n@keyframes hb-kf8-blink {\n  0%, 100% { opacity: 1; }\n  50% { opacity: .35; }\n}\n.hb-kf8 {\n  --hb-kf8-accent: #e5532d;\n  --hb-kf8-ink: #1a1814;\n  --hb-kf8-muted: #6f6a60;\n  --hb-kf8-line: rgba(26, 24, 20, .14);\n  --hb-kf8-serif: var(--font-sans, ui-sans-serif, system-ui, sans-serif);\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  padding: 28px 20px 72px;\n  overflow: hidden;\n  container-type: inline-size;\n  background: #f7f5ef;\n  color: var(--hb-kf8-ink);\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-kf8 *, .hb-kf8 *::before, .hb-kf8 *::after { box-sizing: border-box; }\n.hb-kf8-inner { max-width: 1120px; margin: 0 auto; }\n.hb-kf8-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-bottom: 16px; border-bottom: 1px solid var(--hb-kf8-line); color: var(--hb-kf8-muted); font-size: 13px; }\n.hb-kf8-bar strong { color: var(--hb-kf8-ink); font-weight: 600; }\n.hb-kf8-avail { display: inline-flex; align-items: center; gap: 8px; }\n.hb-kf8-avail i { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); animation: hb-kf8-blink 2.4s ease-in-out infinite; }\n.hb-kf8-title {\n  margin: 36px 0 28px;\n  font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);\n  font-size: clamp(72px, 19cqw, 228px);\n  font-weight: 400;\n  line-height: .86;\n  letter-spacing: -.035em;\n}\n.hb-kf8-ch { display: inline-block; animation: hb-kf8-letter .8s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--hb-kf8-i) * 45ms); white-space: pre; }\n.hb-kf8-hl { color: var(--hb-kf8-accent); }\n.hb-kf8-grid { display: grid; grid-template-columns: 1fr; gap: 48px; }\n.hb-kf8-form { margin: 0; min-width: 0; }\n.hb-kf8-sentence { margin: 0; font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif); font-size: clamp(24px, 3.7cqw, 42px); line-height: 1.7; letter-spacing: -.01em; color: var(--hb-kf8-ink); }\n.hb-kf8-fill {\n  max-width: 100%;\n  margin: 0 .12em;\n  padding: 0 .1em;\n  border: 0;\n  border-bottom: 2px solid var(--hb-kf8-line);\n  border-radius: 0;\n  background: linear-gradient(var(--hb-kf8-accent), var(--hb-kf8-accent)) no-repeat left bottom / 0 2px;\n  color: var(--hb-kf8-accent);\n  font: inherit;\n    line-height: 1.2;\n  outline: none;\n  transition: background-size .35s cubic-bezier(.2, .8, .2, 1), border-color .2s ease;\n}\n.hb-kf8-fill::placeholder { color: rgba(26, 24, 20, .3); }\n.hb-kf8-fill:hover { border-bottom-color: rgba(26, 24, 20, .32); }\n.hb-kf8-fill:focus { background-size: 100% 2px; }\n.hb-kf8-fill:focus-visible { outline: 2px dashed color-mix(in srgb, var(--hb-kf8-accent) 45%, transparent); outline-offset: 4px; }\n.hb-kf8-fill[aria-invalid=\"true\"] { border-bottom-color: #b42318; border-bottom-style: dashed; }\n.hb-kf8-fill:disabled { opacity: .6; }\n.hb-kf8-sugg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--hb-kf8-muted); font-size: 13px; }\n.hb-kf8-chip {\n  height: 32px;\n  padding: 0 13px;\n  border: 1px solid var(--hb-kf8-line);\n  border-radius: 999px;\n  background: rgba(255, 255, 255, .55);\n  color: var(--hb-kf8-ink);\n  font: inherit;\n  font-size: 13px;\n  cursor: pointer;\n  transition: background .2s ease, border-color .2s ease, color .2s ease;\n}\n.hb-kf8-chip:hover { border-color: var(--hb-kf8-ink); background: #fff; }\n.hb-kf8-chip[aria-pressed=\"true\"] { border-color: var(--hb-kf8-ink); background: var(--hb-kf8-ink); color: #f7f5ef; }\n.hb-kf8-chip:focus-visible { outline: 2px solid var(--hb-kf8-accent); outline-offset: 2px; }\n.hb-kf8-errs { display: grid; gap: 4px; margin: 18px 0 0; padding: 0; list-style: none; }\n.hb-kf8-errs li { display: flex; align-items: center; gap: 8px; color: #b42318; font-size: 14px; animation: hb-kf8-in .2s ease both; }\n.hb-kf8-errs li::before { content: \"\"; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }\n.hb-kf8-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 34px; }\n.hb-kf8-send {\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  gap: 14px;\n  height: 60px;\n  padding: 0 10px 0 28px;\n  overflow: hidden;\n  border: 0;\n  border-radius: 999px;\n  background: var(--hb-kf8-ink);\n  color: #f7f5ef;\n  font: inherit;\n  font-size: 16px;\n  font-weight: 550;\n  cursor: pointer;\n  isolation: isolate;\n  transition: transform .2s ease;\n}\n.hb-kf8-send::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n  border-radius: inherit;\n  background: var(--hb-kf8-accent);\n  transform: translateY(101%);\n  transition: transform .45s cubic-bezier(.2, .8, .2, 1);\n}\n.hb-kf8-send:hover:not(:disabled)::before { transform: translateY(0); }\n.hb-kf8-send:active:not(:disabled) { transform: scale(.98); }\n.hb-kf8-send:disabled { cursor: progress; }\n.hb-kf8-send:focus-visible { outline: 2px solid var(--hb-kf8-accent); outline-offset: 4px; }\n.hb-kf8-arrow { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #f7f5ef; color: var(--hb-kf8-ink); transition: transform .45s cubic-bezier(.2, .8, .2, 1); }\n.hb-kf8-send:hover:not(:disabled) .hb-kf8-arrow { transform: rotate(-45deg); }\n.hb-kf8-spin { width: 16px; height: 16px; border: 2px solid rgba(26, 24, 20, .2); border-top-color: var(--hb-kf8-ink); border-radius: 50%; animation: hb-kf8-spin .7s linear infinite; }\n.hb-kf8-note { color: var(--hb-kf8-muted); font-size: 14px; }\n.hb-kf8-alert { margin: 18px 0 0; color: #b42318; font-size: 14px; }\n.hb-kf8-done { margin: 0; font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif); font-size: clamp(26px, 4cqw, 46px); line-height: 1.35; letter-spacing: -.015em; outline: none; }\n.hb-kf8-word { display: inline-block; animation: hb-kf8-word .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--hb-kf8-i) * 55ms); white-space: pre; }\n.hb-kf8-word[data-hl=\"true\"] { color: var(--hb-kf8-accent); }\n.hb-kf8-again { margin-top: 28px; padding: 6px 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--hb-kf8-ink); font: inherit; font-size: 15px; cursor: pointer; animation: hb-kf8-in .4s 1s ease both; }\n.hb-kf8-again:hover { color: var(--hb-kf8-accent); }\n.hb-kf8-again:focus-visible { outline: 2px solid var(--hb-kf8-accent); outline-offset: 3px; }\n.hb-kf8-details { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; border-top: 1px solid var(--hb-kf8-line); }\n.hb-kf8-detail { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--hb-kf8-line); font-size: 15px; line-height: 1.55; }\n.hb-kf8-detail dt { color: var(--hb-kf8-muted); font-size: 13px; padding-top: 2px; }\n.hb-kf8-detail dd { margin: 0; }\n.hb-kf8-detail span { display: block; }\n.hb-kf8-link { color: var(--hb-kf8-ink); text-decoration: underline; text-decoration-color: var(--hb-kf8-line); text-underline-offset: 4px; transition: text-decoration-color .2s ease, color .2s ease; border-radius: 2px; }\n.hb-kf8-link:hover { color: var(--hb-kf8-accent); text-decoration-color: currentColor; }\n.hb-kf8-link:focus-visible { outline: 2px solid var(--hb-kf8-accent); outline-offset: 3px; }\n.hb-kf8-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }\n@container (min-width: 880px) {\n  .hb-kf8 { padding: 36px 40px 112px; }\n  .hb-kf8-title { margin: 48px 0 40px; }\n  .hb-kf8-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 80px; align-items: start; }\n}\n@container (max-width: 420px) {\n  .hb-kf8-detail { grid-template-columns: 1fr; gap: 4px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-kf8-ch, .hb-kf8-word, .hb-kf8-errs li, .hb-kf8-again, .hb-kf8-avail i { animation: none; }\n  .hb-kf8-fill, .hb-kf8-send, .hb-kf8-send::before, .hb-kf8-arrow, .hb-kf8-chip, .hb-kf8-link { transition: none; }\n  .hb-kf8-spin { animation-duration: 2s; }\n}\n`;\n\nconst defaultSuggestions = [\"start a new project\", \"redesign our website\", \"book a two-week sprint\", \"just say hello\"];\n\nconst defaultDetails: ContactMinimalDetail[] = [\n  { label: \"Email\", lines: [], link: { label: \"hello@halden.studio\", href: \"mailto:hello@halden.studio\" } },\n  { label: \"Studio\", lines: [\"Jægersborggade 41\", \"2200 Copenhagen N, Denmark\"] },\n  { label: \"Phone\", lines: [], link: { label: \"+45 32 18 40 92\", href: \"tel:+4532184092\" } },\n  { label: \"Elsewhere\", lines: [], link: { label: \"Read our journal\", href: \"#journal\" } },\n];\n\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\ntype Field = \"name\" | \"company\" | \"intent\" | \"email\";\n\nexport function ContactMinimalLight({\n  studio = \"Studio Halden\",\n  availability = \"Booking projects from January 2027\",\n  title = \"Let's\",\n  highlight = \"talk.\",\n  suggestions = defaultSuggestions,\n  details = defaultDetails,\n  responseNote = \"We reply within two working days.\",\n  onSubmit,\n  accent = \"#e5532d\",\n  className = \"\",\n  style,\n  ...rest\n}: ContactMinimalLightProps) {\n  const uid = React.useId();\n  const [values, setValues] = React.useState<ContactMinimalValues>({ name: \"\", company: \"\", intent: \"\", email: \"\" });\n  const [submitted, setSubmitted] = React.useState(false);\n  const [status, setStatus] = React.useState<\"idle\" | \"loading\" | \"success\">(\"idle\");\n  const [failure, setFailure] = React.useState(\"\");\n  const formRef = React.useRef<HTMLFormElement>(null);\n  const doneRef = React.useRef<HTMLParagraphElement>(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 errors: Partial<Record<Field, string>> = {};\n  if (!values.name.trim()) errors.name = \"Tell us your name.\";\n  if (!values.intent.trim()) errors.intent = \"Let us know what you'd like to do, or pick a suggestion.\";\n  if (!values.email.trim()) errors.email = \"Add an email so we can write back.\";\n  else if (!emailPattern.test(values.email.trim())) errors.email = \"That email address looks incomplete.\";\n  const visible = submitted ? errors : {};\n  const loading = status === \"loading\";\n\n  function set(field: Field, value: string) {\n    setValues((v) => ({ ...v, [field]: value }));\n  }\n\n  function fill(field: Field, label: string, placeholder: string, extra?: Partial<React.InputHTMLAttributes<HTMLInputElement>>) {\n    const value = values[field];\n    const message = visible[field];\n    return (\n      <>\n        <label className=\"hb-kf8-sr\" htmlFor={`${uid}-${field}`}>\n          {label}\n        </label>\n        <input\n          id={`${uid}-${field}`}\n          className=\"hb-kf8-fill\"\n          name={field}\n          placeholder={placeholder}\n          value={value}\n          size={Math.max(value.length, placeholder.length, 4)}\n          disabled={loading}\n          onChange={(e) => set(field, e.target.value)}\n          aria-invalid={message ? true : undefined}\n          aria-describedby={message ? `${uid}-${field}-err` : undefined}\n          {...extra}\n        />\n      </>\n    );\n  }\n\n  async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {\n    event.preventDefault();\n    if (loading) return;\n    setSubmitted(true);\n    setFailure(\"\");\n    const first = ([\"name\", \"intent\", \"email\"] as Field[]).find((f) => errors[f]);\n    if (first) {\n      document.getElementById(`${uid}-${first}`)?.focus();\n      return;\n    }\n    setStatus(\"loading\");\n    try {\n      await wait(\n        onSubmit?.({\n          name: values.name.trim(),\n          company: values.company.trim(),\n          intent: values.intent.trim(),\n          email: values.email.trim(),\n        }),\n      );\n      moved.current = true;\n      setStatus(\"success\");\n    } catch (error) {\n      setStatus(\"idle\");\n      setFailure(error instanceof Error && error.message ? error.message : \"Your note didn't send. Please try again.\");\n    }\n  }\n\n  function again() {\n    moved.current = true;\n    setValues((v) => ({ ...v, intent: \"\" }));\n    setSubmitted(false);\n    setStatus(\"idle\");\n  }\n\n  const heading = `${title} `;\n  const letters = [...heading, ...highlight];\n  const firstName = values.name.trim().split(\" \")[0];\n  const doneWords = `Thank you, ${firstName}. We'll write to ${values.email.trim()} within two working days.`.split(\" \");\n  const vars = { \"--hb-kf8-accent\": accent, ...style } as React.CSSProperties;\n  const errorList = ([\"name\", \"intent\", \"email\"] as Field[]).filter((f) => visible[f]);\n\n  return (\n    <section className={`hb-kf8 ${className}`} style={vars} aria-labelledby={`${uid}-title`} {...rest}>\n      <style href=\"hb-contact-minimal-light\" precedence=\"default\">{css}</style>\n      <div className=\"hb-kf8-inner\">\n        <div className=\"hb-kf8-bar\">\n          <span>\n            <strong>{studio}</strong> / Contact\n          </span>\n          {availability ? (\n            <span className=\"hb-kf8-avail\">\n              <i aria-hidden=\"true\" />\n              {availability}\n            </span>\n          ) : null}\n        </div>\n        <h2 className=\"hb-kf8-title\" id={`${uid}-title`} aria-label={`${title} ${highlight}`}>\n          {letters.map((ch, i) => (\n            <span key={i} className={`hb-kf8-ch${i >= heading.length ? \" hb-kf8-hl\" : \"\"}`} style={{ \"--hb-kf8-i\": i } as React.CSSProperties} aria-hidden=\"true\">\n              {ch}\n            </span>\n          ))}\n        </h2>\n        <div className=\"hb-kf8-grid\">\n          <div>\n            {status === \"success\" ? (\n              <div role=\"status\">\n                <p className=\"hb-kf8-done\" ref={doneRef} tabIndex={-1}>\n                  {doneWords.map((word, i) => (\n                    <span key={i} className=\"hb-kf8-word\" data-hl={i === 2 || word === values.email.trim() ? \"true\" : undefined} style={{ \"--hb-kf8-i\": i } as React.CSSProperties}>\n                      {word}\n                      {i < doneWords.length - 1 ? \" \" : \"\"}\n                    </span>\n                  ))}\n                </p>\n                <button type=\"button\" className=\"hb-kf8-again\" onClick={again}>\n                  Write another note\n                </button>\n              </div>\n            ) : (\n              <form ref={formRef} className=\"hb-kf8-form\" noValidate onSubmit={handleSubmit} aria-busy={loading || undefined}>\n                <p className=\"hb-kf8-sentence\">\n                  Hi, I&apos;m {fill(\"name\", \"Your name\", \"your name\", { autoComplete: \"name\" })} from {fill(\"company\", \"Company, optional\", \"your company\", { autoComplete: \"organization\" })}, and I&apos;d like to{\" \"}\n                  {fill(\"intent\", \"What you'd like to do\", \"start a project\")}. You can reach me at{\" \"}\n                  {fill(\"email\", \"Email address\", \"you@email.com\", { type: \"email\", autoComplete: \"email\", inputMode: \"email\" })}.\n                </p>\n                {suggestions.length ? (\n                  <ul className=\"hb-kf8-sugg\" aria-label=\"Suggestions\">\n                    <li aria-hidden=\"true\">Or pick one:</li>\n                    {suggestions.map((s) => (\n                      <li key={s}>\n                        <button type=\"button\" className=\"hb-kf8-chip\" aria-pressed={values.intent === s} disabled={loading} onClick={() => set(\"intent\", s)}>\n                          {s}\n                        </button>\n                      </li>\n                    ))}\n                  </ul>\n                ) : null}\n                {errorList.length ? (\n                  <ul className=\"hb-kf8-errs\">\n                    {errorList.map((f) => (\n                      <li key={f} id={`${uid}-${f}-err`}>\n                        {visible[f]}\n                      </li>\n                    ))}\n                  </ul>\n                ) : null}\n                {failure ? (\n                  <p className=\"hb-kf8-alert\" role=\"alert\">\n                    {failure}\n                  </p>\n                ) : null}\n                <div className=\"hb-kf8-actions\">\n                  <button type=\"submit\" className=\"hb-kf8-send\" disabled={loading}>\n                    {loading ? \"Sending\" : \"Send message\"}\n                    <span className=\"hb-kf8-arrow\" aria-hidden=\"true\">\n                      {loading ? (\n                        <span className=\"hb-kf8-spin\" />\n                      ) : (\n                        <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n                          <path d=\"M3 8h10M9 4l4 4-4 4\" />\n                        </svg>\n                      )}\n                    </span>\n                  </button>\n                  <span className=\"hb-kf8-note\">{responseNote}</span>\n                </div>\n                <span className=\"hb-kf8-sr\" role=\"status\">\n                  {loading ? \"Sending your message\" : \"\"}\n                </span>\n              </form>\n            )}\n          </div>\n          {details.length ? (\n            <dl className=\"hb-kf8-details\">\n              {details.map((detail) => (\n                <div className=\"hb-kf8-detail\" key={detail.label}>\n                  <dt>{detail.label}</dt>\n                  <dd>\n                    {detail.lines.map((line) => (\n                      <span key={line}>{line}</span>\n                    ))}\n                    {detail.link ? (\n                      <a className=\"hb-kf8-link\" href={detail.link.href}>\n                        {detail.link.label}\n                      </a>\n                    ) : null}\n                  </dd>\n                </div>\n              ))}\n            </dl>\n          ) : null}\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}