/* ==========================================================================
   Акцент СПб — style.css
   Часть 1/4: переменные, сброс, типографика, контейнер, кнопки, формы
   ========================================================================== */

/* Атрибут hidden обязан скрывать: правило класса с display перебивает
   браузерное [hidden]{display:none}, и скрытый блок остаётся видимым. */
[hidden] { display: none !important; }

:root {
  /* Палитра */
  --bg: #F6F9FC;
  --bg-alt: #FFFFFF;
  --navy: #0A2540;
  --navy-2: #122C4A;
  --text: #425466;
  --text-muted: #6B7C93;
  --accent: #635BFF;
  --accent-hover: #4F46E5;
  --accent-on-dark: #948DFF;
  --amber: #FFB84D;
  --coral: #FF6D5A;
  --border: #E3E8EE;
  --white: #FFFFFF;

  /* Тени */
  --shadow-card: 0 1px 2px rgba(10,37,64,.04), 0 4px 12px rgba(10,37,64,.06), 0 16px 32px rgba(10,37,64,.08);
  --shadow-card-hover: 0 2px 4px rgba(10,37,64,.05), 0 8px 20px rgba(10,37,64,.09), 0 24px 48px rgba(10,37,64,.12);
  --shadow-sm: 0 1px 2px rgba(10,37,64,.06), 0 2px 6px rgba(10,37,64,.05);

  /* Радиусы */
  --radius-btn: 8px;
  --radius-card: 12px;
  --radius-sm: 6px;
  --radius-lg: 20px;

  /* Сетка */
  --container-max: 1200px;
  --container-pad: 24px;
  --gutter: 24px;

  /* Типографика */
  --font: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --section-space: 96px;
  --section-space-mobile: 56px;
}

