
/* Google Fonts import removed - now loaded asynchronously in HTML head */
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96%;
    --secondary-foreground: 222.2 84% 4.9%;
    --muted: 210 40% 96%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96%;
    --accent-foreground: 222.2 84% 4.9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221.2 83.2% 53.3%;
    --chart-1: 12 76% 61%;
    --chart-2: 173 58% 39%;
    --chart-3: 197 37% 24%;
    --chart-4: 43 74% 66%;
    --chart-5: 27 87% 67%;
    --radius: 0.5rem;
  }

  .dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    --primary: 217.2 91.2% 59.8%;
    --primary-foreground: 222.2 84% 4.9%;
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 224.3 76.3% 94.1%;
    --chart-1: 220 70% 50%;
    --chart-2: 160 60% 45%;
    --chart-3: 30 80% 55%;
    --chart-4: 280 65% 60%;
    --chart-5: 340 75% 55%;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  
  /* Base body styles - critical styles already inlined in HTML */
  body {
    @apply bg-background text-foreground font-sans;
  }
}

/* Non-critical CSS - loaded after first paint */
@layer utilities {
  /* Disable hover effects on mobile for better performance */
  @media (hover: none) {
    .hover\:scale-105 {
      transform: none !important;
    }
    
    .hover\:shadow-lg {
      box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
    }
    
    .group:hover .group-hover\:scale-110 {
      transform: none !important;
    }
    
    .group:hover .group-hover\:opacity-100 {
      opacity: var(--tw-opacity) !important;
    }
  }

  /* Hardware acceleration for animations */
  .will-change-transform {
    will-change: transform;
  }
  
  .hardware-accelerated {
    transform: translate3d(0, 0, 0);
  }

  /* Optimized touch targets for mobile */
  @media (max-width: 768px) {
    .min-h-\[44px\] {
      min-height: 44px;
    }
    
    button, a[role="button"], input[type="button"] {
      min-height: 44px;
      min-width: 44px;
    }
    
    /* Mobile performance optimizations */
    .transition-all,
    .transition,
    .transition-transform,
    .transition-colors,
    .transition-opacity {
      transition: none !important;
    }
  }

  /* Reduced motion for users who prefer it */
  @media (prefers-reduced-motion: reduce) {
    .transition-all,
    .transition,
    .transition-transform,
    .transition-colors,
    .transition-opacity {
      transition: none !important;
    }
    
    .animate-pulse,
    .animate-spin {
      animation: none !important;
    }
  }

  /* Line clamping utility */
  .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* Performance optimizations */
img {
  max-width: 100%;
  height: auto;
}

/* Improved focus states for accessibility */
@layer base {
  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible {
    outline: 2px solid theme(colors.blue.500);
    outline-offset: 2px;
  }
}

/* CSS containment for performance */
.contain-layout {
  contain: layout;
}

.contain-style {
  contain: style;
}

.contain-paint {
  contain: paint;
}

/* Hero Section Styles */
.hero-container {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(30, 58, 138, 0.95), rgba(30, 64, 175, 0.95));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem 1rem 2rem;
  min-height: 100vh;
}

/* Enhanced mobile performance */
@media (max-width: 768px) {
  /* Force hardware acceleration on mobile */
  body {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
  }
  
  /* Reduce visual complexity on mobile */
  .shadow-lg,
  .shadow-xl,
  .shadow-2xl {
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1) !important;
  }
  
  /* Optimize hero section height for mobile */
  .hero-container {
    min-height: 70vh;
  }
  
  .hero-content {
    min-height: 70vh;
    padding: 2rem 1rem 1rem;
  }
}
