/* ==========================================================================
   3D PRINT & SCAN STUDIO — DESIGN SYSTEM & THEME TOKENS
   ========================================================================== 
   ДВЕ ПОЛНОЦЕННЫЕ ДИЗАЙН-КОНЦЕПЦИИ:
   1. [Основная по умолчанию] "Atelier Minimal" — Светлый архитектурный минимализм
   2. [Вторичная переключаемая] "Industrial Precision" — Темный инженерный хай-тек
   
   Чтобы сменить тему по умолчанию в коде:
   - Либо установите data-theme="industrial" на тег <html> в index.html
   - Либо используйте интерактивный переключатель стилей в шапке сайта
   ========================================================================== */

/* --------------------------------------------------------------------------
   ТЕМА 1: ATELIER MINIMAL (Светлая архитектурная эстетика) — ПО УМОЛЧАНИЮ
   -------------------------------------------------------------------------- */
:root {
  --theme-name: "Atelier Minimal";

  /* Базовые фоны и поверхности */
  --bg-primary: #F8F9FA;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F1F3F5;
  --bg-elevated: rgba(255, 255, 255, 0.85);
  --bg-hero: radial-gradient(circle at 70% 30%, #FFFFFF 0%, #F3F4F6 60%, #E9ECEF 100%);
  --bg-card: #FFFFFF;
  --bg-card-hover: #FAFBFC;
  
  /* Текст и типографика */
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;
  --text-inverse: #FFFFFF;
  
  /* Акцентные цвета студии */
  --accent-primary: #1F2937;          /* Глубокий антрацит / строгий стиль */
  --accent-primary-hover: #000000;
  --accent-secondary: #C5A880;        /* Теплая архитектурная латунь / бронза */
  --accent-highlight: #2563EB;        /* Высокоточный ультрамарин */
  --accent-laser: #0284C7;            /* Лазерная плоскость сканера */
  --accent-success: #10B981;
  --accent-badge-bg: #EEF2F6;
  --accent-badge-text: #1F2937;
  
  /* Линии, бордеры и разделители */
  --border-light: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.14);
  --border-focus: #111827;
  
  /* Тени и глубина */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 12px 36px -4px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 30px rgba(197, 168, 128, 0.25);
  
  /* Сетка, текстура и строгие прямые углы */
  --grid-pattern: radial-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px);
  --grid-size: 24px 24px;
  --panel-backdrop: blur(16px);
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-full: 0px;

  /* Параметры 3D сцены Three.js */
  --three-bg-clear: 0xF8F9FA;
  --three-fog-color: 0xF8F9FA;
  --three-wireframe-color: 0x2563EB;
  --three-model-color: 0xD1D5DB;
  --three-laser-color: 0x0284C7;
  --three-particles-color: 0x9CA3AF;
}

/* --------------------------------------------------------------------------
   ТЕМА 2: INDUSTRIAL PRECISION (Темный инженерный хай-тек)
   -------------------------------------------------------------------------- */
[data-theme="industrial"] {
  --theme-name: "Industrial Precision";

  /* Базовые фоны и поверхности */
  --bg-primary: #0C0D10;
  --bg-secondary: #13151A;
  --bg-tertiary: #1A1D24;
  --bg-elevated: rgba(19, 21, 26, 0.85);
  --bg-hero: radial-gradient(circle at 70% 30%, #1A1D24 0%, #0F1014 60%, #060709 100%);
  --bg-card: #15181F;
  --bg-card-hover: #1C202A;
  
  /* Текст и типографика */
  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --text-inverse: #0C0D10;
  
  /* Акцентные цвета студии */
  --accent-primary: #FF5C00;          /* Промышленный оранжевый (Safety Orange) */
  --accent-primary-hover: #FF7729;
  --accent-secondary: #00F0FF;        /* Неоновый циан сканера */
  --accent-highlight: #FF5C00;
  --accent-laser: #00F0FF;            /* Неоновый лазерный луч */
  --accent-success: #10B981;
  --accent-badge-bg: rgba(255, 92, 0, 0.15);
  --accent-badge-text: #FF7729;
  
  /* Линии, бордеры и разделители */
  --border-light: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-focus: #FF5C00;
  
  /* Тени и свечения */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 24px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 44px -4px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 35px rgba(255, 92, 0, 0.3);
  
  /* Сетка, текстура и строгие прямые углы */
  --grid-pattern: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  --grid-size: 28px 28px;
  --panel-backdrop: blur(16px);
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-full: 0px;

  /* Параметры 3D сцены Three.js */
  --three-bg-clear: 0x0C0D10;
  --three-fog-color: 0x0C0D10;
  --three-wireframe-color: 0x00F0FF;
  --three-model-color: 0x2A2E39;
  --three-laser-color: 0x00F0FF;
  --three-particles-color: 0xFF5C00;
}

/* --------------------------------------------------------------------------
   ГЛОБАЛЬНЫЙ БАЗОВЫЙ СБРОС И ТИПОГРАФИКА
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.35s ease, color 0.35s ease;
}

body {
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  background-image: var(--grid-pattern);
  background-size: var(--grid-size);
}

img, svg, canvas {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.mono-font {
  font-family: 'JetBrains Mono', 'Space Mono', Consolas, monospace;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* --------------------------------------------------------------------------
   НАВИГАЦИОННАЯ ШАПКА (HEADER) И ПЕРЕКЛЮЧАТЕЛЬ СТИЛЕЙ
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-elevated);
  backdrop-filter: var(--panel-backdrop);
  -webkit-backdrop-filter: var(--panel-backdrop);
  border-bottom: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-logo:hover .brand-icon {
  transform: rotate(45deg);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
  padding: 0.5rem 0;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-highlight);
  transition: width 0.25s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Стильный переключатель тем (Theme Switcher Widget) */
.theme-switch-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  padding: 0.5rem 0.95rem;
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.25s ease;
}

