/* ==================== LANDING PAGE STYLES ==================== */

:root {
  /* Fintech Blue Color System - Dark Theme */
  --primary: #132430;
  --primary-light: #1a3344;
  --primary-dark: #0d1a22;
  --primary-glow: rgba(19, 36, 48, 0.4);
  
  /* Accent Colors */
  --accent-cyan: #22d3ee;
  --accent-teal: #2dd4bf;
  --accent-blue: #3b82f6;
  
  /* Backgrounds */
  --bg-dark: #030712;
  --bg-card: rgba(17, 24, 39, 0.6);
  --bg-card-hover: rgba(17, 24, 39, 0.8);
  
  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(19, 36, 48, 0.4);
  
  /* Text */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: white;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== WEBGL BACKGROUND ==================== */

.webgl-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.webgl-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, 
    rgba(3, 7, 18, 0.88) 0%, 
    rgba(3, 7, 18, 0.78) 50%, 
    rgba(3, 7, 18, 0.92) 100%
  );
  pointer-events: none;
}

/* ==================== HEADER ==================== */

header {
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

/* ==================== HERO GLOW ==================== */

.hero-content {
  position: relative;
}

.hero-content::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

/* ==================== ANIMATED BACKGROUND ==================== */

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  transform: translateZ(0);
  will-change: transform;
}

.bg-mesh::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(19, 36, 48, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 80%, rgba(45, 212, 191, 0.05) 0%, transparent 50%);
  will-change: transform;
  animation: meshFloat 25s ease-in-out infinite;
}

@keyframes meshFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, 2%) rotate(1deg); }
  66% { transform: translate(-1%, 1%) rotate(-1deg); }
}

/* Floating Orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.2;
  transform: translateZ(0);
  will-change: transform, opacity;
  animation: orbFloat 20s ease-in-out infinite;
  pointer-events: none;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25), transparent 70%);
  top: 10%;
  left: 10%;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(19, 36, 48, 0.4), transparent 70%);
  top: 60%;
  right: 5%;
}

.orb-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.15), transparent 70%);
  bottom: 20%;
  left: 30%;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 10px) scale(1.02); }
}

/* Grid Pattern */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.5;
  pointer-events: none;
}

/* ==================== TYPOGRAPHY ==================== */

/* Headlines - Sora for premium feel */
h1, h2, h3, .hero-headline {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
}

.hero-headline {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-subheadline {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.body-text {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
}

.small-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Stats - Large impactful numbers */
.stats-number {
  font-family: 'Sora', sans-serif;
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #1e3a5f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stats-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 8px;
}

/* Text gradient for emphasis */
.text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #1e3a5f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==================== BUTTONS ==================== */

/* Primary Button - Fintech Blue */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #1e3a5f 0%, #132430 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 14px 28px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(19, 36, 48, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #264a6e 0%, #1a3344 100%);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 8px 25px rgba(19, 36, 48, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary Button - Subtle outline */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  padding: 14px 28px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  border-color: var(--accent-blue);
  color: #ffffff;
  background: rgba(59, 130, 246, 0.08);
}

/* Legacy button compatibility */
.glow-btn {
  composes: btn-primary;
}

.outline-btn {
  composes: btn-secondary;
}

/* ==================== FEATURE CARDS ==================== */

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%);
  pointer-events: none;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(59, 130, 246, 0.15);
}

/* Feature Card Premium Styling */
.feature-card {
  padding: 28px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.feature-card .card-description {
  flex: 1;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-top: 8px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.feature-icon.blue {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
  color: #ffffff;
}

.feature-icon.cyan {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12) 0%, rgba(34, 211, 238, 0.05) 100%);
  color: var(--accent-cyan);
}

.feature-icon.teal {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.12) 0%, rgba(45, 212, 191, 0.05) 100%);
  color: var(--accent-teal);
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 16px;
  width: fit-content;
}

/* ==================== SEARCH DEMO ==================== */

.search-demo {
  position: relative;
}

.search-demo input {
  width: 100%;
  padding: 20px 140px 20px 24px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: white;
  outline: none;
  transition: all 0.3s ease;
}

.search-demo input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-demo input::placeholder {
  color: var(--text-muted);
}

