/* =========================================
   QuantBridge AI - Premium Website Styles
   ========================================= */

/* =========================================
   CSS Variables (Design Tokens)
   ========================================= */
:root {
  /* Colors */
  --bg-primary: #FAFAFA;
  --bg-white: #FFFFFF;
  --bg-light: #F3F4F6;
  --bg-dark: #0F1629;
  
  --text-heading: #0F1629;
  --text-body: #374151;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --text-white: #FFFFFF;
  
  --accent-blue: #2563EB;
  --accent-blue-dark: #1D4ED8;
  --accent-blue-light: #3B82F6;
  --accent-gold: #D4AF37;
  --accent-gold-light: #E5C158;
  
  --border-light: #E5E7EB;
  --border-medium: #D1D5DB;
  
  --success: #10B981;
  --error: #EF4444;
  
  /* Typography */
  --font-heading: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --section-padding: 100px 0;
  --section-padding-mobile: 60px 0;
  --container-max: 1280px;
  --container-padding: 24px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-premium: 0 10px 40px rgba(0, 0, 0, 0.12);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  --gradient-gold: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
  --gradient-dark: linear-gradient(135deg, #0F1629 0%, #1a2744 100%);
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

/* =========================================
   Reset & Base Styles
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-blue-dark);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* =========================================
   Typography
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  line-height: 1.2;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.03em;
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.text-muted {
  color: var(--text-muted);
}

.text-gold {
  color: var(--accent-gold);
}

.text-blue {
  color: var(--accent-blue);
}

/* =========================================
   Layout Components
   ========================================= */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--section-padding);
}

.section-sm {
  padding: 60px 0;
}

@media (max-width: 768px) {
  .section {
    padding: 50px 0;
  }
  
  .section-sm {
    padding: 30px 0;
  }
  
  .container {
    padding: 0 20px;
  }
}

/* Section Headers */
.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-muted);
}

.section-label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

/* =========================================
   Navigation
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  border-bottom-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
}

.navbar-logo:hover {
  color: var(--text-heading);
}

.navbar-logo span {
  color: var(--accent-blue);
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-link {
  position: relative;
  padding: 8px 16px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-body);
  transition: color var(--transition-fast);
}

.navbar-link:hover {
  color: var(--text-heading);
}

.navbar-link.active {
  color: var(--accent-blue);
}

/* Dropdown */
.navbar-dropdown {
  position: relative;
}

.navbar-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar-dropdown-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.navbar-dropdown:hover .navbar-dropdown-toggle svg {
  transform: rotate(180deg);
}

.navbar-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-fast);
}

.navbar-dropdown:hover .navbar-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar-dropdown-link {
  display: block;
  padding: 12px 16px;
  font-size: 0.9375rem;
  color: var(--text-body);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.navbar-dropdown-link:hover {
  background: var(--bg-light);
  color: var(--text-heading);
}

.navbar-dropdown-link small {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Navbar CTA */
.navbar-cta {
  margin-left: 16px;
}

/* Mobile Menu Toggle */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-heading);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Styles */
@media (max-width: 1024px) {
  .navbar-toggle {
    display: flex;
    z-index: 10001;
  }
  
  .navbar-menu {
    display: flex !important;
    position: fixed !important;
    top: 80px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 24px !important;
    background: #FFFFFF !important;
    transform: translateX(100%) !important;
    transition: transform 300ms ease !important;
    overflow-y: auto !important;
    z-index: 10000 !important;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1) !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: calc(100vh - 80px) !important;
  }
  
  .navbar-menu.active {
    transform: translateX(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
  }
  
  .navbar-link {
    padding: 16px 0 !important;
    font-size: 1.125rem !important;
    border-bottom: 1px solid var(--border-light) !important;
    display: block !important;
    color: var(--text-body) !important;
    width: 100% !important;
  }
  
  .navbar-dropdown {
    border-bottom: 1px solid var(--border-light) !important;
    width: 100% !important;
  }
  
  .navbar-dropdown .navbar-dropdown-toggle {
    border-bottom: none !important;
    display: block !important;
  }
  
  .navbar-dropdown-menu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 0 0 16px !important;
    display: none !important;
    background: var(--bg-light) !important;
    margin-top: 8px !important;
    border-radius: 8px !important;
    width: 100% !important;
  }
  
  .navbar-dropdown.active .navbar-dropdown-menu {
    display: flex !important;
    flex-direction: column !important;
  }
  
  .navbar-dropdown-link {
    padding: 12px 16px !important;
    display: block !important;
    width: 100% !important;
  }
  
  .navbar-cta {
    margin: 24px 0 0 0 !important;
    display: block !important;
    width: 100% !important;
  }
  
  .navbar-cta .btn {
    width: 100% !important;
    justify-content: center !important;
    display: flex !important;
  }
}

