
:root {
  /* Color System */
  --bg-primary: #090a0f;
  --bg-secondary: #121420;
  --bg-tertiary: #1a1d30;
  --bg-card: rgba(26, 29, 48, 0.4);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #8fa1be; /* Increased contrast from #64748b to satisfy WCAG AA (>4.5:1) */
  
  --color-primary: #6366f1; /* Indigo */
  --color-secondary: #a855f7; /* Purple */
  --color-accent: #06b6d4; /* Cyan */
  --color-success: #10b981; /* Emerald */
  
  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #06b6d4 100%);
  --gradient-card-hover: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
  
  /* Shadow & Glow */
  --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 12px 20px -8px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.8);
  --glow-primary: 0 0 20px rgba(99, 102, 241, 0.25);
  --glow-accent: 0 0 20px rgba(6, 182, 212, 0.25);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) var(--bg-primary);
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Accessible focus styling */
:focus-visible {
  outline: 2px solid var(--color-accent) !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.25) !important;
}

/* Hide focus rings if mouse is used, only apply focus-visible */
:focus {
  outline: none;
}

/* Prevent focus outline on programmatically focused non-interactive elements (like headings) */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Typography Custom Rules */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding {
  padding-top: 100px;
  padding-bottom: 60px;
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* App Views Routing Container */
.view-container {
  display: none;
  animation: fadeIn var(--transition-slow);
}

.view-container.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .section-padding {
    padding-top: 100px;
    padding-bottom: 40px;
  }
}
