/* ─── VARIABLES ─── */
:root {
  --bg: #080808;
  --bg2: #0d0d0d;
  --card: #111111;
  --card-h: #161616;
  --border: #ffffff;
  --border-h: #ffffff;
  --text: #ffffff;
  --text2: #888888;
  --text3: #444444;
  --text-body: rgba(255,255,255,0.78); /* body/secondary text — theme-aware */
  --text-dim: rgba(255,255,255,0.45);  /* faint text — theme-aware */
  --fh: 'Space Grotesk', system-ui, sans-serif;
  --fb: 'Manrope', system-ui, sans-serif;
  --fm: 'IBM Plex Mono', ui-monospace, monospace;
  --ease: 0.35s ease;
  --w: 1520px;
}
/* ─── LIGHT THEME (toggled via <html data-theme="light">) ─── */
html[data-theme="light"] {
  --bg: #f2f2f2;
  --bg2: #f2f2f2;
  --card: #f2f2f2;
  --card-h: #f2f2f2;
  --border: #0a0a0c;
  --border-h: #0a0a0c;
  --text: #0a0a0c;
  --text2: #55555c;
  --text3: #a0a0a8;
  --text-body: rgba(10,10,12,0.82);
  --text-dim: rgba(10,10,12,0.5);
  color-scheme: light;
}
/* Фон корневого элемента — тёмный (под цвет футера): это «подложка», видимая в зоне
   оверскролла (резинка при прокрутке вниз/вверх). body остаётся светлым, контент не меняется. */
/* Подложка (видна при overscroll-«резинке»). На светлых страницах — светлая, чтобы не
   портить вид сверху; на главной (тёмный hero) и тёмных страницах (админка) — чёрная. */