/* =========================================
   Buttons
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* Primary Button */
.btn-primary {
  background: var(--accent-blue);
  color: var(--text-white);
  border: 2px solid var(--accent-blue);
}

.btn-primary:hover {
  background: var(--accent-blue-dark);
  border-color: var(--accent-blue-dark);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Secondary Button */
.btn-secondary {
  background: transparent;
  color: var(--text-heading);
  border: 2px solid var(--border-medium);
}

.btn-secondary:hover {
  border-color: var(--text-heading);
  transform: translateY(-2px);
}

/* Gold Button */
.btn-gold {
  background: var(--accent-gold);
  color: var(--text-heading);
  border: 2px solid var(--accent-gold);
}

.btn-gold:hover {
  background: var(--accent-gold-light);
  border-color: var(--accent-gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* White Button */
.btn-white {
  background: var(--bg-white);
  color: var(--text-heading);
  border: 2px solid var(--bg-white);
}

.btn-white:hover {
  background: var(--bg-light);
  border-color: var(--bg-light);
  transform: translateY(-2px);
}

/* Button Sizes */
.btn-sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 18px 36px;
  font-size: 1rem;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  background: var(--bg-white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-white);
  z-index: 0;
}

.hero-pattern {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
}

.hero-container {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.hero-content {
  max-width: 720px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-blue);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 60px;
}

/* Page Hero (smaller) */
.hero-page {
  min-height: auto;
  padding: 160px 0 80px;
}

.hero-page .hero-content {
  max-width: 800px;
  text-align: center;
  margin: 0 auto;
}

.hero-page .hero-subtitle {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-page .hero-ctas {
  justify-content: center;
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 120px 0 60px;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-ctas {
    flex-direction: column;
  }
  
  .hero-ctas .btn {
    width: 100%;
  }
  
  .hero-page {
    padding: 100px 0 40px;
  }
  
  .section-sm {
    padding: 30px 0;
  }
}

/* =========================================
   Stats Section
   ========================================= */
.stats {
  padding: 80px 0;
  background: var(--bg-dark);
  color: var(--text-white);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  align-items: stretch;
}

.stat-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.stat-source {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: auto;
  padding-top: 12px;
}

.stat-source a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: underline;
}

.stat-source a:hover {
  color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 24px;
  }
  
  .stats {
    padding: 60px 0;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .stats {
    padding: 40px 0;
  }
  
  .stats .features-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .stats .section-header h2 {
    font-size: 1.75rem !important;
  }
  
  .stats .section-header p {
    font-size: 1rem !important;
  }
  
  /* Enhanced mobile card padding and text sizing */
  .services-grid-item {
    padding: 24px !important;
  }
  
  .services-grid-item h4 {
    font-size: 1.125rem !important;
    line-height: 1.4 !important;
  }
  
  .services-grid-item p {
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
  }
  
  .feature-card {
    padding: 24px !important;
  }
  
  .feature-card h4 {
    font-size: 1.125rem !important;
  }
  
  /* Force grids to single column on mobile */
  .features-grid,
  .services-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Fix inline grid styles in Who We Serve stats section */
  .stats div[style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Fix financial services 3-column grid on mobile */
  section div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Reduce padding on stat cards for mobile */
  section div[style*="padding: 36px 28px"],
  section div[style*="padding: 32px 24px"] {
    padding: 24px 20px !important;
  }
  
  /* Make stat numbers smaller on mobile */
  section div[style*="font-size: 3.25rem"],
  section div[style*="font-size: 2.75rem"] {
    font-size: 2.5rem !important;
  }
  
  /* Improve text readability on mobile */
  section div[style*="font-size: 1.0625rem"] {
    font-size: 1rem !important;
  }
}

@media (max-width: 480px) {
  /* Extra small mobile adjustments */
  .services-grid-item h4 {
    font-size: 1rem !important;
  }
  
  .services-grid-item p {
    font-size: 0.875rem !important;
  }
  
  /* Further reduce stat numbers on very small screens */
  section div[style*="font-size: 3.25rem"],
  section div[style*="font-size: 2.75rem"] {
    font-size: 2rem !important;
  }
}

/* =========================================
   Process Section (7 Steps)
   ========================================= */
.process {
  background: var(--bg-white);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
  margin-bottom: 40px;
  position: relative;
}

.process-step {
  position: relative;
  text-align: center;
  padding: 28px 20px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid var(--border-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.process-step::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -16px;
  width: 16px;
  height: 3px;
  background: var(--accent-blue);
  transform: translateY(-50%);
  opacity: 1;
  z-index: 1;
  transition: all 0.3s ease;
}

.process-step::after {
  content: '→';
  position: absolute;
  top: 50%;
  right: -28px;
  transform: translateY(-50%);
  color: var(--accent-blue);
  font-size: 1.5rem;
  font-weight: bold;
  opacity: 1;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.3));
  transition: all 0.3s ease;
}

.process-step:last-child::before,
.process-step:last-child::after {
  display: none;
}

.process-step:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.2);
  border-color: var(--accent-blue);
  background: linear-gradient(135deg, var(--bg-white) 0%, rgba(37, 99, 235, 0.03) 100%);
}

