/* ===== BASE STYLES & VARIABLES ===== */
:root {
  /* Цветовая палитра */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray-light: #f5f5f5;
  --color-gray: #d4d4d4;
  --color-gray-dark: #333333;
  --color-primary: #000000;
  --color-primary-dark: #000000;
  --color-accent: #000000;
  --color-overlay: rgba(0, 0, 0, 0.7);
  --color-shadow: rgba(0, 0, 0, 0.1);
  
  /* Шрифты */
  --font-primary: 'TT Commons Pro Trl Exp', 'TT Commons', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-secondary: 'TT Commons Pro Trl Exp', 'TT Commons', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Анимации */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Размеры */
  --header-height: 80px;
  --container-padding: clamp(1rem, 5vw, 2rem);
  --container-max: 1200px;
  --mobile-page-gutter: 18px;
  --floating-ui-bottom: clamp(16px, 4vw, 28px);
}

/* ===== RESET & GLOBAL STYLES ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--color-black);
  background-color: var(--color-white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

/* Поддержка уменьшенной анимации */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== CONTAINERS & GRID ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

/* Утилиты для отступов */
.section-padding {
  padding: clamp(3rem, 8vh, 6rem) 0;
}

/* ===== MEDIA QUERIES (GLOBAL) ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--mobile-page-gutter);
  }
  
  .mobile-hide {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }
}


/* SEO-only heading: accessible for crawlers/readers, hidden visually */
.seo-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
