@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-obsidian: #faf8ff;
  --bg-secondary: #f3e8ff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-hover: #ffffff;
  --border-glass: rgba(147, 51, 234, 0.16);
  --border-glass-glow: rgba(147, 51, 234, 0.45);
  --color-primary: #7c3aed;
  --color-secondary: #9333ea;
  --color-accent: #a855f7;
  --color-cyan: #0284c7;
  --text-primary: #0f172a;
  --text-muted: #475569;
  --shadow-purple: 0 15px 35px rgba(124, 58, 237, 0.12);
  --glass-inner-highlight: inset 0 1px 1px 0 rgba(255, 255, 255, 0.8);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Display", "SF Pro Text", "Plus Jakarta Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Display", "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.03em;
  color: #0f172a;
}

html {
  scroll-behavior: initial;
  background: #faf8ff;
  color: #0f172a;
}

html.lenis, html.lenis body {
  height: auto;
}

body {
  background: linear-gradient(180deg, #f5f3ff 0%, #faf8ff 40%, #f1f5f9 100%);
  background-attachment: fixed;
  color: #0f172a;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: rgba(147, 51, 234, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(147, 51, 234, 0.6);
}

/* -------------------------------------------------------------
 * LIGHT LIQUID GLASS PRE-LOADER
 * ------------------------------------------------------------- */
#loader-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s ease;
}

#loader-screen[style*="opacity: 0"], #loader-screen[style*="visibility: hidden"] {
  pointer-events: none !important;
}

.loader-logo-frame {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 24px;
  background: rgba(147, 51, 234, 0.08);
  border: 1px solid rgba(147, 51, 234, 0.25);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.2);
}

.loader-liquid {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: linear-gradient(to top, #7c3aed, #a855f7);
  transition: height 1.8s cubic-bezier(0.65, 0, 0.35, 1);
  opacity: 0.9;
}

/* -------------------------------------------------------------
 * CRYSTAL LIQUID GLASS PANELS (HIGH TRANSPARENCY, LOW BLUR)
 * ------------------------------------------------------------- */
.liquid-glass {
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  outline: 1px solid rgba(168, 85, 247, 0.18);
  box-shadow: 
    inset 0 1.5px 2px 0 rgba(255, 255, 255, 0.95),
    0 12px 30px -10px rgba(124, 58, 237, 0.12),
    0 4px 12px 0 rgba(0, 0, 0, 0.02);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  will-change: transform;
}

.liquid-glass:hover {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 
    inset 0 1.5px 2px 0 rgba(255, 255, 255, 1),
    0 20px 45px -10px rgba(124, 58, 237, 0.2),
    0 8px 20px 0 rgba(0, 0, 0, 0.03);
}

.liquid-nav {
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 
    inset 0 1.5px 2px 0 rgba(255, 255, 255, 0.95),
    0 10px 25px -8px rgba(124, 58, 237, 0.15);
}

/* -------------------------------------------------------------
 * GRADIENT TEXT & LIGHT AURORA GLOWS
 * ------------------------------------------------------------- */
.text-gradient-purple {
  background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 50%, #9333ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.aurora-bg-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 15% 15%, rgba(192, 132, 252, 0.45) 0%, transparent 45%),
    radial-gradient(circle at 85% 45%, rgba(147, 51, 234, 0.35) 0%, transparent 50%),
    radial-gradient(circle at 50% 85%, rgba(56, 189, 248, 0.35) 0%, transparent 55%),
    radial-gradient(circle at 75% 15%, rgba(244, 63, 94, 0.25) 0%, transparent 40%);
  filter: blur(50px);
  animation: auroraPulse 12s infinite alternate ease-in-out;
}

@keyframes auroraPulse {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(3deg); }
  100% { transform: scale(1.05) rotate(-3deg); }
}

/* -------------------------------------------------------------
 * MAGNETIC BUTTONS (LIGHT THEME)
 * ------------------------------------------------------------- */
.btn-magnetic {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
  color: #ffffff !important;
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.35);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  cursor: pointer;
}

.btn-magnetic:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 15px 35px rgba(124, 58, 237, 0.5);
}

.btn-glass-outline {
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(147, 51, 234, 0.3);
  color: #4c1d95 !important;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.08);
  transition: all 0.3s ease;
}

.btn-glass-outline:hover {
  background: #ffffff;
  border-color: #7c3aed;
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.18);
}

/* -------------------------------------------------------------
 * 3D SMARTPHONE SHOWCASE & PODIUM (LIGHT THEME)
 * ------------------------------------------------------------- */
.hero-showcase-container {
  perspective: 1200px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-mockup-frame {
  width: 280px;
  height: 540px;
  border-radius: 40px;
  background: #0f172a;
  border: 4px solid #7c3aed;
  box-shadow: 
    0 25px 50px rgba(124, 58, 237, 0.25),
    0 10px 30px rgba(15, 23, 42, 0.3);
  transform: rotateY(-12deg) rotateX(8deg);
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
  position: relative;
  z-index: 10;
  overflow: hidden;
  padding: 10px;
}

.phone-mockup-frame:hover {
  transform: rotateY(0deg) rotateX(0deg) scale(1.02);
}

.phone-screen-inner {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.podium-platform {
  position: absolute;
  bottom: -35px;
  width: 340px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.4) 0%, rgba(243, 232, 255, 0.6) 60%, transparent 80%);
  border: 2px solid rgba(147, 51, 234, 0.3);
  box-shadow: 0 0 50px rgba(168, 85, 247, 0.3);
  transform: rotateX(70deg);
  z-index: 2;
}

