/* assets/css/main.css */

/**
 * Основные стили сайта
 * Содержит: CSS переменные, базовые стили, типографику, навигацию
 */

/* ============================================
   CSS ПЕРЕМЕННЫЕ (Цветовая схема Dracula)
   ============================================ */
:root {
  /* Основные цвета фона */
  --background: #282a36;
  --surface: #44475a;
  --surface-light: #6272a4;
  
  /* Цвета текста */
  --foreground: #f8f8f2;
  --foreground-secondary: #bd93f9;
  
  /* Акцентные цвета */
  --primary: #8be9fd;
  --primary-light: #a4f4ff;
  --secondary: #50fa7b;
  --accent: #ffb86c;
  --danger: #ff5555;
  
  /* Границы */
  --border: #6272a4;
  --border-light: #bd93f9;
  
  /* Тени */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  
  /* Переходы */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Размеры */
  --nav-height: 70px;
  --container-max-width: 1400px;
}

/* ============================================
   БАЗОВЫЕ СТИЛИ
   ============================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  font-weight: 400;
  font-size: 16px;
  /* Фоновое изображение */
  background-image: linear-gradient(rgba(40, 42, 54, 0.9), rgba(40, 42, 54, 0.9)), url('../img/background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  /* Отступ для навигации */
  padding-top: var(--nav-height);
}

/* ============================================
   НАВИГАЦИЯ (Современный дизайн 2026)
   ============================================ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(40, 42, 54, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(139, 233, 253, 0.1);
  z-index: 1000;
  transition: all var(--transition-normal);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Эффект при скролле - более выраженный фон */
nav.scrolled {
  background: rgba(40, 42, 54, 0.95);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  border-bottom-color: rgba(139, 233, 253, 0.2);
}

.nav-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  height: 100%;
}

/* Логотип/Бренд */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-brand .brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: all var(--transition-normal);
}

.nav-brand .brand-logo {
  height: 42px;
  width: auto;
  transition: all var(--transition-normal);
  filter: brightness(1);
}

.nav-brand .brand-link:hover .brand-logo {
  transform: scale(1.05);
  filter: brightness(1.2);
}

/* Старый стиль для текста (если понадобится) */
.nav-brand .brand-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  transition: all var(--transition-normal);
}

.nav-brand .brand-text:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Навигационные ссылки */
.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition-normal);
  position: relative;
  padding: 0.5rem 0;
  letter-spacing: 0.3px;
}

.nav-links a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width var(--transition-normal);
  border-radius: 2px;
}

.nav-links a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.nav-links a:hover::before {
  width: 100%;
}

/* Активная ссылка */
.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::before {
  width: 100%;
}

/* Мобильное меню (бургер) */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  padding: 0.5rem;
  z-index: 1001;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--foreground);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
  background: var(--primary);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
  background: var(--primary);
}

/* ============================================
   ОСНОВНЫЕ СЕКЦИИ
   ============================================ */
section {
  padding: 5rem 2rem;
  max-width: var(--container-max-width);
  margin: 0 auto;
  position: relative;
}

section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, var(--foreground), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  letter-spacing: -1px;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

/* ============================================
   ГЕРОЙ СЕКЦИЯ
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 2rem) 2rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 1000px;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--foreground), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  letter-spacing: -1px;
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--foreground-secondary);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  transform: translateY(30px);
}

.stat:nth-child(1) { animation-delay: 0.2s; }
.stat:nth-child(2) { animation-delay: 0.4s; }
.stat:nth-child(3) { animation-delay: 0.6s; }

.stat-number {
  display: block;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  color: var(--foreground-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Lottie анимация в hero */
.hero-bg-lottie {
  position: fixed;
  left: -5vw;
  bottom: 0;
  width: 40vw;
  height: 50vh;
  z-index: 0;
  overflow: visible;
  display: block;
  pointer-events: none;
  background: none;
  box-shadow: none;
  border: none;
  transition: opacity 0.6s;
  opacity: 1;
}

.hero-bg-lottie.fade-out {
  opacity: 0;
  pointer-events: none;
}

#lottie-hero-bg {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  min-width: 300px;
  min-height: 300px;
  max-width: none;
  max-height: none;
  margin: 0;
  background: none;
  box-shadow: none;
  border: none;
  filter: brightness(0.5);
}

.lottie-overlay {
  display: none;
}

/* ============================================
   ФУТЕР
   ============================================ */
footer {
  background: rgba(68, 71, 90, 0.8);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.footer-content {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
}

.footer-section p,
.footer-section ul {
  color: var(--foreground-secondary);
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--foreground-secondary);
  text-decoration: none;
  transition: color var(--transition-normal);
}

.footer-section ul li a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  color: var(--foreground-secondary);
  font-size: 0.9rem;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 1.5rem;
  }
  
  .nav-brand .brand-logo {
    height: 38px;
  }
  
  .nav-brand .brand-text {
    font-size: 1.35rem;
  }
  
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: rgba(40, 42, 54, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    flex-direction: column;
    padding: 2rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 999;
    gap: 0;
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-links a {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(139, 233, 253, 0.1);
    width: 100%;
    text-align: center;
  }
  
  .nav-links a:last-child {
    border-bottom: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero {
    padding: calc(var(--nav-height) + 1rem) 1rem 2rem;
  }
  
  .hero-stats {
    gap: 2rem;
  }
  
  section {
    padding: 3rem 1.5rem;
  }
  
  .hero-bg-lottie {
    left: 1rem;
    width: 150px;
    height: 150px;
    min-height: 120px;
  }
  
  #lottie-hero-bg {
    min-width: 120px;
    min-height: 120px;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 1rem;
  }
  
  .nav-brand .brand-logo {
    height: 38px;
  }
  
  .nav-brand .brand-text {
    font-size: 1.2rem;
  }
  
  .nav-links {
    top: calc(var(--nav-height) - 10px);
  }
  
  .hero {
    padding: calc(var(--nav-height) + 0.5rem) 1rem 2rem;
  }
  
  section {
    padding: 2.5rem 1rem;
  }
  
  .hero-bg-lottie {
    height: 120px;
    width: 120px;
    left: 0.5rem;
  }
}