/* ---- Сброс ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, picture, svg { max-width: 100%; display: block; }
img { height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--navy); font-weight: 700; letter-spacing: -0.01em; line-height: 1.18; }
p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 0; }

/* ---- Типографика ---- */
h1, .h1 { font-size: clamp(2rem, 1.6rem + 2vw, 3.25rem); font-weight: 700; }
h2, .h2 { font-size: clamp(1.6rem, 1.35rem + 1.2vw, 2.375rem); font-weight: 700; }
h3, .h3 { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem); font-weight: 600; }
h4, .h4 { font-size: 1.125rem; font-weight: 600; }
.lede { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem); color: var(--text); line-height: 1.55; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.text-muted { color: var(--text-muted); }
.numeral { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ---- Контейнер и сетка ---- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.section { padding-block: var(--section-space); }
.section--tight { padding-block: calc(var(--section-space) * 0.6); }
.section--white { background: var(--bg-alt); }
.section--bg { background: var(--bg); }
.section--navy { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #C9D4E3; }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head__title { margin-top: 10px; }
.section-head__text { margin-top: 14px; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}
.content-col { max-width: 820px; }
.content-col--narrow { max-width: 760px; }

/* ---- Кнопки ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
  border: 1.5px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.btn--primary:active { transform: translateY(0); }

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

.btn--outline-light {
  background: transparent;
  border-color: rgba(255,255,255,.42);
  color: var(--white);
}
.btn--outline-light:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.7); }

.btn--white {
  background: var(--white);
  color: var(--navy);
}
.btn--white:hover { background: #EDF1F7; transform: translateY(-2px); }

.btn--sm { padding: 10px 18px; font-size: 0.875rem; }
.btn--lg { padding: 16px 32px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--icon-only { padding: 10px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: gap .18s ease, color .18s ease;
}
.link-arrow:hover { gap: 10px; color: var(--accent-hover); }
.link-arrow .icon { transition: transform .18s ease; }

/* ---- Формы ---- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 0.8125rem; font-weight: 600; color: var(--navy); }
.field__input {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--white);
  color: var(--navy);
  font-size: 0.9375rem;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field__input::placeholder { color: #9AABC2; }
.field__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,91,255,.15); }
.field__input--textarea { resize: vertical; min-height: 90px; font-family: var(--font); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--text);
  line-height: 1.4;
}
.checkbox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checkbox__box {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: var(--white);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  margin-top: 1px;
}
.checkbox input:checked + .checkbox__box { background: var(--accent); border-color: var(--accent); color: var(--white); }
.checkbox input:focus-visible + .checkbox__box { outline: 2px solid var(--accent); outline-offset: 2px; }

select.field__input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7C93' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }

/* ---- Утилиты ---- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(99,91,255,.1);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}
.tag--navy { background: var(--navy); color: var(--white); }
.tag--amber { background: rgba(255,184,77,.16); color: #A85F00; }
.tag--coral { background: rgba(255,109,90,.14); color: #C43D2A; }

.stars { display: inline-flex; gap: 2px; color: var(--border); }
.stars__item.is-filled { color: var(--amber); }

/* ==========================================================================
   Часть 2/4: шапка, навигация, бургер, мобильное меню, футер
   ========================================================================== */

/* ---- Шапка ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--navy);
  font-family: var(--font);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(10,37,64,.25); }

.topbar { border-bottom: 1px solid rgba(255,255,255,.08); }
.topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 9px;
  font-size: 0.8125rem;
  color: #9FB0C7;
}
.topbar__info { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.topbar__item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.topbar__item .icon { color: #6F84A3; flex: 0 0 auto; }
.topbar__actions { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.topbar__phone { display: inline-flex; align-items: center; gap: 8px; color: var(--white); white-space: nowrap; }
.topbar__phone .icon { color: var(--accent); }
.topbar__phone-text { display: flex; flex-direction: column; line-height: 1.15; }
.topbar__phone-text strong { font-size: 0.9375rem; font-weight: 700; }
.topbar__phone-text small { font-size: 0.6875rem; color: #7C8FAA; font-weight: 400; }
.topbar__link { color: #C3CEE0; white-space: nowrap; transition: color .15s ease; }
.topbar__link:hover { color: var(--white); }

.navbar { position: relative; }
.navbar__row {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-block: 14px;
}

/* Логотип может ужиматься: иначе на узких экранах он вместе с кнопками шапки
   не помещается в контейнер и выдавливает горизонтальную прокрутку. */
.logo { display: flex; align-items: center; gap: 10px; flex: 0 1 auto; min-width: 0; }
.logo__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(99,91,255,.16);
  color: var(--accent);
  flex: 0 0 auto;
}
.logo__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.logo__name { font-weight: 700; font-size: 1.125rem; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo__claim { font-size: 0.6875rem; color: #7C8FAA; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo--mobile .logo__icon { width: 34px; height: 34px; }

.mainnav { flex: 1 1 auto; min-width: 0; }
.mainnav__list { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.mainnav__item { position: relative; flex: 0 0 auto; }
.mainnav__link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #D7DEEA;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color .15s ease, background-color .15s ease;
}
.mainnav__link:hover, .mainnav__item.is-active > .mainnav__link { color: var(--white); background: rgba(255,255,255,.06); }
.mainnav__item.is-active > .mainnav__link { color: var(--accent-on-dark); }
.mainnav__link .icon { transition: transform .18s ease; color: #8194B0; }
.mainnav__item.has-mega:hover .mainnav__link .icon,
.mainnav__item.has-mega:focus-within .mainnav__link .icon { transform: rotate(180deg); }

.mega {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 560px;
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card-hover);
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
  z-index: 50;
}
.mainnav__item.has-mega:hover .mega,
.mainnav__item.has-mega:focus-within .mega {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.mega__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.mega__tile {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  transition: background-color .15s ease;
}
.mega__tile:hover { background: var(--bg); }
.mega__tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(99,91,255,.1);
  color: var(--accent);
  flex: 0 0 auto;
}
.mega__tile-text { display: flex; flex-direction: column; gap: 2px; }
.mega__tile-title { font-weight: 600; color: var(--navy); font-size: 0.9375rem; }
.mega__tile-desc { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.4; }

.navbar__tools { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  color: #D7DEEA;
  transition: background-color .15s ease, color .15s ease;
}
.icon-btn:hover { background: rgba(255,255,255,.08); color: var(--white); }
.burger { display: none; }

.search-panel {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--white);
  box-shadow: var(--shadow-card-hover);
  padding-block: 18px;
}
.search-panel[hidden] { display: none; }
.search-panel__form { display: flex; align-items: center; gap: 12px; color: var(--text-muted); }
.search-panel__form input {
  flex: 1 1 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.9375rem;
  color: var(--navy);
}
.search-panel__form input:focus { outline: none; border-color: var(--accent); }

/* ---- Мобильное меню ---- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--white);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .25s ease;
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu[hidden] { display: flex; }
.mobile-menu-backdrop {
  position: fixed; inset: 0; z-index: 299;
  background: rgba(10,37,64,.5);
  opacity: 0;
  transition: opacity .25s ease;
}
.mobile-menu-backdrop.is-open { opacity: 1; }
.mobile-menu-backdrop[hidden] { display: none; }

.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--container-pad);
  border-bottom: 1px solid var(--border);
}
.mobile-menu__head .icon-btn { color: var(--navy); }
.mobile-menu__head .icon-btn:hover { background: var(--bg); }
.mobile-menu .logo__name { color: var(--navy); }
.mobile-menu .logo__icon { background: rgba(99,91,255,.1); }

.mobile-menu__phone {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px var(--container-pad) 0;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-weight: 700;
  font-size: 1.0625rem;
}
.mobile-menu__phone .icon { color: var(--accent); }

.mobile-menu__nav { padding: 8px var(--container-pad) 16px; flex: 1 1 auto; }
.accordion__item { border-bottom: 1px solid var(--border); }
.accordion__trigger, .accordion__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 15px 2px;
  font-weight: 600;
  color: var(--navy);
  font-size: 1rem;
}
.accordion__trigger .icon { color: var(--text-muted); transition: transform .2s ease; }
.accordion__trigger[aria-expanded="true"] .icon { transform: rotate(180deg); }
.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .22s ease;
}
.accordion__panel > .accordion__sublist { overflow: hidden; }
.accordion__item.is-open .accordion__panel { grid-template-rows: 1fr; }
.accordion__sublist { padding-bottom: 8px; }
.accordion__sublist li a {
  display: block;
  padding: 9px 2px 9px 14px;
  color: var(--text);
  font-size: 0.9375rem;
  border-left: 2px solid var(--border);
}
.accordion__sublist li a:hover { color: var(--accent); border-left-color: var(--accent); }

.mobile-menu__actions { display: flex; flex-direction: column; gap: 10px; padding: 8px var(--container-pad) 24px; }

/* ---- Футер: CTA «Остались вопросы?» ---- */
.cta-questions {
  position: relative;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #C9D4E3;
  padding-block: 96px;
  overflow: hidden;
}
.cta-questions__glow {
  position: absolute;
  width: 900px; height: 500px;
  right: -220px; top: -160px;
  background: linear-gradient(120deg, rgba(99,91,255,.55), rgba(255,184,77,.4) 45%, rgba(255,109,90,.4) 75%);
  filter: blur(90px);
  opacity: .55;
  pointer-events: none;
}
.cta-questions__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.cta-questions__title { color: var(--white); }
.cta-questions__text { margin-top: 14px; max-width: 440px; color: #A9B7CC; }
.cta-questions__phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--white);
}
.cta-questions__phone .icon { color: var(--accent); }
.cta-questions__email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #A9B7CC;
  font-size: 0.9375rem;
}
.cta-questions__checkbox { margin-top: 22px; color: #A9B7CC; }
.cta-questions__checkbox .checkbox__box { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.3); }

