/* ==========================================================================
   СЫТОВ НИКОЛАЙ ОЛЕГОВИЧ — SCROLLYTELLING LANDING PAGE
   Премиальный темный визуальный стиль, Zero-bloat, 100/100 PageSpeed, GPU-ускорение
   ========================================================================== */

/* --- 1. CSS Переменные и Дизайн-система --- */
:root {
  /* Базовая палитра: благородный глубокий графит/сланец, мягче и светлее черного */
  --bg-primary: #19202c;
  --bg-surface: #222b3a;
  --bg-surface-elevated: #2d384c;
  --bg-surface-glass: rgba(34, 43, 58, 0.85);
  --bg-glass-card: rgba(30, 39, 53, 0.92);
  
  /* Текстовые оттенки */
  --text-primary: #f2f6fc;
  --text-secondary: #9aa7b8;
  --text-muted: #798799;
  --text-link: #60a5fa;

  /* Государственный алый и неоново-рубиновый акцент */
  --accent-ruby: #c8102e;
  --accent-ruby-glow: #e63946;
  --accent-ruby-dark: #8b0a1e;
  --accent-ruby-alpha: rgba(200, 16, 46, 0.22);
  --accent-ruby-border: rgba(230, 57, 70, 0.45);

  /* Золотистый и геральдический акцент */
  --accent-gold: #d4af37;
  --accent-gold-alpha: rgba(212, 175, 55, 0.15);

  /* Бордюры и разделители */
  --border-subtle: rgba(240, 246, 252, 0.13);
  --border-medium: rgba(240, 246, 252, 0.20);
  --border-highlight: rgba(240, 246, 252, 0.32);

  /* Тени и свечения */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.6);
  --glow-ruby: 0 0 20px rgba(230, 57, 70, 0.45);
  --glow-ruby-strong: 0 0 35px rgba(230, 57, 70, 0.75);

  /* Скругления */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* Тайминг анимаций */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 2. Нормализация и Базовые Стили --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  height: 100%;
  overflow: hidden;
  font-family: Inter, Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  user-select: text;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
}

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

/* Фоновые рассеянные атмосферные пятна света */
.ambient-glow {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 1;
  opacity: 0.18;
}

.ambient-glow-1 {
  top: -10vw;
  right: -10vw;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--accent-ruby-glow), transparent 70%);
}

.ambient-glow-2 {
  bottom: -15vw;
  left: -10vw;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, #3b82f6, transparent 70%);
  opacity: 0.12;
}

/* --- 3. Верхний тонкий индикатор прогресса (Top Progress Bar) --- */
.top-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-ruby), var(--accent-ruby-glow));
  box-shadow: 0 0 10px var(--accent-ruby-glow);
  z-index: 999;
  transition: width 0.15s ease-out;
  pointer-events: none;
}

/* --- 4. Мобильная верхняя панель статуса --- */
.mobile-nav-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 0.75rem 1rem;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto;
}

.mobile-nav-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-ruby-glow);
  box-shadow: 0 0 8px var(--accent-ruby-glow);
  margin-right: 0.5rem;
}

.mobile-nav-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.mobile-nav-counter {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 0.75rem;
  border: 1px solid var(--border-subtle);
}

/* --- 5. Закрепленный вертикальный таймлайн (Desktop Scrollytelling) --- */
.scrolly-timeline {
  position: fixed;
  right: 2.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 800;
  display: flex;
  align-items: center;
  user-select: none;
}

.timeline-track {
  position: absolute;
  top: 14px;
  bottom: 14px;
  right: 11px;
  width: 2px;
  background-color: rgba(240, 246, 252, 0.12);
  border-radius: 2px;
  z-index: 1;
}

.timeline-progress-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--accent-ruby), var(--accent-ruby-glow));
  box-shadow: 0 0 8px var(--accent-ruby-glow);
  border-radius: 2px;
  transition: height 0.3s var(--ease-out-expo);
}

