/*
 * onboarding-overrides.css
 * Bridges the visual gap between the Framer landing page and the React SPA onboarding flow.
 * All overrides use !important sparingly — only where Tailwind utilities must be beaten.
 *
 * Landing page design language:
 *   Background: #000000 | Accent: #f2ff00 | Cards: gradient #000→#0f0f0f, 1px #3d3d3d border
 *   Fonts: Inter Display (headings), DM Sans (body) | Radius: 23px cards, 12px buttons
 *   Glassmorphism: backdrop-filter blur(6px) | Animations: stagger blur reveals
 */

/* ═══════════════════════════════════════════════
   1. FONT ALIGNMENT
   Match the Framer landing page font stack
   ═══════════════════════════════════════════════ */

html {
  font-family: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body, input, textarea, select, button {
  font-family: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  letter-spacing: -0.03em;
}


/* ═══════════════════════════════════════════════
   2. COLOR HARMONIZATION — Dark Theme Tokens
   Override Radix/Shadcn CSS variables to match Framer
   ═══════════════════════════════════════════════ */

.dark, .dark-theme, :root {
  /* Backgrounds — shift from #111 gray to pure black */
  --gray-1: #080808;
  --gray-2: #0f0f10;
  --gray-3: #1a1a1c;
  --gray-4: #222225;
  --gray-5: #2a2a2e;
  --gray-6: #323236;
  --gray-7: #3d3d42;
  --gray-8: #4a4a50;

  /* Text — brighter to match Framer contrast */
  --gray-11: #b4b4b4;
  --gray-12: #eeeeee;

  /* Primary accent — match Framer neon yellow */
  --button-primary-bg: #f2ff00;

  /* Shadcn/Radix HSL tokens */
  --background: 0 0% 2%;
  --foreground: 0 0% 95%;
  --card: 0 0% 3.5%;
  --card-foreground: 0 0% 95%;
  --popover: 0 0% 4%;
  --popover-foreground: 0 0% 95%;
  --primary: 66 100% 50%;
  --primary-foreground: 0 0% 0%;
  --muted: 0 0% 10%;
  --muted-foreground: 0 0% 55%;
  --border: 0 0% 16%;
  --input: 0 0% 16%;
  --ring: 66 100% 50%;

  /* Increase global radius to match landing page feel */
  --radius: 0.75rem;

  /* Base backgrounds */
  --background-base: #050505;
  --background-popover: #0c0c0d;
}


/* ═══════════════════════════════════════════════
   3. PAGE BACKGROUND
   Pure black with subtle radial glow (matching hero)
   ═══════════════════════════════════════════════ */

html, body {
  background-color: #000000 !important;
}

.bg-background-base,
#root {
  background-color: #000000 !important;
}

/* Subtle radial glow behind content — matches Framer hero section */
#root::before {
  content: '';
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(
    ellipse at center,
    rgba(242, 255, 0, 0.04) 0%,
    rgba(242, 255, 0, 0.01) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}


/* ═══════════════════════════════════════════════
   4. MODAL & CARD STYLING
   Glassmorphism + gradient backgrounds
   ═══════════════════════════════════════════════ */