.theme-switch-btn:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.theme-switch-indicator {
  width: 8px;
  height: 8px;
  border-radius: 0;
  background: var(--accent-highlight);
  box-shadow: 0 0 8px var(--accent-highlight);
}

/* Кнопки вызова действий */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.925rem;
  padding: 0.85rem 1.6rem;
  border-radius: 0;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-focus);
}

.btn-laser {
  background: var(--accent-highlight);
  color: #FFFFFF;
}

.btn-laser:hover {
  opacity: 0.92;
  box-shadow: var(--shadow-glow);
}

/* Информационный статус в шапке */
.lab-status-badge {
  display: none;
}

/* --------------------------------------------------------------------------
   HERO СЕКЦИЯ — СОВРЕМЕННЫЙ СПЛИТ-ЭКРАН С 3D-КАНВАСОМ
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  padding: 3.5rem 0 5rem;
  overflow: hidden;
  background: var(--bg-hero);
  border-bottom: 1px solid var(--border-light);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.badge-tech {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.hero-title {
  font-size: 3.25rem;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
}

.hero-title .text-gradient {
  background: linear-gradient(135deg, var(--accent-highlight), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 540px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 0.5rem;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.825rem;
  color: var(--text-secondary);
}

/* Интерактивный 3D-контейнер увеличенного размера */
.hero-visual-card {
  position: relative;
  height: 650px;
  min-height: 580px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 0;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#hero-3d-canvas-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

#hero-3d-canvas {
  width: 100%;
  height: 100%;
  cursor: grab;
}

#hero-3d-canvas:active {
  cursor: grabbing;
}

/* Плавающая панель управления 3D сценой (HUD Controls) */
.viewer-hud-top {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 5;
}

.viewer-tag {
  pointer-events: auto;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-elevated);
  backdrop-filter: blur(8px);
  padding: 0.4rem 0.85rem;
  border-radius: 0;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.viewer-hud-bottom {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
  z-index: 5;
}

.viewer-controls-bar {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  pointer-events: auto;
  background: var(--bg-elevated);
  backdrop-filter: blur(12px);
  padding: 0.35rem;
  border-radius: 0;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  margin: 0 auto;
}