.timeline-milestones {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.milestone-node {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 0.85rem;
  padding: 4px;
  cursor: pointer;
  outline: none;
  background: transparent;
  transition: transform 0.25s ease;
}

.milestone-node:hover {
  transform: translateX(-4px);
}

.milestone-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  border: 2px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s var(--ease-out-expo);
  flex-shrink: 0;
}

.milestone-dot-core {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-muted);
  transition: all 0.3s ease;
}

.milestone-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(22, 27, 34, 0.9);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s var(--ease-out-expo);
  pointer-events: none;
  white-space: nowrap;
}

.milestone-node:hover .milestone-label {
  opacity: 1;
  transform: translateX(0);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

/* Активная точка */
.milestone-node.active .milestone-dot {
  border-color: var(--accent-ruby-glow);
  background-color: var(--accent-ruby);
  box-shadow: 0 0 16px var(--accent-ruby-glow), 0 0 30px var(--accent-ruby-alpha);
  transform: scale(1.25);
}

.milestone-node.active .milestone-dot-core {
  background-color: #ffffff;
  transform: scale(1.2);
}

.milestone-node.active .milestone-label {
  opacity: 1;
  transform: translateX(0);
  color: #ffffff;
  border-color: var(--accent-ruby-border);
  background: rgba(200, 16, 46, 0.25);
  box-shadow: 0 0 12px var(--accent-ruby-alpha);
}

/* --- 6. Главный Контейнер и Секции (Fullscreen Snap) --- */
.scrolly-container {
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  position: relative;
  z-index: 10;
  -webkit-overflow-scrolling: touch;
}

/* Кастомный утонченный скроллбар */
.scrolly-container::-webkit-scrollbar {
  width: 5px;
}

.scrolly-container::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

.scrolly-container::-webkit-scrollbar-thumb {
  background: var(--bg-surface-elevated);
  border-radius: 4px;
}

.scrolly-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent-ruby);
}

.screen-section {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 3rem 6rem 3rem 5rem;
  box-sizing: border-box;
  overflow: hidden;
}

.screen-wrapper {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

/* Split-сетка 2-колоночного макета */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5rem;
  align-items: center;
}

.split-grid.reverse-on-desktop {
  grid-template-columns: 1fr 1fr;
}

/* --- 7. GPU-ускоренные Анимации Появления (Fade & Scale) --- */
.fade-target {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.85s var(--ease-out-expo), transform 0.85s var(--ease-out-expo);
  will-change: opacity, transform;
}

.scale-target {
  opacity: 0;
  transform: scale(0.94) translateY(20px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
  will-change: opacity, transform;
}

/* Состояние при попадании в область видимости */
.screen-section.is-visible .fade-target {
  opacity: 1;
  transform: translateY(0);
}

.screen-section.is-visible .scale-target {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Задержки для элегантного ступенчатого появления */
.content-col.fade-target {
  transition-delay: 0.15s;
}

/* --- 8. Портретные Рамки и Графические Элементы --- */
.portrait-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.5);
  aspect-ratio: 4 / 5;
  max-width: 440px;
  margin: 0 auto;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.portrait-frame:hover {
  border-color: var(--accent-ruby-border);
  box-shadow: var(--shadow-lg), var(--glow-ruby);
}

.portrait-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.8s var(--ease-out-expo), filter 0.5s ease;
  filter: saturate(0.96) contrast(1.04);
}

.portrait-frame:hover .portrait-img {
  transform: scale(1.03);
}

/* Угловые высокотехнологичные скобки */
.portrait-corner-tl,
.portrait-corner-tr,
.portrait-corner-bl,
.portrait-corner-br {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
  z-index: 4;
}

.portrait-corner-tl {
  top: 12px;
  left: 12px;
  border-top: 2px solid var(--accent-ruby-glow);
  border-left: 2px solid var(--accent-ruby-glow);
}

.portrait-corner-tr {
  top: 12px;
  right: 12px;
  border-top: 2px solid var(--accent-ruby-glow);
  border-right: 2px solid var(--accent-ruby-glow);
}

