/* Critical CSS for above-the-fold content - OPTIMIZED FOR PERFORMANCE */
/* This file is preloaded for better caching and performance */

/* Essential reset and base styles - Optimized */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
  text-size-adjust: 100%;
}
body {
  font-family:
    ui-monospace, SFMono-Regular, "SF Mono", Monaco, Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
  background-color: #0f172a;
  color: #fff;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Critical loading states */
.loading-critical {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* Critical hero section */
.hero-critical {
  min-height: 100vh;
  background: #0f172a;
  position: relative;
  padding: 4rem 1rem 2rem;
  display: flex;
  align-items: center;
  will-change: scroll-position;
}

/* Critical navbar */
.navbar-critical {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(6, 182, 212, 0.3);
  height: 64px;
  display: flex;
  align-items: center;
  will-change: transform;
}

/* Critical animations */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Critical gradient text */
.gradient-text {
  background: linear-gradient(to right, #06b6d4, #3b82f6, #8b5cf6);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  display: inline-block;
}

/* Critical utilities */
.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;
}
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.flex {
  display: flex;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.text-center {
  text-align: center;
}
.font-mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
}
.font-bold {
  font-weight: 700;
}
.font-black {
  font-weight: 900;
}

/* Critical spacing */
.mb-4 {
  margin-bottom: 1rem;
}
.mb-8 {
  margin-bottom: 2rem;
}
.mt-8 {
  margin-top: 2rem;
}
.p-4 {
  padding: 1rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Critical performance hints */
.will-change-auto {
  will-change: auto;
}
.will-change-scroll {
  will-change: scroll-position;
}
.will-change-transform {
  will-change: transform;
}

/* Critical responsive */
@media (max-width: 768px) {
  .hero-critical {
    padding: 3rem 1rem 1rem;
    min-height: 90vh;
  }
  .navbar-critical {
    height: 56px;
  }
}

/* Critical accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
