/* Critical CSS for above-the-fold content */
/* This CSS is loaded inline for faster First Contentful Paint */

/* Critical font loading styles */
.fonts-loading {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  visibility: hidden;
}

.fonts-loaded {
  font-family: 'Helvetica Neue Cyr', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  visibility: visible;
}

/* Critical layout styles for hero section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

/* Critical navigation styles */
.header-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(10px);
}

/* Critical button styles */
.btn-primary {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: translateY(0);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

/* Critical text styles */
.hero-title {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: white;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #d1d5db;
  margin-bottom: 2rem;
  max-width: 600px;
}

/* Critical responsive styles */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .btn-primary {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
}

/* Prevent layout shifts */
.hero-image {
  width: 100%;
  height: auto;
  max-width: 500px;
  aspect-ratio: 16/9;
}

/* Critical loading animation */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid #ef4444;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

/* Focus indicators for accessibility */
.focus-visible:focus {
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}

/* Critical animation classes */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

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