.portrait-corner-bl {
  bottom: 12px;
  left: 12px;
  border-bottom: 2px solid var(--accent-ruby-glow);
  border-left: 2px solid var(--accent-ruby-glow);
}

.portrait-corner-br {
  bottom: 12px;
  right: 12px;
  border-bottom: 2px solid var(--accent-ruby-glow);
  border-right: 2px solid var(--accent-ruby-glow);
}

/* Бирка на фото */
.frame-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.frame-tag.frame-tag-bottom-left {
  top: auto;
  bottom: 16px;
  right: auto;
  left: 16px;
}

/* Запасной стильный фон, если фото ещё загружается */
.img-fallback {
  background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- 9. Общие Типографические Элементы Секций --- */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: 5px 14px 5px 6px;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}

.badge-year {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-ruby), var(--accent-ruby-glow));
  padding: 3px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px var(--accent-ruby-alpha);
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-year.badge-ruby {
  background: linear-gradient(135deg, #e63946, #c8102e);
}

.badge-text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desktop-text {
  display: inline;
}

.mobile-text {
  display: none;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.section-lead-text {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #c9d1d9;
  margin-bottom: 1.75rem;
}

.section-lead-text p + p {
  margin-top: 1rem;
}

.section-lead-text strong {
  color: #ffffff;
  font-weight: 600;
}

/* --- 10. Секция 1: Hero / Визитная Карточка --- */
.section-hero {
  background: radial-gradient(circle at 75% 45%, rgba(200, 16, 46, 0.08) 0%, transparent 60%);
}

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

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(22, 27, 34, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  margin-bottom: 1.5rem;
  max-width: 100%;
}

.status-beacon {
  width: 8px;
  min-width: 8px;
  height: 8px;
  min-height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: var(--accent-ruby-glow);
  box-shadow: 0 0 10px var(--accent-ruby-glow);
  animation: pulse-beacon 2s infinite;
}

@keyframes pulse-beacon {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(230, 57, 70, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

.status-badge-text {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.hero-title {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.hero-title-first {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: -0.02em;
}

.hero-title-last {
  font-size: 4.25rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 40%, #c9d1d9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero-roles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9375rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
}

.role-item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  background: var(--bg-surface-glass);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: all 0.25s ease;
}

.role-item:hover {
  border-color: var(--border-medium);
  background: var(--bg-surface-elevated);
  color: #ffffff;
}

.role-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-ruby-glow);
  flex-shrink: 0;
}

.role-divider {
  display: none;
}

.hero-credo {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  background: rgba(200, 16, 46, 0.08);
  border-left: 3px solid var(--accent-ruby);
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: 2.25rem;
}

.credo-quote-mark {
  font-size: 1.5rem;
  color: var(--accent-ruby-glow);
  font-weight: 900;
  line-height: 1;
}

.credo-text {
  font-size: 1.1875rem;
  font-weight: 600;
  font-style: italic;
  color: #ffffff;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Кнопки */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, var(--accent-ruby) 0%, var(--accent-ruby-glow) 100%);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(200, 16, 46, 0.4);
  transition: all 0.3s var(--ease-out-expo);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.6);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-icon-down {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon-down {
  transform: translateY(3px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  transition: all 0.3s var(--ease-out-expo);
}

.btn-secondary:hover {
  background: var(--bg-surface);
  border-color: var(--accent-ruby-border);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-ruby-glow);
}

.hero-portrait-frame {
  max-width: 460px;
  aspect-ratio: 3 / 4;
}

.portrait-caption {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.caption-lead {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #ffffff;
}

.caption-sub {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* Нижний индикатор скролла */
.scrolldown-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 20;
}

.scrolldown-indicator:hover {
  opacity: 1;
  transform: translateX(-50%) translateY(3px);
}

.mouse-icon {
  width: 22px;
  height: 36px;
  border: 2px solid var(--border-medium);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.mouse-wheel {
  width: 4px;
  height: 8px;
  background-color: var(--accent-ruby-glow);
  border-radius: 2px;
  animation: wheel-bounce 1.6s infinite;
}

@keyframes wheel-bounce {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

.mouse-text {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- 11. Секция 2: Инженерная Школа (2001) --- */
.section-engineer .portrait-img {
  object-position: 68% center;
}

.quote-card {
  position: relative;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--accent-ruby);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
}

.quote-text {
  font-size: 1.0625rem;
  font-style: italic;
  line-height: 1.65;
  color: #e6edf3;
  margin-bottom: 0;
}

.quote-author {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent-ruby-glow);
  text-transform: uppercase;
}

/* --- 12. Секция 3: Минпромэнерго и Метрики (2005–2016) --- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.metric-card {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  transition: all 0.3s var(--ease-out-expo);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric-card:hover {
  border-color: var(--accent-ruby-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm), var(--glow-ruby);
  background: rgba(22, 27, 34, 0.95);
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.metric-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-ruby-glow);
}

.metric-label {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* --- 13. Секция 4: Донбасс и Новороссия (2014–2022) --- */
.history-callout-box {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.callout-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.2), rgba(200, 16, 46, 0.05));
  border: 1px solid var(--accent-ruby-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-ruby-glow);
}

.callout-icon svg {
  width: 22px;
  height: 22px;
}

.callout-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.callout-desc {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* --- 14. Секция 5: СВО и Орденские Бейджи Наград --- */
.awards-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.award-plate {
  background: linear-gradient(145deg, rgba(22, 27, 34, 0.95), rgba(13, 17, 23, 0.9));
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  position: relative;
  overflow: hidden;
  transition: all 0.35s var(--ease-out-expo);
  box-shadow: var(--shadow-sm);
}

.award-plate::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-ruby), transparent);
}

.award-plate:hover {
  transform: translateY(-3px);
  border-color: var(--accent-ruby-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px var(--accent-ruby-alpha);
}

.award-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.award-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(200, 16, 46, 0.15);
  border: 1px solid var(--accent-ruby-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd166;
  flex-shrink: 0;
}

.award-icon-box svg {
  width: 14px;
  height: 14px;
}

.award-region {
  font-size: 0.9375rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.award-desc {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* --- 15. Секция 6: Гуманитарная Миссия и Мини-Карусель --- */
.humanitarian-media-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 440px;
  margin: 0 auto;
}

.humanitarian-main-frame {
  aspect-ratio: 16 / 10;
  margin: 0;
}

.mini-carousel-wrapper {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.carousel-track-container {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s var(--ease-out-expo);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  color: #ffffff;
  border: 1px solid var(--border-subtle);
}

.carousel-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  background: rgba(13, 17, 23, 0.95);
  border-top: 1px solid var(--border-subtle);
}

.carousel-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.carousel-btn:hover {
  background: var(--accent-ruby);
  color: #ffffff;
  border-color: var(--accent-ruby-glow);
}

.carousel-btn svg {
  width: 14px;
  height: 14px;
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot-btn {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-medium);
  transition: all 0.3s ease;
}

.dot-btn.active {
  width: 20px;
  background: var(--accent-ruby-glow);
  box-shadow: 0 0 8px var(--accent-ruby-glow);
}

.thesis-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(200, 16, 46, 0.08);
  border: 1px solid var(--accent-ruby-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
}

.thesis-star {
  font-size: 1.5rem;
  color: var(--accent-ruby-glow);
  line-height: 1;
}

.thesis-text {
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
  color: #ffffff;
  line-height: 1.5;
}

/* --- 16. Секция 7: Парламентская Деятельность (Сегодня) --- */
.focus-pillars {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.pillar-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  transition: all 0.3s var(--ease-out-expo);
}

.pillar-item:hover {
  border-color: var(--accent-ruby-border);
  transform: translateX(4px);
  background: rgba(22, 27, 34, 0.95);
}

.pillar-bullet {
  color: var(--accent-ruby-glow);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.4;
}

.pillar-text {
  font-size: 0.9375rem;
  color: #e6edf3;
  line-height: 1.5;
}

/* --- 17. Секция 8: Семья, Ценности и Контакты --- */
.contact-actions-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.btn-primary-large {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
  padding: 1.1rem 1.75rem;
  background: linear-gradient(135deg, var(--accent-ruby) 0%, var(--accent-ruby-glow) 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(200, 16, 46, 0.45);
  transition: all 0.35s var(--ease-out-expo);
}

.btn-primary-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(230, 57, 70, 0.65);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-icon-envelope {
  width: 22px;
  height: 22px;
}

.social-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
}

.social-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
  background: var(--bg-surface-elevated);
}

.social-vk:hover {
  border-color: rgba(76, 117, 163, 0.7);
  box-shadow: 0 4px 20px rgba(76, 117, 163, 0.3);
}

.social-max:hover {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
}

.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: transparent;
}

.social-svg-badge {
  width: 100%;
  height: 100%;
  display: block;
}

.social-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.social-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

.social-hint {
  font-size: 0.6875rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.social-arrow {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.social-card:hover .social-arrow {
  transform: translate(2px, -2px);
  color: #ffffff;
}

.tag-status {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(200, 16, 46, 0.2);
  color: var(--accent-ruby-glow);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--accent-ruby-border);
}

.site-subfooter {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-copy {
  font-weight: 600;
  color: var(--text-secondary);
}

/* --- 18. Модальное Окно Депутатской Приемной --- */
.reception-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out-expo), visibility 0.35s ease;
}

.reception-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 32px var(--accent-ruby-alpha);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s var(--ease-out-expo);
}

.reception-modal-overlay.is-active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 1.75rem 2rem 1.25rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}

