/* ============================================
   Modern UI Styles - Optimized for Western Audiences
   Low-context design principles applied
   ============================================ */

/* CSS Variables for Modern Color Palette */
:root {
  /* Primary Colors */
  --primary: #f59e0b;
  --primary-dark: #d97706;
  --primary-light: #fbbf24;
  
  /* Accent Colors */
  --accent: #dc2626;
  --accent-dark: #b91c1c;
  --accent-light: #ef4444;
  
  /* Neutral Colors */
  --neutral-50: #fafafa;
  --neutral-100: #f4f4f5;
  --neutral-200: #e4e4e7;
  --neutral-300: #d4d4d8;
  --neutral-400: #a1a1aa;
  --neutral-500: #71717a;
  --neutral-600: #52525b;
  --neutral-700: #3f3f46;
  --neutral-800: #27272a;
  --neutral-900: #18181b;
  
  /* Glass Effect Colors */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Animations */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
}

/* ============================================
   Global Styles & Resets
   ============================================ */

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  color: var(--neutral-900);
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar - Minimal & Clean */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
  background: var(--neutral-400);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neutral-500);
}

/* Text Selection Style */
::selection {
  background: var(--primary-light);
  color: white;
}

::-moz-selection {
  background: var(--primary-light);
  color: white;
}

/* ============================================
   Animation Classes
   ============================================ */

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease forwards;
}

.animate-slideInLeft {
  animation: slideInLeft 0.6s ease forwards;
}

.animate-slideInRight {
  animation: slideInRight 0.6s ease forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   Glass Morphism Effects
   ============================================ */

.glass {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-subtle {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ============================================
   Modern Button Styles
   ============================================ */

.btn-modern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-modern:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-modern:hover:before {
  left: 100%;
}

.btn-primary-modern {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px 0 rgba(59, 130, 246, 0.3);
}

.btn-primary-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.4);
}

.btn-secondary-modern {
  background: white;
  color: var(--neutral-700);
  border: 2px solid var(--neutral-200);
}

.btn-secondary-modern:hover {
  background: var(--neutral-50);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ============================================
   Card Components
   ============================================ */

.card-modern {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card-modern:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2xl);
}

.card-gradient-border {
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, var(--primary), var(--accent)) border-box;
  border: 2px solid transparent;
  border-radius: var(--radius-xl);
}

/* ============================================
   Hero Section Modern
   ============================================ */

.hero-modern {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f59e0b 0%, #dc2626 100%);
}

.hero-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ============================================
   Navigation Modern
   ============================================ */

.nav-modern {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition-base);
}

.nav-modern.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
}

.nav-link-modern {
  color: var(--neutral-700);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link-modern:hover {
  color: var(--primary);
  background: var(--neutral-50);
}

.nav-link-modern::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

.nav-link-modern:hover::after {
  width: 80%;
}

/* ============================================
   Feature Cards
   ============================================ */

.feature-card-modern {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
}

.feature-card-modern:hover::before {
  transform: translateX(0);
}

.feature-card-modern:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
}

.feature-icon-modern {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: var(--radius-lg);
  color: white;
  font-size: 1.5rem;
}

/* ============================================
   Grid Layouts
   ============================================ */

.grid-modern {
  display: grid;
  gap: 2rem;
}

.grid-modern-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-modern-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-modern-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ============================================
   Section Styles
   ============================================ */

.section-modern {
  padding: 6rem 0;
  position: relative;
}

.section-title-modern {
  font-size: 3rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle-modern {
  font-size: 1.25rem;
  text-align: center;
  color: var(--neutral-600);
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* ============================================
   Badge & Pills
   ============================================ */

.badge-modern {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.pill-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--neutral-100);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.pill-modern:hover {
  background: var(--primary-light);
  color: white;
}

/* ============================================
   Loading States
   ============================================ */

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--neutral-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ============================================
   Hover Effects
   ============================================ */

.hover-scale {
  transition: transform var(--transition-base);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-lift {
  transition: all var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.hover-glow {
  transition: all var(--transition-base);
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

/* ============================================
   Responsive Utilities
   ============================================ */

.container-modern {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 768px) {
  .section-title-modern {
    font-size: 2rem;
  }
  
  .section-subtitle-modern {
    font-size: 1rem;
  }
  
  .grid-modern-2,
  .grid-modern-3,
  .grid-modern-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Accessibility
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Styles */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============================================
   Western Audience Optimizations
   Low-context, clean, minimal design
   ============================================ */

.cta-clear {
  background: var(--primary);
  color: white;
  padding: 1.25rem 3rem;
  font-size: 1.125rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cta-clear:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.text-clear {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--neutral-700);
}

.heading-clear {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--neutral-900);
}

.layout-simple {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

/* Single-focus design pattern */
.focus-block {
  padding: 4rem 2rem;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  margin: 2rem 0;
}

.focus-block:focus-within {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}