.viewer-mode-btn {
  background: transparent;
  border: 1px solid transparent;
  font-size: 0.775rem;
  font-weight: 600;
  padding: 0.4rem 0.95rem;
  border-radius: 0;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.viewer-mode-btn:hover {
  color: var(--text-primary);
}

.viewer-mode-btn.active {
  background: var(--accent-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-sm);
}

.viewer-model-switch {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  pointer-events: auto;
}

.model-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.model-pill:hover, .model-pill.active {
  border-color: var(--accent-highlight);
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   ИНТЕРАКТИВНЫЙ БЛОК: СРАВНЕНИЕ «ДО / ПОСЛЕ» (BEFORE/AFTER SLIDER)
   -------------------------------------------------------------------------- */
.section {
  padding: 5.5rem 0;
  position: relative;
}

.section-alt {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-highlight);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

/* Контейнер интерактивного слайдера */
.comparison-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.compare-card {
  position: relative;
  width: 100%;
  height: 480px;
  border-radius: 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-medium);
  background: #0D0E12;
  user-select: none;
}

.compare-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* Базовый нижний слой: ПОСЛЕ (справа) */
.compare-layer-after {
  z-index: 1;
  background-image: url('../assets/after.jpg'), url('../assets/after.svg');
  background-color: #0c1c24;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

/* Верхний слой: ДО (слева, отсекается шторкой) */
.compare-layer-before {
  z-index: 2;
  width: 50%;
  border-right: 2px solid var(--accent-laser);
  box-shadow: 3px 0 20px rgba(0, 240, 255, 0.45);
  background-image: url('../assets/before.jpg'), url('../assets/before.svg');
  background-color: #1e1917;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.compare-slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 2px solid var(--accent-laser);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  cursor: ew-resize;
  z-index: 10;
}

.compare-tag {
  position: absolute;
  bottom: 1.25rem;
  padding: 0.45rem 0.95rem;
  border-radius: 0;
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  z-index: 5;
  backdrop-filter: blur(8px);
}

.tag-before {
  left: 1.25rem;
  background: rgba(0, 0, 0, 0.78);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.tag-after {
  right: 1.25rem;
  background: rgba(0, 0, 0, 0.78);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Шаги процесса рядом со слайдером */
.reconstruction-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.step-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem;
  border-radius: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  transition: all 0.25s ease;
}

.step-card:hover {
  border-color: var(--border-medium);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.step-number {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0;
  background: var(--bg-tertiary);
  color: var(--accent-highlight);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.step-body h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.step-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   СЕТКА УСЛУГ (SERVICES GRID)
   -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.service-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-lg);
}

.service-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.service-icon-box {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--accent-highlight);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--accent-badge-bg);
  color: var(--accent-badge-text);
}

.service-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.service-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.service-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.service-features-list li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-features-list li svg {
  color: var(--accent-success);
  flex-shrink: 0;
}

.service-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
}

.service-price {
  display: flex;
  flex-direction: column;
}

.price-from {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.price-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   ИНТЕРАКТИВНЫЙ КВИЗ-КАЛЬКУЛЯТОР СТОИМОСТИ (SMART ESTIMATOR)
   -------------------------------------------------------------------------- */
.estimator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
}

.estimator-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
}

.calc-step {
  margin-bottom: 2rem;
}

.calc-step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calc-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.calc-option-pill {
  border: 1px solid var(--border-light);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.calc-option-pill:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
}

.calc-option-pill.active {
  border-color: var(--accent-highlight);
  background: var(--bg-card);
  box-shadow: 0 0 0 2px var(--accent-highlight);
}

.pill-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.pill-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Саммари калькулятора (правая колонка) */
.calc-summary-panel {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.summary-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-light);
  color: var(--text-secondary);
}

.summary-row span:last-child {
  font-weight: 600;
  color: var(--text-primary);
}

.total-estimate-box {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  text-align: center;
}

.total-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.total-price-range {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-highlight);
  letter-spacing: -0.02em;
}

.total-time-tag {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-success);
}

/* --------------------------------------------------------------------------
   МАТЕРИАЛЫ И ИНЖЕНЕРНЫЕ СВОЙСТВА (MATERIALS SPEC)
   -------------------------------------------------------------------------- */
.materials-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
}

.materials-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.925rem;
}

.materials-table th {
  background: var(--bg-tertiary);
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 0.825rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

.materials-table td {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.materials-table tr:last-child td {
  border-bottom: none;
}

.materials-table tr:hover td {
  background: var(--bg-card-hover);
}

.material-tag {
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  display: inline-block;
}

/* --------------------------------------------------------------------------
   АККОРДЕОН FAQ
   -------------------------------------------------------------------------- */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-question {
  width: 100%;
  padding: 1.35rem 1.75rem;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-icon {
  font-size: 1.25rem;
  transition: transform 0.25s ease;
  color: var(--accent-highlight);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 250px;
  padding: 0 1.75rem 1.35rem;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* --------------------------------------------------------------------------
   ФУТЕР (FOOTER)
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 4.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-col h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   АДАПТИВНОСТЬ (RESPONSIVE)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-visual-card {
    height: 440px;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .estimator-grid {
    grid-template-columns: 1fr;
  }
  .comparison-container {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  .hero-title {
    font-size: 2.35rem;
  }
  .hero-stats-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .calc-options-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
