{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "faq-section",
  "type": "registry:component",
  "title": "FAQ Section",
  "description": "Two-column FAQ: heading and contact link on the left, an animated one-at-a-time accordion on the right.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "faq",
    "faq",
    "accordion",
    "questions",
    "section",
    "landing",
    "support"
  ],
  "docs": "https://hyperblur.dev/effects/faq-section",
  "files": [
    {
      "path": "registry/hyperblur/faq-section.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/faq-section.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface FaqItem {\n  question: string;\n  answer: React.ReactNode;\n}\n\nexport interface FaqContact {\n  label: string;\n  href: string;\n}\n\nexport interface FaqSectionProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  title?: string;\n  subtitle?: string;\n  items?: FaqItem[];\n  contact?: FaqContact;\n  accent?: string;\n  defaultOpen?: number;\n}\n\nconst css = `\n.hb-fq {\n  --hb-fq-accent: #2f7bff;\n  box-sizing: border-box;\n  width: 100%;\n  padding: 96px 24px;\n  background: #07070a;\n  color: #f2f2f5;\n  font-family: ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-fq *, .hb-fq *::before, .hb-fq *::after { box-sizing: border-box; }\n.hb-fq-wrap {\n  display: grid;\n  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);\n  gap: 64px;\n  align-items: start;\n  max-width: 1120px;\n  margin: 0 auto;\n}\n.hb-fq-side { position: sticky; top: 48px; }\n.hb-fq-title {\n  margin: 0;\n  font-size: clamp(30px, 4vw, 42px);\n  font-weight: 650;\n  line-height: 1.1;\n  letter-spacing: -.02em;\n}\n.hb-fq-sub {\n  margin: 16px 0 0;\n  max-width: 420px;\n  font-size: clamp(15px, 1.6vw, 17px);\n  line-height: 1.6;\n  color: rgba(255, 255, 255, .62);\n}\n.hb-fq-contact {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  min-height: 44px;\n  margin-top: 28px;\n  padding: 0 22px;\n  border: 1px solid rgba(255, 255, 255, .2);\n  border-radius: 999px;\n  background: rgba(255, 255, 255, .04);\n  color: #f2f2f5;\n  font-size: 14px;\n  font-weight: 600;\n  text-decoration: none;\n  transition: border-color .25s ease, background-color .25s ease, transform .25s cubic-bezier(.22, .8, .24, 1);\n}\n.hb-fq-contact:hover {\n  border-color: var(--hb-fq-accent);\n  background: color-mix(in srgb, var(--hb-fq-accent) 14%, transparent);\n  transform: translate3d(0, -2px, 0);\n}\n.hb-fq-contact:focus-visible { outline: 2px solid var(--hb-fq-accent); outline-offset: 3px; }\n.hb-fq-contact svg { width: 14px; height: 14px; transition: transform .25s ease; }\n.hb-fq-contact:hover svg { transform: translate3d(3px, 0, 0); }\n.hb-fq-list { margin: 0; padding: 0; list-style: none; }\n.hb-fq-item { border-bottom: 1px solid rgba(255, 255, 255, .12); }\n.hb-fq-item:first-child { border-top: 1px solid rgba(255, 255, 255, .12); }\n.hb-fq-head { margin: 0; font: inherit; }\n.hb-fq-trigger {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  width: 100%;\n  margin: 0;\n  padding: 20px 4px;\n  border: 0;\n  border-radius: 8px;\n  background: transparent;\n  color: inherit;\n  font: inherit;\n  font-size: 16px;\n  font-weight: 550;\n  line-height: 1.4;\n  text-align: left;\n  cursor: pointer;\n  transition: color .2s ease;\n  -webkit-tap-highlight-color: transparent;\n}\n.hb-fq-trigger:hover { color: color-mix(in srgb, var(--hb-fq-accent) 60%, #fff); }\n.hb-fq-trigger:focus-visible { outline: 2px solid var(--hb-fq-accent); outline-offset: -2px; }\n.hb-fq-chevron {\n  flex: 0 0 auto;\n  width: 18px;\n  height: 18px;\n  opacity: .65;\n  transition: transform .35s cubic-bezier(.2, .9, .2, 1), opacity .2s ease, color .2s ease;\n}\n.hb-fq-trigger[aria-expanded=\"true\"] .hb-fq-chevron {\n  transform: rotate(180deg);\n  opacity: 1;\n  color: var(--hb-fq-accent);\n}\n.hb-fq-panel {\n  display: grid;\n  grid-template-rows: 0fr;\n  visibility: hidden;\n  transition: grid-template-rows .35s cubic-bezier(.2, .9, .2, 1), visibility 0s linear .35s;\n}\n.hb-fq-item[data-open=\"true\"] > .hb-fq-panel {\n  grid-template-rows: 1fr;\n  visibility: visible;\n  transition: grid-template-rows .35s cubic-bezier(.2, .9, .2, 1), visibility 0s linear 0s;\n}\n.hb-fq-inner { min-height: 0; overflow: hidden; }\n.hb-fq-answer {\n  padding: 0 4px 22px;\n  max-width: 600px;\n  font-size: 15px;\n  line-height: 1.65;\n  color: rgba(255, 255, 255, .64);\n}\n@media (max-width: 767px) {\n  .hb-fq { padding: 64px 16px; }\n  .hb-fq-wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }\n  .hb-fq-side { position: static; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-fq-panel, .hb-fq-item[data-open=\"true\"] > .hb-fq-panel { transition: none; }\n  .hb-fq-chevron, .hb-fq-contact, .hb-fq-contact svg, .hb-fq-trigger { transition: none; }\n  .hb-fq-contact:hover { transform: none; }\n  .hb-fq-contact:hover svg { transform: none; }\n}\n`;\n\nconst defaultItems: FaqItem[] = [\n  {\n    question: \"How does the free trial work?\",\n    answer: \"You get full access to every feature for 14 days. No credit card is required, and your workspace is kept if you decide to upgrade later.\",\n  },\n  {\n    question: \"Can I change or cancel my plan at any time?\",\n    answer: \"Yes. Upgrade, downgrade or cancel whenever you like from your billing settings. Changes apply at the next billing cycle and we never charge cancellation fees.\",\n  },\n  {\n    question: \"Is my data secure?\",\n    answer: \"All data is encrypted in transit and at rest, backed up daily and stored in certified data centers. You can export or delete everything with one click.\",\n  },\n  {\n    question: \"Do you offer discounts for startups or nonprofits?\",\n    answer: \"We do. Eligible startups, students and nonprofit organizations get a significant discount. Reach out with a few details and we will set you up.\",\n  },\n  {\n    question: \"What kind of support do you provide?\",\n    answer: \"Every plan includes email support with a reply in under one business day. Higher plans add live chat and a dedicated success manager.\",\n  },\n  {\n    question: \"Can I bring my existing data with me?\",\n    answer: \"Absolutely. Import from CSV or connect your current tools, and our migration guides walk you through each step. Most teams are done in an afternoon.\",\n  },\n];\n\nexport function FaqSection({\n  title = \"Frequently asked questions\",\n  subtitle = \"Everything you need to know before getting started. Can not find the answer you are after? Our team is happy to help.\",\n  items = defaultItems,\n  contact = { label: \"Contact support\", href: \"#contact\" },\n  accent = \"#2f7bff\",\n  defaultOpen = 0,\n  className = \"\",\n  style,\n  ...rest\n}: FaqSectionProps) {\n  const uid = React.useId();\n  const [open, setOpen] = React.useState(defaultOpen);\n  const vars = { \"--hb-fq-accent\": accent, ...style } as React.CSSProperties;\n\n  return (\n    <section className={`hb-fq ${className}`} style={vars} aria-labelledby={`${uid}-title`} {...rest}>\n      <style href=\"hb-faq-section\" precedence=\"default\">{css}</style>\n      <div className=\"hb-fq-wrap\">\n        <div className=\"hb-fq-side\">\n          <h2 id={`${uid}-title`} className=\"hb-fq-title\">{title}</h2>\n          {subtitle && <p className=\"hb-fq-sub\">{subtitle}</p>}\n          {contact && (\n            <a className=\"hb-fq-contact\" href={contact.href}>\n              {contact.label}\n              <svg\n                viewBox=\"0 0 16 16\"\n                fill=\"none\"\n                stroke=\"currentColor\"\n                strokeWidth=\"1.8\"\n                strokeLinecap=\"round\"\n                strokeLinejoin=\"round\"\n                aria-hidden=\"true\"\n              >\n                <path d=\"M3 8h10\" />\n                <path d=\"M9 4l4 4-4 4\" />\n              </svg>\n            </a>\n          )}\n        </div>\n        <ul className=\"hb-fq-list\">\n          {items.map((item, i) => {\n            const isOpen = open === i;\n            const triggerId = `${uid}-trigger-${i}`;\n            const panelId = `${uid}-panel-${i}`;\n            return (\n              <li className=\"hb-fq-item\" data-open={isOpen} key={`${item.question}-${i}`}>\n                <h3 className=\"hb-fq-head\">\n                  <button\n                    id={triggerId}\n                    className=\"hb-fq-trigger\"\n                    type=\"button\"\n                    aria-expanded={isOpen}\n                    aria-controls={panelId}\n                    onClick={() => setOpen((prev) => (prev === i ? -1 : i))}\n                  >\n                    <span>{item.question}</span>\n                    <svg\n                      className=\"hb-fq-chevron\"\n                      viewBox=\"0 0 16 16\"\n                      fill=\"none\"\n                      stroke=\"currentColor\"\n                      strokeWidth=\"1.8\"\n                      strokeLinecap=\"round\"\n                      strokeLinejoin=\"round\"\n                      aria-hidden=\"true\"\n                    >\n                      <path d=\"M3.5 6l4.5 4.5L12.5 6\" />\n                    </svg>\n                  </button>\n                </h3>\n                <div id={panelId} className=\"hb-fq-panel\" role=\"region\" aria-labelledby={triggerId}>\n                  <div className=\"hb-fq-inner\">\n                    <div className=\"hb-fq-answer\">{item.answer}</div>\n                  </div>\n                </div>\n              </li>\n            );\n          })}\n        </ul>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}