{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "signup-form",
  "title": "Signup Form",
  "author": "AlgorizeTech",
  "description": "A standalone registration form with inline field validation and animated error states. Use it where sign-up is its own page rather than a tab beside sign-in.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "https://avaraui.com/r/icons.json",
    "utils"
  ],
  "files": [
    {
      "path": "src/components/custom/blocks/SignupForm.tsx",
      "content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport {\n  AlertCircle,\n  ArrowLeft,\n  Calendar,\n  Check,\n  ChevronDown,\n  ChevronLeft,\n  ChevronRight,\n  Clock,\n  Eye,\n  EyeOff,\n  Lock,\n  Mail,\n  User,\n  X,\n} from \"lucide-react\";\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport { springLinear } from \"./motion-curves\";\nimport { GoogleIcon } from \"./Icons\";\nimport { getThemeStyles } from \"./register-form-theme\";\n\n// ==========================================\n// MOTION\n// ==========================================\n// The default fade for opacity and height.\nconst FADE_EASE = \"cubic-bezier(0.25, 0.1, 0.35, 1)\";\n// The default spring for a short vertical move.\nconst Y_SPRING = springLinear({ stiffness: 500, damping: 25 });\n// The form rows rise in on this spring.\nconst ITEM_SPRING = springLinear({ stiffness: 300, damping: 24 });\n// The checkmark's `{ type: \"spring\", bounce: 0.5 }`: 800ms, stiffness 252.69,\n// damping 15.9, landing exactly on 1 at the end.\nconst TICK_SPRING =\n  \"linear(0, 0.032, 0.1159, 0.2345, 0.3724, 0.5167, 0.657, 0.7857, 0.8976, 0.9897, 1.061, 1.112, 1.1442, 1.1601, 1.1625, 1.1544, 1.1387, 1.1181, 1.0951, 1.0716, 1.0492, 1.029, 1.0117, 0.9977, 0.9872, 0.9798, 0.9754, 0.9736, 0.9738, 0.9755, 0.9784, 0.9819, 0.9857, 0.9895, 0.993, 0.9962, 0.9988, 1.001, 1.0025, 1.0036, 1.0041, 1.0043, 1.0042, 1.0039, 1.0034, 1.0028, 1.0021, 1.0015, 1)\";\nconst TICK_DURATION = 800;\n// circOut (a quarter circle), sampled densely where it starts steep.\nconst CIRC_OUT =\n  \"linear(0, 0.0078 0.003%, 0.0221 0.024%, 0.0406 0.082%, 0.0625 0.195%, 0.0873 0.382%, 0.1146 0.659%, 0.1443 1.047%, 0.1761 1.563%, 0.2098 2.225%, 0.2452 3.052%, 0.2821 4.062%, 0.3204 5.273%, 0.36 6.705%, 0.4006 8.374%, 0.442 10.3%, 0.4841 12.5%, 0.5267 14.993%, 0.5695 17.798%, 0.6122 20.932%, 0.6547 24.414%, 0.6967 28.262%, 0.7378 32.495%, 0.7777 37.131%, 0.8159 42.188%, 0.8522 47.684%, 0.886 53.638%, 0.9168 60.068%, 0.944 66.992%, 0.9668 74.429%, 0.9844 82.398%, 0.9959 90.915%, 1)\";\n\nconst keyframes = `\n  @keyframes signup-form-fade-in { from { opacity: 0; } }\n  @keyframes signup-form-drop-in { from { translate: 0 -20px; } }\n  @keyframes signup-form-item-in { from { opacity: 0; translate: 0 15px; } }\n  @keyframes signup-form-tick-draw {\n    from { stroke-dasharray: 0 1; }\n    to { stroke-dasharray: 1 1; }\n  }\n`;\n\n/**\n * Keeps a piece of UI mounted while it transitions out. `open` flips one\n * commit after mounting (so the closed styles are in place and the change\n * transitions), and `mounted` drops when the closing transition of\n * `endProperty` ends, or after `exitMs` if that event never comes.\n */\nfunction usePresence<T extends Element>(\n  show: boolean,\n  endProperty: string,\n  exitMs: number,\n) {\n  const [mounted, setMounted] = useState(show);\n  const [open, setOpen] = useState(false);\n\n  // Follow `show` while rendering, so the change is what first commits.\n  if (!show && open) setOpen(false);\n  if (show && !mounted) setMounted(true);\n\n  // Runs in the commit where the element mounts, and again whenever `show`\n  // changes (a new callback is a new ref), so an element caught mid-exit\n  // opens again too. Resolve the closed styles before opening, or nothing\n  // transitions.\n  const attach = useCallback(\n    (el: T | null) => {\n      if (!el || !show) return;\n      el.getBoundingClientRect();\n      setOpen(true);\n    },\n    [show],\n  );\n\n  useEffect(() => {\n    if (show || !mounted) return;\n    const timer = window.setTimeout(() => setMounted(false), exitMs + 100);\n    return () => window.clearTimeout(timer);\n  }, [show, mounted, exitMs]);\n\n  const onTransitionEnd = (e: React.TransitionEvent) => {\n    if (\n      e.target === e.currentTarget &&\n      e.propertyName === endProperty &&\n      !show\n    ) {\n      setMounted(false);\n    }\n  };\n\n  return { attach, mounted, open, onTransitionEnd };\n}\n\n/** The last non-empty message, so an error keeps its text while it leaves. */\nfunction useLastMessage(message?: string) {\n  const [shown, setShown] = useState(message);\n  if (message && message !== shown) setShown(message);\n  return message || shown;\n}\n\n\n\n// ==========================================\n// PREMIUM INPUT COMPONENT\n// ==========================================\ninterface PremiumInputProps\n  extends React.InputHTMLAttributes<HTMLInputElement> {\n  label: string;\n  error?: string;\n  icon?: React.ElementType;\n}\n\nconst PremiumInput = React.forwardRef<HTMLInputElement, PremiumInputProps>(\n  ({ label, error, icon: Icon, type, className, required, ...props }, ref) => {\n    const [isFocused, setIsFocused] = useState(false);\n    const [showPassword, setShowPassword] = useState(false);\n\n    const isPassword = type === \"password\";\n    const inputType = isPassword ? (showPassword ? \"text\" : \"password\") : type;\n\n    // The ref callback is pulled out on its own: left inside the object, the\n    // compiler treats every field read from it as a ref read.\n    const { attach: attachError, ...errorPresence } = usePresence<HTMLDivElement>(\n      !!error,\n      \"opacity\",\n      300,\n    );\n    const errorText = useLastMessage(error);\n\n    return (\n      <div className=\"flex flex-col gap-1.5 w-full\">\n        <label className=\"text-[13px] font-semibold text-foreground ml-1\">\n          {label} {required && <span className=\"text-primary\">*</span>}\n        </label>\n\n        <div className=\"relative group\">\n          {/* Animated Focus Glow */}\n          <div\n            className={cn(\n              \"absolute -inset-[2px] rounded-lg blur-[4px] -z-10 transition-colors\",\n              error ? \"bg-rose-500/40\" : \"bg-primary/30\",\n            )}\n            style={{\n              opacity: isFocused ? 1 : 0,\n              scale: isFocused ? 1 : 0.98,\n              // `transition-colors` still covers the background swap.\n              transition:\n                \"opacity 0.2s cubic-bezier(0, 0, 0.58, 1), scale 0.2s cubic-bezier(0, 0, 0.58, 1), background-color 150ms cubic-bezier(0.4, 0, 0.2, 1)\",\n            }}\n          />\n\n          <div\n            className={cn(\n              \"relative flex items-center w-full bg-muted border rounded-lg transition-colors overflow-hidden\",\n              error\n                ? \"border-rose-500/50\"\n                : isFocused\n                  ? \"border-primary/50\"\n                  : \"border-border hover:border-border\",\n            )}\n          >\n            {Icon && (\n              <div className=\"pl-3.5 text-muted-foreground flex-shrink-0 transition-colors group-focus-within:text-primary\">\n                <Icon className=\"w-4 h-4\" />\n              </div>\n            )}\n\n            <input\n              ref={ref}\n              type={inputType}\n              onFocus={(e) => {\n                setIsFocused(true);\n                props.onFocus?.(e);\n              }}\n              onBlur={(e) => {\n                setIsFocused(false);\n                props.onBlur?.(e);\n              }}\n              className={cn(\n                \"flex h-11 w-full bg-transparent px-3 py-2 text-sm font-medium text-foreground placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50\",\n                className,\n              )}\n              {...props}\n            />\n\n            {isPassword && (\n              <button\n                type=\"button\"\n                onClick={() => setShowPassword(!showPassword)}\n                className=\"pr-3.5 text-muted-foreground hover:text-foreground transition-colors focus:outline-none\"\n              >\n                {showPassword ? (\n                  <EyeOff className=\"w-4 h-4\" />\n                ) : (\n                  <Eye className=\"w-4 h-4\" />\n                )}\n              </button>\n            )}\n          </div>\n        </div>\n\n        {/* Animated Error Message */}\n        {errorPresence.mounted && (\n          <div\n            ref={attachError}\n            onTransitionEnd={errorPresence.onTransitionEnd}\n            className=\"overflow-hidden\"\n            style={{\n              display: \"grid\",\n              gridTemplateRows: errorPresence.open ? \"1fr\" : \"0fr\",\n              opacity: errorPresence.open ? 1 : 0,\n              translate: errorPresence.open ? \"0 0\" : \"0 -10px\",\n              transition: `grid-template-rows 0.3s ${FADE_EASE}, opacity 0.3s ${FADE_EASE}, translate ${Y_SPRING.duration}ms ${Y_SPRING.easing}`,\n            }}\n          >\n            <div className=\"min-h-0 overflow-hidden\">\n              <p className=\"flex items-center gap-1.5 text-[12px] font-semibold text-rose-500 mt-1 ml-1\">\n                <AlertCircle className=\"w-3.5 h-3.5\" />\n                {errorText}\n              </p>\n            </div>\n          </div>\n        )}\n      </div>\n    );\n  },\n);\nPremiumInput.displayName = \"PremiumInput\";\n\n// ==========================================\n// PREMIUM CHECKBOX\n// ==========================================\ninterface PremiumCheckboxProps {\n  checked: boolean;\n  onChange: (checked: boolean) => void;\n  label: React.ReactNode;\n  error?: string;\n  required?: boolean;\n}\n\nconst PremiumCheckbox = ({\n  checked,\n  onChange,\n  label,\n  error,\n  required,\n}: PremiumCheckboxProps) => {\n  const { attach: attachTick, ...tick } = usePresence<SVGSVGElement>(checked, \"opacity\", TICK_DURATION);\n  const { attach: attachError, ...errorPresence } = usePresence<HTMLParagraphElement>(\n    !!error,\n    \"opacity\",\n    300,\n  );\n  const errorText = useLastMessage(error);\n\n  return (\n    <div className=\"flex flex-col gap-1\">\n      <label className=\"flex items-start gap-3 cursor-pointer group\">\n        <div className=\"relative flex items-center justify-center pt-0.5\">\n          <input\n            type=\"checkbox\"\n            className=\"sr-only\"\n            checked={checked}\n            onChange={(e) => onChange(e.target.checked)}\n          />\n          <div\n            className={cn(\n              \"w-5 h-5 rounded border transition-colors flex items-center justify-center\",\n              checked\n                ? \"bg-primary border-primary\"\n                : error\n                  ? \"border-rose-500 bg-rose-50 dark:bg-rose-500/10\"\n                  : \"border-border bg-card group-hover:border-primary/60\",\n            )}\n          >\n            {tick.mounted && (\n              <svg\n                ref={attachTick}\n                onTransitionEnd={tick.onTransitionEnd}\n                style={{\n                  opacity: tick.open ? 1 : 0,\n                  scale: tick.open ? 1 : 0.5,\n                  transition: `opacity ${TICK_DURATION}ms ${TICK_SPRING}, scale ${TICK_DURATION}ms ${TICK_SPRING}`,\n                }}\n                viewBox=\"0 0 24 24\"\n                fill=\"none\"\n                stroke=\"currentColor\"\n                strokeWidth=\"3\"\n                strokeLinecap=\"round\"\n                strokeLinejoin=\"round\"\n                className=\"w-3.5 h-3.5 text-primary-foreground\"\n              >\n                <polyline\n                  pathLength={1}\n                  style={{\n                    animation:\n                      \"signup-form-tick-draw 0.3s cubic-bezier(0, 0, 0.58, 1) backwards\",\n                  }}\n                  points=\"20 6 9 17 4 12\"\n                />\n              </svg>\n            )}\n          </div>\n        </div>\n        <span className=\"text-[13px] font-medium text-foreground leading-snug\">\n          {label} {required && <span className=\"text-primary\">*</span>}\n        </span>\n      </label>\n      {errorPresence.mounted && (\n        <p\n          ref={attachError}\n          onTransitionEnd={errorPresence.onTransitionEnd}\n          className=\"text-[12px] font-semibold text-rose-500 ml-8 overflow-hidden\"\n          style={{\n            display: \"grid\",\n            gridTemplateRows: errorPresence.open ? \"1fr\" : \"0fr\",\n            opacity: errorPresence.open ? 1 : 0,\n            transition: `grid-template-rows 0.3s ${FADE_EASE}, opacity 0.3s ${FADE_EASE}`,\n          }}\n        >\n          <span className=\"min-h-0 overflow-hidden\">{errorText}</span>\n        </p>\n      )}\n    </div>\n  );\n};\n\n// ==========================================\n// PASSWORD STRENGTH METER\n// ==========================================\nconst PasswordStrength = ({ password }: { password: string }) => {\n  const getStrength = (pass: string) => {\n    let score = 0;\n    if (!pass) return score;\n    if (pass.length >= 8) score += 1;\n    if (/[A-Z]/.test(pass)) score += 1;\n    if (/[a-z]/.test(pass)) score += 1;\n    if (/[0-9]/.test(pass)) score += 1;\n    if (/[^A-Za-z0-9]/.test(pass)) score += 1;\n    return Math.min(4, score);\n  };\n\n  const strength = getStrength(password);\n\n  const segments = Array.from({ length: 4 });\n  const getSegmentColor = (index: number) => {\n    if (index >= strength) return \"bg-muted\";\n    if (strength <= 1) return \"bg-rose-500\";\n    if (strength === 2) return \"bg-orange-500\";\n    if (strength === 3) return \"bg-yellow-500\";\n    return \"bg-emerald-500\";\n  };\n\n  const getLabel = () => {\n    if (strength === 0) return \"Very Weak\";\n    if (strength === 1) return \"Weak\";\n    if (strength === 2) return \"Fair\";\n    if (strength === 3) return \"Good\";\n    return \"Strong\";\n  };\n\n  return (\n    <div className=\"flex flex-col gap-1.5 mt-2\">\n      <div className=\"flex gap-1 h-1.5 w-full\">\n        {segments.map((_, i) => (\n          <div\n            key={i}\n            className={cn(\n              \"h-full flex-1 rounded-full transition-colors duration-300\",\n              getSegmentColor(i),\n            )}\n          />\n        ))}\n      </div>\n      <div className=\"flex justify-between items-center text-[11px] font-medium text-muted-foreground\">\n        <span>Password strength</span>\n        <span\n          className={cn(\n            \"transition-colors\",\n            strength === 4\n              ? \"text-emerald-500\"\n              : strength >= 2\n                ? \"text-yellow-600\"\n                : \"text-rose-500\",\n          )}\n        >\n          {password ? getLabel() : \"\"}\n        </span>\n      </div>\n    </div>\n  );\n};\n\nexport type ScenicSignupStep =\n  | \"welcome\"\n  | \"options\"\n  | \"form\"\n  | \"otp\"\n  | \"onboarding-intro\"\n  | \"goals\"\n  | \"finances\"\n  | \"confidence\"\n  | \"emergency-fund\"\n  | \"first-goal\"\n  | \"summary\"\n  | \"completed\";\n\nexport interface SignupFormProps {\n  variant?: \"scenic\" | \"default\" | \"nature\" | \"landscape\";\n  color?: string;\n  brandName?: string;\n  brandIcon?: React.ReactNode;\n  title?: string;\n  subtitle?: string;\n  getStartedLabel?: string;\n  alreadyAccountLabel?: string;\n  bgImage?: string;\n  initialStep?: ScenicSignupStep;\n  loginHref?: string;\n}\n\nexport const DocsUiIcon = ({\n  className = \"w-5 h-5\",\n  size = 20,\n}: {\n  className?: string;\n  size?: number;\n}) => (\n  <svg\n    width={size}\n    height={size}\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    className={className}\n  >\n    <rect\n      x=\"3\"\n      y=\"3\"\n      width=\"7\"\n      height=\"7\"\n      rx=\"1.5\"\n      className=\"fill-foreground dark:fill-white\"\n    />\n    <rect\n      x=\"14\"\n      y=\"3\"\n      width=\"7\"\n      height=\"7\"\n      rx=\"1.5\"\n      className=\"fill-primary\"\n    />\n    <rect\n      x=\"14\"\n      y=\"14\"\n      width=\"7\"\n      height=\"7\"\n      rx=\"1.5\"\n      className=\"fill-foreground dark:fill-white\"\n    />\n    <rect\n      x=\"3\"\n      y=\"14\"\n      width=\"7\"\n      height=\"7\"\n      rx=\"1.5\"\n      className=\"fill-primary\"\n    />\n  </svg>\n);\n\nconst AppleBrandIcon = ({\n  className = \"w-5 h-5\",\n  size = 19,\n}: {\n  className?: string;\n  size?: number;\n}) => (\n  <svg\n    width={size}\n    height={size}\n    viewBox=\"0 0 170 170\"\n    fill=\"currentColor\"\n    className={className}\n    xmlns=\"http://www.w3.org/2000/svg\"\n  >\n    <path d=\"M150.37 130.25c-2.45 5.66-5.35 10.87-8.71 15.66-4.58 6.53-8.33 11.05-11.22 13.56-4.48 4.12-9.28 6.23-14.42 6.35-3.69 0-8.14-1.05-13.32-3.18-5.19-2.12-9.97-3.17-14.34-3.17-4.58 0-9.49 1.05-14.75 3.17-5.26 2.13-9.5 3.24-12.74 3.35-4.35.13-9.16-1.9-14.42-6.08-3.7-3.04-7.6-7.85-11.7-14.43-6.09-9.78-10.74-20.93-13.97-33.45-3.23-12.52-4.85-24.16-4.85-34.92 0-14.94 3.73-27.17 11.19-36.68 7.46-9.52 17.06-14.38 28.8-14.59 4.9 0 10.42 1.25 16.56 3.76 6.13 2.5 9.94 3.8 11.43 3.89 1.15-.09 5.25-1.47 12.3-4.14 7.05-2.67 13.06-3.83 18.03-3.48 13.62 1.09 24.36 6.25 32.22 15.49-11.87 7.18-17.7 17.07-17.5 29.68.22 10.02 4.12 18.39 11.71 25.11 7.59 6.72 16.76 10.66 27.52 11.83-2.18 6.75-4.78 13.41-7.81 19.98zm-30.82-108.97c0 7.29-2.67 14.17-8.01 20.65-5.34 6.47-11.96 10.37-19.86 11.7-.33-1.09-.49-2.07-.49-2.94 0-7.07 2.83-13.88 8.49-20.44 5.66-6.56 12.43-10.46 20.3-11.7.11.98.17 1.89.17 2.73z\" />\n  </svg>\n);\n\n// ==========================================\n// MAIN FORM COMPONENT\n// ==========================================\nexport const SignupForm = ({\n  variant = \"default\",\n  color = \"primary\",\n  brandName = \"Docs UI\",\n  brandIcon,\n  title = \"Take control of your financial wellbeing\",\n  subtitle = \"Understand your money, build healthier habits, and make confident financial decisions\",\n  getStartedLabel = \"Get Started\",\n  alreadyAccountLabel = \"I already have an account\",\n  bgImage = \"https://res.cloudinary.com/dodndg7ai/image/upload/f_webp,q_auto,w_1600,c_limit/v1790145140/photo-1426604966848-d7adac402bff-1790145143490.jpg\",\n  initialStep = \"welcome\",\n  loginHref = \"#\",\n}: SignupFormProps = {}) => {\n  const { theme, style } = getThemeStyles(color);\n  const focusInputClasses = cn(\n    \"outline-none transition-all duration-200\",\n    \"focus:bg-white dark:focus:bg-[#18191b]\",\n    theme.focusBorder,\n    theme.focusRing\n  );\n  const focusButtonClasses = cn(\n    \"outline-none transition-all duration-200 focus-visible:outline-none\",\n    theme.focusBorder,\n    theme.focusRing\n  );\n  const scenicPrimaryButtonClasses = cn(\n    theme.bg,\n    theme.panelFg,\n    focusButtonClasses\n  );\n  const scenicDropdownButtonClasses = (isOpen: boolean) =>\n    cn(\n      \"w-full h-11 px-3.5 rounded-xl text-sm font-normal flex items-center justify-between transition-all duration-200 outline-none cursor-pointer\",\n      \"bg-zinc-100 text-zinc-900 border border-zinc-200/80 hover:border-zinc-300 hover:bg-zinc-200/50\",\n      \"dark:bg-[#1e1f21] dark:text-white dark:border-white/[0.08] dark:hover:border-white/20 dark:hover:bg-[#25272a]\",\n      focusButtonClasses,\n      isOpen && [\n        theme.border,\n        \"ring-2\",\n        theme.focusRing,\n        \"bg-white dark:bg-[#1e1f21]\",\n      ]\n    );\n  const [scenicStep, setScenicStep] = useState<ScenicSignupStep>(\n    initialStep === \"form\" ? \"form\" : initialStep || \"welcome\",\n  );\n  const cardContentRef = useRef<HTMLDivElement>(null);\n  const [cardHeight, setCardHeight] = useState<number | undefined>(undefined);\n\n  // OTP state\n  const [otp, setOtp] = useState<string[]>([\"\", \"\", \"\", \"\", \"\", \"\"]);\n  const otpInputRefs = useRef<(HTMLInputElement | null)[]>([]);\n\n  // Focus areas state for \"What would you like to improve first?\"\n  const [selectedAreas, setSelectedAreas] = useState<string[]>([\n    \"Save more\",\n    \"Pay off\",\n  ]);\n\n  // Financial profile state (Image 1)\n  const [finances, setFinances] = useState({\n    monthlyIncome: \"$5,600\",\n    monthlyExpenses: \"$3,800\",\n    employmentStatus: \"Full-time\",\n    household: \"Single\",\n    dependents: \"0\",\n  });\n\n  // Confidence ratings state (Image 2)\n  const [confidenceRatings, setConfidenceRatings] = useState<{\n    expenseCover: number;\n    monthlyControl: number;\n    futurePlan: number;\n  }>({\n    expenseCover: 4,\n    monthlyControl: 3,\n    futurePlan: 3,\n  });\n\n  // Emergency fund state (Image 3)\n  const [emergencyFund, setEmergencyFund] = useState({\n    hasFund: true,\n    currentAmount: \"$5,000\",\n    targetAmount: \"$9,000\",\n  });\n\n  // First goal state (Image 4)\n  const [firstGoal, setFirstGoal] = useState({\n    goalType: \"Grow my net worth\",\n    currentNetWorth: \"$23,950\",\n    targetNetWorth: \"$30,000\",\n    targetDate: \"March 2027\",\n    monthlyContribution: \"$75\",\n  });\n\n  // Custom dropdown & date picker modal states\n  const [activeDropdown, setActiveDropdown] = useState<{\n    title: string;\n    field: \"employmentStatus\" | \"household\" | \"dependents\" | \"goalType\";\n    options: string[];\n  } | null>(null);\n\n  const [isDatePickerOpen, setIsDatePickerOpen] = useState(false);\n  const [datePickerYear, setDatePickerYear] = useState(2027);\n  const [datePickerMonth, setDatePickerMonth] = useState(\"March\");\n\n  const openDatePicker = () => {\n    const parts = firstGoal.targetDate.trim().split(/\\s+/);\n    if (parts.length >= 2) {\n      const mStr = parts[0];\n      const yNum = parseInt(parts[1], 10);\n      const monthNames = [\n        { short: \"Jan\", full: \"January\" },\n        { short: \"Feb\", full: \"February\" },\n        { short: \"Mar\", full: \"March\" },\n        { short: \"Apr\", full: \"April\" },\n        { short: \"May\", full: \"May\" },\n        { short: \"Jun\", full: \"June\" },\n        { short: \"Jul\", full: \"July\" },\n        { short: \"Aug\", full: \"August\" },\n        { short: \"Sep\", full: \"September\" },\n        { short: \"Oct\", full: \"October\" },\n        { short: \"Nov\", full: \"November\" },\n        { short: \"Dec\", full: \"December\" },\n      ];\n      const found = monthNames.find(\n        (m) =>\n          m.short.toLowerCase() === mStr.slice(0, 3).toLowerCase() ||\n          m.full.toLowerCase() === mStr.toLowerCase()\n      );\n      if (found) setDatePickerMonth(found.full);\n      if (!isNaN(yNum)) setDatePickerYear(yNum);\n    }\n    setIsDatePickerOpen(true);\n  };\n\n  const focusOptions = [\n    { id: \"save-more\", label: \"Save more\" },\n    { id: \"pay-off\", label: \"Pay off\" },\n    { id: \"spend-smarter\", label: \"Spend smarter\" },\n    { id: \"emergency-fund\", label: \"Emergency fund\" },\n    { id: \"stress-less\", label: \"Stress less\" },\n    { id: \"grow-wealth\", label: \"Grow wealth\" },\n  ];\n\n  const handleOtpChange = (index: number, value: string) => {\n    const clean = value.replace(/\\D/g, \"\");\n    if (!clean) {\n      const nextOtp = [...otp];\n      nextOtp[index] = \"\";\n      setOtp(nextOtp);\n      return;\n    }\n    const nextOtp = [...otp];\n    if (clean.length > 1) {\n      const digits = clean.slice(0, 6).split(\"\");\n      digits.forEach((d, i) => {\n        if (index + i < 6) nextOtp[index + i] = d;\n      });\n      setOtp(nextOtp);\n      const nextFocus = Math.min(index + digits.length, 5);\n      otpInputRefs.current[nextFocus]?.focus();\n      return;\n    }\n    nextOtp[index] = clean[0];\n    setOtp(nextOtp);\n    if (index < 5) {\n      otpInputRefs.current[index + 1]?.focus();\n    }\n  };\n\n  const handleOtpKeyDown = (\n    index: number,\n    e: React.KeyboardEvent<HTMLInputElement>,\n  ) => {\n    if (e.key === \"Backspace\" && !otp[index] && index > 0) {\n      otpInputRefs.current[index - 1]?.focus();\n    }\n  };\n\n  const handleOtpPaste = (e: React.ClipboardEvent<HTMLInputElement>) => {\n    e.preventDefault();\n    const pasted = e.clipboardData\n      .getData(\"text\")\n      .replace(/\\D/g, \"\")\n      .slice(0, 6);\n    if (!pasted) return;\n    const nextOtp = [...otp];\n    pasted.split(\"\").forEach((d, i) => {\n      if (i < 6) nextOtp[i] = d;\n    });\n    setOtp(nextOtp);\n    const focusIndex = Math.min(pasted.length, 5);\n    otpInputRefs.current[focusIndex]?.focus();\n  };\n\n  const toggleFocusArea = (label: string) => {\n    setSelectedAreas((prev) => {\n      if (prev.includes(label)) {\n        return prev.filter((item) => item !== label);\n      }\n      if (prev.length < 2) {\n        return [...prev, label];\n      }\n      return [prev[1], label];\n    });\n  };\n\n  useEffect(() => {\n    if (!cardContentRef.current) return;\n    const updateHeight = () => {\n      if (cardContentRef.current) {\n        setCardHeight(cardContentRef.current.offsetHeight);\n      }\n    };\n    updateHeight();\n\n    const observer = new ResizeObserver(updateHeight);\n    observer.observe(cardContentRef.current);\n    return () => observer.disconnect();\n  }, [scenicStep]);\n  const [formData, setFormData] = useState({\n    firstName: \"\",\n    lastName: \"\",\n    email: \"\",\n    password: \"\",\n    confirmPassword: \"\",\n    agreeToTerms: false,\n    newsletter: false,\n  });\n\n  const [errors, setErrors] = useState<Record<string, string>>({});\n  const [loading, setLoading] = useState(false);\n\n  // Calculate form completion progress\n  const getProgress = () => {\n    const totalFields = 6; // Excluding newsletter\n    let completed = 0;\n    if (formData.firstName.length >= 2) completed++;\n    if (formData.lastName.length >= 2) completed++;\n    if (/^\\S+@\\S+\\.\\S+$/.test(formData.email)) completed++;\n    if (formData.password.length >= 8) completed++;\n    if (\n      formData.confirmPassword &&\n      formData.password === formData.confirmPassword\n    )\n      completed++;\n    if (formData.agreeToTerms) completed++;\n    return (completed / totalFields) * 100;\n  };\n\n  const handleChange = (name: string, value: string | boolean) => {\n    setFormData((prev) => ({ ...prev, [name]: value }));\n    if (errors[name]) {\n      setErrors((prev) => ({ ...prev, [name]: \"\" }));\n    }\n  };\n\n  const validateForm = () => {\n    const newErrors: Record<string, string> = {};\n\n    if (!formData.firstName) newErrors.firstName = \"First name required\";\n    else if (formData.firstName.length < 2)\n      newErrors.firstName = \"Minimum 2 characters\";\n\n    if (!formData.lastName) newErrors.lastName = \"Last name required\";\n\n    if (!formData.email) newErrors.email = \"Email required\";\n    else if (!/^\\S+@\\S+\\.\\S+$/.test(formData.email))\n      newErrors.email = \"Invalid email format\";\n\n    if (!formData.password) newErrors.password = \"Password required\";\n    else if (formData.password.length < 8)\n      newErrors.password = \"Minimum 8 characters\";\n\n    if (!formData.confirmPassword)\n      newErrors.confirmPassword = \"Confirm your password\";\n    else if (formData.password !== formData.confirmPassword)\n      newErrors.confirmPassword = \"Passwords do not match\";\n\n    if (!formData.agreeToTerms) newErrors.agreeToTerms = \"Must agree to terms\";\n\n    setErrors(newErrors);\n    return Object.keys(newErrors).length === 0;\n  };\n\n  const handleSubmit = async (e: React.FormEvent) => {\n    e.preventDefault();\n    if (!validateForm()) return;\n    if (\n      variant === \"scenic\" ||\n      variant === \"nature\" ||\n      variant === \"landscape\"\n    ) {\n      setScenicStep(\"otp\");\n      return;\n    }\n    setLoading(true);\n\n    // Simulate API\n    await new Promise((resolve) => setTimeout(resolve, 2000));\n    setLoading(false);\n    alert(\"Account created successfully!\");\n  };\n\n  // Entrance: the form fades in while its rows rise one after another,\n  // 0.08s apart from 0.1s.\n  const itemIn = (index: number): React.CSSProperties => ({\n    animation: `signup-form-item-in ${ITEM_SPRING.duration}ms ${ITEM_SPRING.easing} ${0.1 + index * 0.08}s backwards`,\n  });\n\n  if (\n    variant === \"scenic\" ||\n    variant === \"nature\" ||\n    variant === \"landscape\"\n  ) {\n    return (\n      <div\n        className=\"relative w-full min-h-[580px] sm:min-h-[640px] flex items-center justify-center overflow-hidden rounded-3xl p-4 sm:p-6 md:p-8\"\n        style={style}\n      >\n        <style>{`\n          @keyframes scenic-header-zoom {\n            0% {\n              opacity: 0;\n              transform: translateX(-32px) scale(1.12);\n            }\n            60% {\n              opacity: 1;\n              transform: translateX(4px) scale(0.98);\n            }\n            100% {\n              opacity: 1;\n              transform: translateX(0) scale(1);\n            }\n          }\n          @keyframes scenic-spring-bounce {\n            0% {\n              opacity: 0;\n              transform: translateY(26px) scale(0.92);\n            }\n            55% {\n              opacity: 0.95;\n              transform: translateY(-6px) scale(1.03);\n            }\n            80% {\n              transform: translateY(2px) scale(0.99);\n            }\n            100% {\n              opacity: 1;\n              transform: translateY(0) scale(1);\n            }\n          }\n          @keyframes scenic-footer-spring {\n            0% {\n              opacity: 0;\n              transform: translateY(26px) scale(0.94);\n            }\n            60% {\n              opacity: 1;\n              transform: translateY(-4px) scale(1.02);\n            }\n            85% {\n              transform: translateY(1.5px) scale(0.995);\n            }\n            100% {\n              opacity: 1;\n              transform: translateY(0) scale(1);\n            }\n          }\n          @keyframes scenic-stagger-rise {\n            0% {\n              opacity: 0;\n              transform: translateY(22px);\n            }\n            100% {\n              opacity: 1;\n              transform: translateY(0);\n            }\n          }\n          @keyframes scenic-slide-right {\n            0% {\n              opacity: 0;\n              transform: translateX(-24px);\n            }\n            100% {\n              opacity: 1;\n              transform: translateX(0);\n            }\n          }\n          @keyframes scenic-modal-in {\n            0% {\n              opacity: 0;\n              transform: scale(0.95) translateY(8px);\n            }\n            100% {\n              opacity: 1;\n              transform: scale(1) translateY(0);\n            }\n          }\n          @keyframes scenic-fade-in {\n            0% {\n              opacity: 0;\n            }\n            100% {\n              opacity: 1;\n            }\n          }\n        `}</style>\n\n        {/* Full-bleed scenic nature background */}\n        <img\n          src={bgImage}\n          alt=\"Scenic nature landscape background\"\n          className=\"absolute inset-0 w-full h-full object-cover select-none pointer-events-none\"\n        />\n\n        {/* Soft atmospheric overlay */}\n        <div className=\"absolute inset-0 bg-gradient-to-b from-black/20 via-transparent to-black/35 pointer-events-none\" />\n\n        {/* Floating Card with smooth animated height */}\n        <div\n          className={cn(\n            \"relative z-10 w-full max-w-[440px] rounded-[28px] overflow-hidden transition-[height] duration-700 ease-[cubic-bezier(0.16,1,0.3,1)]\",\n            // Light mode: clean frosted white card, crisp dark text, delicate border, deep ambient shadow\n            \"bg-white/95 text-zinc-900 border border-zinc-200/80 shadow-[0_20px_50px_rgba(0,0,0,0.18)] backdrop-blur-xl\",\n            // Dark mode: deep charcoal card matching screenshot, crisp white text, subtle translucent border\n            \"dark:bg-[#131415]/95 dark:text-white dark:border-white/10 dark:shadow-[0_25px_60px_-15px_rgba(0,0,0,0.7)]\"\n          )}\n          style={{\n            height: cardHeight ? `${cardHeight}px` : \"auto\",\n          }}\n        >\n          <div ref={cardContentRef} className=\"p-6 sm:p-8 md:p-9\">\n            {scenicStep === \"welcome\" && (\n              <div\n                className=\"flex flex-col items-center text-center\"\n                style={{\n                  animation:\n                    \"scenic-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards\",\n                }}\n              >\n                {/* Brand Header */}\n                <div\n                  className=\"flex items-center gap-2 mb-6\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.04s backwards\",\n                  }}\n                >\n                  {brandIcon || (\n                    <DocsUiIcon className=\"w-5 h-5 text-zinc-900 dark:text-white shrink-0\" />\n                  )}\n                  <span className=\"font-semibold text-lg tracking-tight text-zinc-900 dark:text-white\">\n                    {brandName}\n                  </span>\n                </div>\n\n                {/* Title */}\n                <h2\n                  className=\"text-2xl sm:text-[28px] font-medium tracking-tight text-zinc-900 dark:text-white mb-3 leading-snug\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.10s backwards\",\n                  }}\n                >\n                  {title}\n                </h2>\n\n                {/* Subtitle */}\n                <p\n                  className=\"text-xs sm:text-sm text-zinc-600 dark:text-white/70 max-w-[340px] mb-8 leading-relaxed\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.16s backwards\",\n                  }}\n                >\n                  {subtitle}\n                </p>\n\n                {/* Actions */}\n                <div\n                  className=\"w-full flex flex-col gap-3\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.24s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"options\")}\n                    className={cn(\n                      \"w-full h-12 rounded-xl sm:rounded-2xl font-semibold text-sm sm:text-base transition-all duration-200 active:scale-[0.98] shadow-sm\",\n                      scenicPrimaryButtonClasses\n                    )}\n                  >\n                    {getStartedLabel}\n                  </button>\n\n                  <a\n                    href={loginHref}\n                    className={cn(\n                      \"w-full h-11 flex items-center justify-center rounded-xl sm:rounded-2xl text-xs sm:text-sm font-medium transition-all duration-200 active:scale-[0.98]\",\n                      \"bg-zinc-100/90 text-zinc-700 hover:bg-zinc-200/90 border border-zinc-200/60\",\n                      \"dark:bg-white/[0.08] dark:text-white/85 dark:hover:bg-white/[0.14] dark:border-white/5\",\n                      focusButtonClasses\n                    )}\n                  >\n                    {alreadyAccountLabel}\n                  </a>\n                </div>\n              </div>\n            )}\n\n            {scenicStep === \"options\" && (\n              <div className=\"flex flex-col items-center text-center\">\n                {/* Header with Back button and Brand */}\n                <div\n                  className=\"w-full flex items-center justify-between mb-4 pb-2 border-b border-zinc-200/60 dark:border-white/10\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.04s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"welcome\")}\n                    className=\"inline-flex items-center gap-1.5 text-xs font-medium text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors\"\n                  >\n                    <ArrowLeft size={14} />\n                    <span>Back</span>\n                  </button>\n                  <span className=\"font-semibold text-xs text-zinc-900 dark:text-white\">\n                    {brandName}\n                  </span>\n                </div>\n\n                {/* Title */}\n                <h2\n                  className=\"text-2xl sm:text-[28px] font-medium tracking-tight text-zinc-900 dark:text-white mb-2 leading-snug\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.10s backwards\",\n                  }}\n                >\n                  Create your account\n                </h2>\n\n                {/* Subtitle */}\n                <p\n                  className=\"text-xs sm:text-sm text-zinc-600 dark:text-white/70 mb-7\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.16s backwards\",\n                  }}\n                >\n                  Choose how you'd like to get started\n                </p>\n\n                {/* Staggered action buttons */}\n                <div className=\"w-full flex flex-col gap-3\">\n                  {/* Google Button */}\n                  <button\n                    type=\"button\"\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.22s backwards\",\n                    }}\n                    className={cn(\n                      \"w-full h-[52px] rounded-2xl flex items-center justify-center gap-3 px-4 font-medium text-[15px] transition-all duration-200 active:scale-[0.98]\",\n                      \"bg-zinc-100 hover:bg-zinc-200/90 text-zinc-900 border border-zinc-200/80 shadow-sm\",\n                      \"dark:bg-[#1e1f21] dark:hover:bg-[#282a2d] dark:text-white dark:border-white/[0.08]\",\n                      focusButtonClasses\n                    )}\n                  >\n                    <GoogleIcon size={19} className=\"shrink-0\" />\n                    <span>Continue with Google</span>\n                  </button>\n\n                  {/* Apple Button */}\n                  <button\n                    type=\"button\"\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.30s backwards\",\n                    }}\n                    className={cn(\n                      \"w-full h-[52px] rounded-2xl flex items-center justify-center gap-3 px-4 font-medium text-[15px] transition-all duration-200 active:scale-[0.98]\",\n                      \"bg-zinc-100 hover:bg-zinc-200/90 text-zinc-900 border border-zinc-200/80 shadow-sm\",\n                      \"dark:bg-[#1e1f21] dark:hover:bg-[#282a2d] dark:text-white dark:border-white/[0.08]\",\n                      focusButtonClasses\n                    )}\n                  >\n                    <AppleBrandIcon\n                      size={19}\n                      className=\"shrink-0 text-zinc-900 dark:text-white\"\n                    />\n                    <span>Continue with Apple</span>\n                  </button>\n\n                  {/* Email Button */}\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"form\")}\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.38s backwards\",\n                    }}\n                    className={cn(\n                      \"w-full h-[52px] rounded-2xl flex items-center justify-center gap-3 px-4 font-medium text-[15px] transition-all duration-200 active:scale-[0.98]\",\n                      \"bg-zinc-100 hover:bg-zinc-200/90 text-zinc-900 border border-zinc-200/80 shadow-sm\",\n                      \"dark:bg-[#1e1f21] dark:hover:bg-[#282a2d] dark:text-white dark:border-white/[0.08]\",\n                      focusButtonClasses\n                    )}\n                  >\n                    <Mail size={19} className=\"shrink-0 text-current\" />\n                    <span>Continue with Email</span>\n                  </button>\n                </div>\n\n                {/* Footer link */}\n                <div\n                  className=\"mt-6 text-center\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.46s backwards\",\n                  }}\n                >\n                  <p className=\"text-xs sm:text-[13px] text-zinc-500 dark:text-zinc-400\">\n                    Already have an account?{\" \"}\n                    <a\n                      href={loginHref}\n                      className=\"font-semibold text-zinc-900 dark:text-white hover:underline transition-colors ml-0.5\"\n                    >\n                      Log in\n                    </a>\n                  </p>\n                </div>\n              </div>\n            )}\n\n            {scenicStep === \"form\" && (\n              <div>\n                {/* Back button */}\n                <div\n                  className=\"flex items-center justify-between mb-4 pb-3 border-b border-zinc-200/60 dark:border-white/10\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.04s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"options\")}\n                    className=\"inline-flex items-center gap-1.5 text-xs font-medium text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors\"\n                  >\n                    <ArrowLeft size={14} />\n                    <span>Back</span>\n                  </button>\n                  <span className=\"font-semibold text-xs text-zinc-900 dark:text-white\">\n                    {brandName}\n                  </span>\n                </div>\n\n                {/* Form Heading */}\n                <div className=\"mb-4\">\n                  <h3\n                    className=\"text-xl font-bold tracking-tight text-zinc-900 dark:text-white mb-1\"\n                    style={{\n                      animation:\n                        \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.10s backwards\",\n                    }}\n                  >\n                    Create an account\n                  </h3>\n                  <p\n                    className=\"text-xs text-zinc-500 dark:text-zinc-400\"\n                    style={{\n                      animation:\n                        \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.16s backwards\",\n                    }}\n                  >\n                    Fill in your details below to get started.\n                  </p>\n                </div>\n\n                {/* Form Content */}\n                <form onSubmit={handleSubmit} className=\"space-y-3\">\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.20s backwards\",\n                    }}\n                  >\n                    <div className=\"grid grid-cols-2 gap-3\">\n                      <PremiumInput\n                        label=\"First Name\"\n                        value={formData.firstName}\n                        onChange={(e) => handleChange(\"firstName\", e.target.value)}\n                        error={errors.firstName}\n                        placeholder=\"John\"\n                        required\n                      />\n                      <PremiumInput\n                        label=\"Last Name\"\n                        value={formData.lastName}\n                        onChange={(e) => handleChange(\"lastName\", e.target.value)}\n                        error={errors.lastName}\n                        placeholder=\"Doe\"\n                        required\n                      />\n                    </div>\n                  </div>\n\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.26s backwards\",\n                    }}\n                  >\n                    <PremiumInput\n                      label=\"Email Address\"\n                      type=\"email\"\n                      value={formData.email}\n                      onChange={(e) => handleChange(\"email\", e.target.value)}\n                      error={errors.email}\n                      placeholder=\"john@example.com\"\n                      required\n                    />\n                  </div>\n\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.32s backwards\",\n                    }}\n                  >\n                    <PremiumInput\n                      label=\"Password\"\n                      type=\"password\"\n                      value={formData.password}\n                      onChange={(e) => handleChange(\"password\", e.target.value)}\n                      error={errors.password}\n                      placeholder=\"••••••••\"\n                      required\n                    />\n                  </div>\n\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.38s backwards\",\n                    }}\n                  >\n                    <PremiumCheckbox\n                      checked={formData.agreeToTerms}\n                      onChange={(checked) => handleChange(\"agreeToTerms\", checked)}\n                      label={<span>I agree to the Terms and Privacy Policy</span>}\n                      error={errors.agreeToTerms}\n                      required\n                    />\n                  </div>\n\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.46s backwards\",\n                    }}\n                  >\n                    <button\n                      type=\"submit\"\n                      disabled={loading}\n                      className={cn(\n                        \"w-full h-11 rounded-xl font-semibold text-sm transition-all duration-200 active:scale-[0.98] shadow-sm flex items-center justify-center gap-2 mt-2 disabled:opacity-60\",\n                        scenicPrimaryButtonClasses\n                      )}\n                    >\n                      {loading ? \"Processing...\" : \"Create Account\"}\n                    </button>\n                  </div>\n                </form>\n\n                <div\n                  className=\"mt-4 text-center\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.54s backwards\",\n                  }}\n                >\n                  <p className=\"text-xs text-zinc-500 dark:text-zinc-400\">\n                    Already have an account?{\" \"}\n                    <a\n                      href={loginHref}\n                      className=\"font-semibold text-zinc-900 dark:text-white hover:underline\"\n                    >\n                      Sign in\n                    </a>\n                  </p>\n                </div>\n              </div>\n            )}\n\n            {/* STEP 4: OTP VERIFICATION */}\n            {scenicStep === \"otp\" && (\n              <div className=\"flex flex-col items-center text-center\">\n                {/* Header with Back button and Brand */}\n                <div\n                  className=\"relative w-full flex items-center justify-center mb-6\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.04s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"form\")}\n                    className=\"absolute left-0 inline-flex items-center gap-1 text-xs text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors\"\n                    aria-label=\"Back to form\"\n                  >\n                    <ArrowLeft size={16} />\n                  </button>\n                  <span className=\"font-semibold text-lg tracking-tight text-zinc-900 dark:text-white\">\n                    {brandName}\n                  </span>\n                </div>\n\n                {/* Title */}\n                <h2\n                  className=\"text-2xl sm:text-[28px] font-medium tracking-tight text-zinc-900 dark:text-white mb-2 leading-snug\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.10s backwards\",\n                  }}\n                >\n                  Verify your email\n                </h2>\n\n                {/* Subtitle */}\n                <p\n                  className=\"text-xs sm:text-sm text-zinc-600 dark:text-white/70 mb-7 max-w-[340px] leading-relaxed\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.16s backwards\",\n                  }}\n                >\n                  We've sent a 6-digit code to{\" \"}\n                  <span className=\"font-medium text-zinc-900 dark:text-white\">\n                    {formData.email || \"artur@gmail.com\"}\n                  </span>\n                </p>\n\n                {/* 6 OTP Input Boxes */}\n                <div\n                  className=\"flex items-center justify-between gap-2 sm:gap-2.5 mb-7 w-full\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.24s backwards\",\n                  }}\n                >\n                  {otp.map((digit, index) => (\n                    <input\n                      key={index}\n                      ref={(el) => {\n                        otpInputRefs.current[index] = el;\n                      }}\n                      type=\"text\"\n                      inputMode=\"numeric\"\n                      pattern=\"[0-9]*\"\n                      maxLength={1}\n                      value={digit}\n                      onChange={(e) => handleOtpChange(index, e.target.value)}\n                      onKeyDown={(e) => handleOtpKeyDown(index, e)}\n                      onPaste={handleOtpPaste}\n                      className={cn(\n                        \"w-full h-12 sm:h-14 rounded-2xl text-center text-lg sm:text-xl font-semibold\",\n                        \"bg-zinc-100/90 text-zinc-900 border border-zinc-200/80\",\n                        \"dark:bg-[#1e1f21] dark:text-white dark:border-white/[0.08]\",\n                        focusInputClasses\n                      )}\n                    />\n                  ))}\n                </div>\n\n                {/* Submit Action */}\n                <div\n                  className=\"w-full\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.32s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"onboarding-intro\")}\n                    className={cn(\n                      \"w-full h-12 rounded-2xl font-semibold text-sm sm:text-base transition-all duration-200 active:scale-[0.98] shadow-sm flex items-center justify-center\",\n                      scenicPrimaryButtonClasses\n                    )}\n                  >\n                    Verify &amp; Continue\n                  </button>\n                </div>\n\n                {/* Resend & Change email */}\n                <div\n                  className=\"mt-5 text-center flex items-center justify-center gap-3 text-xs text-zinc-500 dark:text-zinc-400\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.40s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"form\")}\n                    className=\"hover:underline transition-colors text-zinc-600 dark:text-zinc-300\"\n                  >\n                    Change email\n                  </button>\n                  <span>•</span>\n                  <button\n                    type=\"button\"\n                    onClick={() => alert(\"A new 6-digit code has been sent!\")}\n                    className=\"font-medium text-zinc-900 dark:text-white hover:underline transition-colors\"\n                  >\n                    Resend code\n                  </button>\n                </div>\n              </div>\n            )}\n\n            {/* STEP 5: ONBOARDING INTRO */}\n            {scenicStep === \"onboarding-intro\" && (\n              <div className=\"flex flex-col items-center text-center\">\n                {/* Header with Brand */}\n                <div\n                  className=\"relative w-full flex items-center justify-center mb-6\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.04s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"otp\")}\n                    className=\"absolute left-0 inline-flex items-center gap-1 text-xs text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors\"\n                    aria-label=\"Back to OTP\"\n                  >\n                    <ArrowLeft size={16} />\n                  </button>\n                  <span className=\"font-semibold text-lg tracking-tight text-zinc-900 dark:text-white\">\n                    {brandName}\n                  </span>\n                </div>\n\n                {/* Title */}\n                <h2\n                  className=\"text-2xl sm:text-[28px] font-medium tracking-tight text-zinc-900 dark:text-white mb-3 leading-snug\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.10s backwards\",\n                  }}\n                >\n                  Let's build your financial picture\n                </h2>\n\n                {/* Subtitle */}\n                <p\n                  className=\"text-xs sm:text-sm text-zinc-600 dark:text-white/70 mb-7 max-w-[340px] leading-relaxed\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.16s backwards\",\n                  }}\n                >\n                  Answer a few questions so we can personalize your dashboard, insights, and recommendations.\n                </p>\n\n                {/* Time estimate badge */}\n                <div\n                  className=\"flex justify-center mb-8\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.24s backwards\",\n                  }}\n                >\n                  <div\n                    className={cn(\n                      \"inline-flex items-center gap-2 px-4 py-2 rounded-2xl text-xs sm:text-[13px] font-medium transition-colors\",\n                      \"bg-zinc-100 text-zinc-700 border border-zinc-200/80 shadow-sm\",\n                      \"dark:bg-[#1e1f21] dark:text-zinc-300 dark:border-white/[0.08]\"\n                    )}\n                  >\n                    <Clock size={14} className=\"shrink-0 opacity-70\" />\n                    <span>Takes about 3 minutes</span>\n                  </div>\n                </div>\n\n                {/* Action button */}\n                <div\n                  className=\"w-full\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.32s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"goals\")}\n                    className={cn(\n                      \"w-full h-12 rounded-2xl font-semibold text-sm sm:text-base transition-all duration-200 active:scale-[0.98] shadow-sm flex items-center justify-center\",\n                      scenicPrimaryButtonClasses\n                    )}\n                  >\n                    Let's start\n                  </button>\n                </div>\n              </div>\n            )}\n\n            {/* STEP 6: GOALS & FOCUS AREAS */}\n            {scenicStep === \"goals\" && (\n              <div className=\"flex flex-col items-center text-center\">\n                {/* Header with Brand */}\n                <div\n                  className=\"relative w-full flex items-center justify-center mb-5\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.04s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"onboarding-intro\")}\n                    className=\"absolute left-0 inline-flex items-center gap-1 text-xs text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors\"\n                    aria-label=\"Back to intro\"\n                  >\n                    <ArrowLeft size={16} />\n                  </button>\n                  <span className=\"font-semibold text-lg tracking-tight text-zinc-900 dark:text-white\">\n                    {brandName}\n                  </span>\n                </div>\n\n                {/* Title */}\n                <h2\n                  className=\"text-2xl sm:text-[28px] font-medium tracking-tight text-zinc-900 dark:text-white mb-2 leading-snug\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.10s backwards\",\n                  }}\n                >\n                  What would you like to improve first?\n                </h2>\n\n                {/* Subtitle */}\n                <p\n                  className=\"text-xs sm:text-sm text-zinc-600 dark:text-white/70 mb-6 leading-relaxed\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.16s backwards\",\n                  }}\n                >\n                  Choose up to 2 areas to focus on.\n                </p>\n\n                {/* 6 Selectable Options Grid (3 cols x 2 rows) */}\n                <div className=\"grid grid-cols-3 gap-2.5 sm:gap-3 mb-5 w-full\">\n                  {focusOptions.map((opt, idx) => {\n                    const isSelected = selectedAreas.includes(opt.label);\n                    return (\n                      <button\n                        key={opt.id}\n                        type=\"button\"\n                        onClick={() => toggleFocusArea(opt.label)}\n                        style={{\n                          animation: `scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) ${0.20 + idx * 0.04}s backwards`,\n                        }}\n                        className={cn(\n                          \"relative flex flex-col justify-between p-3 sm:p-3.5 rounded-2xl text-left min-h-[76px] sm:min-h-[88px] transition-all duration-200 active:scale-[0.97]\",\n                          !isSelected && [\n                            \"bg-zinc-100/90 text-zinc-800 border border-zinc-200/80 hover:bg-zinc-200/70\",\n                            \"dark:bg-[#1e1f21] dark:text-white/90 dark:border-white/[0.08] dark:hover:bg-[#25272a] dark:hover:border-white/15\",\n                          ],\n                          isSelected && [\n                            theme.bg,\n                            theme.panelFg,\n                            \"border-transparent shadow-md ring-2 ring-black/10 dark:ring-white/20\",\n                          ]\n                        )}\n                      >\n                        <span className=\"text-xs sm:text-[13px] font-medium leading-tight select-none\">\n                          {opt.label}\n                        </span>\n                        <div className=\"self-end mt-2\">\n                          <div\n                            className={cn(\n                              \"w-4 h-4 rounded-md border transition-all flex items-center justify-center\",\n                              isSelected\n                                ? cn(\"bg-white\", theme.text, \"border-white shadow-sm\")\n                                : \"border-zinc-300 dark:border-white/20 bg-transparent\"\n                            )}\n                          >\n                            {isSelected && <Check size={10} strokeWidth={3} />}\n                          </div>\n                        </div>\n                      </button>\n                    );\n                  })}\n                </div>\n\n                {/* Counter */}\n                <div\n                  className=\"mb-5 text-center\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.44s backwards\",\n                  }}\n                >\n                  <p className=\"text-xs text-zinc-500 dark:text-zinc-400 font-medium\">\n                    {selectedAreas.length} of 2 selected\n                  </p>\n                </div>\n\n                {/* Continue button */}\n                <div\n                  className=\"w-full\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.50s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"finances\")}\n                    className={cn(\n                      \"w-full h-12 rounded-2xl font-semibold text-sm sm:text-base transition-all duration-200 active:scale-[0.98] shadow-sm flex items-center justify-center\",\n                      scenicPrimaryButtonClasses\n                    )}\n                  >\n                    Continue\n                  </button>\n                </div>\n              </div>\n            )}\n\n            {/* STEP 7: FINANCES (Tell us about your finances) */}\n            {scenicStep === \"finances\" && (\n              <div className=\"flex flex-col items-center text-center\">\n                {/* Header with Brand */}\n                <div\n                  className=\"relative w-full flex items-center justify-center mb-5\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.04s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"goals\")}\n                    className=\"absolute left-0 inline-flex items-center gap-1 text-xs text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors\"\n                    aria-label=\"Back to goals\"\n                  >\n                    <ArrowLeft size={16} />\n                  </button>\n                  <span className=\"font-semibold text-lg tracking-tight text-zinc-900 dark:text-white\">\n                    {brandName}\n                  </span>\n                </div>\n\n                {/* Title */}\n                <h2\n                  className=\"text-2xl sm:text-[28px] font-medium tracking-tight text-zinc-900 dark:text-white mb-2 leading-snug\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.10s backwards\",\n                  }}\n                >\n                  Tell us about your finances\n                </h2>\n\n                {/* Subtitle */}\n                <p\n                  className=\"text-xs sm:text-sm text-zinc-600 dark:text-white/70 mb-6 max-w-[340px] leading-relaxed\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.16s backwards\",\n                  }}\n                >\n                  This helps us understand your monthly financial picture and personalize your insights.\n                </p>\n\n                {/* Form fields */}\n                <div className=\"w-full flex flex-col gap-3.5 mb-6 text-left\">\n                  {/* Row 1: Income & Expenses */}\n                  <div\n                    className=\"grid grid-cols-2 gap-3\"\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.22s backwards\",\n                    }}\n                  >\n                    <div>\n                      <label className=\"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1.5\">\n                        Monthly income\n                      </label>\n                      <input\n                        type=\"text\"\n                        value={finances.monthlyIncome}\n                        onChange={(e) =>\n                          setFinances((prev) => ({\n                            ...prev,\n                            monthlyIncome: e.target.value,\n                          }))\n                        }\n                        className={cn(\n                          \"w-full h-11 px-3.5 rounded-xl text-sm font-normal transition-colors\",\n                          \"bg-zinc-100 text-zinc-900 border border-zinc-200/80\",\n                          \"dark:bg-[#1e1f21] dark:text-white dark:border-white/[0.08]\",\n                          focusInputClasses\n                        )}\n                      />\n                    </div>\n                    <div>\n                      <label className=\"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1.5\">\n                        Monthly expenses\n                      </label>\n                      <input\n                        type=\"text\"\n                        value={finances.monthlyExpenses}\n                        onChange={(e) =>\n                          setFinances((prev) => ({\n                            ...prev,\n                            monthlyExpenses: e.target.value,\n                          }))\n                        }\n                        className={cn(\n                          \"w-full h-11 px-3.5 rounded-xl text-sm font-normal transition-colors\",\n                          \"bg-zinc-100 text-zinc-900 border border-zinc-200/80\",\n                          \"dark:bg-[#1e1f21] dark:text-white dark:border-white/[0.08]\",\n                          focusInputClasses\n                        )}\n                      />\n                    </div>\n                  </div>\n\n                  {/* Row 2: Employment status & Household - Custom Modals */}\n                  <div\n                    className=\"grid grid-cols-2 gap-3\"\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.30s backwards\",\n                    }}\n                  >\n                    <div>\n                      <label className=\"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1.5\">\n                        Employment status\n                      </label>\n                      <button\n                        type=\"button\"\n                        onClick={() =>\n                          setActiveDropdown({\n                            title: \"Employment Status\",\n                            field: \"employmentStatus\",\n                            options: [\n                              \"Full-time\",\n                              \"Part-time\",\n                              \"Self-employed\",\n                              \"Freelance\",\n                              \"Student\",\n                              \"Retired\",\n                            ],\n                          })\n                        }\n                        className={scenicDropdownButtonClasses(\n                          activeDropdown?.field === \"employmentStatus\"\n                        )}\n                      >\n                        <span className=\"truncate\">{finances.employmentStatus}</span>\n                        <ChevronDown size={15} className={cn(\"opacity-70 shrink-0 transition-colors\", theme.text)} />\n                      </button>\n                    </div>\n                    <div>\n                      <label className=\"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1.5\">\n                        Household\n                      </label>\n                      <button\n                        type=\"button\"\n                        onClick={() =>\n                          setActiveDropdown({\n                            title: \"Household\",\n                            field: \"household\",\n                            options: [\"Single\", \"Married\", \"Partnered\", \"Family\"],\n                          })\n                        }\n                        className={scenicDropdownButtonClasses(\n                          activeDropdown?.field === \"household\"\n                        )}\n                      >\n                        <span className=\"truncate\">{finances.household}</span>\n                        <ChevronDown size={15} className={cn(\"opacity-70 shrink-0 transition-colors\", theme.text)} />\n                      </button>\n                    </div>\n                  </div>\n\n                  {/* Row 3: Dependents - Custom Modal */}\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.38s backwards\",\n                    }}\n                  >\n                    <label className=\"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1.5\">\n                      Dependents\n                    </label>\n                    <button\n                      type=\"button\"\n                      onClick={() =>\n                        setActiveDropdown({\n                          title: \"Dependents\",\n                          field: \"dependents\",\n                          options: [\"0\", \"1\", \"2\", \"3+\"],\n                        })\n                      }\n                      className={scenicDropdownButtonClasses(\n                        activeDropdown?.field === \"dependents\"\n                      )}\n                    >\n                      <span className=\"truncate\">{finances.dependents}</span>\n                      <ChevronDown size={15} className={cn(\"opacity-70 shrink-0 transition-colors\", theme.text)} />\n                    </button>\n                  </div>\n                </div>\n\n                {/* Continue button */}\n                <div\n                  className=\"w-full\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.46s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"confidence\")}\n                    className={cn(\n                      \"w-full h-12 rounded-2xl font-semibold text-sm sm:text-base transition-all duration-200 active:scale-[0.98] shadow-sm flex items-center justify-center\",\n                      scenicPrimaryButtonClasses\n                    )}\n                  >\n                    Continue\n                  </button>\n                </div>\n              </div>\n            )}\n\n            {/* STEP 8: CONFIDENCE (How financially confident do you feel right now?) */}\n            {scenicStep === \"confidence\" && (\n              <div className=\"flex flex-col items-center text-center\">\n                {/* Header with Brand */}\n                <div\n                  className=\"relative w-full flex items-center justify-center mb-5\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.04s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"finances\")}\n                    className=\"absolute left-0 inline-flex items-center gap-1 text-xs text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors\"\n                    aria-label=\"Back to finances\"\n                  >\n                    <ArrowLeft size={16} />\n                  </button>\n                  <span className=\"font-semibold text-lg tracking-tight text-zinc-900 dark:text-white\">\n                    {brandName}\n                  </span>\n                </div>\n\n                {/* Title */}\n                <h2\n                  className=\"text-2xl sm:text-[28px] font-medium tracking-tight text-zinc-900 dark:text-white mb-2 leading-snug\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.10s backwards\",\n                  }}\n                >\n                  How financially confident do you feel right now?\n                </h2>\n\n                {/* Subtitle */}\n                <p\n                  className=\"text-xs sm:text-sm text-zinc-600 dark:text-white/70 mb-6 max-w-[340px] leading-relaxed\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.16s backwards\",\n                  }}\n                >\n                  Your answers help us understand your financial habits and personalize your insights.\n                </p>\n\n                {/* 3 Rating Questions */}\n                <div className=\"w-full flex flex-col gap-4 mb-6 text-left\">\n                  {/* Question 1 */}\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.22s backwards\",\n                    }}\n                  >\n                    <p className=\"text-xs sm:text-[13px] font-medium text-zinc-700 dark:text-zinc-300 mb-2\">\n                      I could cover an unexpected $1,000 expense.\n                    </p>\n                    <div className=\"grid grid-cols-5 gap-2\">\n                      {[1, 2, 3, 4, 5].map((val) => {\n                        const isSelected =\n                          confidenceRatings.expenseCover === val;\n                        return (\n                          <button\n                            key={val}\n                            type=\"button\"\n                            onClick={() =>\n                              setConfidenceRatings((prev) => ({\n                                ...prev,\n                                expenseCover: val,\n                              }))\n                            }\n                            className={cn(\n                              \"h-11 rounded-xl text-xs sm:text-sm font-medium transition-all duration-150 active:scale-95 flex items-center justify-center\",\n                              focusButtonClasses,\n                              !isSelected && [\n                                \"bg-zinc-100 text-zinc-700 hover:bg-zinc-200/80 border border-zinc-200/80\",\n                                \"dark:bg-[#1e1f21] dark:text-zinc-300 dark:border-white/[0.08] dark:hover:bg-[#282a2e]\",\n                              ],\n                              isSelected && [\n                                theme.bg,\n                                theme.panelFg,\n                                \"border-transparent shadow-sm ring-1 ring-black/10 dark:ring-white/20\",\n                              ]\n                            )}\n                          >\n                            {val}\n                          </button>\n                        );\n                      })}\n                    </div>\n                  </div>\n\n                  {/* Question 2 */}\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.30s backwards\",\n                    }}\n                  >\n                    <p className=\"text-xs sm:text-[13px] font-medium text-zinc-700 dark:text-zinc-300 mb-2\">\n                      I feel in control of my monthly spending.\n                    </p>\n                    <div className=\"grid grid-cols-5 gap-2\">\n                      {[1, 2, 3, 4, 5].map((val) => {\n                        const isSelected =\n                          confidenceRatings.monthlyControl === val;\n                        return (\n                          <button\n                            key={val}\n                            type=\"button\"\n                            onClick={() =>\n                              setConfidenceRatings((prev) => ({\n                                ...prev,\n                                monthlyControl: val,\n                              }))\n                            }\n                            className={cn(\n                              \"h-11 rounded-xl text-xs sm:text-sm font-medium transition-all duration-150 active:scale-95 flex items-center justify-center\",\n                              focusButtonClasses,\n                              !isSelected && [\n                                \"bg-zinc-100 text-zinc-700 hover:bg-zinc-200/80 border border-zinc-200/80\",\n                                \"dark:bg-[#1e1f21] dark:text-zinc-300 dark:border-white/[0.08] dark:hover:bg-[#282a2e]\",\n                              ],\n                              isSelected && [\n                                theme.bg,\n                                theme.panelFg,\n                                \"border-transparent shadow-sm ring-1 ring-black/10 dark:ring-white/20\",\n                              ]\n                            )}\n                          >\n                            {val}\n                          </button>\n                        );\n                      })}\n                    </div>\n                  </div>\n\n                  {/* Question 3 */}\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.38s backwards\",\n                    }}\n                  >\n                    <p className=\"text-xs sm:text-[13px] font-medium text-zinc-700 dark:text-zinc-300 mb-2\">\n                      I have a clear plan for my financial future.\n                    </p>\n                    <div className=\"grid grid-cols-5 gap-2\">\n                      {[1, 2, 3, 4, 5].map((val) => {\n                        const isSelected =\n                          confidenceRatings.futurePlan === val;\n                        return (\n                          <button\n                            key={val}\n                            type=\"button\"\n                            onClick={() =>\n                              setConfidenceRatings((prev) => ({\n                                ...prev,\n                                futurePlan: val,\n                              }))\n                            }\n                            className={cn(\n                              \"h-11 rounded-xl text-xs sm:text-sm font-medium transition-all duration-150 active:scale-95 flex items-center justify-center\",\n                              focusButtonClasses,\n                              !isSelected && [\n                                \"bg-zinc-100 text-zinc-700 hover:bg-zinc-200/80 border border-zinc-200/80\",\n                                \"dark:bg-[#1e1f21] dark:text-zinc-300 dark:border-white/[0.08] dark:hover:bg-[#282a2e]\",\n                              ],\n                              isSelected && [\n                                theme.bg,\n                                theme.panelFg,\n                                \"border-transparent shadow-sm ring-1 ring-black/10 dark:ring-white/20\",\n                              ]\n                            )}\n                          >\n                            {val}\n                          </button>\n                        );\n                      })}\n                    </div>\n                  </div>\n                </div>\n\n                {/* Continue button */}\n                <div\n                  className=\"w-full\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.46s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"emergency-fund\")}\n                    className={cn(\n                      \"w-full h-12 rounded-2xl font-semibold text-sm sm:text-base transition-all duration-200 active:scale-[0.98] shadow-sm flex items-center justify-center\",\n                      scenicPrimaryButtonClasses\n                    )}\n                  >\n                    Continue\n                  </button>\n                </div>\n              </div>\n            )}\n\n            {/* STEP 9: EMERGENCY FUND */}\n            {scenicStep === \"emergency-fund\" && (\n              <div className=\"flex flex-col items-center text-center\">\n                {/* Header with Brand */}\n                <div\n                  className=\"relative w-full flex items-center justify-center mb-5\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.04s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"confidence\")}\n                    className=\"absolute left-0 inline-flex items-center gap-1 text-xs text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors\"\n                    aria-label=\"Back to confidence\"\n                  >\n                    <ArrowLeft size={16} />\n                  </button>\n                  <span className=\"font-semibold text-lg tracking-tight text-zinc-900 dark:text-white\">\n                    {brandName}\n                  </span>\n                </div>\n\n                {/* Title */}\n                <h2\n                  className=\"text-2xl sm:text-[28px] font-medium tracking-tight text-zinc-900 dark:text-white mb-2 leading-snug\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.10s backwards\",\n                  }}\n                >\n                  Do you have an emergency fund?\n                </h2>\n\n                {/* Subtitle */}\n                <p\n                  className=\"text-xs sm:text-sm text-zinc-600 dark:text-white/70 mb-6 max-w-[340px] leading-relaxed\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.16s backwards\",\n                  }}\n                >\n                  This helps us understand how prepared you are for unexpected expenses.\n                </p>\n\n                {/* Toggle Pills: Yes I have one / Not Yet */}\n                <div\n                  className=\"grid grid-cols-2 gap-2.5 w-full mb-5\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.22s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() =>\n                      setEmergencyFund((prev) => ({ ...prev, hasFund: true }))\n                    }\n                    className={cn(\n                      \"h-12 rounded-2xl px-4 flex items-center justify-between text-xs sm:text-sm font-medium transition-all duration-200 active:scale-[0.98]\",\n                      focusButtonClasses,\n                      emergencyFund.hasFund\n                        ? [\n                            theme.bg,\n                            theme.panelFg,\n                            \"border-transparent shadow-sm ring-1 ring-black/10 dark:ring-white/20\",\n                          ]\n                        : [\n                            \"bg-zinc-100 text-zinc-700 border border-zinc-200/80 hover:bg-zinc-200/70\",\n                            \"dark:bg-[#1e1f21] dark:text-zinc-400 dark:border-white/[0.08] dark:hover:bg-[#25272a]\",\n                          ]\n                    )}\n                  >\n                    <span>Yes I have one</span>\n                    <div\n                      className={cn(\n                        \"w-4 h-4 rounded-md flex items-center justify-center transition-all\",\n                        emergencyFund.hasFund\n                          ? cn(\"bg-white\", theme.text, \"border border-white shadow-sm\")\n                          : \"border border-zinc-300 dark:border-white/20 bg-transparent\"\n                      )}\n                    >\n                      {emergencyFund.hasFund && (\n                        <Check size={10} strokeWidth={3} />\n                      )}\n                    </div>\n                  </button>\n\n                  <button\n                    type=\"button\"\n                    onClick={() =>\n                      setEmergencyFund((prev) => ({ ...prev, hasFund: false }))\n                    }\n                    className={cn(\n                      \"h-12 rounded-2xl px-4 flex items-center justify-between text-xs sm:text-sm font-medium transition-all duration-200 active:scale-[0.98]\",\n                      focusButtonClasses,\n                      !emergencyFund.hasFund\n                        ? [\n                            theme.bg,\n                            theme.panelFg,\n                            \"border-transparent shadow-sm ring-1 ring-black/10 dark:ring-white/20\",\n                          ]\n                        : [\n                            \"bg-zinc-100 text-zinc-700 border border-zinc-200/80 hover:bg-zinc-200/70\",\n                            \"dark:bg-[#1e1f21] dark:text-zinc-400 dark:border-white/[0.08] dark:hover:bg-[#25272a]\",\n                          ]\n                    )}\n                  >\n                    <span>Not Yet</span>\n                    <div\n                      className={cn(\n                        \"w-4 h-4 rounded-md flex items-center justify-center transition-all\",\n                        !emergencyFund.hasFund\n                          ? cn(\"bg-white\", theme.text, \"border border-white shadow-sm\")\n                          : \"border border-zinc-300 dark:border-white/20 bg-transparent\"\n                      )}\n                    >\n                      {!emergencyFund.hasFund && (\n                        <Check size={10} strokeWidth={3} />\n                      )}\n                    </div>\n                  </button>\n                </div>\n\n                {/* Amount inputs */}\n                <div className=\"w-full flex flex-col gap-3.5 mb-6 text-left\">\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.30s backwards\",\n                    }}\n                  >\n                    <label className=\"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1.5\">\n                      Current amount\n                    </label>\n                    <input\n                      type=\"text\"\n                      value={emergencyFund.currentAmount}\n                      onChange={(e) =>\n                        setEmergencyFund((prev) => ({\n                          ...prev,\n                          currentAmount: e.target.value,\n                        }))\n                      }\n                      className={cn(\n                        \"w-full h-11 px-3.5 rounded-xl text-sm font-normal outline-none transition-all duration-200\",\n                        \"bg-zinc-100 text-zinc-900 border border-zinc-200/80 hover:border-zinc-300\",\n                        \"dark:bg-[#1e1f21] dark:text-white dark:border-white/[0.08] dark:hover:border-white/20\",\n                        focusInputClasses\n                      )}\n                    />\n                  </div>\n\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.38s backwards\",\n                    }}\n                  >\n                    <label className=\"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1.5\">\n                      Target amount\n                    </label>\n                    <input\n                      type=\"text\"\n                      value={emergencyFund.targetAmount}\n                      onChange={(e) =>\n                        setEmergencyFund((prev) => ({\n                          ...prev,\n                          targetAmount: e.target.value,\n                        }))\n                      }\n                      className={cn(\n                        \"w-full h-11 px-3.5 rounded-xl text-sm font-normal outline-none transition-all duration-200\",\n                        \"bg-zinc-100 text-zinc-900 border border-zinc-200/80 hover:border-zinc-300\",\n                        \"dark:bg-[#1e1f21] dark:text-white dark:border-white/[0.08] dark:hover:border-white/20\",\n                        focusInputClasses\n                      )}\n                    />\n                  </div>\n                </div>\n\n                {/* Continue button */}\n                <div\n                  className=\"w-full\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.46s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"first-goal\")}\n                    className={cn(\n                      \"w-full h-12 rounded-2xl font-semibold text-sm sm:text-base transition-all duration-200 active:scale-[0.98] shadow-sm flex items-center justify-center\",\n                      scenicPrimaryButtonClasses\n                    )}\n                  >\n                    Continue\n                  </button>\n                </div>\n              </div>\n            )}\n\n            {/* STEP 10: FIRST GOAL */}\n            {scenicStep === \"first-goal\" && (\n              <div className=\"flex flex-col items-center text-center\">\n                {/* Header with Brand */}\n                <div\n                  className=\"relative w-full flex items-center justify-center mb-5\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.04s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"emergency-fund\")}\n                    className=\"absolute left-0 inline-flex items-center gap-1 text-xs text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors\"\n                    aria-label=\"Back to emergency fund\"\n                  >\n                    <ArrowLeft size={16} />\n                  </button>\n                  <span className=\"font-semibold text-lg tracking-tight text-zinc-900 dark:text-white\">\n                    {brandName}\n                  </span>\n                </div>\n\n                {/* Title */}\n                <h2\n                  className=\"text-2xl sm:text-[28px] font-medium tracking-tight text-zinc-900 dark:text-white mb-2 leading-snug\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.10s backwards\",\n                  }}\n                >\n                  Let's set your first goal\n                </h2>\n\n                {/* Subtitle */}\n                <p\n                  className=\"text-xs sm:text-sm text-zinc-600 dark:text-white/70 mb-6 max-w-[340px] leading-relaxed\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.16s backwards\",\n                  }}\n                >\n                  We'll turn one of your priorities into a simple, achievable plan.\n                </p>\n\n                {/* Goal Form Fields */}\n                <div className=\"w-full flex flex-col gap-3 mb-6 text-left\">\n                  {/* Goal Dropdown - Custom Modal */}\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.22s backwards\",\n                    }}\n                  >\n                    <label className=\"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1.5\">\n                      Goal\n                    </label>\n                    <button\n                      type=\"button\"\n                      onClick={() =>\n                        setActiveDropdown({\n                          title: \"Goal\",\n                          field: \"goalType\",\n                          options: [\n                            \"Grow my net worth\",\n                            \"Pay off credit card debt\",\n                            \"Save for emergency\",\n                            \"Save for down payment\",\n                          ],\n                        })\n                      }\n                      className={scenicDropdownButtonClasses(\n                        activeDropdown?.field === \"goalType\"\n                      )}\n                    >\n                      <span className=\"truncate\">{firstGoal.goalType}</span>\n                      <ChevronDown size={15} className={cn(\"opacity-70 shrink-0 transition-colors\", theme.text)} />\n                    </button>\n                  </div>\n\n                  {/* Current net worth */}\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.28s backwards\",\n                    }}\n                  >\n                    <label className=\"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1.5\">\n                      Current net worth\n                    </label>\n                    <input\n                      type=\"text\"\n                      value={firstGoal.currentNetWorth}\n                      onChange={(e) =>\n                        setFirstGoal((prev) => ({\n                          ...prev,\n                          currentNetWorth: e.target.value,\n                        }))\n                      }\n                      className={cn(\n                        \"w-full h-11 px-3.5 rounded-xl text-sm font-normal outline-none transition-all duration-200\",\n                        \"bg-zinc-100 text-zinc-900 border border-zinc-200/80 hover:border-zinc-300\",\n                        \"dark:bg-[#1e1f21] dark:text-white dark:border-white/[0.08] dark:hover:border-white/20\",\n                        focusInputClasses\n                      )}\n                    />\n                  </div>\n\n                  {/* Target net worth */}\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.34s backwards\",\n                    }}\n                  >\n                    <label className=\"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1.5\">\n                      Target net worth\n                    </label>\n                    <input\n                      type=\"text\"\n                      value={firstGoal.targetNetWorth}\n                      onChange={(e) =>\n                        setFirstGoal((prev) => ({\n                          ...prev,\n                          targetNetWorth: e.target.value,\n                        }))\n                      }\n                      className={cn(\n                        \"w-full h-11 px-3.5 rounded-xl text-sm font-normal outline-none transition-all duration-200\",\n                        \"bg-zinc-100 text-zinc-900 border border-zinc-200/80 hover:border-zinc-300\",\n                        \"dark:bg-[#1e1f21] dark:text-white dark:border-white/[0.08] dark:hover:border-white/20\",\n                        focusInputClasses\n                      )}\n                    />\n                  </div>\n\n                  {/* Target date with custom Date Picker modal trigger */}\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.40s backwards\",\n                    }}\n                  >\n                    <label className=\"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1.5\">\n                      Target date\n                    </label>\n                    <button\n                      type=\"button\"\n                      onClick={openDatePicker}\n                      className={scenicDropdownButtonClasses(isDatePickerOpen)}\n                    >\n                      <span className=\"flex items-center gap-2 truncate\">\n                        <span>{firstGoal.targetDate}</span>\n                        <Calendar size={14} className={cn(\"shrink-0 transition-colors\", theme.text)} />\n                      </span>\n                      <ChevronDown size={15} className={cn(\"opacity-70 shrink-0 transition-colors\", theme.text)} />\n                    </button>\n                  </div>\n\n                  {/* Monthly contribution */}\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.46s backwards\",\n                    }}\n                  >\n                    <label className=\"block text-xs font-medium text-zinc-600 dark:text-zinc-400 mb-1.5\">\n                      Monthly contribution\n                    </label>\n                    <input\n                      type=\"text\"\n                      value={firstGoal.monthlyContribution}\n                      onChange={(e) =>\n                        setFirstGoal((prev) => ({\n                          ...prev,\n                          monthlyContribution: e.target.value,\n                        }))\n                      }\n                      className={cn(\n                        \"w-full h-11 px-3.5 rounded-xl text-sm font-normal outline-none transition-all duration-200\",\n                        \"bg-zinc-100 text-zinc-900 border border-zinc-200/80 hover:border-zinc-300\",\n                        \"dark:bg-[#1e1f21] dark:text-white dark:border-white/[0.08] dark:hover:border-white/20\",\n                        focusInputClasses\n                      )}\n                    />\n                  </div>\n                </div>\n\n                {/* Create Goal Button */}\n                <div\n                  className=\"w-full\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.52s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"summary\")}\n                    className={cn(\n                      \"w-full h-12 rounded-2xl font-semibold text-sm sm:text-base transition-all duration-200 active:scale-[0.98] shadow-sm flex items-center justify-center\",\n                      scenicPrimaryButtonClasses\n                    )}\n                  >\n                    Create Goal\n                  </button>\n                </div>\n              </div>\n            )}\n\n            {/* STEP 11: SUMMARY (Your financial picture is ready) */}\n            {scenicStep === \"summary\" && (\n              <div className=\"flex flex-col items-center text-center\">\n                {/* Header with Brand */}\n                <div\n                  className=\"relative w-full flex items-center justify-center mb-5\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.04s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"first-goal\")}\n                    className=\"absolute left-0 inline-flex items-center gap-1 text-xs text-zinc-500 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors\"\n                    aria-label=\"Back to first goal\"\n                  >\n                    <ArrowLeft size={16} />\n                  </button>\n                  <span className=\"font-semibold text-lg tracking-tight text-zinc-900 dark:text-white\">\n                    {brandName}\n                  </span>\n                </div>\n\n                {/* Title */}\n                <h2\n                  className=\"text-2xl sm:text-[28px] font-medium tracking-tight text-zinc-900 dark:text-white mb-2 leading-snug\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.10s backwards\",\n                  }}\n                >\n                  Your financial picture is ready\n                </h2>\n\n                {/* Subtitle */}\n                <p\n                  className=\"text-xs sm:text-sm text-zinc-600 dark:text-white/70 mb-6 max-w-[340px] leading-relaxed\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.16s backwards\",\n                  }}\n                >\n                  Here's your starting point and where you can make the biggest impact.\n                </p>\n\n                {/* 4 Metric Cards (2x2 grid) matching Image 5 */}\n                <div className=\"grid grid-cols-2 gap-3 mb-6 w-full text-left\">\n                  {/* Card 1: Top Strength */}\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.22s backwards\",\n                    }}\n                    className={cn(\n                      \"p-4 rounded-2xl flex flex-col justify-between min-h-[96px] transition-all\",\n                      \"bg-zinc-100/90 text-zinc-900 border border-zinc-200/80 shadow-sm\",\n                      \"dark:bg-[#1a1b1e] dark:text-white dark:border-white/[0.08]\"\n                    )}\n                  >\n                    <span className=\"text-xs text-zinc-500 dark:text-zinc-400 font-medium\">\n                      Top Strength\n                    </span>\n                    <span className=\"text-2xl sm:text-3xl font-bold tracking-tight text-zinc-900 dark:text-white my-1\">\n                      72\n                    </span>\n                    <span className=\"text-[11px] text-zinc-600 dark:text-zinc-400 font-medium\">\n                      Income stability\n                    </span>\n                  </div>\n\n                  {/* Card 2: Priority Area */}\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.28s backwards\",\n                    }}\n                    className={cn(\n                      \"p-4 rounded-2xl flex flex-col justify-between min-h-[96px] transition-all\",\n                      \"bg-zinc-100/90 text-zinc-900 border border-zinc-200/80 shadow-sm\",\n                      \"dark:bg-[#1a1b1e] dark:text-white dark:border-white/[0.08]\"\n                    )}\n                  >\n                    <span className=\"text-xs text-zinc-500 dark:text-zinc-400 font-medium\">\n                      Priority Area\n                    </span>\n                    <span className=\"text-2xl sm:text-3xl font-bold tracking-tight text-zinc-900 dark:text-white my-1\">\n                      45\n                    </span>\n                    <span className=\"text-[11px] text-zinc-600 dark:text-zinc-400 font-medium\">\n                      Debt management\n                    </span>\n                  </div>\n\n                  {/* Card 3: Emergency Fund */}\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.34s backwards\",\n                    }}\n                    className={cn(\n                      \"p-4 rounded-2xl flex flex-col justify-between min-h-[96px] transition-all\",\n                      \"bg-zinc-100/90 text-zinc-900 border border-zinc-200/80 shadow-sm\",\n                      \"dark:bg-[#1a1b1e] dark:text-white dark:border-white/[0.08]\"\n                    )}\n                  >\n                    <span className=\"text-xs text-zinc-500 dark:text-zinc-400 font-medium\">\n                      Emergency Fund\n                    </span>\n                    <span className=\"text-xl sm:text-2xl font-bold tracking-tight text-zinc-900 dark:text-white my-1\">\n                      $5K of $9K\n                    </span>\n                    <span className=\"text-[11px] text-zinc-600 dark:text-zinc-400 font-medium\">\n                      56% of target reached\n                    </span>\n                  </div>\n\n                  {/* Card 4: Primary goal */}\n                  <div\n                    style={{\n                      animation:\n                        \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.40s backwards\",\n                    }}\n                    className={cn(\n                      \"p-4 rounded-2xl flex flex-col justify-between min-h-[96px] transition-all\",\n                      \"bg-zinc-100/90 text-zinc-900 border border-zinc-200/80 shadow-sm\",\n                      \"dark:bg-[#1a1b1e] dark:text-white dark:border-white/[0.08]\"\n                    )}\n                  >\n                    <span className=\"text-xs text-zinc-500 dark:text-zinc-400 font-medium\">\n                      Primary goal\n                    </span>\n                    <span className=\"text-xl sm:text-2xl font-bold tracking-tight text-zinc-900 dark:text-white my-1\">\n                      $30K\n                    </span>\n                    <span className=\"text-[11px] text-zinc-600 dark:text-zinc-400 font-medium\">\n                      Net worth\n                    </span>\n                  </div>\n                </div>\n\n                {/* Go to Dashboard button */}\n                <div\n                  className=\"w-full\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.48s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => setScenicStep(\"completed\")}\n                    className={cn(\n                      \"w-full h-12 rounded-2xl font-semibold text-sm sm:text-base transition-all duration-200 active:scale-[0.98] shadow-sm flex items-center justify-center\",\n                      scenicPrimaryButtonClasses\n                    )}\n                  >\n                    Go to Dashboard\n                  </button>\n                </div>\n              </div>\n            )}\n\n            {/* STEP 12: COMPLETED STATE */}\n            {scenicStep === \"completed\" && (\n              <div className=\"flex flex-col items-center text-center py-4\">\n                {/* Brand */}\n                <div\n                  className=\"flex items-center gap-2 mb-6\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.04s backwards\",\n                  }}\n                >\n                  {brandIcon || (\n                    <DocsUiIcon className=\"w-5 h-5 text-zinc-900 dark:text-white\" />\n                  )}\n                  <span className=\"font-semibold text-lg tracking-tight text-zinc-900 dark:text-white\">\n                    {brandName}\n                  </span>\n                </div>\n\n                {/* Success check badge */}\n                <div\n                  className=\"w-14 h-14 rounded-full bg-emerald-500/10 border border-emerald-500/20 text-emerald-600 dark:text-emerald-400 flex items-center justify-center mb-5\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.10s backwards\",\n                  }}\n                >\n                  <Check size={26} strokeWidth={2.6} />\n                </div>\n\n                {/* Title */}\n                <h2\n                  className=\"text-2xl sm:text-[28px] font-medium tracking-tight text-zinc-900 dark:text-white mb-2 leading-snug\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.16s backwards\",\n                  }}\n                >\n                  You're all set!\n                </h2>\n\n                {/* Subtitle */}\n                <p\n                  className=\"text-xs sm:text-sm text-zinc-600 dark:text-white/70 mb-7 max-w-[320px] leading-relaxed\"\n                  style={{\n                    animation:\n                      \"scenic-slide-right 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.22s backwards\",\n                  }}\n                >\n                  Your profile and focus areas have been customized. Welcome aboard!\n                </p>\n\n                {/* Restart demo button */}\n                <div\n                  className=\"w-full flex flex-col gap-2.5\"\n                  style={{\n                    animation:\n                      \"scenic-stagger-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.28s backwards\",\n                  }}\n                >\n                  <button\n                    type=\"button\"\n                    onClick={() => {\n                      setScenicStep(\"welcome\");\n                      setOtp([\"\", \"\", \"\", \"\", \"\", \"\"]);\n                    }}\n                    className={cn(\n                      \"w-full h-12 rounded-2xl font-semibold text-sm sm:text-base transition-all duration-200 active:scale-[0.98] shadow-sm flex items-center justify-center\",\n                      scenicPrimaryButtonClasses\n                    )}\n                  >\n                    Restart Demo Flow\n                  </button>\n                </div>\n              </div>\n            )}\n          </div>\n        </div>\n\n        {/* CUSTOM DROPDOWN MODAL */}\n        {activeDropdown && (\n          <div\n            className=\"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 animate-in fade-in duration-200\"\n            onClick={() => setActiveDropdown(null)}\n          >\n            <div\n              className=\"relative w-full max-w-[360px] bg-white dark:bg-[#18191b] border border-zinc-200/90 dark:border-white/10 rounded-[24px] p-5 shadow-2xl flex flex-col gap-3 text-left\"\n              style={{\n                animation:\n                  \"scenic-modal-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) backwards\",\n              }}\n              onClick={(e) => e.stopPropagation()}\n            >\n              <div className=\"flex items-center justify-between pb-3 border-b border-zinc-100 dark:border-white/[0.08]\">\n                <div>\n                  <h3 className=\"font-semibold text-[15px] text-zinc-900 dark:text-white\">\n                    {activeDropdown.title}\n                  </h3>\n                  <p className=\"text-xs text-zinc-500 dark:text-zinc-400 mt-0.5\">\n                    Select one option\n                  </p>\n                </div>\n                <button\n                  type=\"button\"\n                  onClick={() => setActiveDropdown(null)}\n                  className=\"w-8 h-8 rounded-full flex items-center justify-center text-zinc-400 hover:text-zinc-900 dark:hover:text-white hover:bg-zinc-100 dark:hover:bg-white/10 transition-colors\"\n                >\n                  <X size={16} />\n                </button>\n              </div>\n\n              <div className=\"max-h-[280px] overflow-y-auto space-y-1.5 py-1 pr-1\">\n                {activeDropdown.options.map((opt) => {\n                  const isSelected =\n                    activeDropdown.field === \"goalType\"\n                      ? firstGoal.goalType === opt\n                      : finances[activeDropdown.field] === opt;\n                  return (\n                    <button\n                      key={opt}\n                      type=\"button\"\n                      onClick={() => {\n                        if (activeDropdown.field === \"goalType\") {\n                          setFirstGoal((prev) => ({ ...prev, goalType: opt }));\n                        } else {\n                          setFinances((prev) => ({\n                            ...prev,\n                            [activeDropdown.field]: opt,\n                          }));\n                        }\n                        setActiveDropdown(null);\n                      }}\n                      className={cn(\n                        \"w-full px-4 py-3 rounded-2xl text-xs sm:text-sm font-medium flex items-center justify-between transition-all duration-150 text-left\",\n                        focusButtonClasses,\n                        isSelected\n                          ? cn(theme.bg, theme.panelFg, \"shadow-sm\")\n                          : \"bg-zinc-100/80 text-zinc-700 hover:bg-zinc-200/90 dark:bg-white/[0.05] dark:text-zinc-300 dark:hover:bg-white/10\"\n                      )}\n                    >\n                      <span>{opt}</span>\n                      {isSelected && <Check size={16} strokeWidth={2.5} className={theme.panelFg} />}\n                    </button>\n                  );\n                })}\n              </div>\n            </div>\n          </div>\n        )}\n\n        {/* CUSTOM DATE PICKER MODAL */}\n        {isDatePickerOpen && (\n          <div\n            className=\"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 animate-in fade-in duration-200\"\n            onClick={() => setIsDatePickerOpen(false)}\n          >\n            <div\n              className=\"relative w-full max-w-[360px] bg-white dark:bg-[#18191b] border border-zinc-200/90 dark:border-white/10 rounded-[24px] p-5 shadow-2xl flex flex-col gap-4 text-left\"\n              style={{\n                animation:\n                  \"scenic-modal-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) backwards\",\n              }}\n              onClick={(e) => e.stopPropagation()}\n            >\n              {/* Header */}\n              <div className=\"flex items-center justify-between pb-3 border-b border-zinc-100 dark:border-white/[0.08]\">\n                <div>\n                  <h3 className=\"font-semibold text-[15px] text-zinc-900 dark:text-white\">\n                    Select Target Date\n                  </h3>\n                  <p className=\"text-xs text-zinc-500 dark:text-zinc-400 mt-0.5\">\n                    Month and year for your goal\n                  </p>\n                </div>\n                <button\n                  type=\"button\"\n                  onClick={() => setIsDatePickerOpen(false)}\n                  className=\"w-8 h-8 rounded-full flex items-center justify-center text-zinc-400 hover:text-zinc-900 dark:hover:text-white hover:bg-zinc-100 dark:hover:bg-white/10 transition-colors\"\n                >\n                  <X size={16} />\n                </button>\n              </div>\n\n              {/* Year Navigation */}\n              <div className=\"flex items-center justify-between px-2 py-1 bg-zinc-100/80 dark:bg-white/[0.05] rounded-xl\">\n                <button\n                  type=\"button\"\n                  onClick={() => setDatePickerYear((y) => y - 1)}\n                  className=\"w-8 h-8 rounded-lg flex items-center justify-center text-zinc-600 hover:text-zinc-900 dark:text-zinc-300 dark:hover:text-white hover:bg-zinc-200 dark:hover:bg-white/10 transition-colors\"\n                  aria-label=\"Previous year\"\n                >\n                  <ChevronLeft size={16} />\n                </button>\n                <span className=\"font-semibold text-sm text-zinc-900 dark:text-white\">\n                  {datePickerYear}\n                </span>\n                <button\n                  type=\"button\"\n                  onClick={() => setDatePickerYear((y) => y + 1)}\n                  className=\"w-8 h-8 rounded-lg flex items-center justify-center text-zinc-600 hover:text-zinc-900 dark:text-zinc-300 dark:hover:text-white hover:bg-zinc-200 dark:hover:bg-white/10 transition-colors\"\n                  aria-label=\"Next year\"\n                >\n                  <ChevronRight size={16} />\n                </button>\n              </div>\n\n              {/* 12 Months Grid */}\n              <div className=\"grid grid-cols-3 gap-2\">\n                {[\n                  \"January\",\n                  \"February\",\n                  \"March\",\n                  \"April\",\n                  \"May\",\n                  \"June\",\n                  \"July\",\n                  \"August\",\n                  \"September\",\n                  \"October\",\n                  \"November\",\n                  \"December\",\n                ].map((m) => {\n                  const isSelected = datePickerMonth === m;\n                  return (\n                    <button\n                      key={m}\n                      type=\"button\"\n                      onClick={() => setDatePickerMonth(m)}\n                      className={cn(\n                        \"h-10 rounded-xl text-xs font-medium transition-all duration-150 flex items-center justify-center\",\n                        focusButtonClasses,\n                        isSelected\n                          ? cn(theme.bg, theme.panelFg, \"font-semibold shadow-sm\")\n                          : \"bg-zinc-100/80 text-zinc-700 hover:bg-zinc-200/90 dark:bg-white/[0.05] dark:text-zinc-300 dark:hover:bg-white/10\"\n                      )}\n                    >\n                      {m.slice(0, 3)}\n                    </button>\n                  );\n                })}\n              </div>\n\n              {/* Actions Footer */}\n              <div className=\"flex items-center gap-2 pt-2 border-t border-zinc-100 dark:border-white/[0.08]\">\n                <button\n                  type=\"button\"\n                  onClick={() => setIsDatePickerOpen(false)}\n                  className={cn(\n                    \"flex-1 h-10 rounded-xl text-xs sm:text-sm font-medium bg-zinc-100 text-zinc-700 hover:bg-zinc-200/80 dark:bg-white/[0.05] dark:text-zinc-300 dark:hover:bg-white/10 transition-colors\",\n                    focusButtonClasses\n                  )}\n                >\n                  Cancel\n                </button>\n                <button\n                  type=\"button\"\n                  onClick={() => {\n                    setFirstGoal((prev) => ({\n                      ...prev,\n                      targetDate: `${datePickerMonth} ${datePickerYear}`,\n                    }));\n                    setIsDatePickerOpen(false);\n                  }}\n                  className={cn(\n                    \"flex-1 h-10 rounded-xl text-xs sm:text-sm font-semibold transition-colors shadow-sm\",\n                    scenicPrimaryButtonClasses\n                  )}\n                >\n                  Apply Date\n                </button>\n              </div>\n            </div>\n          </div>\n        )}\n      </div>\n    );\n  }\n\n  return (\n    <div\n      className=\"max-w-md mx-auto relative overflow-hidden bg-card text-card-foreground rounded-3xl shadow-[0_8px_40px_rgba(0,0,0,0.08)] dark:shadow-[0_8px_40px_rgba(0,0,0,0.4)] border border-border w-full\"\n      style={style}\n    >\n      {/* Top Completion Progress Bar */}\n      <div className=\"absolute top-0 left-0 right-0 h-1.5 bg-muted\">\n        <div\n          className=\"h-full bg-primary\"\n          style={{\n            width: `${getProgress()}%`,\n            transition: `width 0.5s ${CIRC_OUT}`,\n          }}\n        />\n      </div>\n\n      <div className=\"p-8 pt-10\">\n        <div\n          className=\"text-center mb-8\"\n          style={{\n            animation: `signup-form-fade-in 0.3s ${FADE_EASE} backwards, signup-form-drop-in ${Y_SPRING.duration}ms ${Y_SPRING.easing} backwards`,\n          }}\n        >\n          <div className=\"w-12 h-12 bg-primary/10 rounded-2xl flex items-center justify-center mx-auto mb-4 border border-primary/20\">\n            <User className=\"w-6 h-6 text-primary\" />\n          </div>\n          <h2 className=\"text-2xl font-bold text-foreground tracking-tight\">\n            Create Account\n          </h2>\n          <p className=\"text-[13.5px] text-muted-foreground mt-1.5\">\n            Join thousands of developers building the future.\n          </p>\n        </div>\n\n        <form\n          onSubmit={handleSubmit}\n          className=\"space-y-5\"\n          style={{\n            animation: `signup-form-fade-in 0.3s ${FADE_EASE} backwards`,\n          }}\n        >\n          <div className=\"grid grid-cols-2 gap-4\">\n            <div style={itemIn(0)}>\n              <PremiumInput\n                label=\"First Name\"\n                value={formData.firstName}\n                onChange={(e) => handleChange(\"firstName\", e.target.value)}\n                error={errors.firstName}\n                placeholder=\"John\"\n                required\n              />\n            </div>\n            <div style={itemIn(1)}>\n              <PremiumInput\n                label=\"Last Name\"\n                value={formData.lastName}\n                onChange={(e) => handleChange(\"lastName\", e.target.value)}\n                error={errors.lastName}\n                placeholder=\"Doe\"\n                required\n              />\n            </div>\n          </div>\n\n          <div style={itemIn(2)}>\n            <PremiumInput\n              label=\"Email Address\"\n              icon={Mail}\n              type=\"email\"\n              value={formData.email}\n              onChange={(e) => handleChange(\"email\", e.target.value)}\n              error={errors.email}\n              placeholder=\"name@company.com\"\n              required\n            />\n          </div>\n\n          <div style={itemIn(3)}>\n            <PremiumInput\n              label=\"Password\"\n              icon={Lock}\n              type=\"password\"\n              value={formData.password}\n              onChange={(e) => handleChange(\"password\", e.target.value)}\n              error={errors.password}\n              placeholder=\"••••••••\"\n              required\n            />\n            <PasswordStrength password={formData.password} />\n          </div>\n\n          <div style={itemIn(4)}>\n            <PremiumInput\n              label=\"Confirm Password\"\n              icon={Lock}\n              type=\"password\"\n              value={formData.confirmPassword}\n              onChange={(e) => handleChange(\"confirmPassword\", e.target.value)}\n              error={errors.confirmPassword}\n              placeholder=\"••••••••\"\n              required\n            />\n          </div>\n\n          <div className=\"space-y-4 pt-2\" style={itemIn(5)}>\n            <PremiumCheckbox\n              label=\"I agree to the Terms of Service & Privacy Policy\"\n              checked={formData.agreeToTerms}\n              onChange={(c: boolean) => handleChange(\"agreeToTerms\", c)}\n              error={errors.agreeToTerms}\n              required\n            />\n            <PremiumCheckbox\n              label=\"Subscribe to monthly product updates\"\n              checked={formData.newsletter}\n              onChange={(c: boolean) => handleChange(\"newsletter\", c)}\n            />\n          </div>\n\n          <div className=\"pt-2\" style={itemIn(6)}>\n            <button\n              type=\"submit\"\n              disabled={loading}\n              className={cn(\n                \"relative w-full h-12 rounded-xl bg-primary text-primary-foreground font-semibold text-[15px] overflow-hidden group disabled:opacity-70 disabled:cursor-not-allowed transition-transform active:scale-[0.98]\",\n                focusButtonClasses\n              )}\n            >\n              {/* Button Hover Shine */}\n              <div className=\"absolute inset-0 -translate-x-full bg-gradient-to-r from-transparent via-primary-foreground/20 to-transparent group-hover:animate-[shimmer_1.5s_infinite]\" />\n\n              <div className=\"relative flex items-center justify-center gap-2\">\n                {loading ? (\n                  <>\n                    <div className=\"w-5 h-5 border-2 border-primary-foreground/40 border-t-primary-foreground rounded-full animate-spin\" />\n                    <span>Processing...</span>\n                  </>\n                ) : (\n                  <span>Create Account</span>\n                )}\n              </div>\n            </button>\n          </div>\n        </form>\n\n        <div\n          className=\"mt-8 text-center\"\n          style={{\n            animation: `signup-form-fade-in 0.3s ${FADE_EASE} 0.6s backwards`,\n          }}\n        >\n          <p className=\"text-[13px] text-muted-foreground font-medium\">\n            Already have an account?{\" \"}\n            <a\n              href=\"#\"\n              className=\"text-primary hover:text-primary/80 font-semibold transition-colors\"\n            >\n              Sign in\n            </a>\n          </p>\n        </div>\n      </div>\n\n      {/* Required Keyframes for shimmer and the entrance */}\n      <style>{`\n        @keyframes shimmer {\n          100% { transform: translateX(100%); }\n        }\n        ${keyframes}\n      `}</style>\n    </div>\n  );\n};\n",
      "type": "registry:component",
      "target": "components/custom/blocks/SignupForm.tsx"
    },
    {
      "path": "src/components/custom/blocks/motion-curves.ts",
      "content": "/**\n * Motion curves with no animation library behind them.\n *\n * The components here ship as CSS, GSAP or Motion builds that must move\n * identically, so the curves are computed once, from the same numbers, and\n * handed to whichever engine runs them:\n *\n *   - `cubicBezier(x1, y1, x2, y2)` → an easing function (GSAP accepts any\n *     `(progress) => value` as `ease`), exact for Motion's `ease: [..]` arrays\n *     and for CSS `cubic-bezier()`.\n *   - `spring({ stiffness, damping, mass })` → the analytic solution Motion\n *     Motion uses, as an easing function plus the time it takes to settle, or\n *     as a CSS `linear()` string for a fixed start and end.\n *   - `createSpringFollower` → a value that chases a moving target through the\n *     same spring every frame, like Motion's `useSpring`, for pointer-driven\n *     motion that no fixed curve can describe.\n */\n\n// ---------------------------------------------------------------------------\n// Cubic bezier\n// ---------------------------------------------------------------------------\n\n/**\n * The CSS / Motion cubic-bezier as a function of progress. Newton-Raphson\n * with a bisection fallback, the same solver browsers use.\n */\nexport function cubicBezier(x1: number, y1: number, x2: number, y2: number) {\n  if (x1 === y1 && x2 === y2) return (t: number) => t;\n\n  const a = (p1: number, p2: number) => 1 - 3 * p2 + 3 * p1;\n  const b = (p1: number, p2: number) => 3 * p2 - 6 * p1;\n  const c = (p1: number) => 3 * p1;\n  const at = (t: number, p1: number, p2: number) =>\n    ((a(p1, p2) * t + b(p1, p2)) * t + c(p1)) * t;\n  const slope = (t: number, p1: number, p2: number) =>\n    3 * a(p1, p2) * t * t + 2 * b(p1, p2) * t + c(p1);\n\n  const solveX = (x: number) => {\n    let t = x;\n    for (let i = 0; i < 8; i++) {\n      const s = slope(t, x1, x2);\n      if (Math.abs(s) < 1e-6) break;\n      const err = at(t, x1, x2) - x;\n      if (Math.abs(err) < 1e-7) return t;\n      t -= err / s;\n    }\n    let lo = 0;\n    let hi = 1;\n    t = x;\n    for (let i = 0; i < 30 && hi - lo > 1e-7; i++) {\n      const value = at(t, x1, x2);\n      if (value < x) lo = t;\n      else hi = t;\n      t = (lo + hi) / 2;\n    }\n    return t;\n  };\n\n  return (x: number) => (x <= 0 ? 0 : x >= 1 ? 1 : at(solveX(x), y1, y2));\n}\n\n/** Motion's named eases, as the cubic-beziers they are. */\nexport const MOTION_EASE = {\n  linear: [0, 0, 1, 1],\n  easeIn: [0.42, 0, 1, 1],\n  easeOut: [0, 0, 0.58, 1],\n  easeInOut: [0.42, 0, 0.58, 1],\n  circIn: [0.55, 0, 1, 0.45],\n  circOut: [0.55, 0, 0.45, 1],\n  circInOut: [0.85, 0, 0.15, 1],\n  backIn: [0.31, 0.01, 0.66, -0.59],\n  backOut: [0.33, 1.53, 0.69, 0.99],\n  anticipate: [0.66, -0.56, 0.34, 1.35],\n} as const;\n\n/**\n * Motion's default layout transition (`layout` / `layoutId`):\n * `{ duration: 0.45, ease: [0.4, 0, 0.1, 1] }`.\n */\nexport const LAYOUT_TRANSITION = { duration: 0.45, ease: [0.4, 0, 0.1, 1] as const };\n\n// ---------------------------------------------------------------------------\n// Spring\n// ---------------------------------------------------------------------------\n\nexport interface SpringOptions {\n  /** Motion default 100. */\n  stiffness?: number;\n  /** Motion default 10. */\n  damping?: number;\n  /** Motion default 1. */\n  mass?: number;\n  /** Starting velocity, in units of the whole distance per second. */\n  velocity?: number;\n  /** How close to the end counts as settled, as a fraction of the distance. */\n  restDelta?: number;\n}\n\n/**\n * Normalised position (0 → 1) of a spring released from 0 towards 1, at time\n * `t` seconds. The closed-form solution Motion's `spring()` generator\n * uses for the under-, critically and over-damped cases.\n */\nexport function springAt(options: SpringOptions = {}) {\n  const { stiffness = 100, damping = 10, mass = 1, velocity = 0 } = options;\n  const zeta = damping / (2 * Math.sqrt(stiffness * mass));\n  const omega0 = Math.sqrt(stiffness / mass);\n  // Motion's convention: distance still to cover, velocity toward it negated.\n  const delta = 1;\n  const v0 = -velocity;\n\n  if (zeta < 1) {\n    const omegaD = omega0 * Math.sqrt(1 - zeta * zeta);\n    return (t: number) => {\n      const envelope = Math.exp(-zeta * omega0 * t);\n      return (\n        1 -\n        envelope *\n          (((v0 + zeta * omega0 * delta) / omegaD) * Math.sin(omegaD * t) +\n            delta * Math.cos(omegaD * t))\n      );\n    };\n  }\n  if (zeta === 1) {\n    return (t: number) => 1 - Math.exp(-omega0 * t) * (delta + (v0 + omega0 * delta) * t);\n  }\n  const omegaD = omega0 * Math.sqrt(zeta * zeta - 1);\n  return (t: number) => {\n    const envelope = Math.exp(-zeta * omega0 * t);\n    const freq = Math.min(omegaD * t, 300);\n    return (\n      1 -\n      (envelope *\n        ((v0 + zeta * omega0 * delta) * Math.sinh(freq) + omegaD * delta * Math.cosh(freq))) /\n        omegaD\n    );\n  };\n}\n\n/** Seconds until the spring stays within `restDelta` of its end. */\nexport function springDuration(options: SpringOptions = {}) {\n  const at = springAt(options);\n  const restDelta = options.restDelta ?? 0.001;\n  const step = 1 / 240;\n  let lastOutside = 0;\n  for (let t = 0; t <= 10; t += step) {\n    if (Math.abs(1 - at(t)) > restDelta) lastOutside = t;\n    else if (t - lastOutside > 0.1) break;\n  }\n  return Math.max(lastOutside + step, step);\n}\n\n/**\n * A spring as a duration and an easing function over it — what GSAP takes:\n *\n *   const { duration, ease } = springEase({ stiffness: 300, damping: 20 });\n *   gsap.to(el, { y: 0, duration, ease });\n *\n * Exact for a fixed start and end; a spring that has to react mid-flight to a\n * new target needs `createSpringFollower` instead.\n */\nexport function springEase(options: SpringOptions = {}) {\n  const duration = springDuration(options);\n  const at = springAt(options);\n  return {\n    duration,\n    ease: (progress: number) => (progress >= 1 ? 1 : at(progress * duration)),\n  };\n}\n\n/**\n * A spring as a CSS `linear()` easing and its duration in ms, for\n * `transition` / `animation` with a fixed start and end.\n *\n *   const { easing, duration } = springLinear({ stiffness: 400, damping: 30 });\n *   el.style.transition = `transform ${duration}ms ${easing}`;\n */\nexport function springLinear(options: SpringOptions = {}, pointsPerSecond = 60) {\n  const duration = springDuration(options);\n  const at = springAt(options);\n  const count = Math.max(Math.ceil(duration * pointsPerSecond), 8);\n  const points: string[] = [];\n  for (let i = 0; i <= count; i++) {\n    const t = (i / count) * duration;\n    points.push(String(Math.round((i === count ? 1 : at(t)) * 10000) / 10000));\n  }\n  return { easing: `linear(${points.join(\", \")})`, duration: Math.round(duration * 1000) };\n}\n\n// ---------------------------------------------------------------------------\n// Spring follower (useSpring equivalent)\n// ---------------------------------------------------------------------------\n\n/** Something that calls back once per frame with the time since the last, in ms. */\nexport interface FrameTicker {\n  add: (callback: (deltaMs: number) => void) => () => void;\n}\n\n/** requestAnimationFrame as a ticker — the library-free default. */\nexport const rafTicker: FrameTicker = {\n  add(callback) {\n    let last = performance.now();\n    let frame = requestAnimationFrame(function tick(now) {\n      callback(now - last);\n      last = now;\n      frame = requestAnimationFrame(tick);\n    });\n    return () => cancelAnimationFrame(frame);\n  },\n};\n\nexport interface SpringFollower {\n  /** Chase a new target from wherever the value is now, keeping its velocity. */\n  set: (target: number) => void;\n  /** Move to a value instantly, with no motion. */\n  jump: (value: number) => void;\n  get: () => number;\n  destroy: () => void;\n}\n\n/**\n * A value that follows its target through a spring, integrating the same\n * equation of motion Motion's `useSpring` solves — so a pointer-driven spring\n * reads the same in every build. Runs only while moving; `onUpdate` receives\n * each new value.\n */\nexport function createSpringFollower(\n  initial: number,\n  onUpdate: (value: number) => void,\n  options: SpringOptions & { restSpeed?: number; ticker?: FrameTicker } = {},\n): SpringFollower {\n  const { stiffness = 100, damping = 10, mass = 1, ticker = rafTicker } = options;\n  const restDelta = options.restDelta ?? 0.01;\n  const restSpeed = options.restSpeed ?? 0.01;\n  let value = initial;\n  let target = initial;\n  let velocity = 0;\n  let stop: (() => void) | null = null;\n\n  const step = (deltaMs: number) => {\n    // Fixed 1ms sub-steps keep the integration stable for stiff springs and\n    // independent of the frame rate.\n    const steps = Math.min(Math.max(Math.round(deltaMs), 1), 250);\n    for (let i = 0; i < steps; i++) {\n      const force = -stiffness * (value - target) - damping * velocity;\n      velocity += (force / mass) * 0.001;\n      value += velocity * 0.001;\n    }\n    if (Math.abs(target - value) < restDelta && Math.abs(velocity) < restSpeed) {\n      value = target;\n      velocity = 0;\n      stop?.();\n      stop = null;\n    }\n    onUpdate(value);\n  };\n\n  return {\n    set(next) {\n      target = next;\n      if (!stop && value !== target) stop = ticker.add(step);\n    },\n    jump(next) {\n      stop?.();\n      stop = null;\n      value = target = next;\n      velocity = 0;\n      onUpdate(value);\n    },\n    get: () => value,\n    destroy() {\n      stop?.();\n      stop = null;\n    },\n  };\n}\n",
      "type": "registry:component",
      "target": "components/custom/blocks/motion-curves.ts"
    },
    {
      "path": "src/components/custom/blocks/register-form-theme.ts",
      "content": "\"use client\";\n\nconst colorThemes: Record<string, Record<string, string>> = {\n  lavender: {\n    bg: \"bg-[#9b8afb] hover:bg-[#8b75f8]\",\n    text: \"text-[#9b8afb]\",\n    border: \"border-[#9b8afb]\",\n    ring: \"focus:ring-[#9b8afb]\",\n    focusBorder: \"focus:border-[#9b8afb] focus-visible:border-[#9b8afb]\",\n    focusRing: \"focus:ring-2 focus:ring-[#9b8afb]/25 focus-visible:ring-2 focus-visible:ring-[#9b8afb]/25\",\n    hoverBorder: \"hover:border-[#9b8afb]/60\",\n    gradient: \"from-[#9b8afb] to-[#7c66f6]\",\n    panelFg: \"text-white\",\n  },\n  indigo: {\n    bg: \"bg-indigo-600 hover:bg-indigo-700\",\n    text: \"text-indigo-600 dark:text-indigo-400\",\n    border: \"border-indigo-600\",\n    ring: \"focus:ring-indigo-600\",\n    focusBorder: \"focus:border-indigo-600 focus-visible:border-indigo-600\",\n    focusRing: \"focus:ring-2 focus:ring-indigo-600/25 focus-visible:ring-2 focus-visible:ring-indigo-600/25\",\n    hoverBorder: \"hover:border-indigo-500/60\",\n    gradient: \"from-indigo-600 to-violet-600\",\n    panelFg: \"text-white\",\n  },\n  rose: {\n    bg: \"bg-rose-600 hover:bg-rose-700\",\n    text: \"text-rose-600 dark:text-rose-400\",\n    border: \"border-rose-600\",\n    ring: \"focus:ring-rose-600\",\n    focusBorder: \"focus:border-rose-600 focus-visible:border-rose-600\",\n    focusRing: \"focus:ring-2 focus:ring-rose-600/25 focus-visible:ring-2 focus-visible:ring-rose-600/25\",\n    hoverBorder: \"hover:border-rose-500/60\",\n    gradient: \"from-rose-600 to-orange-500\",\n    panelFg: \"text-white\",\n  },\n  emerald: {\n    bg: \"bg-emerald-600 hover:bg-emerald-700\",\n    text: \"text-emerald-600 dark:text-emerald-400\",\n    border: \"border-emerald-600\",\n    ring: \"focus:ring-emerald-600\",\n    focusBorder: \"focus:border-emerald-600 focus-visible:border-emerald-600\",\n    focusRing: \"focus:ring-2 focus:ring-emerald-600/25 focus-visible:ring-2 focus-visible:ring-emerald-600/25\",\n    hoverBorder: \"hover:border-emerald-500/60\",\n    gradient: \"from-emerald-600 to-teal-500\",\n    panelFg: \"text-white\",\n  },\n  zinc: {\n    bg: \"bg-zinc-900 hover:bg-zinc-800 dark:bg-zinc-100 dark:hover:bg-zinc-200 dark:text-zinc-900\",\n    text: \"text-zinc-900 dark:text-zinc-100\",\n    border: \"border-zinc-900 dark:border-zinc-100\",\n    ring: \"focus:ring-zinc-900 dark:focus:ring-zinc-100\",\n    focusBorder: \"focus:border-zinc-900 dark:focus:border-zinc-100 focus-visible:border-zinc-900 dark:focus-visible:border-zinc-100\",\n    focusRing: \"focus:ring-2 focus:ring-zinc-900/20 dark:focus:ring-zinc-100/20 focus-visible:ring-2 focus-visible:ring-zinc-900/20 dark:focus-visible:ring-zinc-100/20\",\n    hoverBorder: \"hover:border-zinc-900/50 dark:hover:border-zinc-400/50\",\n    gradient: \"from-zinc-800 to-zinc-600 dark:from-zinc-200 dark:to-zinc-400\",\n    panelFg: \"text-white dark:text-zinc-900\",\n  },\n};\n\nconst PRESET_HEX: Record<\n  string,\n  { hex: string; rgb: string; secondary: string; panelFg: string }\n> = {\n  lavender: {\n    hex: \"#9b8afb\",\n    rgb: \"155, 138, 251\",\n    secondary: \"#c4b5fd\",\n    panelFg: \"#ffffff\",\n  },\n  indigo: {\n    hex: \"#6366f1\",\n    rgb: \"99, 102, 241\",\n    secondary: \"#a855f7\",\n    panelFg: \"#ffffff\",\n  },\n  rose: {\n    hex: \"#f43f5e\",\n    rgb: \"244, 63, 94\",\n    secondary: \"#fb7185\",\n    panelFg: \"#ffffff\",\n  },\n  emerald: {\n    hex: \"#10b981\",\n    rgb: \"16, 185, 129\",\n    secondary: \"#34d399\",\n    panelFg: \"#ffffff\",\n  },\n  zinc: {\n    hex: \"#18181b\",\n    rgb: \"24, 24, 27\",\n    secondary: \"#71717a\",\n    panelFg: \"#fafafa\",\n  },\n};\n\nconst contrastingForeground = (rgb: string) => {\n  const [r, g, b] = rgb.split(\",\").map((v) => parseInt(v.trim(), 10));\n  const channel = (v: number) => {\n    const c = v / 255;\n    return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);\n  };\n  const luminance =\n    0.2126 * channel(r) + 0.7152 * channel(g) + 0.0722 * channel(b);\n  return luminance > 0.45 ? \"#09090b\" : \"#ffffff\";\n};\n\nconst hexToRgb = (hex: string) => {\n  let cleanHex = hex.replace(/^#/, \"\");\n  if (cleanHex.length === 3)\n    cleanHex = cleanHex\n      .split(\"\")\n      .map((x) => x + x)\n      .join(\"\");\n  const result = /^([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(cleanHex);\n  return result\n    ? `${parseInt(result[1], 16)}, ${parseInt(result[2], 16)}, ${parseInt(result[3], 16)}`\n    : \"99, 102, 241\";\n};\n\nexport const getThemeStyles = (color: string) => {\n  if (colorThemes[color]) {\n    const preset = PRESET_HEX[color];\n    const hex = preset?.hex;\n    const rgb = preset?.rgb;\n    const secondary = preset?.secondary || hex;\n    const style: React.CSSProperties = hex\n      ? ({\n          \"--primary\": hex,\n          \"--primary-foreground\": preset?.panelFg || \"#ffffff\",\n          \"--ring\": hex,\n          \"--theme-color\": hex,\n          \"--theme-color-rgb\": rgb,\n          \"--panel-fg\": preset?.panelFg || \"#ffffff\",\n          \"--brand\": hex,\n          \"--brand-secondary\": secondary,\n        } as React.CSSProperties)\n      : {};\n    return { theme: colorThemes[color], style };\n  }\n\n  if (color && color.startsWith(\"#\")) {\n    const rgb = hexToRgb(color);\n    const fg = contrastingForeground(rgb);\n    return {\n      theme: {\n        bg: \"bg-[var(--theme-color)] text-white hover:opacity-90\",\n        text: \"text-[var(--theme-color)]\",\n        border: \"border-[var(--theme-color)]\",\n        ring: \"focus:ring-[var(--theme-color)]\",\n        focusBorder: \"focus:border-[var(--theme-color)] focus-visible:border-[var(--theme-color)]\",\n        focusRing: \"focus:ring-2 focus:ring-[rgba(var(--theme-color-rgb),0.25)] focus-visible:ring-2 focus-visible:ring-[rgba(var(--theme-color-rgb),0.25)]\",\n        hoverBorder: \"hover:border-[var(--theme-color)]/60\",\n        gradient:\n          \"from-[var(--theme-color)] to-[rgba(var(--theme-color-rgb),0.6)]\",\n        panelFg: \"text-[var(--panel-fg)]\",\n      },\n      style: {\n        \"--primary\": color,\n        \"--primary-foreground\": fg,\n        \"--ring\": color,\n        \"--theme-color\": color,\n        \"--theme-color-rgb\": rgb,\n        \"--panel-fg\": fg,\n        \"--brand\": color,\n        \"--brand-secondary\": color,\n      } as React.CSSProperties,\n    };\n  }\n\n  return {\n    theme: {\n      bg: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n      text: \"text-primary\",\n      border: \"border-primary\",\n      ring: \"focus:ring-primary\",\n      focusBorder: \"focus:border-primary focus-visible:border-primary\",\n      focusRing: \"focus:ring-2 focus:ring-primary/25 focus-visible:ring-2 focus-visible:ring-primary/25\",\n      hoverBorder: \"hover:border-primary/60\",\n      gradient: \"from-primary to-primary/70\",\n      // The token designed to be legible on --primary, which inverts by theme.\n      panelFg: \"text-primary-foreground\",\n    },\n    style: {} as React.CSSProperties,\n  };\n};\n",
      "type": "registry:component",
      "target": "components/custom/blocks/register-form-theme.ts"
    }
  ],
  "docs": "Named export: SignupForm. Uses Motion for field-level error transitions. Validation is client-side presentation only — enforce it again on your server.",
  "categories": [
    "authentication",
    "forms"
  ],
  "type": "registry:component"
}
