body {
  margin: 0;
  background-color: #050505;
  color: white;
  overflow-x: hidden;
}

/* Optimize rendering of off-screen sections */
section {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px; /* Approximate height for better performance */
}

/* Hero section should render immediately */
section:first-of-type {
  content-visibility: visible;
}

/* Noise Texture - Disabled on mobile for better performance */
.bg-noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 50;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Disable noise on mobile for better performance */
@media (max-width: 768px) {
  .bg-noise {
    display: none;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: #050505;
}
::-webkit-scrollbar-thumb {
  background: #ccff00;
}

/* Selection Color */
::selection {
  background-color: #ccff00;
  color: #000000;
}

/* Hero animations - optimized for mobile with GPU acceleration */
.hero-title {
  opacity: 0;
  transform: scale(0.9) translateZ(0); /* Force GPU acceleration */
  will-change: opacity, transform;
  animation: fadeInScale 0.8s ease-out forwards;
  backface-visibility: hidden; /* Optimize rendering */
  perspective: 1000px; /* Enable 3D transforms */
}

.hero-line {
  will-change: width;
  animation: expandLine 1s ease-in-out 0.3s forwards;
  transform: translateZ(0); /* Force GPU acceleration */
}

.hero-description {
  opacity: 0;
  transform: translateY(20px) translateZ(0); /* Force GPU acceleration */
  will-change: opacity, transform;
  animation: fadeInUp 0.6s ease-out 0.2s forwards;
  backface-visibility: hidden;
}

.hero-scroll {
  will-change: opacity;
  animation: fadeIn 0.5s ease-out 0.8s forwards;
  transform: translateZ(0); /* Force GPU acceleration */
}

/* Reduce motion on mobile/low-end devices */
@media (prefers-reduced-motion: reduce) {
  .hero-title,
  .hero-line,
  .hero-description,
  .hero-scroll {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Optimize animations for mobile */
@media (max-width: 768px) {
  .hero-title {
    animation-duration: 0.6s;
  }
  .hero-line {
    animation-duration: 0.8s;
    animation-delay: 0.2s;
  }
  .hero-description {
    animation-duration: 0.5s;
    animation-delay: 0.1s;
  }
  .hero-scroll {
    animation-duration: 0.4s;
    animation-delay: 0.5s;
  }
}

@keyframes fadeInScale {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes expandLine {
  to {
    width: 100%;
  }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Service items animation - GPU accelerated */
.service-item {
  opacity: 0;
  transform: translateY(20px) translateZ(0); /* Force GPU acceleration */
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  will-change: opacity, transform;
  backface-visibility: hidden;
}

.service-item.visible {
  opacity: 1;
  transform: translateY(0) translateZ(0);
  will-change: auto; /* Remove will-change after animation */
}

/* Navbar - transparent on desktop, black on mobile */
nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 100 !important;
  mix-blend-mode: normal !important;
  color: #ffffff !important;
  background: transparent !important;
  height: 90px !important;
}

/* Black background only on mobile */
@media (max-width: 768px) {
  nav {
    background: #050505 !important;
  }
}

nav * {
  mix-blend-mode: normal !important;
}

/* Все ссылки и элементы в nav белые */
nav a,
nav button,
nav span {
  color: #ffffff !important;
}

/* Ссылки меню - принудительно белые */
nav .container a.text-sm,
nav a[href*="#"],
nav a[class*="text-"] {
  color: #ffffff !important;
}

/* Кнопка "ОБСУДИТЬ ПРОЕКТ" - черный текст (переопределяется inline стилями) */
nav a.px-6 {
  color: #000000 !important;
  background-color: #ccff00 !important;
}



nav svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* Mobile menu - ensure black background */
#mobile-menu {
  background-color: #000000 !important;
  mix-blend-mode: normal !important;
}

#mobile-menu:not(.hidden) {
  display: flex !important;
}