.process-step:hover::after {
  transform: translateY(-50%) translateX(4px);
  color: var(--accent-blue-dark);
}

.process-step.active {
  border-color: var(--accent-blue);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

.process-step.active::before,
.process-step.active::after {
  opacity: 1;
  filter: drop-shadow(0 3px 6px rgba(37, 99, 235, 0.4));
}

.process-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent-blue);
  color: var(--text-white);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 16px;
}

.process-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--accent-blue);
  background: rgba(37, 99, 235, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.process-step:hover .process-step-icon {
  background: rgba(37, 99, 235, 0.15);
  transform: scale(1.1);
}

.process-step-icon svg {
  width: 32px;
  height: 32px;
}

.process-step h4 {
  font-size: 0.9375rem;
  margin-bottom: 8px;
}

.process-step p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.process-note {
  text-align: center;
  padding: 24px;
  background: rgba(37, 99, 235, 0.05);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent-blue);
}

.process-note p {
  font-size: 1rem;
  color: var(--text-heading);
  font-weight: 500;
}

@media (max-width: 1200px) {
  .process-steps {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .process-step:nth-child(4n)::before,
  .process-step:nth-child(4n)::after {
    display: none;
  }
  
  .process-step:nth-child(4n+1)::before,
  .process-step:nth-child(4n+1)::after {
    display: block;
  }
}

@media (max-width: 768px) {
  .process-steps {
    grid-template-columns: repeat(2, 1fr) !important;
    max-width: 100% !important;
  }
  
  .process-step:nth-child(even)::before,
  .process-step:nth-child(even)::after {
    display: none;
  }
  
  .process-step:nth-child(odd):not(:last-child)::before,
  .process-step:nth-child(odd):not(:last-child)::after {
    display: block;
  }
}

@media (max-width: 480px) {
  .process-steps {
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
  }
  
  .process-step::before,
  .process-step::after {
    display: none !important;
  }
  
  .process-step:not(:last-child)::after {
    display: block !important;
    top: auto;
    bottom: -28px;
    right: 50%;
    transform: translateX(50%) rotate(90deg);
  }
}

/* =========================================
   Services Cards
   ========================================= */
.services-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.service-card {
  position: relative;
  padding: 48px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-blue);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.service-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  transform: translateY(-8px);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-blue);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.service-card-icon svg {
  width: 32px;
  height: 32px;
}

.service-card h3 {
  margin-bottom: 16px;
}

.service-card p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.service-card .btn {
  margin-top: auto;
}

@media (max-width: 768px) {
  .services-overview {
    grid-template-columns: 1fr;
  }
  
  .service-card {
    padding: 32px;
  }
}

/* =========================================
   Features Grid
   ========================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.feature-card {
  padding: 32px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(-8px);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--accent-gold);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-card h4 {
  font-size: 1.125rem;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  
  .feature-card {
    padding: 24px;
  }
}

/* =========================================
   Services Grid (Detail Page)
   ========================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.services-grid-item {
  padding: 32px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.services-grid-item:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-md);
}

.services-grid-item h4 {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.services-grid-item h4 svg {
  width: 24px;
  height: 24px;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.services-grid-item p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 16px;
}

.services-grid-item ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.services-grid-item ul li {
  padding: 4px 12px;
  background: var(--bg-light);
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-radius: var(--radius-full);
}

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Pricing Flow Grid (3 columns on desktop) */
.pricing-flow-grid {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
  .pricing-flow-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   Tools Section
   ========================================= */
.tools {
  background: var(--bg-light);
}

.tools-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.tool-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-heading);
  transition: all var(--transition-fast);
}

.tool-item:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-sm);
}

/* =========================================
   AI Tech Section
   ========================================= */
.tech-section {
  background: var(--bg-dark);
  color: var(--text-white);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.tech-category h4 {
  color: var(--accent-gold);
  font-size: 0.875rem;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tech-item {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  color: var(--text-white);
  transition: all var(--transition-fast);
}

.tech-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent-gold);
}

@media (max-width: 768px) {
  .tech-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* =========================================
   FAQ Section
   ========================================= */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  background: var(--bg-white);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-heading);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.faq-question:hover {
  color: var(--accent-blue);
}