.modal-tag {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-ruby-glow);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.modal-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.modal-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.modal-close-btn:hover {
  background: var(--accent-ruby);
  color: #ffffff;
  border-color: var(--accent-ruby-glow);
}

.modal-close-btn svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  padding: 2rem;
}

.reception-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: flex;
  flex-direction: column;
}

.form-row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.req {
  color: var(--accent-ruby-glow);
  font-weight: 900;
}

.form-input,
.form-select,
.form-textarea {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: #ffffff;
  font-size: 0.9375rem;
  transition: all 0.25s ease;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-ruby-glow);
  box-shadow: 0 0 0 3px var(--accent-ruby-alpha);
  background: rgba(33, 38, 45, 0.95);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.form-select option {
  background: var(--bg-surface-elevated);
  color: #ffffff;
}

.form-error {
  font-size: 0.75rem;
  color: #ff6b6b;
  display: none;
  margin-top: 2px;
}

.has-error .form-input,
.has-error .form-select,
.has-error .form-textarea {
  border-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.06);
}

.has-error .form-error {
  display: block;
}

/* Чекбокс */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--border-highlight);
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.2s ease;
}

.checkbox-label input:checked + .custom-checkbox {
  background: var(--accent-ruby);
  border-color: var(--accent-ruby-glow);
}