/* ReactModal overlay — override hardcoded rgba(255,255,255,0.75) */
.ReactModal__Overlay {
  background-color: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

/* Modal content containers */
.ReactModal__Content {
  background: linear-gradient(180deg, #0c0c0d 0%, #080808 100%) !important;
  border: 1px solid #2a2a2e !important;
  border-radius: 20px !important;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.5),
    0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 0 1px rgba(255, 255, 255, 0.08) !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Inner modal panels — override bg-[#0B0B0B] */
[class*="bg-[#0B0B0B]"],
[class*="bg-\\[\\#0B0B0B\\]"] {
  background: linear-gradient(180deg, #0c0c0d 0%, #080808 100%) !important;
}

/* Tailwind card-like containers */
[class*="rounded-4xl"],
[class*="rounded-t-4xl"] {
  background: linear-gradient(180deg, #0c0c0d 0%, #050505 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.4),
    inset 0 0 2px rgba(255, 255, 255, 0.06) !important;
}

/* Backdrop blur overlays */
.backdrop-blur-sm {
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  background-color: rgba(0, 0, 0, 0.65) !important;
}


/* ═══════════════════════════════════════════════
   5. BUTTON STYLING
   Match the Framer landing page CTA buttons
   ═══════════════════════════════════════════════ */

/* Primary action buttons */
button[class*="bg-button-primary"],
button[style*="button-primary"],
[class*="bg-button-primary"] {
  background-color: #f2ff00 !important;
  color: #000000 !important;
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  border: none !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  letter-spacing: -0.02em;
  position: relative;
  overflow: hidden;
}

button[class*="bg-button-primary"]:hover,
[class*="bg-button-primary"]:hover {
  background-color: #e5f200 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(242, 255, 0, 0.25);
}

button[class*="bg-button-primary"]:active,
[class*="bg-button-primary"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(242, 255, 0, 0.15);
}

/* Ghost / hollow buttons */
button[class*="border-gray-3"],
[class*="border"][class*="bg-transparent"] {
  border-color: #3d3d42 !important;
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
}

button[class*="border-gray-3"]:hover,
[class*="border"][class*="bg-transparent"]:hover {
  border-color: #555 !important;
  background-color: rgba(255, 255, 255, 0.04) !important;
}

/* General button transitions */
button {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ═══════════════════════════════════════════════
   6. INPUT & FORM STYLING
   Dark, sleek inputs matching the premium aesthetic
   ═══════════════════════════════════════════════ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="tel"],
textarea,
select {
  background-color: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid #2a2a2e !important;
  border-radius: 12px !important;
  color: #eeeeee !important;
  font-family: 'DM Sans', sans-serif !important;
  transition: all 0.2s ease !important;
  caret-color: #f2ff00;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #f2ff00 !important;
  box-shadow: 0 0 0 2px rgba(242, 255, 0, 0.1) !important;
  outline: none !important;
  background-color: rgba(255, 255, 255, 0.04) !important;
}

input::placeholder,
textarea::placeholder {
  color: #5f636c !important;
  font-family: 'DM Sans', sans-serif !important;
}

/* OTP / verification code inputs */
input[inputmode="numeric"],
input[maxlength="1"],
input[autocomplete="one-time-code"] {
  background-color: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid #2a2a2e !important;
  border-radius: 12px !important;
  font-family: 'Inter', monospace !important;
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  text-align: center;
  transition: all 0.2s ease !important;
}

input[inputmode="numeric"]:focus,
input[maxlength="1"]:focus {
  border-color: #f2ff00 !important;
  box-shadow: 0 0 0 3px rgba(242, 255, 0, 0.12) !important;
}

/* Labels */
label {
  color: #b4b4b4 !important;
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em;
}


/* ═══════════════════════════════════════════════
   7. TYPOGRAPHY OVERRIDES
   Heading hierarchy matching Framer
   ═══════════════════════════════════════════════ */

/* Modal titles / headings */
h1, [class*="text-2xl"], [class*="text-3xl"] {
  color: #eeeeee !important;
  font-weight: 600 !important;
  letter-spacing: -0.03em !important;
}

/* Subtitles / descriptions */
[class*="text-gray-11"],
[class*="text-muted"],
p[class*="text-sm"] {
  color: #92969f !important;
}

/* Links */
a:not([class*="bg-"]) {
  color: #f2ff00;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:not([class*="bg-"]):hover {
  color: #e5f200;
}


/* ═══════════════════════════════════════════════
   8. ENTRANCE ANIMATIONS
   Smooth fade-in matching Framer's reveal pattern
   ═══════════════════════════════════════════════ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Modal entrance animation */
.ReactModal__Content {
  animation: scaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Form containers inside modals */
[class*="rounded-4xl"],
[class*="rounded-t-4xl"] {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger children animation inside modals */
.ReactModal__Content > div > div > * {
  animation: fadeInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ReactModal__Content > div > div > *:nth-child(1) { animation-delay: 0.05s; }
.ReactModal__Content > div > div > *:nth-child(2) { animation-delay: 0.1s; }
.ReactModal__Content > div > div > *:nth-child(3) { animation-delay: 0.15s; }
.ReactModal__Content > div > div > *:nth-child(4) { animation-delay: 0.2s; }
.ReactModal__Content > div > div > *:nth-child(5) { animation-delay: 0.25s; }

/* Overlay fade-in */
.ReactModal__Overlay {
  animation: fadeIn 0.25s ease forwards !important;
}


/* ═══════════════════════════════════════════════
   9. DIVIDERS & BORDERS
   Subtle, consistent border treatment
   ═══════════════════════════════════════════════ */

hr, [class*="border-gray-3"], [class*="divide-gray-3"] > * + * {
  border-color: #1a1a1c !important;
}

[class*="border-gray-4"] {
  border-color: #222225 !important;
}


/* ═══════════════════════════════════════════════
   10. SCROLLBAR STYLING (WebKit)
   Dark, minimal scrollbar matching the aesthetic
   ═══════════════════════════════════════════════ */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #2a2a2e;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3d3d42;
}


/* ═══════════════════════════════════════════════
   11. SELECTION & FOCUS RING
   Neon yellow accent for selections
   ═══════════════════════════════════════════════ */

::selection {
  background-color: rgba(242, 255, 0, 0.2);
  color: #ffffff;
}

*:focus-visible {
  outline: 2px solid rgba(242, 255, 0, 0.4) !important;
  outline-offset: 2px !important;
}


/* ═══════════════════════════════════════════════
   12. PROGRESS INDICATORS & BADGES
   ═══════════════════════════════════════════════ */

/* Progress bars */
[role="progressbar"] > div,
[class*="bg-primary"] {
  background-color: #f2ff00 !important;
}

/* Step indicators / dots */
[class*="bg-gray-7"],
[class*="bg-gray-8"] {
  transition: background-color 0.2s ease;
}


/* ═══════════════════════════════════════════════
   13. TOAST / NOTIFICATION OVERRIDES
   ═══════════════════════════════════════════════ */

[class*="Toaster"],
[data-sonner-toast] {
  font-family: 'DM Sans', sans-serif !important;
}

[data-sonner-toast][data-type="success"] {
  border-color: rgba(242, 255, 0, 0.2) !important;
}


/* ═══════════════════════════════════════════════
   14. CHECKBOX & RADIO OVERRIDES
   ═══════════════════════════════════════════════ */

[role="checkbox"][data-state="checked"],
[role="radio"][data-state="checked"] {
  background-color: #f2ff00 !important;
  border-color: #f2ff00 !important;
  color: #000000 !important;
}


/* ═══════════════════════════════════════════════
   15. LOADING SPINNER
   Match theme color
   ═══════════════════════════════════════════════ */

.loading {
  border-color: rgba(242, 255, 0, 0.15) !important;
  border-top-color: #f2ff00 !important;
}


/* ═══════════════════════════════════════════════
   16. FRAMER IFRAME TRANSITION
   Smooth transition from landing page to onboarding
   ═══════════════════════════════════════════════ */

iframe {
  border: 0 !important;
  background-color: #000000;
}