.badge-5mins-glass {
  position: absolute;
  right: -25px;
  top: 35%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(147, 51, 234, 0.3);
  box-shadow: 0 15px 35px rgba(124, 58, 237, 0.15);
  border-radius: 20px;
  padding: 14px 18px;
  z-index: 20;
  animation: floatBadge 4s ease-in-out infinite alternate;
}

@keyframes floatBadge {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-12px); }
}

.floating-gold-coin {
  position: absolute;
  left: -15px;
  top: 48%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #78350f;
  font-weight: 900;
  font-size: 18px;
  z-index: 25;
  animation: floatCoin 3.5s ease-in-out infinite alternate;
}

@keyframes floatCoin {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-15px) rotate(15deg); }
}

.vision-tile {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.vision-tile:hover .logo-popup-frame {
  transform: scale(1.12) translateY(-4px);
  box-shadow: 0 10px 25px rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.6);
}

.logo-popup-frame {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

/* Custom Range Slider (Light Theme) */
input[type="range"] {
  -webkit-appearance: none;
  background: rgba(147, 51, 234, 0.15);
  height: 6px;
  border-radius: 3px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #7c3aed;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* -------------------------------------------------------------
 * FULL DOCUMENT DARK THEME ENGINE (TOP TO BOTTOM OBSIDIAN DARK)
 * ------------------------------------------------------------- */
html.dark-theme,
body.dark-theme {
  background: #080b12 !important;
  background-image: radial-gradient(circle at 50% 0%, #150d2a 0%, #080b12 60%, #030509 100%) !important;
  background-attachment: fixed !important;
  color: #f8fafc !important;
}

body.dark-theme section {
  background-color: transparent !important;
  background-image: none !important;
}

body.dark-theme .aurora-bg-mesh {
  background: 
    radial-gradient(circle at 15% 15%, rgba(168, 85, 247, 0.35) 0%, transparent 45%),
    radial-gradient(circle at 85% 45%, rgba(56, 189, 248, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 50% 85%, rgba(244, 63, 94, 0.2) 0%, transparent 55%) !important;
}

body.dark-theme .liquid-glass {
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  outline: 1px solid rgba(168, 85, 247, 0.25) !important;
  box-shadow: 
    inset 0 1.5px 2px 0 rgba(255, 255, 255, 0.12),
    0 15px 35px -10px rgba(0, 0, 0, 0.7) !important;
}

body.dark-theme .liquid-glass:hover {
  background: rgba(30, 41, 59, 0.8) !important;
  border-color: rgba(168, 85, 247, 0.6) !important;
  box-shadow: 
    inset 0 1.5px 2px 0 rgba(255, 255, 255, 0.2),
    0 25px 50px -10px rgba(124, 58, 237, 0.3) !important;
}

body.dark-theme .liquid-nav {
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(20px) saturate(200%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.15),
    0 12px 30px -10px rgba(0, 0, 0, 0.8) !important;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme .font-heading,
body.dark-theme .text-slate-900 {
  color: #ffffff !important;
}

body.dark-theme p,
body.dark-theme label,
body.dark-theme .text-slate-600,
body.dark-theme .text-slate-700 {
  color: #cbd5e1 !important;
}

body.dark-theme header nav div a {
  color: #e2e8f0 !important;
}

body.dark-theme header nav div a:hover {
  color: #c084fc !important;
}

body.dark-theme select,
body.dark-theme input[type="text"] {
  background-color: rgba(15, 23, 42, 0.85) !important;
  color: #ffffff !important;
  border-color: rgba(168, 85, 247, 0.4) !important;
}

body.dark-theme .bg-white\/50,
body.dark-theme .bg-white\/40,
body.dark-theme .bg-white\/30,
body.dark-theme .bg-white\/60,
body.dark-theme .bg-white {
  background-color: rgba(15, 23, 42, 0.65) !important;
  border-color: rgba(168, 85, 247, 0.3) !important;
  color: #ffffff !important;
}

body.dark-theme button.bg-white\/30,
body.dark-theme a[href="#eligibility-checker"] {
  background: rgba(30, 41, 59, 0.85) !important;
  color: #ffffff !important;
  border-color: rgba(168, 85, 247, 0.4) !important;
}

body.dark-theme #theme-toggle-btn {
  background-color: rgba(15, 23, 42, 0.8) !important;
  border-color: rgba(168, 85, 247, 0.5) !important;
}

/* -------------------------------------------------------------
 * LIQUID GLASS FORM FIELDS & PORTAL ANIMATIONS
 * ------------------------------------------------------------- */
#credit-application-portal input,
#credit-application-portal select {
  color-scheme: dark;
}

#credit-application-portal input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) hue-rotate(240deg) brightness(1.2);
  cursor: pointer;
  padding: 2px;
  border-radius: 6px;
  transition: transform 0.2s ease;
}

#credit-application-portal input[type="date"]::-webkit-calendar-picker-indicator:hover {
  transform: scale(1.15);
}

#credit-application-portal input:focus,
#credit-application-portal select:focus {
  border-color: #a855f7 !important;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.1) !important;
}