.checkbox-label input:checked + .custom-checkbox::after {
  content: '✓';
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.checkbox-text {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.form-actions {
  margin-top: 0.5rem;
}

.btn-submit {
  width: 100%;
  padding: 0.95rem;
  background: linear-gradient(135deg, var(--accent-ruby), var(--accent-ruby-glow));
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(200, 16, 46, 0.4);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.6);
}

.btn-submit-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 0.5rem;
}

.btn-submit.loading .btn-submit-spinner {
  display: inline-block;
}

.btn-submit.loading {
  pointer-events: none;
  opacity: 0.85;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Экран успешной отправки */
.form-success-state {
  text-align: center;
  padding: 2.5rem 1rem;
}

.success-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(35, 134, 54, 0.15);
  border: 2px solid #2ea043;
  color: #3fb950;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
}

.success-icon-box svg {
  width: 32px;
  height: 32px;
}

.success-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.success-text {
  font-size: 1rem;
  color: #e6edf3;
  margin-bottom: 0.5rem;
}

.success-subtext {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 440px;
  margin: 0 auto 2rem auto;
  line-height: 1.5;
}

/* ==========================================================================
   19. Адаптивность и Мобильные Стили (@media)
   ========================================================================== */

@media (max-width: 1200px) {
  .screen-section {
    padding: 3rem 4rem 3rem 3rem;
  }
  
  .split-grid {
    gap: 3rem;
  }

  .hero-grid {
    gap: 2.5rem;
  }

  .hero-title-last {
    font-size: 3.5rem;
  }
}