html { background: #f2f2f2; }
html[data-theme="dark"],
html:has(body.home) { background: #050505; }
/* light-theme fixes for elements with hardcoded dark/white chrome */
/* Адаптивная шапка. Фон всегда полностью прозрачный — без полосы и блюра. Меняется только
   цвет текста: над светлым контентом (по умолчанию) — чёрный, над тёмными секциями (класс
   .on-dark ставит JS) — белый. */
.header {
  background: transparent;            /* без цветной подложки — только размытие */
  backdrop-filter: blur(18px) saturate(120%); -webkit-backdrop-filter: blur(18px) saturate(120%);
  border-bottom-color: transparent;
  color: var(--text);
}
.header.on-dark {
  --bg: #080808; --bg2: #0d0d0d; --card: #111111;
  --border: #ffffff; --border-h: #ffffff;
  --text: #ffffff; --text2: #888888; --text3: #444444;
  --text-body: rgba(255,255,255,0.78); --text-dim: rgba(255,255,255,0.45);
  color: var(--text);
  color-scheme: dark;
}
/* Частичная адаптация: блок формально светлый, но под одной половиной шапки —
   тёмная картинка («О нас» — справа под навигацией, главная «Аэросистем» — слева
   под логотипом). Никаких подложек/бордеров: стандартная прозрачная шапка с тем же
   размытием, перекрашиваем в белый только ту половину, что оказалась над тёмным. */
.header.logo-on-dark .nav__logo { color: #ffffff; }
/* Поэлементная адаптация: каждый пункт меню белеет сам, когда доминирующий фон
   под ним тёмный (частичное перекрытие секцией/чёрным блоком/выделением текста). */
.header .nav__link.is-on-dark,
.header .theme-toggle.is-on-dark { color: #ffffff; }
.header .nav__burger.is-on-dark span { background: #ffffff; }
.header.nav-on-dark .nav__menu {
  --text: #ffffff; --text2: #888888; --text3: #444444;
  --text-body: rgba(255,255,255,0.78); --text-dim: rgba(255,255,255,0.45);
  color: #ffffff;
  color-scheme: dark;
}
/* иконка-глаз убрана из логотипа (шапка) и из прелоадера */
.logo-icon { display: none; }
html[data-theme="light"] .btn--outline,
html[data-theme="light"] .btn--hero { border-color: #0a0a0c; }
html[data-theme="light"] .consent a { border-bottom-color: #0a0a0c; }
html[data-theme="light"] .news-tag-btn,
html[data-theme="light"] .field { accent-color: #0a0a0c; }
html[data-theme="light"] .consent input { border-color: #0a0a0c; }
html[data-theme="light"] .consent input:checked { background: var(--text); border-color: var(--text); }
/* theme toggle button (injected into header) */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0; cursor: pointer;
  color: var(--text-body); transition: color var(--ease), border-color var(--ease);
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle svg { width: 18px; height: 18px; }
/* index hero sits on dark video in ANY theme → keep its text/controls light */
.hero .hero__title { color: #ffffff; }
.hero .hero__sub { color: rgba(255,255,255,0.72); }
html[data-theme="light"] .hero .btn--hero { border-color: #ffffff; color: #fff; background: transparent; }
html[data-theme="light"] .hero .btn--hero:hover { background: #fff; color: #0a0a0c; border-color: #fff; }

/* Сайт работает только в светлой теме → переключатель тем скрыт. */
.nav__theme { display: none; }

/* Видео-герой главной — «тёмный островок»: локально тёмная палитра, чтобы ховеры
   (var(--text)/var(--bg)) и прочее вели себя как в тёмной теме поверх видео. */
html[data-theme="light"] .hero {
  --bg: #080808; --bg2: #0d0d0d; --card: #111111;
  --border: #ffffff; --border-h: #ffffff;
  --text: #ffffff; --text2: #888888; --text3: #444444;
  --text-body: rgba(255,255,255,0.78); --text-dim: rgba(255,255,255,0.45);
  color-scheme: dark;
}
/* На тёмных зонах главной (видео-герой, «Аегис CRM», «Последние новости») выделение
   остаётся «тёмным»: белый фон, тёмный текст — иначе тёмное выделение теряется на тёмном фоне. */
html[data-theme="light"] .hero ::selection,
html[data-theme="light"] #about ::selection,
html[data-theme="light"] #news ::selection { background: #ffffff; color: #0a0a0c; text-shadow: none; }
html[data-theme="light"] .hero ::-moz-selection,
html[data-theme="light"] #about ::-moz-selection,
html[data-theme="light"] #news ::-moz-selection { background: #ffffff; color: #0a0a0c; text-shadow: none; }

/* Утилита .dark-section — тёмный «островок» на светлой странице: тёмный фон, светлый
   текст (через локальную тёмную палитру) и адаптированное выделение. */
.dark-section {
  --bg: #080808; --bg2: #0d0d0d; --card: #111111;
  --border: #ffffff; --border-h: #ffffff;
  --text: #ffffff; --text2: #888888; --text3: #444444;
  --text-body: rgba(255,255,255,0.78); --text-dim: rgba(255,255,255,0.45);
  color: var(--text);
  color-scheme: dark;
  background: #080808;
}
.dark-section ::selection { background: #ffffff; color: #0a0a0c; text-shadow: none; }
.dark-section ::-moz-selection { background: #ffffff; color: #0a0a0c; text-shadow: none; }
/* кнопки-аутлайн на тёмной секции: обводка светлая (в светлой теме её красят в тёмную → теряется) */
html[data-theme="light"] .dark-section .btn--outline { border-color: #ffffff; }

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* overflow-x: hidden на КОРНЕ гасит горизонтальный перелив от полноширинных 100vw-элементов
   (100vw включает ширину скроллбара → иначе справа вылезала полоса фона на узких экранах). */
html { scroll-behavior: smooth; font-size: 16px; scrollbar-width: none; -ms-overflow-style: none; overflow-x: hidden; }
/* переход из футера «Услуги» → к секции прайса/конфигуратора: отступ под фиксированную шапку */
#pricing { scroll-margin-top: 88px; }
html::-webkit-scrollbar { width: 0; height: 0; display: none; }
/* min-width: пол вёрстки — ниже 360px (все массовые телефоны шире: Android 360, iPhone SE 375)
   страница не сжимается дальше, а прокручивается по горизонтали, а не «крушится» в кашу. */
body { background: var(--bg); color: var(--text); font-family: var(--fb); line-height: 1.6; overflow-x: hidden; min-width: 360px; }
body::-webkit-scrollbar { width: 0; height: 0; display: none; }
/* блокировка прокрутки страницы под открытым бургер-меню: реальный скроллер — <html>,
   поэтому overflow:hidden на body его не держит; фиксируем body и запоминаем позицию в JS */
body.nav-scroll-lock { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
/* text selection: white highlight, dark text (instead of default blue) */
/* consent checkbox (lead forms + registration) */
.consent { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0.2rem 0 1.2rem; font-size: 0.78rem; color: var(--text2); line-height: 1.5; cursor: pointer; }
/* конклюдентное принятие Условий — мелким текстом под кнопкой отправки */
.form-fineprint { margin: 0.85rem 0 0; font-size: 0.72rem; line-height: 1.5; color: var(--text2); text-align: center; }
.form-fineprint a { color: var(--text); border-bottom: 1px solid currentColor; }
.form-fineprint a:hover { opacity: 0.7; }
/* тёмные модалки (контактная + авторизация) на светлой теме — светлый текст */
html[data-theme="light"] .modal .form-fineprint { color: rgba(255,255,255,0.5); }
html[data-theme="light"] .modal .form-fineprint a { color: rgba(255,255,255,0.82); }
.consent input { appearance: none; -webkit-appearance: none; margin-top: 0.1rem; width: 16px; height: 16px; flex-shrink: 0; border: 1px solid #ffffff; border-radius: 4px; background: transparent; cursor: pointer; position: relative; transition: border-color var(--ease), background var(--ease); }
.consent input:hover { border-color: var(--text); }
.consent input:checked { background: var(--text); border-color: var(--text); }
.consent input:checked::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.consent input:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.consent a { color: var(--text); border-bottom: 1px solid #ffffff; transition: opacity var(--ease), border-color var(--ease); }
.consent a:hover { opacity: 0.65; }
.consent a:hover { border-bottom-color: var(--text); }
::selection { background: var(--text); color: var(--bg); text-shadow: none; }
::-moz-selection { background: var(--text); color: var(--bg); text-shadow: none; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { background: none; border: none; cursor: pointer; color: inherit; font: inherit; }
img { max-width: 100%; display: block; }
/* убираем стандартный drag-ghost у ссылок, кнопок, картинок и иконок */
a, button, img, svg { -webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; user-drag: none; }
/* плавное появление догружающихся изображений (кешированные показываются сразу) */
.img-fade { opacity: 0; transition: opacity 0.5s ease; }
.img-fade.img-ready { opacity: 1; }

/* ─── cookie-уведомление (в нашем стиле, угол экрана) ─── */
.cookie-banner {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 9000;
  max-width: 360px; background: var(--card); border: 1px solid var(--border-h);
  padding: 1.15rem 1.25rem;
  opacity: 0; transform: translateY(14px); transition: opacity 0.45s ease, transform 0.45s ease;
}
.cookie-banner.show { opacity: 1; transform: none; }
.cookie-banner__t { font-family: var(--fb); font-size: 0.8rem; line-height: 1.65; color: var(--text2); margin: 0 0 1rem; }
.cookie-banner__t a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner__btn {
  font-family: var(--fm); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--text); color: var(--bg); border: 1px solid var(--text);
  padding: 0.6rem 1.5rem; cursor: pointer; transition: opacity var(--ease);
}
.cookie-banner__btn:hover { opacity: 0.85; }
@media (max-width: 560px) { .cookie-banner { left: 1rem; right: 1rem; bottom: 1rem; max-width: none; } }

/* ─── LAYOUT ─── */
.container { max-width: var(--w); margin: 0 auto; padding: 0 2rem; }
.section { padding: 5.5rem 0; }

/* ─── TYPOGRAPHY ─── */
.section-label {
  display: block;
  font-family: var(--fh);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--text2);
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.section-title {
  font-family: var(--fh);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.section-head { margin-bottom: 3.5rem; }
.section-head--center { text-align: center; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-block;
  padding: 0.8rem 2.2rem;
  font-family: var(--fh);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: all var(--ease);
  cursor: pointer;
}
.btn--outline {
  border: 1px solid #ffffff;
  color: var(--text);
  background: transparent;
}
.btn--outline:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn--hero {
  border: 1px solid #ffffff;
  color: var(--text);
  background: transparent;
}
.btn--hero:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ─── HEADER ─── */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1.15rem 0;                /* фикс. высота (чуть выше, без «пружины» при скролле) */
  transition: background var(--ease), color var(--ease), border-color var(--ease);
  border-bottom: 1px solid transparent;
}
/* .scrolled больше не меняет размер/фон (это давало «пружину» и перекрывало адаптивный цвет) */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}
.logo-icon { width: 36px; height: 36px; }
.logo-icon--sm { width: 30px; height: 30px; }
.logo-text {
  font-family: var(--fh);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  transition: color var(--ease);
}
.nav__list {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}
.nav__link {
  font-family: var(--fh);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: normal; /* без трекинга — читается как обычный текст; выделяется шрифтом (--fh), а не «растянутостью» */
  color: var(--text-body);
  transition: color var(--ease);
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 1.5px;
  background: var(--text);
  transition: width var(--ease);
}
/* Анимируем ширину, а не transform:scaleX — масштабируемая трансформом 1px-линия
   при движении растрируется на GPU и выглядит размыто-толще, а в конце скачком
   становится чёткой. Через width линия остаётся ровно 1px на всём протяжении. */
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { width: 100%; }

/* Пункт авторизации: три заранее отрендеренных варианта (гость / кабинет / админ-панель).
   Нужный показывается синхронно классом на <html> (см. inline-скрипт в <head>),
   ещё до первой отрисовки и без перестроения DOM — убирает мелькание
   «Войти → Кабинет/Админ-панель» при загрузке страниц и SPA-переходах. */
.nav__auth .na-user,
.nav__auth .na-admin { display: none; }
html.is-authed .nav__auth .na-guest { display: none; }
html.is-authed:not(.is-admin) .nav__auth .na-user { display: inline; }
html.is-authed.is-admin .nav__auth .na-admin { display: inline; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  z-index: 200;
  flex-shrink: 0;
}
.nav__burger span {
  display: block;
  height: 2px; /* 2px: у 1px/1.5px линий субпиксельное округление давало разную толщину на разных зумах/DPR */
  background: var(--text);
  transition: all var(--ease);
  transform-origin: center;
}
/* фирменный штрих: нижняя линия в полширины (прижата влево — читается как последняя
   строка абзаца); на ховере дорастает до полной */
.nav__burger span:nth-child(3) { width: 50%; }
.nav__burger:hover span:nth-child(3) { width: 100%; }
.nav__burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav__burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__burger.open span:nth-child(3) { width: 100%; transform: rotate(-45deg) translate(5px, -5px); } /* в кресте — полная, иначе крест кривой */
/* служебные элементы мобильной панели («НАВИГАЦИЯ», «ПОСЛЕДНИЕ НОВОСТИ») — только на мобильном */
.mnav-label, .mnav-news { display: none; }

/* ─── HERO MAP ─── */
.hero__map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.42;
  transform: scaleY(1.12);   /* slight vertical stretch — fixes the squashed look */
  transform-origin: center;
}
/* The map canvas paints a dark radial vignette (rgba(8,8,8,…)) meant for the
   dark theme. On the white light-theme background it reads as a grey blob, so
   hide the map entirely there. (Particles draw white → invisible on white.) */
html[data-theme="light"] .hero__map { display: none; }

/* ─── HERO ─── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero__slider {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: clamp(9rem, 26vh, 17rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}
.hero__slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* ─── SCULPTURE ─── */
.hero__visual {
  width: 260px;
  height: 240px;
  position: relative;
  margin-bottom: 2rem;
  flex-shrink: 0;
}
.sculpture {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.s-outer, .s-mid, .s-core {
  position: absolute;
  border-radius: 50%;
  animation: morph1 14s ease-in-out infinite;
}
.s-outer {
  width: 210px; height: 220px;
  background: radial-gradient(ellipse at 40% 35%, rgba(160,160,160,0.09) 0%, rgba(80,80,80,0.04) 45%, transparent 70%);
  filter: blur(18px);
  animation-name: morph1;
  animation-duration: 16s;
}
.s-mid {
  width: 150px; height: 165px;
  background: radial-gradient(ellipse at 38% 32%, rgba(220,220,220,0.11) 0%, rgba(120,120,120,0.06) 40%, transparent 65%);
  filter: blur(8px);
  animation-name: morph2;
  animation-duration: 11s;
}
.s-core {
  width: 95px; height: 110px;
  background: radial-gradient(ellipse at 36% 30%, rgba(255,255,255,0.14) 0%, rgba(180,180,180,0.07) 35%, transparent 60%);
  filter: blur(3px);
  animation-name: morph3;
  animation-duration: 8s;
}

/* Each sculpture variant has a slightly different starting shape */
.s1 .s-outer { border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; }
.s2 .s-outer { border-radius: 55% 45% 40% 60% / 45% 60% 40% 55%; }
.s3 .s-outer { border-radius: 60% 40% 50% 50% / 55% 45% 55% 45%; }
.s4 .s-outer { border-radius: 45% 55% 65% 35% / 50% 55% 45% 50%; }

@keyframes morph1 {
  0%,100% { border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; }
  25%      { border-radius: 55% 45% 40% 60% / 45% 60% 40% 55%; }
  50%      { border-radius: 60% 40% 50% 50% / 55% 45% 55% 45%; }
  75%      { border-radius: 45% 55% 65% 35% / 50% 55% 45% 50%; }
}
@keyframes morph2 {
  0%,100% { border-radius: 55% 45% 40% 60% / 45% 60% 40% 55%; }
  33%     { border-radius: 40% 60% 60% 40% / 55% 45% 55% 45%; }
  66%     { border-radius: 65% 35% 45% 55% / 50% 50% 60% 40%; }
}
@keyframes morph3 {
  0%,100% { border-radius: 45% 55% 55% 45% / 50% 50% 50% 50%; }
  50%     { border-radius: 55% 45% 45% 55% / 45% 55% 45% 55%; }
}

/* ─── HERO CONTENT ─── */
.hero__content { text-align: left; z-index: 2; width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 2rem; }
.hero__title {
  font-family: var(--fh);
  font-size: clamp(3rem, 9.5vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 0.98;
  margin-bottom: 1.4rem;
  min-height: 1.96em; /* резерв под 2 строки — слайды не скачут */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero__sub {
  font-family: var(--fb);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  margin-bottom: 2.2rem;
  min-height: 5.1em; /* резерв под 3 строки — кнопки на одном уровне */
}
/* eyebrow + actions (dark zone — всегда светлые) */
.hero__eyebrow {
  font-family: var(--fm);
  font-size: 0.66rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}
.hero__eyebrow::before { content: ""; width: 28px; height: 1px; background: rgba(255,255,255,0.35); display: inline-block; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.4rem; }
.btn--hero-solid,
html[data-theme="light"] .hero .btn--hero-solid { background: #fff; color: #0a0a0c; border-color: #fff; display: inline-flex; align-items: center; gap: 0.55rem; }
.btn--hero-solid:hover,
html[data-theme="light"] .hero .btn--hero-solid:hover { background: transparent; color: #fff; border-color: #fff; }
.btn--hero-solid .btn-arr { transition: transform var(--ease); }
.btn--hero-solid:hover .btn-arr { transform: translateX(4px); }

/* slider nav: стрелки + полоски + счётчик */
.hero__nav {
  position: absolute;
  bottom: 2.4rem;
  left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  width: 100%;
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 2rem;
}
.hero__bars { display: flex; align-items: center; gap: 0.5rem; }
.hero__bar {
  width: 28px; height: 2px;
  background: rgba(255,255,255,0.25);
  border: none; padding: 0; cursor: pointer;
  transition: all 0.4s ease;
}
.hero__bar.active { width: 56px; background: #fff; }
.hero__count {
  font-family: var(--fm);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.5);
  margin-left: 0.4rem;
}
.hero__count span { color: #fff; }

/* ─── SERVICES ─── */
.services { background: var(--bg2); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
}
.scard {
  padding: 2.5rem 2rem 2.2rem;
  border-right: 1px solid var(--border);
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: background var(--ease);
  cursor: pointer;
}
.scard:last-child { border-right: none; }
.scard:hover { background: var(--card-h); }
.scard__icon { width: 44px; height: 44px; color: var(--text-body); }
.scard__icon svg { width: 100%; height: 100%; }
.scard__title {
  font-family: var(--fh);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.scard__text { font-size: 0.83rem; color: var(--text2); line-height: 1.65; flex: 1; }
.scard__arrow {
  font-size: 1.1rem;
  color: var(--text-dim);
  display: inline-block;
  transition: color var(--ease), transform var(--ease);
}
.scard:hover .scard__arrow { color: var(--text); transform: translateX(5px); }

/* ─── ABOUT ─── */
.about {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--bg);
}

/* Homepage: each major section fills the viewport so they breathe (matches the video block) */
.home > section.services,
.home > section.fcase,
.home > section.news,
.home > section.cta {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* flex + margin-auto makes containers size to content; force full width so the
   news ticker (max-content track) can't blow the column past the viewport */
.home > section.services > .container,
.home > section.fcase > .container,
.home > section.news > .container,
.home > section.cta > .container { width: 100%; }
.news-marquee { max-width: 100%; }
@media (max-width: 768px) {
  .home > section.services,
  .home > section.fcase,
  .home > section.news,
  .home > section.cta {
    min-height: auto;
  }
}

/* Pages flagged .tall-sections: each content section fills the viewport */
.tall-sections > section.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tall-sections > section.section > .container { width: 100%; }
/* «Наша история» — поднять выше центра (а не в самой середине секции) */
.tall-sections > section.story-section { justify-content: flex-start; padding-top: 15vh; padding-bottom: 8vh; }
@media (max-width: 768px) { .tall-sections > section.story-section { padding-top: 0; } }
@media (max-width: 768px) {
  .tall-sections > section.section { min-height: auto; }
}

.about-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  filter: grayscale(1) contrast(1.05);
  pointer-events: none;
  /* Dark placeholder so the hero never flashes flat black while the video buffers/decodes on navigation.
     The <video> poster (about-poster.jpg) sits on top and shows instantly until the stream can play. */
  background: radial-gradient(ellipse at 50% 38%, #161616 0%, #0b0b0b 55%, #060606 100%);
}
/* Local <video> fallback: cover the section directly */
.about-video > video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* YouTube iframe: scale a 16:9 frame so it always covers the section (no letterboxing) */
.about-video > iframe {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw; height: 56.25vw;      /* 16:9 based on width  */
  min-width: 177.78vh; min-height: 100vh; /* 16:9 based on height */
}
.about-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.72) 100%),
    linear-gradient(180deg, rgba(8,8,8,0.85) 0%, rgba(8,8,8,0.4) 30%, rgba(8,8,8,0.4) 70%, rgba(8,8,8,0.85) 100%);
}
.about .container { position: relative; z-index: 2; }
.about-content {
  max-width: 680px;
  margin: 0 auto;
}
.about-title {
  font-family: var(--fh);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0.5rem 0 1.5rem;
}
.about-text {
  font-size: 0.92rem;
  color: var(--text2);
  line-height: 1.85;
  margin-bottom: 2.2rem;
}

/* ─── STATS ─── */
.stats { background: var(--bg2); padding: 4.5rem 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 2.5rem;
}
.stat {
  padding: 3rem 1.5rem;
  text-align: center;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.stat:last-child { border-right: none; }
.stat__icon { width: 30px; height: 30px; color: var(--text-dim); }
.stat__icon svg { width: 100%; height: 100%; }
.stat__num {
  font-family: var(--fh);
  font-size: clamp(2.6rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1;
  position: relative;
  display: inline-block;
}
.stat__num::after {
  content: '+';
  font-size: 0.55em;
  position: absolute;
  top: 0.05em;
  right: -0.65em;
  font-weight: 700;
}
.stat__label {
  font-family: var(--fh);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--text2);
  text-transform: uppercase;
}

/* ─── FEATURED CASE (homepage) ─── */
.fcase { background: var(--bg2); }
.fcase__grid {
  display: grid;
  /* медиа-колонка = ровно 50% ширины (как картинка в карточке новостей ниже),
     правый столбец со статистикой добирает остаток за вычетом зазора */
  grid-template-columns: 50% calc(50% - 4rem);
  gap: 4rem;
  align-items: center;
}
.fcase__media {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--card);
}
.fcase__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 2; }
/* интерактивное демо (iframe) вместо картинки — заполняет медиа-область 4:5 */
.fcase__demo { position: absolute; inset: 0; z-index: 3; }
.fcase__demo-stage { position: absolute; inset: 0; }
.fcase__ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(80,80,80,0.18) 0%, transparent 60%),
    linear-gradient(160deg, #0e0e0e 0%, #1a1a1a 50%, #0e0e0e 100%);
}
.fcase__ph svg { width: 72px; height: 72px; color: var(--text-dim); }
.fcase__ph span {
  font-family: var(--fh);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text3);
}
.fcase__title {
  font-family: var(--fh);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0.6rem 0 1.3rem;
}
.fcase__text {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.85;
  margin-bottom: 2.2rem;
}
.fcase__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem 2.5rem;
  margin-bottom: 2.4rem;
}
.fcase__stat .stat__num {
  font-family: var(--fh);
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  font-weight: 800;
  line-height: 1;
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
}
/* custom prefix/suffix — inline, not the superscript style used in the stats grid */
.fcase__stat .stat__num::before {
  content: attr(data-prefix);
  position: static;
  font-size: 1em;
  font-weight: 800;
}
.fcase__stat .stat__num::after {
  content: attr(data-suffix);
  position: static;
  font-size: 0.6em;
  font-weight: 700;
  vertical-align: baseline;
  margin-left: 0.06em;
}
.fcase__stat .stat__label { display: block; }
@media (max-width: 860px) {
  .fcase__grid { grid-template-columns: 1fr; gap: 2rem; }
  /* на мобильном: сначала текст «Избранный кейс…», потом — удлинённый iframe демо */
  .fcase__content { order: 1; }
  .fcase__media { order: 2; aspect-ratio: auto; height: 76vh; min-height: 480px; max-height: none; } /* высота = как у рамок в кейсах (.cd-demo__stage) */
}

/* ─── NEWS ─── */
.news { background: var(--bg); }
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.ncard {
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
  transition: border-color var(--ease), transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  cursor: pointer;
}
/* при наведении вся карточка чуть увеличивается — как на /news (.nx-card) */
.ncard:hover { border-color: var(--text); transform: scale(1.018); }
.ncard__img { height: 210px; position: relative; overflow: hidden; }
.ncard__img-inner { position: absolute; inset: 0; }
.ncard__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
/* лёгкий зум изображения при наведении — как у карточек на /news (.nx-card) */
.ncard__img-inner, .ncard__photo { transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1); }
.ncard:hover .ncard__img-inner, .ncard:hover .ncard__photo { transform: scale(1.05); }

/* News image 1 – cybersecurity / lock */
.ncard__img--1 { background: linear-gradient(145deg, #0c1018 0%, #141a28 55%, #0c1018 100%); }
.ncard__img--1 .ncard__img-inner {
  background:
    radial-gradient(circle at 50% 55%, rgba(50,70,100,0.3) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Crect x='20' y='38' width='40' height='30' rx='3' fill='none' stroke='rgba(255,255,255,0.18)' stroke-width='1.2'/%3E%3Cpath d='M28 38 V28 a12 12 0 0 1 24 0 v10' fill='none' stroke='rgba(255,255,255,0.18)' stroke-width='1.2'/%3E%3Ccircle cx='40' cy='53' r='4' fill='rgba(255,255,255,0.14)'/%3E%3C/svg%3E") center/80px no-repeat;
}

/* News image 2 – legal / columns */
.ncard__img--2 { background: linear-gradient(160deg, #0e0e0e 0%, #1a1a1a 50%, #0e0e0e 100%); }
.ncard__img--2 .ncard__img-inner {
  background:
    radial-gradient(ellipse at 50% 80%, rgba(80,80,80,0.2) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='100' viewBox='0 0 120 100'%3E%3Crect x='10' y='20' width='8' height='60' fill='rgba(255,255,255,0.07)'/%3E%3Crect x='26' y='20' width='8' height='60' fill='rgba(255,255,255,0.07)'/%3E%3Crect x='42' y='20' width='8' height='60' fill='rgba(255,255,255,0.07)'/%3E%3Crect x='58' y='20' width='8' height='60' fill='rgba(255,255,255,0.07)'/%3E%3Crect x='74' y='20' width='8' height='60' fill='rgba(255,255,255,0.07)'/%3E%3Crect x='90' y='20' width='8' height='60' fill='rgba(255,255,255,0.07)'/%3E%3Crect x='106' y='20' width='8' height='60' fill='rgba(255,255,255,0.07)'/%3E%3Crect x='5' y='16' width='110' height='6' fill='rgba(255,255,255,0.09)'/%3E%3Crect x='5' y='80' width='110' height='5' fill='rgba(255,255,255,0.09)'/%3E%3C/svg%3E") center/120px no-repeat;
}

/* News image 3 – automation / network waves */
.ncard__img--3 { background: linear-gradient(135deg, #09090f 0%, #141420 55%, #09090f 100%); }
.ncard__img--3 .ncard__img-inner {
  background:
    radial-gradient(ellipse at 60% 40%, rgba(60,60,110,0.25) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='100' viewBox='0 0 160 100'%3E%3Cpath d='M0 70 Q40 30 80 50 Q120 70 160 30' fill='none' stroke='rgba(255,255,255,0.1)' stroke-width='1'/%3E%3Cpath d='M0 80 Q40 50 80 65 Q120 80 160 50' fill='none' stroke='rgba(255,255,255,0.07)' stroke-width='1'/%3E%3Ccircle cx='80' cy='50' r='4' fill='rgba(255,255,255,0.12)'/%3E%3Ccircle cx='40' cy='40' r='3' fill='rgba(255,255,255,0.1)'/%3E%3Ccircle cx='120' cy='45' r='3' fill='rgba(255,255,255,0.1)'/%3E%3Cline x1='40' y1='40' x2='80' y2='50' stroke='rgba(255,255,255,0.1)' stroke-width='1'/%3E%3Cline x1='80' y1='50' x2='120' y2='45' stroke='rgba(255,255,255,0.1)' stroke-width='1'/%3E%3C/svg%3E") center/160px no-repeat;
}

.ncard__body { padding: 1.6rem 1.5rem; }
.ncard__date {
  display: block;
  font-family: var(--fh);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--text2);
  margin-bottom: 0.7rem;
}
.ncard__title {
  font-family: var(--fh);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 1.3rem;
  transition: color var(--ease);
}
/* hover как на обычных карточках статей (.nx-card): заголовок реагирует на наведение */
.ncard:hover .ncard__title { color: var(--text2); }
.ncard__link {
  font-family: var(--fh);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  transition: color var(--ease);
}
.ncard:hover .ncard__link { color: var(--text); }

/* ─── NEWS MARQUEE (homepage ticker) ─── */
.news-marquee {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.news-marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: news-scroll var(--news-duration, 60s) linear infinite;
}
.news-marquee .ncard {
  flex: 0 0 auto;
  width: 340px;
  margin-right: 1.5rem;
}
@keyframes news-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .news-marquee__track { animation: none; }
}

/* ─── NEWS SLIDER (homepage) ─── */
.nsl__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.nsl__nav-left { display: flex; align-items: center; gap: 1.4rem; }
.nsl__count { font-family: var(--fm); font-size: 0.72rem; letter-spacing: 0.18em; color: rgba(255,255,255,0.5); white-space: nowrap; }
.nsl__count span { color: #fff; }
.nsl { position: relative; }
.nsl__viewport { overflow: hidden; position: relative; background: var(--card); }
/* рамка — отдельным слоем ПОВЕРХ содержимого (трек слайдов не может её перекрывать);
   цвет непрозрачный (эквивалент rgba(255,255,255,0.14) на тёмном) — сквозь полупрозрачную
   линию просвечивала картинка следующего слайда, и рамка справа шла «пятнами» */
.nsl__viewport::after { content: ''; position: absolute; inset: 0; border: 1px solid #2d2f31; pointer-events: none; z-index: 6; }
.nsl__track { display: flex; will-change: transform; transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1); }
/* border-left — прозрачная «буферная» кромка: при дробной ширине контейнера слайды стоят
   на дробных координатах, и левый край СЛЕДУЮЩЕГО слайда (картинка) на долю пикселя
   заезжает в видимую зону, подмешивая свой цвет к серому фону текущего слайда на стыке.
   С буфером в этой полосе прозрачность (тёмный фон карточки) — заезд невидим. */
.nslide { flex: 0 0 100%; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; border-left: 1px solid transparent; }
.nslide__media { position: relative; overflow: hidden; min-height: 672px; display: block; background: linear-gradient(160deg, #0e0e0e 0%, #1a1a1a 50%, #0e0e0e 100%); }
.nslide__media::before { content: ''; position: absolute; inset: 0; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.045) 0 2px, transparent 2px 12px); }
.nslide__cat-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--fm); font-size: 0.7rem; letter-spacing: 0.18em; color: var(--text3); }
.nslide__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.nslide__body { padding: 2.8rem 3rem; display: flex; flex-direction: column; justify-content: center; }
.nslide__meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.nslide__cat { font-family: var(--fh); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text2); }
.nslide__date { font-family: var(--fm); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--text3); }
.nslide__title { font-family: var(--fh); font-size: clamp(1.3rem, 2vw, 1.75rem); font-weight: 700; line-height: 1.25; margin: 0 0 1.1rem; }
.nslide__title a { color: inherit; transition: color var(--ease); }
.nslide__title a:hover { color: var(--text-dim); }
.nslide__excerpt { font-size: 0.9rem; line-height: 1.75; color: var(--text2); margin: 0 0 1.9rem; max-width: 46ch; }
.nslide__link { font-family: var(--fh); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); align-self: flex-start; transition: color var(--ease); }
.nslide__link:hover { color: var(--text); }
/* ховер: растёт ВЕСЬ вьюпорт слайдера (рамка + контент вместе), как карточка в
   ленте /news — а не только контент внутри неподвижной рамки. Вьюпорт не в
   overflow-контейнере, поэтому растёт наружу без обрезки. will-change → GPU-слой,
   текст не дрожит при scale. */
.nsl__viewport { transition: transform 0.45s cubic-bezier(0.22,0.61,0.36,1); will-change: transform; backface-visibility: hidden; cursor: pointer; }
/* цвет рамки на ховере НЕ меняем — смена цвета в связке с scale давала мерцание/дрожь
   рамки. Оставляем только рост карточки. */
.nsl__viewport:hover { transform: scale(1.01); }
.nsl__nav { display: flex; justify-content: space-between; align-items: center; margin-top: 1.6rem; }
.nsl__dots { display: flex; align-items: center; gap: 0.5rem; }
/* секция новостей тёмная — фиксированные бело-серые цвета (как у .hero__bar),
   а не var(--border-h)/var(--text): иначе в тёмной палитре оба = #fff и все полоски белые */
.nsl__dot { width: 28px; height: 2px; padding: 0; border: none; background: rgba(255,255,255,0.25); cursor: pointer; transition: all 0.4s ease; }
.nsl__dot.is-active { width: 56px; background: #fff; }
.nsl__arrows { display: flex; gap: 0.7rem; }
.nsl__arr { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.22); background: none; color: var(--text2); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color var(--ease), color var(--ease), transform var(--ease); }
.nsl__arr svg { width: 20px; height: 20px; }
.nsl__arr:hover { border-color: var(--text); color: var(--text); transform: translateY(-2px); }
@media (max-width: 760px) {
  .nslide { grid-template-columns: 1fr; }
  .nslide__media { min-height: 0; aspect-ratio: 16 / 10; }
  .nslide__body { padding: 1.8rem 1.6rem; }
}

/* ─── CTA ─── */
.cta {
  background: var(--bg2);
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 768px) {
  .cta { min-height: auto; }
}
.cta-box {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 2rem 1rem;
}
.cta-glow { display: none; }
.cta-title {
  font-family: var(--fh);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.25;
  margin-bottom: 1.1rem;
  position: relative;
}
.cta-text {
  font-size: 0.88rem;
  color: var(--text2);
  line-height: 1.75;
  margin-bottom: 2.2rem;
  position: relative;
}

/* ─── FOOTER ─── */
.footer {
  /* футер тёмный на всех страницах → «тёмный островок»: локальная тёмная палитра,
     чтобы весь текст и ховеры (var(--text)/var(--text2)) были светлыми, а не терялись. */
  --bg: #080808; --bg2: #0d0d0d; --card: #111111;
  --border: #ffffff; --border-h: #ffffff;
  --text: #ffffff; --text2: #888888; --text3: #444444;
  --text-body: rgba(255,255,255,0.78); --text-dim: rgba(255,255,255,0.45);
  color: var(--text);
  color-scheme: dark;
  background: #050505;
  border-top: 1px solid var(--border);
  padding: 4.5rem 0 2rem;
}
.footer ::selection { background: #ffffff; color: #0a0a0c; text-shadow: none; }
.footer ::-moz-selection { background: #ffffff; color: #0a0a0c; text-shadow: none; }
.footer-top {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 5rem;
  margin-bottom: 3.5rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.3rem;
}
.footer-brand__desc {
  font-size: 0.8rem;
  color: var(--text2);
  line-height: 1.75;
  margin-bottom: 1.6rem;
}
.footer-socials { display: none; }
.social {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  transition: color var(--ease);
}
.social:hover { color: var(--text); }
.social svg { width: 17px; height: 17px; }
/* VK glyph sits smaller inside its viewBox — bump it to match the others */
.footer-socials .social:first-child svg { width: 21px; height: 21px; }
.footer-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.footer-col__title {
  font-family: var(--fh);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1.3rem;
}
.footer-links li { margin-bottom: 0.65rem; }
.footer-links a, .footer-links li {
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.6;
}
.footer-links a { transition: color var(--ease); }
.footer-links a:hover { color: var(--text); }
.footer-links--contact li { margin-bottom: 0.8rem; }
.footer-bottom {
  position: relative;               /* линия-разделитель — псевдоэлементом во всю ширину экрана */
  padding-top: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--fh);
  font-size: 0.75rem;
  color: var(--text3);
  letter-spacing: 0.05em;
}
/* разделитель на всю ширину вьюпорта (как остальные полноширинные линии сайта),
   контент при этом остаётся в контейнере */
.footer-bottom::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: 100vw; height: 1px;
  transform: translateX(-50%);
  background: var(--text3);
}
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { color: var(--text3); transition: color var(--ease); }
.footer-legal a:hover { color: var(--text2); }

/* ─── PRELOADER ─── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #080808;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  transition: opacity 0.65s ease;
}
.preloader.pl-fade { opacity: 0; pointer-events: none; }

/* Минималистичный вордмарк: «Атерикс» плавно появляется, под ним «Технолоджис» */
.pl-word {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.pl-word__main {
  font-family: var(--fh);
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffffff;
  opacity: 0;
  transform: translateY(12px);
  animation: plRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}
.pl-word__sub {
  font-family: var(--fh);
  font-size: clamp(0.6rem, 1.6vw, 0.78rem);
  font-weight: 400;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  text-indent: 0.5em;            /* компенсация трекинга, чтобы текст был по центру */
  color: rgba(255, 255, 255, 0.42);
  opacity: 0;
  transform: translateY(10px);
  animation: plRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards;
}
@keyframes plRise { to { opacity: 1; transform: none; } }

/* ─── ACTIVE NAV ─── */
.nav__link.active { color: var(--text); }
.nav__link.active::after { width: 100%; }

/* ─── MODAL ─── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 0.4s;
}
.modal.open {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s linear 0s;
}
.modal__bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  cursor: pointer;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, -webkit-backdrop-filter 0.4s ease;
}
.modal.open .modal__bg {
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal__wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.modal.open .modal__wrap { opacity: 1; transform: none; }
.modal__box {
  background: #0f0f0f;
  border: 1px solid var(--border-h);
  padding: 3rem 2.8rem;
  position: relative;
  color: var(--text);
}
.modal__close {
  position: absolute;
  top: 1.2rem; right: 1.2rem;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: all var(--ease);
}
.modal__close:hover { color: var(--text); border-color: var(--text2); }
.modal__close svg { width: 16px; height: 16px; }
.modal__title {
  font-family: var(--fh);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 0.3rem 0 0.7rem;
}
.modal__sub {
  font-size: 0.85rem;
  color: var(--text2);
  margin-bottom: 2rem;
  line-height: 1.7;
}
.modal__sub a { color: var(--text); transition: opacity var(--ease); }
.modal__sub a:hover { opacity: 0.7; }
/* Контактная модалка — всегда тёмная карточка (как герой на главной).
   В светлой теме восстанавливаем тёмную палитру внутри неё, иначе тёмный текст
   ложится на тёмный фон #0f0f0f и становится нечитаемым. */
html[data-theme="light"] .modal {
  --bg: #080808; --bg2: #0d0d0d; --card: #111111; --card-h: #161616;
  /* обводки полей формы — мягкие, чтобы не были резко-белыми на тёмном */
  --border: rgba(255,255,255,0.22); --border-h: rgba(255,255,255,0.22);
  --text: #ffffff; --text2: #888888; --text3: #444444;
  --text-body: rgba(255,255,255,0.78); --text-dim: rgba(255,255,255,0.45);
  color-scheme: dark;
}
html[data-theme="light"] .modal .btn--outline { border-color: rgba(255,255,255,0.4); color: var(--text); }
html[data-theme="light"] .modal .btn--outline:hover { color: var(--bg); }
html[data-theme="light"] .modal .consent a { border-bottom-color: #ffffff; }
html[data-theme="light"] .modal .consent input { border-color: rgba(255,255,255,0.32); }
/* кастомный select внутри тёмной модалки — держим тёмным и в светлой теме */
html[data-theme="light"] .modal .cselect__trigger { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.22); }
html[data-theme="light"] .modal .cselect__panel { background: #181818; border-color: rgba(255,255,255,0.22); scrollbar-color: rgba(255,255,255,0.22) transparent; }
html[data-theme="light"] .modal .cselect__panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.22); background-clip: padding-box; }

/* Главная: разделы «Аегис CRM» (#about) и «Последние новости» (#news) остаются тёмными
   и в светлой теме — с нашей картой и белым текстом. Локально возвращаем тёмную палитру. */
html[data-theme="light"] #about,
html[data-theme="light"] #news {
  --bg: #080808; --bg2: #0d0d0d; --card: #111111; --card-h: #161616;
  --border: #ffffff; --border-h: #ffffff;
  --text: #ffffff; --text2: #888888; --text3: #444444;
  --text-body: rgba(255,255,255,0.78); --text-dim: rgba(255,255,255,0.45);
  color: var(--text);
  color-scheme: dark;
}
html[data-theme="light"] #about .hero__map { display: block; }
html[data-theme="light"] #about .btn--outline { border-color: #ffffff; color: var(--text); }
html[data-theme="light"] #about .btn--outline:hover { color: var(--bg); }
html[data-theme="light"] .modal .cselect__opt:hover, html[data-theme="light"] .modal .cselect__opt.is-active { background: rgba(255,255,255,0.06); color: #fff; }
html[data-theme="light"] .modal .cselect__opt.is-selected { color: #fff; }


/* ─── CONTACT FORM ─── */
.cform__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.cform__group { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1rem; }
.cform__row .cform__group { margin-bottom: 0; }
.cform__label {
  font-family: var(--fh);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text2);
  text-transform: uppercase;
}
.cform__input {
  background: var(--card);
  border: 1px solid var(--border-h);
  color: var(--text);
  font-family: var(--fb);
  font-size: 0.85rem;
  padding: 0.85rem 1rem;
  width: 100%;
  transition: border-color var(--ease);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}
.cform__input:focus { border-color: var(--text-dim); }
.cform__input::placeholder { color: var(--text-dim); }
.cform__input option { background: #111; color: var(--text); }

/* ─── кастомный select (стилизованный дропдаун под наш стиль) ─── */
.cselect { position: relative; width: 100%; }
.cselect__native { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.cselect__trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  width: 100%; text-align: left; cursor: pointer;
  background: rgba(255,255,255,0.03);
  border: 1px solid #ffffff;
  color: var(--text); font-family: var(--fb); font-size: 0.85rem; line-height: normal;
  padding: 0.85rem 1rem; transition: border-color var(--ease);
}
.cselect__trigger:focus-visible { outline: none; border-color: var(--text-dim); }
.cselect.is-open .cselect__trigger { border-color: var(--text-dim); }
.cselect__trigger.is-placeholder { color: var(--text-dim); }
.cselect__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect__arrow { flex-shrink: 0; display: inline-flex; color: var(--text-dim); transition: transform 0.25s ease; }
.cselect.is-open .cselect__arrow { transform: rotate(180deg); }
.cselect__panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: #181818; border: 1px solid #ffffff;
  max-height: 248px; overflow-y: auto;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.22) transparent;
}
.cselect__panel::-webkit-scrollbar { width: 9px; }
.cselect__panel::-webkit-scrollbar-track { background: transparent; }
.cselect__panel::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18); border-radius: 6px;
  border: 2px solid transparent; background-clip: padding-box;
}
.cselect__panel::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); background-clip: padding-box; }
.cselect.is-open .cselect__panel { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cselect__opt {
  padding: 0.7rem 1rem; font-size: 0.85rem; color: var(--text-dim);
  cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
}
.cselect__opt:hover, .cselect__opt.is-active { background: rgba(255,255,255,0.06); color: #fff; }
.cselect__opt.is-selected { color: #fff; }
html[data-theme="light"] .cselect__trigger { background: #f2f2f2; border-color: #0a0a0c; }
html[data-theme="light"] .cselect__panel { background: #f2f2f2; border-color: #0a0a0c; scrollbar-color: rgba(0,0,0,0.28) transparent; }
html[data-theme="light"] .cselect__panel::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.22); background-clip: padding-box; }
html[data-theme="light"] .cselect__panel::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.35); background-clip: padding-box; }
html[data-theme="light"] .cselect__opt:hover, html[data-theme="light"] .cselect__opt.is-active { background: rgba(0,0,0,0.05); color: #000; }
html[data-theme="light"] .cselect__opt.is-selected { color: #000; }
.cform__ta { resize: none; min-height: 140px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.28) transparent; }
/* убираем прямоугольный трек нативного скроллбара — остаётся только тонкий ползунок */
.cform__ta::-webkit-scrollbar { width: 8px; }
.cform__ta::-webkit-scrollbar-track { background: transparent; }
.cform__ta::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.28); border-radius: 4px; border: 2px solid transparent; background-clip: padding-box; }
.cform__ta::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.45); background-clip: padding-box; }
.cform__count { margin-top: 0.4rem; text-align: right; font-size: 0.72rem; letter-spacing: 0.05em; color: var(--text-dim); }
.btn--block { width: 100%; text-align: center; margin-top: 0.5rem; }
.cform__success {
  display: none;
  text-align: left;
  padding: 0;
}
.cform__success.show { display: block; }
/* после отправки шапка модалки (лейбл/заголовок/подпись) лишняя — прячем; подтверждение само повторяет её стиль */
.modal__box.is-sent .section-label,
.modal__box.is-sent .modal__title,
.modal__box.is-sent .modal__sub { display: none; }
/* галочку убрали — экран успеха оформлен как шапка: кикер + крупный заголовок + текст + кнопка во всю ширину */
.cform__tick { display: none; }
.cform__success::before {
  content: "ГОТОВО";
  display: block;
  font-family: var(--fh);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--text2);
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.cform__success h3 {
  font-family: var(--fh);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 0.3rem 0 0.7rem;
}
.cform__success p { font-size: 0.85rem; color: var(--text2); line-height: 1.7; margin-bottom: 2rem; }
.cform__success .btn { width: 100%; }

@media (max-width: 600px) {
  .cform__row { grid-template-columns: 1fr; }
  .modal__box { padding: 2.2rem 1.4rem; }
}

/* ─── SCROLL REVEAL ─── */
/* Прозрачность задаётся из JS (scroll-linked fade). Короткий transition сглаживает резкие
   скачки при быстрой прокрутке — opacity мягко «догоняет» позицию, не выглядит грубо. */
/* scroll-linked fade ВРЕМЕННО ОТКЛЮЧЕН → блоки всегда видимы (opacity:1).
   Чтобы вернуть эффект — поставить opacity:0 и раскомментировать IIFE в script.js. */
[data-reveal] { opacity: 1; will-change: opacity; transition: opacity 0.4s ease-out; }
/* Правило [data-reveal] выше глушит transition до одного opacity. У карточек .ncard
   (в т.ч. с data-reveal) возвращаем плавный переход border/transform — иначе hover-scale
   срабатывает рывком. Ставим после [data-reveal], чтобы выиграть по порядку каскада. */
.ncard { transition: border-color var(--ease), transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1); }

/* ─── RESPONSIVE: 1024px ─── */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .scard { border-bottom: 1px solid var(--border); }
  .scard:nth-child(2) { border-right: none; }
  .scard:nth-child(3) { border-bottom: none; }
  .scard:nth-child(4) { border-right: none; border-bottom: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(3) { border-bottom: none; }
  .stat:nth-child(4) { border-right: none; border-bottom: none; }
  .stat { border-bottom: 1px solid var(--border); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .ncard:last-child { grid-column: 1 / -1; max-width: 50%; }
  .footer-top { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-nav { grid-template-columns: repeat(4, 1fr); }
}

/* ─── RESPONSIVE: 995px — мобильная навигация (бургер) ───
   Брейкпоинт выше общего мобильного: между 768 и 995px пунктам шапки уже тесно —
   они переносились на две строки и обрезались. Остальная адаптация — ниже, на 768px. */
@media (max-width: 995px) {
  /* Mobile nav — полноэкранная панель: «НАВИГАЦИЯ» + разделы + «ПОСЛЕДНИЕ НОВОСТИ» */
  .nav__burger { display: flex; }
  .nav__menu {
    position: fixed;
    top: 0; right: -100%;
    width: 100%;
    height: 100vh; height: 100dvh;
    background: #060606;
    padding: 5.5rem 1.5rem 2.5rem;
    transition: right var(--ease);
    z-index: 150;
    overflow-y: auto;
    overscroll-behavior: contain;   /* скролл внутри панели не «протекает» на страницу позади */
    scrollbar-width: none;          /* Firefox: без системной полосы прокрутки */
    -ms-overflow-style: none;       /* старый Edge */
  }
  .nav__menu::-webkit-scrollbar { width: 0; height: 0; display: none; } /* WebKit/Blink */
  .nav__menu.open { right: 0; }
  /* при открытой панели логотип хедера остаётся видимым поверх неё и белым —
     как в обычном хедере, только на тёмном фоне (панель z-index 150, бургер 200) */
  .header.mnav-open .nav__logo { position: relative; z-index: 160; color: #ffffff; }
  /* ссылки появляются по очереди сверху вниз, слегка въезжая слева направо */
  .nav__menu .mnav-label,
  .nav__menu .nav__list > li,
  .nav__menu .mnav-news { opacity: 0; transform: translateX(-16px); transition: opacity 0.32s ease, transform 0.32s ease; }
  .nav__menu.open .mnav-label { opacity: 1; transform: none; transition-delay: 0.10s; }
  .nav__menu.open .nav__list > li:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.16s; }
  .nav__menu.open .nav__list > li:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.22s; }
  .nav__menu.open .nav__list > li:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.28s; }
  .nav__menu.open .nav__list > li:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.34s; }
  .nav__menu.open .nav__list > li:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.40s; }
  .nav__menu.open .nav__list > li:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.46s; }
  .nav__menu.open .nav__list > li:nth-child(7) { opacity: 1; transform: none; transition-delay: 0.52s; }
  .nav__menu.open .nav__list > li:nth-child(8) { opacity: 1; transform: none; transition-delay: 0.58s; }
  .nav__menu.open .mnav-news { opacity: 1; transform: none; transition-delay: 0.66s; }
  .nav__list { flex-direction: column; align-items: flex-start; gap: 1.35rem; }
  /* размер, вес и трекинг — ровно как у ссылок обычного хедера */
  .nav__menu .nav__link { font-size: 0.92rem; font-family: var(--fh); font-weight: 400; letter-spacing: normal; color: #f4f5f7; }
  .nav__menu .theme-toggle { color: #f4f5f7; }
  /* метка «НАВИГАЦИЯ» над списком */
  .mnav-label {
    display: block;
    font-family: var(--fm); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    border-top: 1px solid rgba(255,255,255,0.16);
    padding-top: 1.1rem; margin-bottom: 2rem;
  }
  /* блок «ПОСЛЕДНИЕ НОВОСТИ» внизу панели */
  .mnav-news { display: block; margin-top: 2.6rem; border-top: 1px solid rgba(255,255,255,0.16); padding-top: 1.1rem; }
  .mnav-news__head {
    display: flex; justify-content: space-between; align-items: center;
    font-family: var(--fm); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: rgba(255,255,255,0.45); margin-bottom: 1.5rem;
  }
  .mnav-news__head a { color: #f4f5f7; text-decoration: underline; text-underline-offset: 3px; transition: color var(--ease); }
  .mnav-news__head a:hover { color: rgba(255,255,255,0.6); }
  /* есть место (широкая панель) → две карточки в ряд; узкий экран → в колонку.
     auto-fit + minmax сам решает по доступной ширине, без жёсткого брейкпоинта.
     align-items: stretch (по умолчанию) + flex-колонка карточки → одинаковая высота. */
  .mnav-news__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem 1.6rem; }
  .mnav-card { display: flex; flex-direction: column; height: 100%; color: #f4f5f7; }
  .mnav-card__meta { display: block; font-family: var(--fm); font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 0.7rem; }
  /* обложка — фиксированное 16:9, зум картинки при наведении (как у карточек новостей) */
  .mnav-card__cover { display: block; position: relative; aspect-ratio: 16/9; overflow: hidden; border: 1px solid rgba(255,255,255,0.14); background: #111; margin-bottom: 0.85rem; }
  .mnav-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; border: 0; transition: transform 0.55s cubic-bezier(0.22,0.61,0.36,1); }
  .mnav-card:hover .mnav-card__cover img { transform: scale(1.05); }
  .mnav-card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; /* резерв под 2 строки — анонсы и «Читать» на одном уровне */ font-family: var(--fh); font-weight: 600; font-size: 1.02rem; line-height: 1.45; margin-bottom: 0.55rem; transition: color var(--ease); }
  .mnav-card:hover .mnav-card__title { color: rgba(255,255,255,0.6); }
  .mnav-card__excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.2em; /* резерв под 2 строки */ font-family: var(--fb); font-size: 0.82rem; line-height: 1.6; color: rgba(255,255,255,0.5); margin: 0 0 0.9rem; }
  .mnav-card__more { display: inline-block; margin-top: auto; font-family: var(--fm); font-size: 0.62rem; letter-spacing: 0.12em; color: #f4f5f7; text-decoration: underline; text-underline-offset: 3px; transition: color var(--ease); }
  .mnav-card:hover .mnav-card__more { color: rgba(255,255,255,0.6); }
  /* ссылки-разделы в панели: наш ховер (подчёркивание-слайд), но в белом — базовый
     .nav__link:hover красит в var(--text)=тёмный и не виден на тёмной панели */
  .nav__menu .nav__link:hover { color: #f4f5f7; }
  .nav__menu .nav__link::after { background: #f4f5f7; }
}

/* ─── RESPONSIVE: 768px ─── */
@media (max-width: 768px) {
  .container { padding: 0 1.5rem; }
  .section { padding: 4rem 0; }

  /* Hero (slider) */
  .hero__slide {
    justify-content: center;
    padding-top: 5rem;
    padding-bottom: 6rem;
  }
  .hero__content { padding: 0 1.5rem; }
  .hero__eyebrow { font-size: 0.58rem; letter-spacing: 0.26em; margin-bottom: 1.1rem; }
  .hero__eyebrow::before { width: 20px; }
  .hero__title {
    font-size: clamp(2rem, 8.5vw, 3rem);
    min-height: 0;
    display: block;
    margin-bottom: 1.1rem;
  }
  .hero__sub {
    font-size: 1rem;
    min-height: 0;
    line-height: 1.6 !important;
    margin-bottom: 1.6rem;
    max-width: 100% !important;
  }
  .hero__actions { gap: 0.7rem; }
  .hero__actions .btn--hero { padding: 0.85rem 1.4rem; font-size: 0.72rem; }
  .hero__nav { bottom: 1.4rem; gap: 1rem; padding: 0 1.5rem; }
  .hero__bar { width: 20px; }
  .hero__bar.active { width: 36px; }
  .hero__count { font-size: 0.66rem; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; }
  .scard { border-right: none; border-bottom: 1px solid var(--border); }
  .scard:last-child { border-bottom: none; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* News */
  .news-grid { grid-template-columns: 1fr; }
  .ncard:last-child { grid-column: auto; max-width: 100%; }
  .news-marquee .ncard { width: 280px; margin-right: 1.1rem; }

  /* CTA */
  .cta-box { padding: 1.5rem 0.8rem; }

  /* Footer */
  .footer-nav { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

/* ─── RESPONSIVE: 480px ─── */
@media (max-width: 480px) {
  .container { padding: 0 1.2rem; }
  .hero__title { font-size: clamp(1.8rem, 8.2vw, 2.6rem); }
  .hero__slide { padding-top: 4.5rem; padding-bottom: 5.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-nav { grid-template-columns: repeat(2, 1fr); }
  .cta-box { padding: 1.2rem 0.6rem; }
  .cta-title { font-size: 1.3rem; }
}

/* ─── PAGE TRANSITIONS (плавная смена страниц) ─── */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.42s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
/* Fallback for browsers without cross-document view transitions: gentle fade-in */
@supports not (view-transition-name: none) {
  body { animation: olPageIn 0.42s ease both; }
  @keyframes olPageIn { from { opacity: 0; } to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ─── Главная: «Отобранные проекты» (кейсы) ─────────────────────── */
.cw-head { display:block; }
.cw-eyebrow { font-family:var(--fm); font-size:.66rem; letter-spacing:.22em; text-transform:uppercase; color:var(--text3); margin-bottom:1.4rem; }
.cw-title { font-family:var(--fh); font-weight:700; letter-spacing:-.02em; line-height:1.02; font-size:clamp(2.2rem,5vw,3.6rem); margin:0; text-transform:uppercase; }
.cw-intro { font-size:.95rem; line-height:1.65; color:var(--text2); margin:0; max-width:42ch; }
.cw-meta { display:flex; gap:1.6rem; flex-wrap:wrap; margin-top:2.4rem; padding-bottom:1.4rem; border-bottom:1px solid var(--border); font-family:var(--fm); font-size:.66rem; letter-spacing:.14em; text-transform:uppercase; color:var(--text3); }
.cw-meta .cw-sep { color:var(--border-h); }
.cw-note { margin-top:2rem; padding-bottom:1.7rem; border-bottom:1px solid var(--border); max-width:780px; font-size:.92rem; line-height:1.75; color:var(--text2); }

.cw-filter { display:flex; align-items:flex-start; gap:2rem; padding:1.4rem 0; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.cw-filter__lbl { font-family:var(--fm); font-size:.66rem; letter-spacing:.16em; text-transform:uppercase; color:var(--text3); padding-top:.4rem; }
.cw-filter__btns { display:flex; gap:1.8rem; flex-wrap:wrap; }
.cw-fbtn { background:none; border:none; padding:0 0 .5rem; cursor:pointer; font-family:var(--fm); font-size:.72rem; letter-spacing:.12em; text-transform:uppercase; color:var(--text3); border-bottom:1px solid transparent; transition:color var(--ease),border-color var(--ease); display:inline-flex; align-items:baseline; gap:.4rem; }
.cw-fbtn i { font-style:normal; font-size:.56rem; color:var(--text3); }
.cw-fbtn:hover { color:var(--text); }
.cw-fbtn.is-active { color:var(--text); border-bottom-color:var(--text); }

.cw-row { position:relative; display:grid; grid-template-columns:64px minmax(0,1.5fr) minmax(0,1.1fr) 180px; gap:1.8rem; align-items:start; padding:2.85rem 0; border-bottom:1px solid var(--border); transition:transform .18s ease, background .18s ease, box-shadow .18s ease; }
.cw-row:hover { transform:translateX(10px); background:var(--card); box-shadow:inset 3px 0 0 var(--text); }
/* растянутая ссылка: клик по строке открывает кейс, кнопка демо — поверх неё */
.cw-row__cover { position:absolute; inset:0; z-index:1; cursor:pointer; }
.cw-row__num, .cw-row__main, .cw-row__stack { position:relative; z-index:1; pointer-events:none; }
.cw-row__main a, .cw-row__stack a { pointer-events:auto; }
.cw-row__num { font-family:var(--fh); font-size:2.2rem; font-weight:700; letter-spacing:-.02em; line-height:.9; color:var(--text); }
.cw-row__ind { font-family:var(--fm); font-size:.62rem; letter-spacing:.2em; text-transform:uppercase; color:var(--text3); margin-bottom:.7rem; }
.cw-row__title { font-family:var(--fh); font-size:1.25rem; font-weight:600; letter-spacing:-.01em; line-height:1.2; margin:0 0 .6rem; }
.cw-row__lead { font-size:.86rem; line-height:1.55; color:var(--text2); margin:0; max-width:48ch; }
.cw-row__stack { display:flex; flex-wrap:wrap; gap:.35rem; align-self:center; }
.cw-row__stack span { font-family:var(--fm); font-size:.6rem; letter-spacing:.03em; color:var(--text2); border:1px solid var(--border); padding:.18rem .5rem; white-space:nowrap; }
.cw-row__demo { display:flex; align-items:center; align-self:center; }
/* как .btn--outline: прямоугольная, острые углы, на ховере заливается тёмным с белым текстом */
.cw-go {
  position:relative; z-index:2; cursor:pointer; text-decoration:none;
  display:inline-flex; align-items:center; gap:.55rem; align-self:flex-start; white-space:nowrap;
  font-family:var(--fm); font-size:.6rem; letter-spacing:.16em; text-transform:uppercase;
  color:var(--text); padding:.72rem 1.1rem; border:1px solid rgba(0,0,0,.45);
  background:transparent;
  transition:background var(--ease), color var(--ease), border-color var(--ease);
}
.cw-go__arr { width:14px; height:14px; flex-shrink:0; transition:transform var(--ease); }
.cw-go:hover { background:var(--text); color:var(--bg); border-color:var(--text); }
.cw-go:hover .cw-go__arr { transform:translateX(3px); }

.cw-cta { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2.5rem; align-items:center; padding:4rem 0 0; }
.cw-cta__txt { font-size:1rem; line-height:1.55; color:var(--text2); margin:.8rem 0 0; max-width:52ch; }

@media (max-width:900px) {
  .cw-head { grid-template-columns:1fr; gap:1.4rem; align-items:start; }
  .cw-cta { grid-template-columns:1fr; gap:1.4rem; align-items:start; }
}
@media (max-width:760px) {
  .cw-row { grid-template-columns:1fr; gap:.9rem; padding:1.6rem 0; }
  .cw-row__num { font-size:1.6rem; }
}

/* ─── Раздел «Кейсы»: детальная страница кейса ──────────────────── */
.cd-back { font-family:var(--fm); font-size:.66rem; letter-spacing:.16em; text-transform:uppercase; color:var(--text3); background:none; border:none; cursor:pointer; padding:0; transition:color var(--ease); display:inline-block; margin-bottom:2.5rem; }
.cd-back:hover { color:var(--text); }
.cd-case { scroll-margin-top:96px; padding-top:5rem; margin-top:5rem; border-top:1px solid var(--border); }
.cd-case:first-of-type { padding-top:0; margin-top:0; border-top:none; position:relative; }
.cn-rail { position:absolute; top:-2px; right:0; z-index:4; }
.cn-nav { display:flex; justify-content:flex-end; align-items:flex-start; gap:1.8rem; }
.cn-link { display:inline-flex; flex-direction:column; align-items:flex-end; gap:.7rem; color:var(--text); text-decoration:none; max-width:180px; }
.cn-svg { display:block; color:var(--text); transition:transform var(--ease); }
.cn-link--next .cn-svg { width:118px; height:24px; }
.cn-link--prev .cn-svg { width:60px; height:18px; color:var(--text2); }
.cn-link--next:hover .cn-svg { transform:translateX(8px); }
.cn-link--prev:hover .cn-svg { transform:translateX(-8px); }
.cn-link__cap { font-family:var(--fm); font-size:.64rem; letter-spacing:.18em; text-transform:uppercase; color:var(--text); }
.cn-link--prev .cn-link__cap { color:var(--text2); font-size:.58rem; }
.cn-link__name { font-family:var(--fm); font-size:.62rem; letter-spacing:.02em; color:var(--text3); text-align:right; line-height:1.35; }
/* Имя следующего кейса переносим в пределах ширины стрелки (118px), чтобы длинное
   название не растягивало ссылку и не сдвигало кнопку «Назад» влево — позиция «Назад»
   остаётся одинаковой на всех кейсах независимо от длины названия. */
.cn-link--next .cn-link__name { max-width:118px; }
.cn-link--prev .cn-link__name { display:none; }
.cn-link:hover .cn-link__cap { color:var(--text); }
.cn-link--prev:hover .cn-link__cap { color:var(--text); }
@media (max-width:980px){
  .cn-rail { position:static; }
  .cn-nav { justify-content:flex-end; margin-bottom:2.4rem; }
}
@media (max-width:700px){
  .cn-nav { gap:1.4rem; }
  .cn-link { max-width:150px; }
  .cn-link--next .cn-svg { width:84px; }
  .cn-link__name { display:none; }
}
.cd-caseno { font-family:var(--fm); font-size:.66rem; letter-spacing:.2em; text-transform:uppercase; color:var(--text3); margin-bottom:1.8rem; }
.cd-hero { display:grid; grid-template-columns:auto minmax(0,1fr); gap:2.5rem; align-items:start; padding-bottom:2.6rem; border-bottom:1px solid var(--border); }
.cd-hero__num { font-family:var(--fh); font-size:clamp(4rem,9vw,6.5rem); font-weight:700; line-height:.82; letter-spacing:-.04em; color:var(--text); }
.cd-hero__ind { font-family:var(--fm); font-size:.66rem; letter-spacing:.2em; text-transform:uppercase; color:var(--text3); margin-bottom:1rem; }
.cd-hero__title { font-family:var(--fh); font-size:clamp(1.7rem,3.4vw,2.6rem); font-weight:700; line-height:1.08; letter-spacing:-.02em; margin:0 0 1.1rem; max-width:20ch; }
.cd-hero__lead { font-size:1.05rem; line-height:1.5; color:var(--text-body); margin:0; max-width:48ch; }
.cd-status { display:inline-flex; align-items:center; gap:.5rem; font-family:var(--fm); font-size:.62rem; letter-spacing:.14em; text-transform:uppercase; margin-top:1.2rem; }
.cd-status i { width:7px; height:7px; border-radius:50%; flex-shrink:0; }
.cd-status--on { color:var(--text2); } .cd-status--on i { background:#1fbf60; box-shadow:0 0 0 3px rgba(31,191,96,.16); }
.cd-status--nda { color:var(--text3); } .cd-status--nda i { background:transparent; border:1px solid var(--text3); }

.cd-meta { display:grid; grid-template-columns:repeat(3,1fr); border-bottom:1px solid var(--border); }
.cd-meta__cell { padding:1.4rem 1.4rem 1.4rem 0; border-top:1px solid var(--border); }
.cd-meta__k { font-family:var(--fm); font-size:.6rem; letter-spacing:.16em; text-transform:uppercase; color:var(--text3); margin-bottom:.5rem; }
.cd-meta__v { font-size:.95rem; color:var(--text); }

.cd-block { padding:2.6rem 0; border-bottom:1px solid rgba(10,10,12,.5); }
.cd-block:last-child { border-bottom:none; }
.cd-block__lbl { display:block; margin-bottom:1.6rem; font-family:var(--fm); font-size:.66rem; letter-spacing:.14em; text-transform:uppercase; color:var(--text3); }
.cd-block__txt { font-size:1.02rem; line-height:1.62; color:var(--text-body); margin:0; max-width:62ch; }
.cd-func { position:relative; display:grid; grid-template-columns:48px minmax(0,1fr); gap:1rem; padding:.9rem 0; align-items:baseline; }
.cd-func::before { content:''; position:absolute; top:0; left:0; width:50%; height:1px; background:rgba(10,10,12,.5); transform:scaleY(.5); transform-origin:top; }
.cd-func:first-child { padding-top:0; }
.cd-func:first-child::before { display:none; }
.cd-func__n { font-family:var(--fm); font-size:.7rem; color:var(--text3); }
.cd-func__t { font-size:.95rem; line-height:1.5; color:var(--text); }
.cd-stack { display:flex; flex-wrap:wrap; gap:.5rem; }
.cd-stack span { font-family:var(--fm); font-size:.7rem; letter-spacing:.02em; color:var(--text2); border:1px solid var(--border); padding:.4rem .7rem; }
.cd-results { display:grid; grid-template-columns:repeat(2,1fr); border-top:1px solid var(--border); border-left:1px solid var(--border); }
.cd-results__cell { padding:1.6rem 1.6rem 1.7rem; border-bottom:1px solid var(--border); border-right:1px solid var(--border); }
.cd-results__v { font-family:var(--fh); font-size:2rem; font-weight:700; letter-spacing:-.02em; line-height:1; margin-bottom:.7rem; }
.cd-results__l { font-family:var(--fm); font-size:.6rem; letter-spacing:.13em; text-transform:uppercase; color:var(--text3); line-height:1.45; }
.cd-shots { display:grid; grid-template-columns:1fr 1fr; gap:1.2rem; }
.cd-shots--inline { margin-top:1.8rem; }
.cc-viewport { overflow:hidden; border:1px solid var(--border); background:var(--card); }
.cc-track { display:flex; transition:transform .55s cubic-bezier(.4,0,.2,1); will-change:transform; }
.cc-slide { flex:0 0 100%; min-width:0; }
.cc .cd-shot__ph { height:clamp(380px,52vw,680px); }
.cd-shot__img { display:block; width:100%; height:clamp(380px,52vw,680px); object-fit:cover; }
/* кнопка «Редактировать» на странице статьи (видна только админу) — белое свечение + перелив */
.a-edit { position:relative; overflow:hidden; display:inline-flex; align-items:center; gap:.45rem; font-family:var(--fm); font-size:.6rem; letter-spacing:.16em; text-transform:uppercase; color:#fff; text-decoration:none; background:#141414; border:1px solid #141414; padding:.32rem .7rem; border-radius:3px; vertical-align:middle; transition:color var(--ease),background-color var(--ease),border-color var(--ease); }
.a-edit__pen { font-size:.9em; line-height:1; }
.a-edit::after { content:''; position:absolute; inset:0; background:linear-gradient(110deg,transparent 35%,rgba(255,255,255,.4) 50%,transparent 65%); transform:translateX(-130%); animation:aEditSweep 3.4s ease-in-out infinite; pointer-events:none; }
.a-edit:hover { background:#000; color:#fff; border-color:#000; }
@keyframes aEditSweep { 0% { transform:translateX(-130%); } 60%,100% { transform:translateX(130%); } }
@media (prefers-reduced-motion: reduce){ .a-edit::after { display:none; } }
/* интерактивное демо (iframe) */
.cd-demo__stage { position:relative; aspect-ratio:16/9; overflow:hidden; background:var(--card); }
.cd-demo__facade { position:absolute; inset:0; z-index:2; background:var(--card) center/cover no-repeat; display:flex; align-items:center; justify-content:center; transition:opacity .6s ease; }
.cd-demo__facade.is-hiding { opacity:0; pointer-events:none; }
.cd-demo__facade.has-poster::before { content:''; position:absolute; inset:0; background:rgba(0,0,0,.45); }
.cd-demo__play { position:relative; z-index:1; display:inline-flex; align-items:center; gap:.7rem; font-family:var(--fm); font-size:.7rem; letter-spacing:.14em; text-transform:uppercase; color:#fff; background:#0a0a0a; border:1px solid rgba(255,255,255,.6); padding:1rem 1.5rem; cursor:pointer; transition:color var(--ease),background-color var(--ease),border-color var(--ease),transform var(--ease); }
.cd-demo__play:hover { background:#fff; color:#000; border-color:#fff; transform:translateY(-2px); }
.cd-demo__ic { font-size:.8em; color:#fff; transition:color var(--ease); }
.cd-demo__play:hover .cd-demo__ic { color:#000; }
/* закрытое демо: тот же вид кнопки, но без интерактивного hover (не кликается) */
.cd-demo__play--closed { cursor:default; }
.cd-demo__play--closed:hover { background:#0a0a0a; color:#fff; border-color:rgba(255,255,255,.6); transform:none; }
.cd-demo__frame { position:absolute; inset:0; z-index:1; display:block; width:100%; height:100%; border:0; background:#fff; }
.cd-demo__bar { display:flex; justify-content:space-between; align-items:baseline; gap:1.4rem; margin-top:.9rem; font-family:var(--fm); font-size:.72rem; letter-spacing:.02em; color:var(--text3); line-height:1.45; }
.cd-demo__open { color:var(--text3); text-decoration:none; border-bottom:1px solid var(--border); white-space:nowrap; transition:color var(--ease), border-color var(--ease); }
.cd-demo__open:hover { color:var(--text); border-bottom-color:var(--text); }
@media (max-width:700px){ .cd-demo__bar { flex-direction:column; gap:.5rem; } }
/* мобильный/планшет: 16/9 давал ~200px высоты — демо внутри было не полистать.
   Вертикальная сцена как «телефон в телефоне», та же высота, что у избранного кейса
   на главной (.fcase__media). !important — страховка от любых поздних переопределений. */
@media (max-width:900px){
  .cd-demo__stage{ aspect-ratio:auto !important; height:76vh !important; min-height:480px !important; }
}
.cc-cap { margin-top:.9rem; font-family:var(--fm); font-size:.64rem; letter-spacing:.03em; color:var(--text3); line-height:1.45; }
.cc-ctrl { display:flex; align-items:center; gap:1.2rem; margin-top:1.2rem; }
.cc-arr { width:40px; height:40px; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; padding:0; background:none; border:1px solid var(--border); color:var(--text2); cursor:pointer; transition:color var(--ease),border-color var(--ease); }
.cc-arr svg { width:18px; height:18px; }
.cc-arr:hover { color:var(--text); border-color:var(--border-h); }
.cc-dots { display:flex; align-items:center; gap:.5rem; }
.cc-dot { width:8px; height:8px; padding:0; border-radius:50%; background:none; border:1px solid var(--text3); cursor:pointer; transition:background var(--ease),border-color var(--ease); }
.cc-dot.is-active { background:var(--text); border-color:var(--text); }
.cd-shot__frame { border:1px solid var(--border); background:var(--card); }
.cd-shot__bar { display:flex; justify-content:space-between; align-items:center; height:38px; padding:0 .9rem; border-bottom:1px solid var(--border); font-family:var(--fm); font-size:.56rem; letter-spacing:.16em; text-transform:uppercase; color:var(--text3); }
.cd-shot__ph { height:230px; display:flex; align-items:center; justify-content:center; font-family:var(--fm); font-size:.62rem; letter-spacing:.12em; text-transform:uppercase; color:var(--text3); background:repeating-linear-gradient(45deg,transparent,transparent 10px,rgba(255,255,255,.015) 10px,rgba(255,255,255,.015) 20px); }
.cd-shot__cap { margin-top:.8rem; font-family:var(--fm); font-size:.64rem; letter-spacing:.03em; color:var(--text3); line-height:1.45; }
.cd-ctabox { display:flex; justify-content:space-between; align-items:center; gap:2rem; flex-wrap:wrap; border:1px solid var(--border-h); padding:2rem 2.2rem; margin:3rem 0 1rem; }
.cd-ctabox__t { font-size:1.05rem; color:var(--text-body); display:flex; align-items:center; gap:.8rem; }
.cd-ctabox__t i { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.cd-ctabox__t.on i { background:#1fbf60; box-shadow:0 0 0 4px rgba(31,191,96,.16); }
.cd-ctabox__t.nda i { background:transparent; border:1px solid var(--text3); }

@media (max-width:900px) {
  .cd-hero { grid-template-columns:1fr; gap:1rem; }
  .cd-meta { grid-template-columns:1fr; }
  .cd-block { grid-template-columns:1fr; gap:1rem; padding:2rem 0; }
  .cd-shots { grid-template-columns:1fr; }
  .cd-ctabox { flex-direction:column; align-items:flex-start; gap:1.2rem; }
}