select option,
#credit-application-portal select option {
  background-color: #0f172a !important;
  color: #ffffff !important;
  padding: 8px 12px;
}

#mobile-nav-drawer {
  z-index: 99 !important;
}

#credit-application-portal input:-webkit-autofill {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0px 1000px #1e293b inset !important;
}

/* =============================================================
 * BASE RESET & CUSTOM FONT IMPORTS
 * ============================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Mobile safe viewport height */
@supports (-webkit-touch-callout: none) {
  .min-h-screen {
    min-height: -webkit-fill-available;
  }
}

/* =============================================================
 * MOBILE RESPONSIVE — PHONE FIRST DESIGN
 * ============================================================= */

/* ---- Hamburger / Mobile Menu Toggle ---- */
#mobile-menu-toggle {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 10px;
  transition: background 0.2s;
}
#mobile-menu-toggle:active { background: rgba(147,51,234,0.08); }

#mobile-nav-drawer {
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-nav-drawer.open {
  display: block !important;
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

#mobile-nav-drawer a span {
  color: #0f172a !important;
}

body.dark-theme #mobile-nav-drawer a span {
  color: #ffffff !important;
}

@media (max-width: 767px) {
  /* --- Header Mobile Clean Layout --- */
  header {
    padding: 6px 8px !important;
  }
  header nav {
    padding-left: 10px !important;
    padding-right: 10px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }
  header nav img {
    height: 34px !important;
  }

  /* Hide Theme toggle button & Explore Providers button from top navbar on mobile */
  #theme-toggle-btn { display: none !important; }
  header nav .btn-magnetic { display: none !important; }

  /* Show 3-line hamburger menu button on mobile */
  #mobile-menu-toggle { 
    display: flex !important; 
    align-items: center; 
    justify-content: center; 
  }

  /* Login & Profile Widget styled cleanly for phone screen */
  #auth-header-container #nav-login-btn { 
    padding: 6px 12px !important; 
    font-size: 11px !important;
  }
  #auth-header-container #nav-login-btn span { 
    display: inline-block !important; 
  }
  #auth-header-container #user-profile-btn { 
    padding: 5px 10px !important; 
  }
  #auth-header-container #user-profile-btn span { 
    display: inline-block !important; 
    max-width: 70px !important; 
  }

  /* --- Hero Section --- */
  section.relative.min-h-screen {
    padding-top: 90px !important;
    padding-bottom: 40px !important;
  }
  .grid.grid-cols-1.lg\\:grid-cols-12 {
    gap: 32px !important;
  }
  /* Hide phone mockup on very small screens */
  .hero-showcase-container {
    display: none !important;
  }
  h1 {
    font-size: 2.2rem !important;
    line-height: 1.15 !important;
  }
  /* Stack hero buttons */
  .hero-reveal-item.flex.flex-col.sm\\:flex-row {
    flex-direction: column !important;
  }

  /* Trust stat grid → 2 cols */
  .hero-reveal-item.grid.grid-cols-2.md\\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* --- Comparison Table → hide on mobile, show card view --- */
  .overflow-x-auto table thead { display: none; }
  .overflow-x-auto table tr {
    display: block;
    margin-bottom: 16px;
    border-radius: 16px;
    border: 1px solid rgba(147,51,234,0.12);
    padding: 12px;
    background: rgba(255,255,255,0.5);
  }
  .overflow-x-auto table td {
    display: flex;
    justify-content: space-between;
    padding: 6px 8px !important;
    font-size: 12px;
    border: none;
  }

  /* --- Partner Grid --- */
  #partners-grid {
    grid-template-columns: 1fr !important;
  }

  /* --- Credit Application Portal --- */
  #credit-application-portal > div {
    padding: 16px !important;
  }
  #credit-application-portal .grid-cols-2 {
    grid-template-columns: 1fr !important;
  }

  /* --- Auth Modal --- */
  #auth-modal > div {
    padding: 20px 18px !important;
    border-radius: 24px !important;
    margin: 0 8px;
  }

  /* --- FAQ Accordion --- */
  #faq-section button {
    font-size: 13px !important;
    padding: 14px 16px !important;
  }

  /* --- Footer --- */
  footer .grid-cols-4 { grid-template-columns: repeat(2,1fr) !important; }
  footer .grid-cols-3 { grid-template-columns: 1fr !important; }

  /* Dropdown right-align fix for mobile */
  #user-dropdown-menu {
    right: -20px !important;
    width: 280px !important;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.8rem !important; }
  .btn-magnetic { padding: 10px 16px !important; font-size: 11px !important; }
  .badge-5mins-glass { display: none !important; }
  .floating-gold-coin { display: none !important; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.animate-shake {
  animation: shake 0.4s ease-in-out;
}