@media (max-width: 992px) {
  html, body {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto;
  }

  /* Полное отключение scroll-snap на мобильных устройствах — плавный листающийся скролл */
  .scrolly-container {
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
    scroll-snap-type: none !important;
    -webkit-overflow-scrolling: auto;
    scroll-behavior: auto !important;
  }

  .screen-section {
    min-height: auto !important;
    height: auto !important;
    scroll-snap-align: none !important;
    scroll-snap-stop: normal !important;
    overflow: visible !important;
    padding: 5rem 1.5rem 4rem 1.5rem;
  }

  /* Гарантированное отображение всех элементов без ожидания анимаций */
  .fade-target,
  .scale-target {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Центрирование плашки Народного Совета ДНР */
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .status-badge {
    margin-left: auto;
    margin-right: auto;
    display: inline-flex;
    justify-content: center;
  }

  .hero-roles {
    justify-content: center;
    width: 100%;
  }

  .role-item {
    justify-content: center;
    text-align: center;
  }

  .hero-credo {
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 460px;
  }

  .credo-text {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .site-subfooter {
    text-align: center;
  }

  .footer-copy,
  .footer-note {
    text-align: center;
  }

  /* Скрытие десктопного таймлайна справа и активация мобильного хедера */
  .scrolly-timeline {
    display: none !important;
  }

  .mobile-nav-bar {
    display: block;
  }

  .split-grid,
  .split-grid.reverse-on-desktop,
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .reverse-on-desktop .media-col {
    order: -1;
  }

  .hero-title-last {
    font-size: 3rem;
  }

  .hero-title-first {
    font-size: 2rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .awards-container {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .social-links-grid {
    grid-template-columns: 1fr;
  }

  .portrait-frame {
    max-width: 360px;
  }

  .humanitarian-media-stack {
    max-width: 360px;
  }

  .form-row-two {
    grid-template-columns: 1fr;
  }

  .scrolldown-indicator {
    display: none;
  }
}

@media (max-width: 576px) {
  .desktop-text {
    display: none;
  }

  .mobile-text {
    display: inline;
  }

  .status-badge {
    padding: 5px 12px;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
  }

  .status-badge-text {
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .section-badge {
    padding: 4px 10px 4px 5px;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .badge-year {
    font-size: 0.6875rem;
    padding: 2.5px 8px;
  }

  .badge-text {
    font-size: 0.75rem;
  }
  .screen-section {
    padding: 4.5rem 1.15rem 3rem 1.15rem;
  }

  .hero-title-last {
    font-size: 2.35rem;
  }

  .hero-title-first {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .hero-roles {
    font-size: 0.8125rem;
  }

  .role-divider {
    display: none;
  }

  .role-item {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .modal-dialog {
    max-height: 95vh;
  }

  .modal-header {
    padding: 1.25rem 1.25rem 1rem 1.25rem;
  }

  .modal-body {
    padding: 1.25rem;
  }
}

/* Поддержка Safe Area Inset для устройств с вырезами (iPhone / Dynamic Island) */
@supports (padding: env(safe-area-inset-bottom)) {
  .screen-section {
    padding-bottom: calc(3rem + env(safe-area-inset-bottom));
  }
  .mobile-nav-bar {
    padding-top: calc(0.75rem + env(safe-area-inset-top));
  }
}