.cta-questions__form {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card-hover), 0 0 0 1px rgba(99,91,255,.12);
}
.cta-questions__form-title { color: var(--navy); margin-bottom: 18px; }
.cta-questions__form .checkbox { margin-bottom: 18px; color: var(--text-muted); }
.cta-questions__note { margin-top: 12px; color: #1E8E5A; font-size: 0.875rem; font-weight: 600; }

/* ---- Футер: «Мы в соцсетях» ---- */
.social-strip { background: var(--bg-alt); padding-block: 40px; }
.social-strip__row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.social-strip__title { font-size: 1.125rem; }
.social-strip__icons { display: flex; gap: 12px; }
.social-strip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--navy);
  border: 1px solid var(--border);
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.social-strip__icon:hover { background: var(--accent); color: var(--white); transform: translateY(-3px); border-color: var(--accent); }

/* ---- Футер основной ---- */
.site-footer { background: var(--navy); color: #93A3BC; padding-top: 64px; }
.footer__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  padding-bottom: 48px;
}
.footer__col--contacts { grid-column: span 2 / span 2; }
.footer__title { color: var(--white); font-size: 0.9375rem; margin-bottom: 18px; letter-spacing: .01em; }
.footer__list { display: flex; flex-direction: column; gap: 11px; }
.footer__list a { font-size: 0.9375rem; transition: color .15s ease; }
.footer__list a:hover { color: var(--white); }

.footer__phone { display: block; color: var(--white); font-size: 1.375rem; font-weight: 700; margin-bottom: 14px; }
.footer__address, .footer__hours, .footer__mail { display: flex; align-items: flex-start; gap: 8px; font-size: 0.875rem; margin-bottom: 10px; line-height: 1.5; }
.footer__address .icon, .footer__hours .icon, .footer__mail .icon { color: #55688A; flex: 0 0 auto; margin-top: 2px; }
.footer__mail { color: #93A3BC; }
.footer__cta { margin-top: 12px; }
.footer__social { display: flex; gap: 10px; }
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  color: #C3CEE0;
  transition: background-color .15s ease, color .15s ease;
}
.footer__social a:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }

.footer__bottom { border-top: 1px solid rgba(255,255,255,.08); padding-block: 22px; }
.footer__bottom-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.8125rem; color: #62759A; }
.footer__legal { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__legal a { color: #62759A; transition: color .15s ease; }
.footer__legal a:hover { color: #C3CEE0; }

/* ==========================================================================
   Часть 3/4: стили всех секций
   ========================================================================== */

/* ---- Хлебные крошки ---- */
.breadcrumbs { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.breadcrumbs__list { display: flex; flex-wrap: wrap; align-items: center; padding-block: 14px; font-size: 0.8125rem; color: var(--text-muted); }
.breadcrumbs__item { display: flex; align-items: center; }
.breadcrumbs__item a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); transition: color .15s ease; }
.breadcrumbs__item a:hover { color: var(--accent); }
.breadcrumbs__item span[aria-current] { color: var(--navy); font-weight: 500; }
.breadcrumbs__sep { display: inline-flex; margin-inline: 6px; color: #B7C2D3; }

/* ---- Карточки (общий компонент) ---- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.card__image { aspect-ratio: 4/3; overflow: hidden; }
.card__image img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; }
.card__title { font-size: 1.0625rem; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }

/* ---- Hero-intro ---- */
.hero {
  padding-block: 64px 88px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero__eyebrow { margin-bottom: 18px; }
.hero__title { margin-bottom: 20px; }
.hero__text { max-width: 520px; margin-bottom: 32px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero__stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero__stat-value { font-size: 1.875rem; color: var(--navy); display: block; }
.hero__stat-label { font-size: 0.8125rem; color: var(--text-muted); margin-top: 2px; }

/* z-index нужен, чтобы создать контекст наложения: без него декоративное свечение
   .hero__media-corner с z-index:-1 уходит за непрозрачный фон страницы и не видно вовсе. */
.hero__media { position: relative; z-index: 0; }
.hero__media-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card-hover);
  aspect-ratio: 4/3.1;
}
.hero__media-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero__media-corner {
  position: absolute;
  width: 220px; height: 220px;
  right: -50px; bottom: -50px;
  background: linear-gradient(135deg, var(--accent), var(--amber) 55%, var(--coral));
  filter: blur(50px);
  opacity: .55;
  border-radius: 50%;
  z-index: -1;
}
.hero__media-badge {
  position: absolute;
  left: -24px; bottom: 28px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  box-shadow: var(--shadow-card-hover);
  min-width: 148px;
}
.hero__media-badge .numeral { display: block; font-size: 2rem; color: var(--white); }
.hero__media-badge span:last-child { font-size: 0.75rem; color: #9FB0C7; }

/* Внутренние страницы: краткий hero */
.hero--page { padding-block: 48px 64px; }
.hero--page .hero__title { margin-bottom: 14px; }
.hero--page .hero__text { max-width: 680px; margin-bottom: 0; }

/* ---- Category icon grid ---- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr) 1.4fr; grid-template-rows: repeat(2, 1fr); gap: 18px; }
.cat-tile {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: rgba(99,91,255,.35); }
.cat-tile__icon {
  width: 46px; height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(99,91,255,.1);
  color: var(--accent);
}
.cat-tile__name { font-weight: 600; color: var(--navy); font-size: 0.9375rem; }
.cat-tile__desc { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.4; }
.cat-tile__price { margin-top: auto; font-size: 0.8125rem; color: var(--text-muted); }
.cat-tile__price strong { color: var(--navy); font-weight: 700; }

.cat-feature {
  grid-row: span 2;
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  color: var(--white);
  min-height: 100%;
  box-shadow: var(--shadow-card-hover);
}
.cat-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.cat-feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,37,64,0) 30%, rgba(10,37,64,.88) 100%); z-index: 1; }
.cat-feature__content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; gap: 8px; }
.cat-feature__tag { align-self: flex-start; background: #FFF4E3; }
.cat-feature__title { color: var(--white); font-size: 1.125rem; }
.cat-feature__meta { font-size: 0.8125rem; color: #D7DEEA; }

/* ---- Tech showcase slider ---- */
.tech-slider { position: relative; }
.tech-slider__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.tech-slider__track::-webkit-scrollbar { display: none; }
.tech-slide {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: min(340px, 82vw);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.tech-slide__image { aspect-ratio: 16/10; overflow: hidden; }
.tech-slide__image img { width: 100%; height: 100%; object-fit: cover; }
.tech-slide__body { padding: 20px; }
.tech-slide__title { font-size: 1rem; margin-bottom: 8px; }
.tech-slide__text { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }
.tech-slider__controls { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.tech-slider__btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.tech-slider__btn:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }
.tech-slider__btn:disabled { opacity: .35; pointer-events: none; }

/* ---- Steps process ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}
.step__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  margin-bottom: 18px;
}
.step__title { margin-bottom: 8px; font-size: 1.0625rem; }
.step__text { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.55; }

/* ---- Video CTA banner ---- */
.video-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: center;
  color: var(--white);
  box-shadow: var(--shadow-card-hover);
}
.video-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.video-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(10,37,64,.92) 0%, rgba(10,37,64,.55) 55%, rgba(10,37,64,.15) 100%); z-index: 1; }
.video-banner__content { position: relative; z-index: 2; padding: 48px; max-width: 520px; display: flex; flex-direction: column; gap: 16px; }
.video-banner__title { color: var(--white); }
.video-banner__text { color: #D7DEEA; }
.video-banner__actions { display: flex; align-items: center; gap: 18px; margin-top: 10px; flex-wrap: wrap; }
.video-banner__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  border: 1.5px solid rgba(255,255,255,.5);
  color: var(--white);
  flex: 0 0 auto;
  transition: background-color .2s ease, transform .2s ease;
}
.video-banner__play:hover { background: var(--accent); border-color: var(--accent); transform: scale(1.06); }
.video-banner__form {
  position: relative;
  z-index: 2;
  margin-left: auto;
  background: rgba(10,37,64,.55);
  backdrop-filter: none;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-card);
  padding: 22px;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.video-banner__form .field__label { color: #D7DEEA; }
.video-banner__form .field__input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: var(--white); }
.video-banner__form .field__input::placeholder { color: #93A3BC; }

/* ---- VK feed preview ---- */
.vk-feed { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.vk-post {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.vk-post:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.vk-post__image { aspect-ratio: 1/1; overflow: hidden; }
.vk-post__image img { width: 100%; height: 100%; object-fit: cover; }
.vk-post__body { padding: 14px 16px; }
.vk-post__text { font-size: 0.8125rem; color: var(--text); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vk-post__meta { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.75rem; color: var(--text-muted); }

/* ---- Services tile grid ---- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.svc-tile {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 26px 24px;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.svc-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.svc-tile__icon {
  width: 50px; height: 50px;
  border-radius: var(--radius-sm);
  background: rgba(99,91,255,.1);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.svc-tile__title { font-size: 1.0625rem; }
.svc-tile__text { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }
.svc-tile__price { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); font-size: 0.875rem; color: var(--navy); font-weight: 700; }
.svc-tile__price span { font-weight: 400; color: var(--text-muted); }
.svc-tile a.stretched-link::after { content: ""; position: absolute; inset: 0; }

/* ---- Project card grid ---- */
.projects-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.project-card { position: relative; }
.project-card__image { aspect-ratio: 4/3; position: relative; overflow: hidden; }
.project-card__image img { width: 100%; height: 100%; object-fit: cover; }
.project-card__tag { position: absolute; top: 14px; left: 14px; z-index: 2; }
.project-card__specs { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 0.8125rem; color: var(--text-muted); }
.project-card__specs span { display: inline-flex; align-items: center; gap: 5px; }
.project-card__specs .icon { color: #9AABC2; }
.project-card__price { margin-top: 6px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.project-card__price-value { font-size: 1.25rem; color: var(--navy); font-weight: 700; }
.project-card__price-label { font-size: 0.75rem; color: var(--text-muted); }

/* ---- Reviews summary widget ---- */
.reviews-summary { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: center; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 32px; box-shadow: var(--shadow-card); }
.reviews-summary__score { text-align: center; }
.reviews-summary__score .numeral { font-size: 3.25rem; color: var(--navy); display: block; }
.reviews-summary__score .stars { justify-content: center; margin-top: 8px; }
.reviews-summary__score p { margin-top: 8px; font-size: 0.875rem; color: var(--text-muted); }
.reviews-summary__bars { display: flex; flex-direction: column; gap: 8px; }
.reviews-summary__bar { display: grid; grid-template-columns: 16px 1fr 32px; align-items: center; gap: 10px; font-size: 0.8125rem; color: var(--text-muted); }
.reviews-summary__bar-track { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.reviews-summary__bar-fill { display: block; height: 100%; background: var(--amber); border-radius: 999px; }

/* ---- Reviews list ---- */
.reviews-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.review-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 26px; box-shadow: var(--shadow-card); }
.review-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.review-card__avatar { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; }
.review-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-card__author { font-weight: 700; color: var(--navy); font-size: 0.9375rem; }
.review-card__meta { font-size: 0.8125rem; color: var(--text-muted); margin-top: 2px; }
.review-card__stars { margin-bottom: 10px; }
.review-card__text { font-size: 0.9375rem; line-height: 1.55; }
.review-card__object { display: inline-block; margin-top: 14px; font-size: 0.8125rem; color: var(--accent); font-weight: 600; }

/* ---- Article / news card grid ---- */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card__meta { display: flex; align-items: center; gap: 10px; font-size: 0.75rem; color: var(--text-muted); }
.article-card__excerpt { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }

.article-featured { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); margin-bottom: 32px; }
.article-featured__image { aspect-ratio: 16/11; overflow: hidden; }
.article-featured__image img { width: 100%; height: 100%; object-fit: cover; }
.article-featured__body { padding: 32px 32px 32px 0; }
.article-featured__title { margin: 12px 0 14px; }

/* ---- Team grid ---- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.team-card { text-align: left; }
.team-card__photo { aspect-ratio: 4/3; overflow: hidden; }
.team-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card__name { font-size: 1rem; }
.team-card__role { font-size: 0.8125rem; color: var(--accent); font-weight: 600; }
.team-card__bio { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }

/* ---- History timeline ---- */
.timeline { position: relative; max-width: 760px; margin-inline: auto; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline__item { position: relative; padding-bottom: 36px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot { position: absolute; left: -32px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(99,91,255,.15); }
.timeline__year { color: var(--navy); font-weight: 800; font-size: 1.375rem; margin-bottom: 6px; }
.timeline__text { color: var(--text); font-size: 0.9375rem; line-height: 1.55; }

/* ---- Certificates slider ---- */
.cert-slider__track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none; }
.cert-slider__track::-webkit-scrollbar { display: none; }
.cert-slide { scroll-snap-align: start; flex: 0 0 auto; width: min(260px, 70vw); }
.cert-slide__frame { border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); aspect-ratio: 3/4; }
.cert-slide__frame img { width: 100%; height: 100%; object-fit: cover; }
.cert-slide__title { margin-top: 12px; font-size: 0.8125rem; color: var(--text-muted); text-align: center; }

/* ---- Filters bar ---- */
.filters-bar { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px 24px; box-shadow: var(--shadow-card); display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 36px; }
.filters-bar__field { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.filters-bar__field label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.filters-bar__range { display: flex; align-items: center; gap: 8px; }
.filters-bar__submit { margin-left: auto; }
.filters-bar__view { display: flex; gap: 6px; margin-left: 12px; }
.filters-bar__view button { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); }
.filters-bar__view button.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ---- Material intro text ---- */
.material-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-bottom: 48px; }
.material-intro__image { border-radius: var(--radius-card); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow-card); }
.material-intro__image img { width: 100%; height: 100%; object-fit: cover; }
.material-intro__stats { display: flex; gap: 24px; margin-top: 20px; }
.material-intro__stat { background: var(--navy); color: var(--white); border-radius: var(--radius-sm); padding: 14px 18px; min-width: 110px; }
.material-intro__stat .numeral { font-size: 1.375rem; display: block; }
.material-intro__stat span:last-child { font-size: 0.75rem; color: #9FB0C7; }

/* ---- Project hero gallery ---- */
.project-gallery { display: grid; grid-template-columns: 1fr; gap: 12px; }
.project-gallery__main { border-radius: var(--radius-card); overflow: hidden; aspect-ratio: 16/10; box-shadow: var(--shadow-card); }
.project-gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.project-gallery__thumbs { display: flex; gap: 12px; }
.project-gallery__thumbs button { flex: 1 1 0; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4/3; border: 2px solid transparent; padding: 0; }
.project-gallery__thumbs button.is-active { border-color: var(--accent); }
.project-gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Project specs sidebar ---- */
.project-layout { display: grid; grid-template-columns: 1.55fr 0.95fr; gap: 40px; align-items: start; }
.specs-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 28px; box-shadow: var(--shadow-card); position: sticky; top: 128px; }
.specs-card__title { margin-bottom: 18px; }
.specs-card__list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.specs-card__row { display: flex; align-items: center; justify-content: space-between; font-size: 0.9375rem; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.specs-card__row:last-child { border-bottom: 0; padding-bottom: 0; }
.specs-card__row-label { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.specs-card__row-label .icon { color: #9AABC2; }
.specs-card__row-value { color: var(--navy); font-weight: 600; }
.specs-card__prices { background: var(--bg); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 20px; }
.specs-card__price-row { display: flex; align-items: baseline; justify-content: space-between; }
.specs-card__price-row + .specs-card__price-row { margin-top: 8px; }
.specs-card__price-value { font-weight: 800; color: var(--navy); font-size: 1.375rem; }

/* ---- Content body rich ---- */
.content-body { max-width: 800px; }
.content-body h2 { margin-top: 40px; margin-bottom: 14px; font-size: 1.5rem; }
.content-body h3 { margin-top: 28px; margin-bottom: 10px; }
.content-body p { margin-bottom: 16px; line-height: 1.7; }
.content-body ul, .content-body ol { margin-bottom: 16px; padding-left: 22px; }
.content-body ul { list-style: none; }
.content-body ul li { position: relative; padding-left: 26px; margin-bottom: 10px; line-height: 1.55; }
.content-body ul li::before { content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.content-body ol { list-style: decimal; }
.content-body ol li { margin-bottom: 10px; line-height: 1.6; }
.content-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.content-body img { border-radius: var(--radius-card); margin-block: 20px; }
.content-body blockquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 20px; color: var(--text-muted); font-style: italic; margin: 20px 0; }

/* ---- Author meta row ---- */
.author-meta { display: flex; align-items: center; gap: 14px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.author-meta__name { font-weight: 700; color: var(--navy); font-size: 0.9375rem; }
.author-meta__date { font-size: 0.8125rem; color: var(--text-muted); }
.author-meta__tags { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }

/* ---- Next/prev nav ---- */
.next-prev { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: stretch; margin-top: 48px; }
.next-prev__link { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; display: flex; align-items: center; gap: 12px; transition: box-shadow .2s ease, transform .2s ease; }
.next-prev__link:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.next-prev__link--next { justify-content: flex-end; text-align: right; flex-direction: row-reverse; }
.next-prev__label { font-size: 0.75rem; color: var(--text-muted); display: block; }
.next-prev__title { font-size: 0.875rem; color: var(--navy); font-weight: 600; }
.next-prev__all { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; color: var(--navy); font-weight: 600; font-size: 0.875rem; white-space: nowrap; }

/* ---- Popular search tags ---- */
.tags-search { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--shadow-card); }
.tags-search__form { display: flex; gap: 10px; margin-bottom: 16px; }
.tags-search__form input { flex: 1 1 auto; }
/* Свёрнутое облако показывает РОВНО две строки чипов. Высоту строки считаем из
   собственных метрик чипа (текст + паддинги 7+7 + рамки 1+1), а не задаём числом:
   прежние 74px не совпадали с реальными 37px строки и резали вторую строку пополам
   на всех ширинах, а потолок 600px у развёрнутого состояния обрезал последние теги
   на узких экранах, где облако выше 600px. */
.tags-search__chips {
  --chip-row: calc(0.8125rem * 1.6 + 16px);
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px;
  overflow: hidden;
  max-height: calc(var(--chip-row) * 2 + 8px + 2px);
  transition: max-height .25s ease;
}
.tags-search__chips.is-expanded { max-height: none; }
/* Как только за свёрнутое состояние отвечает JS (он прячет лишние чипы из потока),
   обрезка по max-height становится вредной: любой просчёт раскладки — например, чипы,
   ставшие шире после загрузки веб-шрифта, — оставлял бы ссылку невидимой внутри
   обрезанной зоны ровно поверх кнопки «Показать ещё». Высоту задаёт сам контент. */
.tags-search__chips.is-js { max-height: none; overflow: visible; transition: none; }
.tags-search__chip { padding: 7px 14px; border-radius: 999px; background: var(--bg); color: var(--text); font-size: 0.8125rem; line-height: 1.6; border: 1px solid var(--border); transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.tags-search__chip:hover { background: rgba(99,91,255,.1); color: var(--accent); border-color: rgba(99,91,255,.3); }
.tags-search__more { margin-top: 12px; font-size: 0.8125rem; color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }

/* ---- Price table ---- */
.price-group { margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--white); box-shadow: var(--shadow-card); overflow: hidden; }
.price-group__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; cursor: pointer; }
.price-group__head h3 { font-size: 1.0625rem; }
.price-group__head .icon { transition: transform .2s ease; color: var(--text-muted); }
.price-group.is-open .price-group__head .icon { transform: rotate(180deg); }
.price-group__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.price-group__body > div { overflow: hidden; }
.price-group.is-open .price-group__body { grid-template-rows: 1fr; }
.price-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-top: 1px solid var(--border); font-size: 0.9375rem; }
.price-row__value { color: var(--navy); font-weight: 700; }
.price-row__value span { color: var(--text-muted); font-weight: 400; font-size: 0.8125rem; }

/* ---- FAQ accordion grouped ---- */
.faq-layout { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
.faq-nav { position: sticky; top: 128px; display: flex; flex-direction: column; gap: 4px; }
.faq-nav a { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.9375rem; color: var(--text-muted); }
.faq-nav a.is-active, .faq-nav a:hover { background: rgba(99,91,255,.08); color: var(--accent); font-weight: 600; }
.faq-group { margin-bottom: 40px; }
.faq-group__title { margin-bottom: 16px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item__q { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 4px; text-align: left; font-weight: 600; color: var(--navy); }
.faq-item__q .icon { flex: 0 0 auto; color: var(--text-muted); transition: transform .2s ease; }
.faq-item.is-open .faq-item__q .icon { transform: rotate(45deg); color: var(--accent); }
.faq-item__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; font-size: 0.9375rem; color: var(--text-muted); line-height: 1.6; }
.faq-item__a > div { overflow: hidden; }
.faq-item.is-open .faq-item__a { grid-template-rows: 1fr; }
.faq-item__a p { padding-bottom: 18px; }

/* ---- Tabs ---- */
.tabs__list { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 28px; flex-wrap: wrap; }
.tabs__btn { padding: 12px 20px; font-weight: 600; font-size: 0.9375rem; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs__btn:hover { color: var(--navy); }
.tabs__btn.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs__panel[hidden] { display: none; }

/* ---- Contact map block ---- */
.contact-map { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.contact-map__tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.contact-map__tabs button { padding: 9px 16px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.8125rem; color: var(--text-muted); }
.contact-map__tabs button.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.contact-map__frame { border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); aspect-ratio: 4/3; border: 1px solid var(--border); }
.contact-map__frame iframe { width: 100%; height: 100%; border: 0; }
.contact-map__link { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; }
.contact-map__info { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 28px; box-shadow: var(--shadow-card); }
.contact-map__info-row { display: flex; gap: 12px; padding-block: 14px; border-bottom: 1px solid var(--border); }
.contact-map__info-row:last-child { border-bottom: 0; }
.contact-map__info-row .icon { color: var(--accent); flex: 0 0 auto; margin-top: 2px; }
.contact-map__info-row strong { display: block; color: var(--navy); margin-bottom: 2px; }

/* ---- Contact form (standalone page block) ---- */
.contact-form-block { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 32px; box-shadow: var(--shadow-card); }

/* ---- Company requisites table ---- */
.requisites-table { width: 100%; table-layout: fixed; border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; background: var(--white); box-shadow: var(--shadow-card); }
.requisites-table tr:not(:last-child) th, .requisites-table tr:not(:last-child) td { border-bottom: 1px solid var(--border); }
.requisites-table th, .requisites-table td { text-align: left; padding: 14px 20px; font-size: 0.9375rem; overflow-wrap: anywhere; }
.requisites-table th { color: var(--text-muted); font-weight: 500; width: 40%; }
.requisites-table td { color: var(--navy); font-weight: 600; }

/* ---- Error / 404 ---- */
.error-block { text-align: center; padding-block: 40px; }
.error-block__code { font-size: clamp(5rem, 4rem + 5vw, 8rem); font-weight: 800; color: var(--accent); line-height: 1; }
.error-block__title { margin-top: 8px; }
.error-block__text { max-width: 480px; margin: 16px auto 32px; }
.error-block__search { max-width: 480px; margin: 0 auto 40px; display: flex; gap: 10px; }
.error-block__search input { flex: 1 1 auto; }
.error-block__links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- Sitemap links list ---- */
.sitemap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.sitemap-col { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--shadow-card); }
.sitemap-col__title { margin-bottom: 14px; font-size: 1rem; }
.sitemap-col__list { display: flex; flex-direction: column; gap: 10px; }
.sitemap-col__list a { font-size: 0.9375rem; color: var(--text); transition: color .15s ease; }
.sitemap-col__list a:hover { color: var(--accent); }

/* ---- Stat tiles (общие крупные плашки) ---- */
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-tile { background: var(--navy); color: var(--white); border-radius: var(--radius-card); padding: 26px 22px; }
.stat-tile .numeral { font-size: 2.25rem; display: block; color: var(--white); }
.stat-tile span:last-child { font-size: 0.8125rem; color: #9FB0C7; margin-top: 4px; display: block; }
.stat-tile--amber { background: linear-gradient(135deg, #C97A1D, var(--amber)); }
.stat-tile--coral { background: linear-gradient(135deg, #C43D2A, var(--coral)); }

/* ---- Модалка «Заказать звонок» ---- */
.modal { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10,37,64,.55); opacity: 0; transition: opacity .2s ease; }
.modal.is-open .modal__backdrop { opacity: 1; }
.modal__panel {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-card-hover);
  transform: translateY(16px) scale(.98);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
}
.modal.is-open .modal__panel { transform: translateY(0) scale(1); opacity: 1; }
.modal__close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); border-radius: 50%; }
.modal__close:hover { background: var(--bg); color: var(--navy); }
.modal h3 { padding-right: 24px; margin-bottom: 8px; }
.modal__text { color: var(--text-muted); font-size: 0.9375rem; margin-bottom: 20px; }
.modal__form { display: flex; flex-direction: column; gap: 14px; }
.modal__note { color: #1E8E5A; font-size: 0.875rem; font-weight: 600; }

/* ---- Двухколоночный блок (контакты: форма + реквизиты) ---- */
.two-col { display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: start; }
/* Без min-width:0 колонка грида не может стать уже своего min-content,
   и широкая таблица реквизитов растягивает всю секцию за край экрана. */
.two-col > * { min-width: 0; }

/* ---- Пагинация ---- */
.pagination { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px;
  padding-inline: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--white);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.pagination a:hover { background: var(--bg); border-color: var(--accent); color: var(--accent); }
.pagination .is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.pagination .is-disabled { opacity: .35; pointer-events: none; border-style: dashed; }

/* ---- Grid-модификаторы количества колонок ---- */
.cat-grid--plain { grid-template-columns: repeat(4, 1fr); }
.projects-grid--3 { grid-template-columns: repeat(3, 1fr); }
.svc-grid--2 { grid-template-columns: repeat(2, 1fr); }
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); background: var(--white); border: 1px dashed var(--border); border-radius: var(--radius-card); }
.empty-state strong { display: block; color: var(--navy); margin-bottom: 6px; font-size: 1.0625rem; }

/* ---- Reveal-on-scroll ---- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Часть 4/4: медиазапросы, focus-visible, prefers-reduced-motion, печать
   ========================================================================== */

/* ---- Focus-visible ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.card:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.mega__tile:focus-visible,
.accordion__trigger:focus-visible,
.faq-item__q:focus-visible {
  outline-offset: -2px;
}

/* ---- Брейкпоинты ---- */
@media (max-width: 1280px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, auto); }
  .cat-feature { grid-row: span 1; min-height: 260px; }
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .vk-feed { grid-template-columns: repeat(3, 1fr); }
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
}

/* Ниже 1200px контейнер перестаёт быть шире вьюпорта: логотипу, меню и кнопкам
   становится тесно, поэтому ужимаем отступы навигации, а не даём ей вылезти. */
@media (max-width: 1200px) {
  .navbar__row { gap: 20px; }
  .mainnav__list { gap: 0; }
  .mainnav__link { padding: 10px 8px; font-size: 0.875rem; }
}

@media (max-width: 1080px) {
  .topbar__item--hours { display: none; }
}

/* Шапка переключается на бургер до того, как меню упрётся в кнопку поиска.
   Значение продублировано в assets/js/main.js (закрытие меню при ресайзе). */
@media (max-width: 1120px) {
  .mainnav { display: none; }
  .navbar__row { padding-block: 12px; }
  .burger { display: inline-flex; }
}

@media (max-width: 960px) {
  :root { --section-space: var(--section-space-mobile); }

  .topbar__row { flex-wrap: wrap; row-gap: 8px; }
  .topbar__info { order: 2; }
  .topbar__actions { order: 1; width: 100%; justify-content: space-between; }
  .topbar__actions .btn, .topbar__link { display: none; }

  .hero__grid,
  .material-intro,
  .project-layout,
  .contact-map,
  .faq-layout,
  .article-featured,
  .two-col {
    grid-template-columns: 1fr;
  }
  .project-layout { gap: 28px; }
  .specs-card { position: static; }
  .faq-nav { position: static; flex-direction: row; overflow-x: auto; gap: 8px; }
  .faq-nav a { white-space: nowrap; }

  .hero__media { order: -1; }
  .hero__media-badge { left: 16px; }

  .cat-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: none; }
  .cat-feature { min-height: 220px; }

  .steps { grid-template-columns: repeat(2, 1fr); }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .articles-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .vk-feed { grid-template-columns: repeat(2, 1fr); }
  .reviews-list { grid-template-columns: 1fr; }
  .sitemap-grid { grid-template-columns: repeat(2, 1fr); }

  .cta-questions__grid { grid-template-columns: 1fr; gap: 40px; }
  .cta-questions__glow { width: 600px; height: 340px; }

  .article-featured__body { padding: 0 28px 28px; }
  .article-featured__image { order: -1; }

  .video-banner { min-height: auto; }
  .video-banner__content { padding: 32px 24px; }
  .video-banner__form { display: none; }

  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__col--contacts { grid-column: span 2 / span 2; order: -1; }
}

@media (max-width: 720px) {
  :root { --container-pad: 18px; }

  .form-row { grid-template-columns: 1fr; }
  .hero__stats { gap: 22px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }

  .cat-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .vk-feed { grid-template-columns: repeat(2, 1fr); }
  .stat-tiles { grid-template-columns: 1fr 1fr; }
  .sitemap-grid { grid-template-columns: 1fr; }

  .article-featured { display: block; }
  .article-featured__image { aspect-ratio: 16/10; }
  .article-featured__body { padding: 20px; }

  .reviews-summary { grid-template-columns: 1fr; text-align: center; }
  .reviews-summary__score .stars { justify-content: center; }

  .filters-bar { flex-direction: column; align-items: stretch; }
  .filters-bar__submit { margin-left: 0; }
  .filters-bar__view { margin-left: 0; }

  .next-prev { grid-template-columns: 1fr; }
  .next-prev__link--next { flex-direction: row; justify-content: flex-start; text-align: left; }
  .next-prev__all { justify-content: center; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__col--contacts { grid-column: span 2 / span 2; }
  .footer__bottom-row { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .requisites-table th, .requisites-table td { padding: 12px 14px; font-size: 0.875rem; }
  .contact-form-block { padding: 22px 18px; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__col--contacts { grid-column: span 1; }
  .vk-feed { grid-template-columns: 1fr 1fr; }
  .stat-tiles { grid-template-columns: 1fr; }
  .hero__media-badge { position: static; margin-top: 16px; }
}

/* Самые узкие экраны: подпись логотипа шире, чем остаток строки шапки после
   иконки, поиска и бургера, — убираем её, чтобы название осталось целиком. */
@media (max-width: 400px) {
  .navbar__row { gap: 12px; }
  .logo__claim { display: none; }
  .navbar__tools { gap: 2px; }
}

/* ---- prefers-reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---- Печать ---- */
@media print {
  .site-header, .mobile-menu, .mobile-menu-backdrop, .cta-questions, .social-strip,
  .site-footer, .hero__media-corner, .video-banner__form, .search-panel,
  .tech-slider__controls, .filters-bar, .breadcrumbs, .modal { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 24px; }
  a { text-decoration: underline; color: #000; }
  .card, .project-card, .article-card, .review-card { box-shadow: none; border: 1px solid #ccc; }
}
