/* ============================================
   CRITICAL CSS — Loads instantly for first paint
   ============================================ */

/* Base variables */
:root {
  --bg-dark-primary: #050816;
  --bg-dark-secondary: #0f1629;
  --bg-dark-tertiary: #1a1f35;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --accent-blue: #4f8fff;
  --accent-purple: #915eff;
  --border-color: rgba(255, 255, 255, 0.06);
  --gradient-primary: linear-gradient(135deg, #4f8fff 0%, #915eff 100%);
}

/* Critical reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Prevent FOUT (Flash of Unstyled Text) */
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-dark-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Header - immediately visible */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(5, 8, 22, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.logo svg,
.logo > span {
  display: none;
}

/* Hero - first screen */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* Gradient text */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Primary button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 0 30px rgba(79, 143, 255, 0.4);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  background: transparent;
}

/* Burger menu */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Navigation links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #0f1629 25%, #1a1f35 50%, #0f1629 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

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

/* Page loader */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-dark-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Mobile responsive - critical */
@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-dark-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    z-index: 9999;
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    padding: 100px 0 60px;
  }

  .hero-content h1 {
    font-size: 2rem;
    text-align: center;
  }

  .hero-content p {
    text-align: center;
    font-size: 1rem;
  }

  body.menu-open {
    overflow: hidden;
  }
}