.search-demo .search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 14px 28px;
  background: linear-gradient(135deg, #1e3a5f 0%, #132430 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-demo .search-btn:hover {
  background: linear-gradient(135deg, #264a6e 0%, #1a3344 100%);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 4px 15px rgba(19, 36, 48, 0.4);
  transform: translateY(-50%) scale(1.02);
}

/* Autocomplete */
.search-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  z-index: 100;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}

.search-autocomplete.active {
  display: block;
  animation: fadeUp 0.2s ease;
}

.autocomplete-item {
  padding: 16px 20px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid var(--border-subtle);
}

.autocomplete-item:hover {
  background: rgba(59, 130, 246, 0.1);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item .symbol {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  color: #ffffff;
  font-size: 15px;
}

.autocomplete-item .name {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

/* ==================== DEMO RESULT ==================== */

.demo-result {
  margin-top: 20px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  display: none;
  animation: fadeUp 0.4s ease;
}

.demo-result.active {
  display: block;
}

.demo-result .stock-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.demo-result .stock-symbol {
  font-family: 'Sora', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.demo-result .stock-name {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.demo-result .stock-price {
  font-family: 'Sora', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #4ade80;
}

.demo-result .stock-price.negative {
  color: #f87171;
}

.demo-result .stock-change {
  font-size: 14px;
  font-weight: 600;
  color: #4ade80;
  text-align: right;
}

.demo-result .stock-change.negative {
  color: #f87171;
}

.demo-result .ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  margin-top: 16px;
}

.demo-result .stock-analysis {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: 12px;
}

.demo-result .data-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

/* Login CTA in demo */
.demo-login-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.demo-login-section p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: center;
}

.demo-login-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: white;
  border: none;
  border-radius: 12px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #111827;
  cursor: pointer;
  transition: all 0.3s ease;
}

.demo-login-btn:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

/* ==================== TRUST BADGE ==================== */

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.15);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-teal);
}

.trust-badge svg {
  width: 16px;
  height: 16px;
}

/* ==================== STATS ==================== */

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==================== HERO SEARCH ==================== */

.hero-search-container {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.hero-search-wrapper {
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(59, 130, 246, 0.08);
}

/* ==================== LIVE INDICATOR ==================== */

.live-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.15); }
}

/* ==================== STATUS BADGE ==================== */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: #4ade80;
}

.status-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* ==================== SPINNER ==================== */

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== SCROLLBAR ==================== */

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

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==================== ENTRANCE ANIMATIONS ==================== */

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-up-delay-1 { animation-delay: 0.1s; }
.fade-up-delay-2 { animation-delay: 0.2s; }
.fade-up-delay-3 { animation-delay: 0.3s; }
.fade-up-delay-4 { animation-delay: 0.4s; }
.fade-up-delay-5 { animation-delay: 0.5s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1024px) {
  .orb-1 { width: 280px; height: 280px; }
  .orb-2 { width: 200px; height: 200px; }
  .orb-3 { width: 160px; height: 160px; }
  
  .hero-headline {
    font-size: 48px;
  }
  
  .hero-subheadline {
    font-size: 17px;
  }
  
  .stats-number {
    font-size: 42px;
  }
  
  .search-demo input {
    padding: 18px 120px 18px 20px;
    font-size: 15px;
  }
  
  .search-demo .search-btn {
    padding: 12px 20px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .orb { display: none; }
  
  .hero-headline {
    font-size: 36px;
    letter-spacing: -0.02em;
  }
  
  .hero-subheadline {
    font-size: 15px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .card-title {
    font-size: 18px;
  }
  
  .stats-number {
    font-size: 36px;
  }
  
  .stats-label {
    font-size: 11px;
  }
  
  .feature-card {
    padding: 20px;
    min-height: auto;
  }
  
  .search-demo input {
    padding: 16px 100px 16px 16px;
    font-size: 15px;
    border-radius: 12px;
  }
  
  .search-demo .search-btn {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 8px;
  }
  
  .glass-card {
    border-radius: 14px;
  }
}

/* ==================== REDUCE MOTION ==================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .bg-mesh, .bg-mesh::before, .orb {
    animation: none !important;
  }
  
  html {
    scroll-behavior: auto !important;
  }
}
