{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "waitlist-launch-card",
  "type": "registry:component",
  "title": "Waitlist: Launch Card",
  "description": "A dark glass card over drifting color with a four-tile flip countdown to a launch date, an email form and a perks column.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "waitlist",
    "waitlist",
    "countdown",
    "flip clock",
    "launch",
    "email",
    "coming soon"
  ],
  "docs": "https://hyperblur.dev/effects/waitlist-launch-card",
  "files": [
    {
      "path": "registry/hyperblur/waitlist-launch-card.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/waitlist-launch-card.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface WaitlistLaunchPerk {\n  title: string;\n  detail: string;\n}\n\nexport interface WaitlistLaunchCardProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\" | \"onSubmit\"> {\n  brand?: string;\n  badge?: string;\n  title?: string;\n  subtitle?: string;\n  launchAt?: string;\n  liveLabel?: string;\n  placeholder?: string;\n  ctaLabel?: string;\n  perksTitle?: string;\n  perks?: WaitlistLaunchPerk[];\n  note?: string;\n  onSubmit?: (email: string) => void;\n  accent?: string;\n}\n\nconst css = `\n@keyframes hb-kh9-ftop { from { transform: rotateX(0deg); } to { transform: rotateX(-90deg); } }\n@keyframes hb-kh9-fbot { from { transform: rotateX(90deg); } to { transform: rotateX(0deg); } }\n@keyframes hb-kh9-drift {\n  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }\n  33% { transform: translate3d(6%, -4%, 0) scale(1.08); }\n  66% { transform: translate3d(-5%, 5%, 0) scale(0.95); }\n}\n@keyframes hb-kh9-in {\n  from { opacity: 0; transform: translate3d(0, 8px, 0); }\n  to { opacity: 1; transform: none; }\n}\n.hb-kh9 {\n  --hb-kh9-accent: #ff7a59;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  overflow: hidden;\n  container: hb-kh9-root / inline-size;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-kh9 *, .hb-kh9 *::before, .hb-kh9 *::after { box-sizing: border-box; }\n.hb-kh9-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }\n.hb-kh9-blob {\n  position: absolute;\n  border-radius: 50%;\n  filter: blur(70px);\n  opacity: 0.55;\n  animation: hb-kh9-drift 18s ease-in-out infinite;\n}\n.hb-kh9-b1 { top: -18%; left: 8%; width: 46%; height: 70%; background: color-mix(in srgb, var(--hb-kh9-accent) 55%, transparent); }\n.hb-kh9-b2 { top: 30%; right: -6%; width: 40%; height: 70%; background: rgba(124, 92, 255, 0.35); animation-delay: -6s; }\n.hb-kh9-b3 { bottom: -30%; left: 30%; width: 44%; height: 60%; background: rgba(34, 211, 238, 0.18); animation-delay: -12s; }\n.hb-kh9-grain {\n  position: absolute;\n  inset: 0;\n  pointer-events: none;\n  background-image:\n    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),\n    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);\n  background-size: 44px 44px;\n  mask-image: radial-gradient(60% 60% at 50% 50%, #000, transparent 80%);\n  -webkit-mask-image: radial-gradient(60% 60% at 50% 50%, #000, transparent 80%);\n}\n.hb-kh9-in {\n  position: relative;\n  max-width: 1120px;\n  margin: 0 auto;\n  padding: 64px 16px 72px;\n}\n.hb-kh9-card {\n  position: relative;\n  display: grid;\n  grid-template-columns: 1fr;\n  max-width: 980px;\n  margin: 0 auto;\n  overflow: hidden;\n  border: 1px solid rgba(255, 255, 255, 0.1);\n  border-radius: 28px;\n  background: linear-gradient(180deg, rgba(23, 23, 23, 0.86), rgba(12, 12, 12, 0.92));\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 60px 120px -50px rgba(0, 0, 0, 0.95);\n  -webkit-backdrop-filter: blur(20px);\n  backdrop-filter: blur(20px);\n}\n.hb-kh9-card::before {\n  content: \"\";\n  position: absolute;\n  top: 0;\n  left: 12%;\n  right: 12%;\n  height: 1px;\n  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--hb-kh9-accent) 80%, #ffffff), transparent);\n}\n.hb-kh9-main { min-width: 0; padding: 28px 22px; }\n.hb-kh9-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }\n.hb-kh9-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }\n.hb-kh9-logo {\n  position: relative;\n  width: 26px;\n  height: 26px;\n  border-radius: 50%;\n  background: radial-gradient(circle at 30% 30%, #ffffff, color-mix(in srgb, var(--hb-kh9-accent) 80%, #ffffff) 40%, var(--hb-kh9-accent));\n  box-shadow: 0 0 20px color-mix(in srgb, var(--hb-kh9-accent) 60%, transparent);\n}\n.hb-kh9-logo::after {\n  content: \"\";\n  position: absolute;\n  top: 3px;\n  left: 9px;\n  width: 20px;\n  height: 20px;\n  border-radius: 50%;\n  background: #141414;\n}\n.hb-kh9-badge {\n  display: inline-flex;\n  align-items: center;\n  gap: 7px;\n  height: 28px;\n  padding: 0 12px;\n  border: 1px solid color-mix(in srgb, var(--hb-kh9-accent) 35%, transparent);\n  border-radius: 999px;\n  background: color-mix(in srgb, var(--hb-kh9-accent) 10%, transparent);\n  color: color-mix(in srgb, var(--hb-kh9-accent) 45%, #ffffff);\n  font-size: 12px;\n  font-weight: 600;\n}\n.hb-kh9-title {\n  margin: 26px 0 0;\n  font-size: clamp(28px, 4.2cqw, 42px);\n  font-weight: 600;\n  line-height: 1.06;\n  letter-spacing: -0.04em;\n  text-wrap: balance;\n}\n.hb-kh9-sub { margin: 12px 0 0; color: #8f8f8f; font-size: 15.5px; line-height: 1.6; text-wrap: pretty; }\n.hb-kh9-live {\n  margin: 24px 0 0;\n  color: color-mix(in srgb, var(--hb-kh9-accent) 50%, #ffffff);\n  font-size: 13px;\n  font-weight: 600;\n}\n.hb-kh9-units {\n  display: grid;\n  grid-template-columns: repeat(4, minmax(0, 1fr));\n  gap: 10px;\n  max-width: 460px;\n  margin-top: 24px;\n  container-type: inline-size;\n}\n.hb-kh9-unit { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }\n.hb-kh9-tile {\n  position: relative;\n  width: 100%;\n  aspect-ratio: 1 / 1.08;\n  border-radius: 14px;\n  font-size: 12.5cqw;\n  font-weight: 600;\n  letter-spacing: -0.04em;\n  font-variant-numeric: tabular-nums;\n  perspective: 400px;\n  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.9);\n}\n.hb-kh9-half {\n  position: absolute;\n  left: 0;\n  right: 0;\n  height: 50%;\n  overflow: hidden;\n  background: linear-gradient(180deg, #202020, #191919);\n  backface-visibility: hidden;\n  -webkit-backface-visibility: hidden;\n}\n.hb-kh9-half > span {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 200%;\n  color: #f5f5f5;\n}\n.hb-kh9-up {\n  top: 0;\n  border: 1px solid rgba(255, 255, 255, 0.08);\n  border-bottom: 0;\n  border-radius: 14px 14px 0 0;\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);\n  transform-origin: 50% 100%;\n}\n.hb-kh9-down {\n  top: 50%;\n  border: 1px solid rgba(255, 255, 255, 0.08);\n  border-top: 0;\n  border-radius: 0 0 14px 14px;\n  background: linear-gradient(180deg, #171717, #141414);\n  transform-origin: 50% 0;\n}\n.hb-kh9-down > span { transform: translateY(-50%); }\n.hb-kh9-tile::after {\n  content: \"\";\n  position: absolute;\n  top: 50%;\n  left: 0;\n  right: 0;\n  z-index: 3;\n  height: 1px;\n  background: rgba(0, 0, 0, 0.7);\n  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);\n}\n.hb-kh9-ftop { z-index: 2; animation: hb-kh9-ftop 0.32s cubic-bezier(0.55, 0, 0.9, 0.4) both; }\n.hb-kh9-fbot { z-index: 2; animation: hb-kh9-fbot 0.38s cubic-bezier(0.1, 0.6, 0.4, 1) 0.32s both; }\n.hb-kh9-ul { color: #8f8f8f; font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }\n.hb-kh9-form {\n  display: flex;\n  gap: 8px;\n  max-width: 460px;\n  margin-top: 26px;\n}\n.hb-kh9-input {\n  flex: 1;\n  min-width: 0;\n  height: 46px;\n  margin: 0;\n  padding: 0 16px;\n  border: 1px solid rgba(255, 255, 255, 0.1);\n  border-radius: 12px;\n  background: rgba(0, 0, 0, 0.35);\n  color: #ededed;\n  font: inherit;\n  font-size: 14.5px;\n  outline: none;\n  transition: border-color 0.2s ease, box-shadow 0.2s ease;\n}\n.hb-kh9-input::placeholder { color: #6f6f6f; }\n.hb-kh9-input:focus { border-color: color-mix(in srgb, var(--hb-kh9-accent) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hb-kh9-accent) 16%, transparent); }\n.hb-kh9-btn {\n  flex: none;\n  height: 46px;\n  margin: 0;\n  padding: 0 18px;\n  border: 0;\n  border-radius: 12px;\n  background: var(--hb-kh9-accent);\n  color: #1a0b06;\n  font: inherit;\n  font-size: 14.5px;\n  font-weight: 700;\n  white-space: nowrap;\n  cursor: pointer;\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 30px -12px var(--hb-kh9-accent);\n  transition: transform 0.15s ease, filter 0.2s ease;\n}\n.hb-kh9-btn:hover { filter: brightness(1.08); }\n.hb-kh9-btn:active { transform: scale(0.97); }\n.hb-kh9-btn:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }\n.hb-kh9-err { margin: 8px 0 0; color: #ff8a8a; font-size: 13px; }\n.hb-kh9-ok {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  max-width: 460px;\n  margin-top: 26px;\n  padding: 12px 14px;\n  border: 1px solid color-mix(in srgb, var(--hb-kh9-accent) 30%, transparent);\n  border-radius: 12px;\n  background: color-mix(in srgb, var(--hb-kh9-accent) 8%, transparent);\n  font-size: 14px;\n  animation: hb-kh9-in 0.4s ease both;\n}\n.hb-kh9-ok svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--hb-kh9-accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }\n.hb-kh9-ok b { font-weight: 600; }\n.hb-kh9-note { margin: 12px 0 0; color: #6f6f6f; font-size: 12.5px; }\n.hb-kh9-side {\n  min-width: 0;\n  padding: 24px 22px 28px;\n  border-top: 1px solid rgba(255, 255, 255, 0.07);\n  background: rgba(255, 255, 255, 0.015);\n}\n.hb-kh9-ph { margin: 0; color: #8f8f8f; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }\n.hb-kh9-perks { display: grid; gap: 4px; margin: 14px 0 0; padding: 0; list-style: none; }\n.hb-kh9-perk {\n  display: flex;\n  gap: 14px;\n  padding: 12px;\n  border: 1px solid transparent;\n  border-radius: 14px;\n  transition: background-color 0.2s ease, border-color 0.2s ease;\n}\n.hb-kh9-perk:hover { border-color: rgba(255, 255, 255, 0.06); background: rgba(255, 255, 255, 0.03); }\n.hb-kh9-pi {\n  display: grid;\n  flex: none;\n  place-items: center;\n  width: 34px;\n  height: 34px;\n  border: 1px solid rgba(255, 255, 255, 0.08);\n  border-radius: 10px;\n  background: #151515;\n  color: var(--hb-kh9-accent);\n}\n.hb-kh9-pi svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }\n.hb-kh9-pt { display: block; min-width: 0; }\n.hb-kh9-pt strong { display: block; font-size: 14.5px; font-weight: 600; }\n.hb-kh9-pd { display: block; margin-top: 3px; color: #8f8f8f; font-size: 13px; line-height: 1.45; }\n.hb-kh9-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  overflow: hidden;\n  clip-path: inset(50%);\n  white-space: nowrap;\n}\n@container hb-kh9-root (max-width: 420px) {\n  .hb-kh9-form { flex-direction: column; }\n  .hb-kh9-btn { width: 100%; }\n  .hb-kh9-tile { border-radius: 10px; }\n  .hb-kh9-up { border-radius: 10px 10px 0 0; }\n  .hb-kh9-down { border-radius: 0 0 10px 10px; }\n}\n@container hb-kh9-root (min-width: 720px) {\n  .hb-kh9-in { padding: 88px 40px 96px; }\n  .hb-kh9-main { padding: 40px 40px 36px; }\n  .hb-kh9-side { padding: 28px 30px 32px; }\n}\n@container hb-kh9-root (min-width: 880px) {\n  .hb-kh9-in { padding: 72px 40px 88px; }\n  .hb-kh9-card { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }\n  .hb-kh9-side { border-top: 0; border-left: 1px solid rgba(255, 255, 255, 0.07); padding: 40px 28px 32px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-kh9 *, .hb-kh9 *::before, .hb-kh9 *::after { animation: none !important; transition: none !important; }\n  .hb-kh9-ftop { display: none; }\n}\n`;\n\nconst defaultPerks: WaitlistLaunchPerk[] = [\n  { title: \"Founding price, locked in\", detail: \"$6 a month for life instead of $12, as long as you stay.\" },\n  { title: \"In two weeks early\", detail: \"Waitlist members get access fourteen days before the public launch.\" },\n  { title: \"Shape what we build\", detail: \"A monthly call with the four people who design and ship Halcyon.\" },\n];\n\nconst perkIcons = [\n  <path key=\"0\" d=\"M12 3l2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.4l-5.2 2.7 1-5.8L3.5 9.2l5.9-.9z\" />,\n  <path key=\"1\" d=\"M12 7v5l3 2M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z\" />,\n  <path key=\"2\" d=\"M7 18l-3 3V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H7zM8 9h8M8 13h5\" />,\n];\n\nfunction pad(n: number) {\n  return String(n).padStart(2, \"0\");\n}\n\nfunction FlipUnit({ value, label }: { value: string; label: string }) {\n  const [cur, setCur] = React.useState(value);\n  const [prev, setPrev] = React.useState(value);\n  if (value !== cur) {\n    setPrev(cur);\n    setCur(value);\n  }\n  const flipping = prev !== cur;\n  return (\n    <div className=\"hb-kh9-unit\">\n      <div className=\"hb-kh9-tile\" aria-hidden=\"true\">\n        <span className=\"hb-kh9-half hb-kh9-up\">\n          <span>{cur}</span>\n        </span>\n        <span className=\"hb-kh9-half hb-kh9-down\">\n          <span>{prev}</span>\n        </span>\n        {flipping ? (\n          <>\n            <span key={`t${cur}`} className=\"hb-kh9-half hb-kh9-up hb-kh9-ftop\">\n              <span>{prev}</span>\n            </span>\n            <span key={`b${cur}`} className=\"hb-kh9-half hb-kh9-down hb-kh9-fbot\">\n              <span>{cur}</span>\n            </span>\n          </>\n        ) : null}\n      </div>\n      <span className=\"hb-kh9-ul\">{label}</span>\n    </div>\n  );\n}\n\nexport function WaitlistLaunchCard({\n  brand = \"Halcyon\",\n  badge = \"Launching January 15\",\n  title = \"Something calm is coming to your inbox\",\n  subtitle = \"Halcyon batches email into two quiet deliveries a day and drafts the replies that can wait. Join the list to get in first.\",\n  launchAt = \"2027-01-15T17:00:00Z\",\n  liveLabel = \"We are live. Check your inbox for your invite.\",\n  placeholder = \"Your work email\",\n  ctaLabel = \"Get early access\",\n  perksTitle = \"Waitlist perks\",\n  perks = defaultPerks,\n  note = \"One email on launch day. No spam, unsubscribe anytime.\",\n  onSubmit,\n  accent = \"#ff7a59\",\n  className,\n  style,\n  ...rest\n}: WaitlistLaunchCardProps) {\n  const [left, setLeft] = React.useState<number | null>(null);\n  const [email, setEmail] = React.useState(\"\");\n  const [error, setError] = React.useState(\"\");\n  const [sent, setSent] = React.useState(\"\");\n  const uid = React.useId().replace(/[^a-zA-Z0-9]/g, \"\");\n\n  React.useEffect(() => {\n    const target = Date.parse(launchAt);\n    if (Number.isNaN(target)) return;\n    const tick = () => setLeft(Math.max(0, target - Date.now()));\n    const first = window.setTimeout(tick, 0);\n    const id = window.setInterval(tick, 1000);\n    return () => {\n      window.clearTimeout(first);\n      window.clearInterval(id);\n    };\n  }, [launchAt]);\n\n  const total = Math.floor((left ?? 0) / 1000);\n  const parts = [\n    { label: \"Days\", value: pad(Math.floor(total / 86400)) },\n    { label: \"Hours\", value: pad(Math.floor((total % 86400) / 3600)) },\n    { label: \"Minutes\", value: pad(Math.floor((total % 3600) / 60)) },\n    { label: \"Seconds\", value: pad(total % 60) },\n  ];\n  const done = left === 0;\n  const spoken = left === null ? \"\" : `${parts[0].value} days, ${parts[1].value} hours and ${parts[2].value} minutes until launch`;\n\n  const submit = (e: React.FormEvent<HTMLFormElement>) => {\n    e.preventDefault();\n    const value = email.trim();\n    if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value)) {\n      setError(\"Enter a valid email address.\");\n      return;\n    }\n    setError(\"\");\n    setSent(value);\n    onSubmit?.(value);\n  };\n\n  return (\n    <section\n      className={[\"hb-kh9\", className].filter(Boolean).join(\" \")}\n      style={{ [\"--hb-kh9-accent\" as string]: accent, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-waitlist-launch-card\" precedence=\"default\">{css}</style>\n      <div className=\"hb-kh9-sky\" aria-hidden=\"true\">\n        <span className=\"hb-kh9-blob hb-kh9-b1\" />\n        <span className=\"hb-kh9-blob hb-kh9-b2\" />\n        <span className=\"hb-kh9-blob hb-kh9-b3\" />\n      </div>\n      <div className=\"hb-kh9-grain\" aria-hidden=\"true\" />\n      <div className=\"hb-kh9-in\">\n        <div className=\"hb-kh9-card\">\n          <div className=\"hb-kh9-main\">\n            <div className=\"hb-kh9-top\">\n              <span className=\"hb-kh9-brand\">\n                <span className=\"hb-kh9-logo\" aria-hidden=\"true\" />\n                {brand}\n              </span>\n              {badge ? <span className=\"hb-kh9-badge\">{badge}</span> : null}\n            </div>\n            <h2 className=\"hb-kh9-title\">{title}</h2>\n            {subtitle ? <p className=\"hb-kh9-sub\">{subtitle}</p> : null}\n            {done && liveLabel ? <p className=\"hb-kh9-live\">{liveLabel}</p> : null}\n            <div className=\"hb-kh9-units\" role=\"timer\" aria-label={spoken || \"Countdown to launch\"}>\n              {parts.map((p) => (\n                <FlipUnit key={p.label} value={p.value} label={p.label} />\n              ))}\n            </div>\n            {sent ? (\n              <div className=\"hb-kh9-ok\" role=\"status\">\n                <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n                  <path d=\"M5 12.5l4.5 4.5L19 7.5\" />\n                </svg>\n                <span>\n                  You are on the list. We will write to <b>{sent}</b> on launch day.\n                </span>\n              </div>\n            ) : (\n              <>\n                <form className=\"hb-kh9-form\" onSubmit={submit} noValidate>\n                  <label htmlFor={`${uid}-email`} className=\"hb-kh9-sr\">\n                    Email address\n                  </label>\n                  <input\n                    id={`${uid}-email`}\n                    className=\"hb-kh9-input\"\n                    type=\"email\"\n                    inputMode=\"email\"\n                    autoComplete=\"email\"\n                    placeholder={placeholder}\n                    value={email}\n                    aria-invalid={error ? true : undefined}\n                    aria-describedby={error ? `${uid}-err` : undefined}\n                    onChange={(e) => {\n                      setEmail(e.target.value);\n                      if (error) setError(\"\");\n                    }}\n                  />\n                  <button type=\"submit\" className=\"hb-kh9-btn\">\n                    {ctaLabel}\n                  </button>\n                </form>\n                {error ? (\n                  <p className=\"hb-kh9-err\" id={`${uid}-err`} role=\"alert\">\n                    {error}\n                  </p>\n                ) : null}\n              </>\n            )}\n            {note ? <p className=\"hb-kh9-note\">{note}</p> : null}\n          </div>\n          {perks.length ? (\n            <div className=\"hb-kh9-side\">\n              <h3 className=\"hb-kh9-ph\">{perksTitle}</h3>\n              <ul className=\"hb-kh9-perks\">\n                {perks.map((p, i) => (\n                  <li key={p.title} className=\"hb-kh9-perk\">\n                    <span className=\"hb-kh9-pi\" aria-hidden=\"true\">\n                      <svg viewBox=\"0 0 24 24\">{perkIcons[i % perkIcons.length]}</svg>\n                    </span>\n                    <span className=\"hb-kh9-pt\">\n                      <strong>{p.title}</strong>\n                      <span className=\"hb-kh9-pd\">{p.detail}</span>\n                    </span>\n                  </li>\n                ))}\n              </ul>\n            </div>\n          ) : null}\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}