.faq-question svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.faq-answer-content {
  padding: 0 24px 24px;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* =========================================
   Contact Form
   ========================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.contact-info h3 {
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.calendly-placeholder {
  background: var(--bg-light);
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.calendly-placeholder p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.contact-form-wrapper {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 48px;
}

.contact-form-wrapper h3 {
  margin-bottom: 8px;
}

.contact-form-wrapper > p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.form-group label span {
  color: var(--error);
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--text-heading);
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
  color: var(--text-light);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 44px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--error);
  margin-top: 6px;
  display: none;
}

.form-group.error .form-control {
  border-color: var(--error);
}

.form-group.error .form-error {
  display: block;
}

.form-submit {
  margin-top: 8px;
}

.form-submit .btn {
  width: 100%;
}

@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .contact-form-wrapper {
    padding: 32px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   CTA Section
   ========================================= */
.cta-section {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1a2744 100%);
  color: var(--text-white);
  text-align: center;
}

.cta-section h2 {
  color: var(--text-white);
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

@media (max-width: 480px) {
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* =========================================
   Blog Grid
   ========================================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.blog-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.blog-card-image {
  height: 200px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.blog-card-content {
  padding: 24px;
}

.blog-card-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.blog-card h4 {
  font-size: 1.125rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.blog-card h4 a {
  color: var(--text-heading);
}

.blog-card h4 a:hover {
  color: var(--accent-blue);
}

.blog-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
  background: var(--bg-white);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
}

.blog-empty h3 {
  margin-bottom: 12px;
}

.blog-empty p {
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* =========================================
   Footer
   ========================================= */
.footer {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: 80px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 16px;
}

.footer-logo span {
  color: var(--accent-gold);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.footer-column h4 {
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-white);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================
   Legal Pages
   ========================================= */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin: 48px 0 16px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 1.25rem;
  margin: 32px 0 12px;
}

.legal-content p {
  color: var(--text-body);
  margin-bottom: 16px;
  line-height: 1.8;
}

.legal-content ul {
  margin: 16px 0;
  padding-left: 24px;
}

.legal-content ul li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  color: var(--text-body);
  line-height: 1.7;
}

.legal-content ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-blue);
}

.legal-content a {
  color: var(--accent-blue);
  text-decoration: underline;
}

.legal-updated {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* =========================================
   Animations
   ========================================= */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 300ms; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 400ms; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 500ms; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 600ms; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 700ms; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   Workflow Animation Styles
   ========================================= */
.workflow-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 48px 0;
  padding: 32px 24px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  min-width: 120px;
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.workflow-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
  border-color: var(--accent-blue);
}


.workflow-number {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-blue);
  color: var(--text-white);
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-heading);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}


.workflow-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-heading);
  text-align: center;
}

.workflow-arrow {
  color: var(--accent-blue);
  opacity: 0.4;
  flex-shrink: 0;
}


@media (max-width: 768px) {
  .workflow-container {
    flex-direction: column;
    gap: 12px;
  }
  
  .workflow-arrow {
    transform: rotate(90deg);
  }
}

/* =========================================
   Hero Animation Styles
   ========================================= */
.hero-animation {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.floating-graphic,
.ai-brain,
.ai-network,
.data-flow,
.financial-dashboard,
.document-flow {
  animation: float 6s ease-in-out infinite;
}

.floating-graphic {
  animation-delay: 0s;
}

.ai-brain {
  animation: float 7s ease-in-out infinite;
  animation-delay: 0.5s;
}

.ai-network {
  animation: float 8s ease-in-out infinite;
  animation-delay: 1s;
}

.data-flow {
  animation: floatUpDown 5s ease-in-out infinite;
}

.financial-dashboard {
  animation: float 6.5s ease-in-out infinite;
  animation-delay: 0.3s;
}

.document-flow {
  animation: floatUpDown 7s ease-in-out infinite;
  animation-delay: 0.7s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
  }
  25% {
    transform: translateY(-15px) translateX(10px);
  }
  50% {
    transform: translateY(-10px) translateX(-10px);
  }
  75% {
    transform: translateY(-20px) translateX(5px);
  }
}

@keyframes floatUpDown {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .floating-graphic,
  .ai-brain,
  .ai-network,
  .data-flow,
  .financial-dashboard,
  .document-flow,
  .workflow-icon,
  .process-step {
    animation: none !important;
  }
  
  .workflow-step {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* =========================================
   Utility Classes
   ========================================= */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.mb-64 { margin-bottom: 64px; }

.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 0; }

.hidden { display: none; }

@media (max-width: 768px) {
  .hidden-mobile { display: none; }
}

@media (min-width: 769px) {
  .hidden-desktop { display: none; }
}
