/* ==========================================================================
   БАЗОВІ СТИЛІ, ЗМІННІ ТА УНІВЕРСАЛЬНІ КНОПКИ (css/base.css)
   Компанія: APFEL GROUP | $1M Tech-Brutalism
   ========================================================================== */

/* ==========================================================================
   1. КОЛІРНА ПАЛІТРА ТА ЗМІННІ (DESIGN TOKENS)
   ========================================================================== */
:root {
  /* Фірмові кольори: Неоновий зелений замість базового */
  --primary-green: #63AF38;
  --primary-green-hover: #75CC43; /* Яскравіший для ефекту світіння */
  --secondary-gray: #64748B;
  
  /* Темні фони (Industrial Black) - Світлої теми більше немає */
  --bg-dark-hero: #05080A; /* Абсолютний інженерний чорний */
  --bg-dark-section: #080B0E; /* Трохи світліший для контрасту секцій */
  --bg-light: #0A0D14; /* Заміна світлого фону на темний графіт */
  --bg-white: #05080A; /* Глобальний фон тепер завжди чорний */
  
  /* Тексти (Terminal UI) */
  --text-dark: #F8FAFC; /* Всі заголовки тепер білі/срібні */
  --text-dark-main: #CBD5E1; 
  --text-dark-muted: #64748B; 
  
  --text-light: #FFFFFF;
  --text-light-alt: #F8FAFC;
  --text-light-muted: #94A3B8;
  
  /* UI Елементи (Бруталізм) */
  --border-light: rgba(255, 255, 255, 0.1);
  --border-dark: rgba(255, 255, 255, 0.05);
  
  /* Жорсткі тіні та неонове світіння замість м'яких тіней */
  --shadow-sm: 0 10px 20px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 20px 40px rgba(0, 0, 0, 0.8);
  --tech-glow: 0 0 15px rgba(99, 175, 56, 0.3), 0 0 30px rgba(99, 175, 56, 0.1);
  
  /* Жорсткі анімації */
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --border-radius-base: 0px; /* ЗНИЩУЄМО ЗАОКРУГЛЕННЯ */
}

/* ==========================================================================
   2. СКИДАННЯ ТА БАЗОВІ НАЛАШТУВАННЯ
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark-hero);
  color: var(--text-light-alt);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

body.no-scroll {
  overflow: hidden !important;
}

/* Зображення */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Інженерний скролбар (Tech Slider) */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #000000;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb {
  background: var(--secondary-gray);
  border-radius: 0; /* Ніяких круглих країв */
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-green);
}

/* Ергономіка */
button, a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   3. АРХІТЕКТУРА СЕКЦІЙ ТА ТИПОГРАФІКА
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1400px; /* Розширено для масивнішого вигляду */
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  padding: 120px 0;
  position: relative;
  scroll-margin-top: 80px;
  border-top: 1px solid var(--border-dark); /* Індустріальні стики між секціями */
}

/* Перевизначаємо світлі секції на темно-сірий метал */
.section--light {
  background-color: var(--bg-light);
  color: var(--text-light-alt);
}

.section--dark {
  background-color: var(--bg-dark-section);
  color: var(--text-light-alt);
}

/* Універсальні заголовки секцій (Монолітні) */
.section__title {
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 900;
  margin-bottom: 25px;
  line-height: 1.1;
  color: var(--text-light);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.section__subtitle {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  color: var(--text-light-muted);
  line-height: 1.6;
  max-width: 700px;
  margin-bottom: 40px;
  font-weight: 400;
}

/* Інженерні маркери (Бруталізм) */
.focus-bracket {
  color: rgba(255, 255, 255, 0.3);
  font-weight: 400;
  margin: 0 4px;
  font-family: monospace;
}

/* ==========================================================================
   4. СТАНДАРТ КНОПОК (TECH-BRUTALISM)
   ========================================================================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  border-radius: var(--border-radius-base);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 18px 32px;
  font-size: 0.85rem;
  overflow: hidden;
  transition: var(--transition);
  min-height: 54px;
}

/* Головна кнопка (Біла -> Зелена + Сканер) */
.btn--primary, .btn--apfel {
  background-color: #FFFFFF;
  color: #05080A !important;
}

/* Лазерний сканер всередині головної кнопки */
.btn--primary::before, .btn--apfel::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 175, 56, 0.4), transparent);
  transform: skewX(-20deg);
  transition: none;
  z-index: 1;
}

.btn--primary:hover::before, .btn--apfel:hover::before {
  animation: btnScanBase 0.8s ease;
}

.btn--primary:hover, .btn--apfel:hover {
  background-color: var(--primary-green);
  color: #FFFFFF !important;
  box-shadow: var(--tech-glow);
}

/* Кнопка з контуром (Радарний стиль) */
.btn--outline {
  background-color: transparent;
  color: var(--text-light) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 17px 31px;
}

.btn--outline:hover {
  background-color: #FFFFFF;
  color: #05080A !important;
  border-color: #FFFFFF;
}

/* Специфічний текст та іконки поверх сканера */
.btn span, .btn svg {
  position: relative;
  z-index: 2;
}

/* Анімація стрілок/іконок */
.btn svg {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover svg {
  transform: translateX(5px);
}

@keyframes btnScanBase { 0% { left: -100%; } 100% { left: 200%; } }

/* ==========================================================================
   5. АДАПТИВНІСТЬ (MOBILE)
   ========================================================================== */
@media screen and (max-width: 1024px) {
  .container { padding: 0 30px; }
}

@media screen and (max-width: 768px) {
  .container { padding: 0 20px; }
  
  .section {
    padding: 80px 0;
    scroll-margin-top: 70px;
  }
  
  .section__title {
    font-size: 2.5rem;
  }
  
  .section__subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
  }
  
  .btn--primary, .btn--apfel, .btn--outline {
    width: 100%;
    justify-content: space-between; /* Розносить текст і стрілку по краях на мобільному */
  }
}