/* ==========================================================================
   Data Strategy Investment — портфолио специалистов
   Геометрия и цвета сняты с макета (ширина макета 1254 px).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Токены
   -------------------------------------------------------------------------- */
:root {
  /* Фирменные цвета — сняты с логотипа и бланка компании */
  --brand: #0b3e8f;
  --brand-deep: #062a63;
  --brand-dark: #041c45;
  --brand-bright: #1a5fc8;
  --brand-red: #db0e16;
  --on-brand: #ffffff;
  --on-brand-2: rgba(255, 255, 255, 0.76);
  --on-brand-3: rgba(255, 255, 255, 0.56);
  --on-brand-line: rgba(255, 255, 255, 0.16);

  /* Контент — светлый, блоки отделяются волосяной рамкой */
  --bg: #f7f6f6;
  --surface: #f8f8f8;
  --surface-2: #fafafa;
  --photo-bg: #ffffff;
  --ink: #0d0d0d;
  --ink-2: #55565a;
  --ink-3: #8b8b8f;
  --line: #e7e7e7;
  --line-strong: #d6d6d6;
  --accent: #000000;
  --accent-ink: #ffffff;
  --positive: #1c7a4b;
  --negative: #b23a2f;

  /* Типографика */
  --font: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  --fs-eyebrow: 11px;
  --fs-micro: 12px;
  --fs-small: 13px;
  --fs-body: 14px;
  --fs-lead: 16px;

  /* Геометрия */
  --radius-lg: 8px;
  --radius: 6px;
  --radius-sm: 6px;
  --radius-pill: 999px;

  /* Раскладка */
  --container: 1254px;
  --gutter: 44px;
  --header-h: 88px;

  /* Тени */
  --shadow-sm: 0 1px 2px rgba(15, 15, 15, 0.04);
  --shadow: 0 10px 28px -18px rgba(15, 15, 15, 0.22);
  --shadow-lg: 0 24px 60px -28px rgba(15, 15, 15, 0.26);

  /* Движение */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. Сброс и база
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

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

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

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

:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--brand);
  color: #fff;
}

/* --------------------------------------------------------------------------
   3. Раскладка
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* В макете шапка и первый экран сдвинуты правее секций ниже */
.header .container,
.hero .container {
  padding-left: 63px;
  padding-right: 47px;
}

.section {
  padding-block: clamp(48px, 6vw, 88px);
}

.section--tight {
  padding-block: clamp(32px, 4vw, 56px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   4. Типографика
   -------------------------------------------------------------------------- */
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-transform: uppercase;
  /* чуть темнее --ink-3: надпись лежит на фотографии, нужен контраст ≥ 4.5:1 */
  color: #6f7075;
}

.display {
  font-size: clamp(34px, 4.15vw, 52px);
  line-height: 1.135;
  letter-spacing: -0.026em;
  font-weight: 400;
}

.h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.022em;
  font-weight: 500;
}

.h3 {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.016em;
  font-weight: 500;
}

.h4 {
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 500;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.7;
  color: var(--ink-2);
}

.muted {
  color: var(--ink-3);
}

.text-body {
  color: var(--ink-2);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   5. Кнопки и ссылки
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 52px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-size: var(--fs-small);
  font-weight: 400;
  letter-spacing: -0.002em;
  border: 1px solid transparent;
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease),
    border-color 0.24s var(--ease), transform 0.24s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--brand);
  color: var(--accent-ink);
}

.btn--primary:hover {
  background: var(--brand-bright);
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}

.btn--ghost:hover {
  background: #fff;
  border-color: var(--ink);
}

.btn--sm {
  height: 40px;
  padding: 0 16px;
  font-size: var(--fs-micro);
  gap: 8px;
}

.btn__arrow {
  width: 11px;
  height: 11px;
  flex: none;
  transition: transform 0.24s var(--ease);
}

.btn:hover .btn__arrow {
  transform: translate(2px, -2px);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-small);
  color: var(--ink-2);
  transition: color 0.2s var(--ease), gap 0.2s var(--ease);
}

.link-arrow:hover {
  color: var(--ink);
  gap: 12px;
}

/* --------------------------------------------------------------------------
   6. Шапка
   -------------------------------------------------------------------------- */
/* Синяя шапка с инверсионными следами — как на бланке компании */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background-color: var(--brand);
  background-image: linear-gradient(
      100deg,
      var(--brand) 0%,
      var(--brand) 24%,
      rgba(11, 62, 143, 0.86) 38%,
      rgba(9, 52, 122, 0.5) 56%,
      rgba(6, 42, 99, 0.24) 76%,
      rgba(6, 42, 99, 0.18) 100%
    ),
    url("../img/header-jets.jpg");
  background-size: auto, cover;
  background-position: center, right 55%;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--on-brand-line);
  transition: box-shadow 0.3s var(--ease);
}

.header.is-stuck {
  background-image: linear-gradient(
      100deg,
      var(--brand-deep) 0%,
      var(--brand-deep) 24%,
      rgba(6, 42, 99, 0.9) 38%,
      rgba(5, 35, 82, 0.66) 56%,
      rgba(4, 28, 69, 0.44) 76%,
      rgba(4, 28, 69, 0.38) 100%
    ),
    url("../img/header-jets.jpg");
  box-shadow: 0 10px 30px -22px rgba(4, 28, 69, 0.9);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.logo img {
  height: 56px;
  width: auto;
  display: block;
}

.footer .logo img {
  height: 68px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 38px;
  margin-left: 85px;
  margin-right: auto;
}

.nav__link {
  position: relative;
  font-size: var(--fs-small);
  color: var(--on-brand-2);
  padding-block: 6px;
  transition: color 0.2s var(--ease);
}

/* красная черта — из фирменного знака */
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--brand-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__link:hover {
  color: var(--on-brand);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}

.nav__link.is-active {
  color: var(--on-brand);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header__actions .btn {
  height: 35px;
  padding: 0 14px;
  font-size: var(--fs-micro);
  gap: 8px;
}

/* на синем фоне главная кнопка становится белой */
.header__actions .btn--primary,
.nav__cta,
.cta-band .btn--primary {
  background: #fff;
  color: var(--brand-deep);
}

.header__actions .btn--primary:hover,
.nav__cta:hover,
.cta-band .btn--primary:hover {
  background: rgba(255, 255, 255, 0.88);
}

/* кнопка живёт только в мобильном меню */
.nav__cta {
  display: none;
}

.burger {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--on-brand-line);
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
}

.burger span {
  position: relative;
  display: block;
  width: 16px;
  height: 1.5px;
  background: #fff;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: #fff;
  transition: transform 0.3s var(--ease);
}

.burger span::before {
  top: -5px;
}

.burger span::after {
  top: 5px;
}

.burger.is-open span {
  background: transparent;
}

.burger.is-open span::before {
  transform: translateY(5px) rotate(45deg);
}

.burger.is-open span::after {
  transform: translateY(-5px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   7. Первый экран
   -------------------------------------------------------------------------- */
/* Гора занимает всю первую секцию, текст лежит поверх неё */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: 52px;
  padding-bottom: 88px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}

/* Светлая вуаль: слева почти сплошная — под текст, справа гора открыта */
.hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
      100deg,
      rgba(247, 246, 246, 0.985) 0%,
      rgba(247, 246, 246, 0.95) 25%,
      rgba(247, 246, 246, 0.74) 42%,
      rgba(247, 246, 246, 0.3) 59%,
      rgba(247, 246, 246, 0) 76%
    ),
    linear-gradient(
      180deg,
      rgba(247, 246, 246, 0.72) 0%,
      rgba(247, 246, 246, 0) 18%
    ),
    linear-gradient(
      0deg,
      var(--bg) 0%,
      rgba(247, 246, 246, 0.78) 9%,
      rgba(247, 246, 246, 0) 30%
    );
}

/* Вертикальный ритм главной снят с макета */
.home-stats {
  padding-top: 0;
}

.home-team {
  padding-top: 38px;
}

.home-team .section-head {
  margin-bottom: 17px;
}

.home-partners {
  padding-top: 13px;
}

.home-cta {
  padding-top: 56px;
}

.hero__grid {
  position: relative;
  z-index: 1;
}

.hero__copy {
  max-width: 620px;
}

.hero__title {
  margin-top: 23px;
  font-size: clamp(32px, 4.07vw, 51px);
  line-height: 1.157; /* 59 px при 51 px — как в макете, но масштабируется */
  letter-spacing: -0.031em;
  overflow-wrap: break-word;
}

@media (min-width: 1001px) {
  /* строка «по криптовалютному» чуть шире колонки — пусть выходит за неё */
  .hero__title {
    width: max-content;
    max-width: 520px;
  }
}

@media (max-width: 1000px) {
  .hero__title br {
    display: none;
  }
}

.hero__text {
  margin-top: 31px;
  max-width: 404px;
  font-size: var(--fs-body);
  line-height: 26px;
  color: var(--ink-2);
}

.hero__cta {
  margin-top: 39px;
}

.hero__cta .btn {
  width: 220px;
  justify-content: space-between;
  padding: 0 20px;
}

/* Сама фотография: параллакс и медленное «дыхание» */
.hero__media {
  position: absolute;
  inset: -5% 0;
  width: 100%;
  height: 110%;
  object-fit: cover;
  object-position: 66% 52%;
  transform: translate3d(0, 0, 0) scale(1.02);
  will-change: transform;
}

/* Мягкая дымка, медленно плывущая поверх горы */
.hero__clouds {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(
      52% 40% at 62% 76%,
      rgba(255, 255, 255, 0.65),
      rgba(255, 255, 255, 0) 70%
    ),
    radial-gradient(
      42% 34% at 86% 60%,
      rgba(255, 255, 255, 0.5),
      rgba(255, 255, 255, 0) 72%
    );
  animation: cloud-drift 26s ease-in-out infinite alternate;
}

@keyframes cloud-drift {
  from {
    transform: translate3d(-3%, 0, 0) scale(1);
  }
  to {
    transform: translate3d(3%, -2%, 0) scale(1.08);
  }
}

/* --------------------------------------------------------------------------
   8. Показатели
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding: 30px 12px 0 36px;
  min-height: 126px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat__icon {
  width: 37px;
  height: 34px;
  margin-top: 12px;
  flex: none;
  color: var(--ink);
}

.stat__value {
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1;
}

.stat__label {
  margin-top: 3px;
  font-size: var(--fs-micro);
  color: var(--ink-3);
  line-height: 23px;
}

/* --------------------------------------------------------------------------
   9. Карточка специалиста
   -------------------------------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: 43.5% minmax(0, 1fr);
  min-height: 289px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.card:hover {
  border-color: rgba(11, 62, 143, 0.35);
  box-shadow: 0 12px 30px -20px rgba(6, 42, 99, 0.55);
  transform: translateY(-2px);
}

/* Фото на всю высоту карточки, фон белый — как в макете */
.card__photo {
  position: relative;
  overflow: hidden;
  background: var(--photo-bg);
}

.card__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(1) contrast(1.02);
  transition: transform 0.7s var(--ease-out);
}

.card:hover .card__photo img {
  transform: scale(1.03);
}

/* Заглушка, пока фотография не положена в assets/img/specialists */
.photo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-3);
  background: repeating-linear-gradient(
    135deg,
    #f2f1ef 0 10px,
    #eae9e6 10px 20px
  );
}

.card__content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 21px 15px 9px 17px;
}

.card__name {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 21px;
}

.card__role {
  margin-top: 9px;
  font-size: var(--fs-micro);
  line-height: 15.6px;
  color: var(--ink-3);
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 25px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 11px;
  line-height: 1;
  color: var(--ink-2);
  white-space: nowrap;
}

.card__chip {
  margin-top: 12px;
  align-self: flex-start;
}

.card__spec {
  margin-top: 20px;
}

.card__spec-label {
  font-size: 11px;
  line-height: 16px;
  color: var(--ink-3);
}

.card__spec-value {
  font-size: 11px;
  line-height: 16px;
  color: var(--ink-2);
}

.card__perf {
  margin-top: auto;
  padding-top: 20px;
}

.card__perf-label {
  font-size: 11px;
  line-height: 14px;
  color: var(--ink-3);
}

.card__perf-row {
  margin-top: 6px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.card__perf-value {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--ink);
  line-height: 1;
  padding-bottom: 2px;
}

.card__perf-value.is-negative {
  color: var(--negative);
}

.spark {
  width: 86px;
  height: 40px;
  flex: none;
  overflow: visible;
}

.spark path {
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card__link {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* --------------------------------------------------------------------------
   10. Лента партнёров
   -------------------------------------------------------------------------- */
.partners {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 30px 34px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.partners__label {
  flex: none;
  font-size: var(--fs-micro);
  color: var(--ink-3);
  white-space: nowrap;
}

.marquee {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 5%,
    #000 95%,
    transparent
  );
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: clamp(40px, 5.4vw, 76px);
  width: max-content;
  animation: marquee var(--marquee-duration, 34s) linear infinite;
  will-change: transform;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

@keyframes marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.partner {
  flex: none;
  display: flex;
  align-items: center;
  height: 24px;
  color: var(--ink-2);
  opacity: 0.78;
  transition: opacity 0.25s var(--ease), color 0.25s var(--ease);
}

.partner:hover {
  opacity: 1;
  color: var(--ink);
}

.partner img,
.partner svg {
  height: 100%;
  width: auto;
}

/* --------------------------------------------------------------------------
   11. Подвал
   -------------------------------------------------------------------------- */
.footer {
  background: var(--brand-deep);
  color: var(--on-brand-2);
  padding-block: 52px 32px;
  margin-top: 72px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer__about {
  max-width: 34ch;
  margin-top: 18px;
  font-size: var(--fs-small);
  color: var(--on-brand-3);
  line-height: 1.6;
}

.footer__title {
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-brand-3);
  margin-bottom: 14px;
}

.footer__list li + li {
  margin-top: 10px;
}

.footer__list a,
.footer__list span {
  font-size: var(--fs-small);
  color: var(--on-brand-2);
  transition: color 0.2s var(--ease);
}

.footer__list a:hover {
  color: var(--on-brand);
}

.footer__bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--on-brand-line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: var(--fs-micro);
  color: var(--on-brand-3);
}

.disclaimer {
  margin-top: 22px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--on-brand-3);
  max-width: 92ch;
}

/* --------------------------------------------------------------------------
   12. Страница каталога
   -------------------------------------------------------------------------- */
.page-head {
  padding-block: clamp(28px, 3.6vw, 48px) clamp(20px, 2.4vw, 30px);
}

.page-head .eyebrow {
  color: var(--brand);
}

.page-head__title {
  margin-top: 14px;
  max-width: 22ch;
}

.page-head__text {
  margin-top: 18px;
  max-width: 62ch;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: var(--fs-micro);
  color: var(--ink-3);
  flex-wrap: wrap;
}

.breadcrumbs a:hover {
  color: var(--ink);
}

.breadcrumbs__sep {
  opacity: 0.5;
}

.catalog {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* кнопка «Фильтры и сортировка» — только на узких экранах */
.filters__toggle {
  display: none;
}

.filters {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.filters__group + .filters__group {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.filters__title {
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}

.field {
  position: relative;
  display: block;
}

.field__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--ink-3);
  pointer-events: none;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  font-size: var(--fs-small);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--ink-3);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(15, 15, 15, 0.07);
}

.input--with-icon {
  padding-left: 36px;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%238a8a86' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 11px;
  padding-right: 34px;
  cursor: pointer;
}

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

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: var(--fs-small);
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.check:hover {
  color: var(--ink);
}

.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  display: grid;
  place-content: center;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
  cursor: pointer;
}

.check input::after {
  content: "";
  width: 9px;
  height: 9px;
  clip-path: polygon(14% 45%, 0 60%, 40% 100%, 100% 22%, 85% 8%, 38% 71%);
  background: #fff;
  transform: scale(0);
  transition: transform 0.16s var(--ease);
}

.check input:checked {
  background: var(--brand);
  border-color: var(--brand);
}

.check input:checked::after {
  transform: scale(1);
}

.check__count {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-3);
}

.filters__reset {
  margin-top: 22px;
  width: 100%;
}

.catalog__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.catalog__count {
  font-size: var(--fs-small);
  color: var(--ink-3);
}

.catalog__count strong {
  color: var(--ink);
  font-weight: 500;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.view-toggle button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 34px;
  color: var(--ink-3);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.view-toggle button + button {
  border-left: 1px solid var(--line-strong);
}

.view-toggle button.is-active {
  background: var(--brand);
  color: #fff;
}

.view-toggle svg {
  width: 15px;
  height: 15px;
}

.catalog__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.catalog__grid.is-list {
  grid-template-columns: minmax(0, 1fr);
}

.catalog__grid.is-list .card {
  grid-template-columns: 164px minmax(0, 1fr);
  min-height: 176px;
}

.catalog__grid.is-list .card__content {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) 168px;
  gap: 28px;
  align-items: center;
  padding: 20px 24px;
}

.catalog__grid.is-list .card__chip {
  margin-top: 10px;
}

.catalog__grid.is-list .card__role {
  margin-top: 8px;
}

.catalog__grid.is-list .card__spec,
.catalog__grid.is-list .card__perf {
  margin-top: 0;
  padding-top: 0;
}

.empty {
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-3);
  background: var(--surface);
}

/* --------------------------------------------------------------------------
   13. Страница профиля
   -------------------------------------------------------------------------- */
.profile {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

.profile__aside {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.profile__photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--photo-bg);
  border: 1px solid var(--line);
}

.profile__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.profile__source {
  margin-top: 16px;
  width: 100%;
}

.profile__title {
  letter-spacing: -0.026em;
}

.profile__resident {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: var(--fs-small);
  color: var(--ink-3);
}

.facts {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.fact {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fact:nth-child(3n) {
  border-right: 0;
}

.fact:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.fact__label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.fact__value {
  margin-top: 8px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.fact__value--sm {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.article {
  margin-top: 36px;
}

.article__intro {
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--ink-2);
}

.article__section {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.article__section-title {
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}

.article__list {
  counter-reset: item;
}

.article__list li {
  position: relative;
  padding-left: 34px;
  color: var(--ink-2);
  line-height: 1.62;
}

.article__list li + li {
  margin-top: 14px;
}

.article__list--num li::before {
  counter-increment: item;
  content: counter(item);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
}

.article__list--dot li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

.article__list b,
.article__list strong {
  color: var(--ink);
  font-weight: 500;
}

.quote {
  margin-top: 34px;
  padding: 28px 30px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.quote p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
}

.terms {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.term {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.term__label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.term__value {
  margin-top: 8px;
  font-size: var(--fs-body);
  line-height: 1.45;
}

.profile__nav {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   14. Контент-блоки (о компании / контакты)
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px);
  align-items: start;
}

.panel {
  padding: clamp(22px, 2.4vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.value {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.value:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.value__num {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.value__title {
  margin-top: 14px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.value__text {
  margin-top: 10px;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--ink-2);
}

.timeline {
  border-left: 1px solid var(--line-strong);
  padding-left: 26px;
}

.timeline li {
  position: relative;
}

.timeline li + li {
  margin-top: 26px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--brand);
}

.timeline__year {
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.timeline__text {
  margin-top: 6px;
  color: var(--ink-2);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form__label {
  display: block;
  font-size: var(--fs-micro);
  color: var(--ink-3);
  margin-bottom: 7px;
}

.form__field + .form__field,
.form-row + .form__field,
.form__field + .form-row {
  margin-top: 16px;
}

.form__note {
  margin-top: 14px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-3);
}

.form__submit {
  margin-top: 20px;
}

.form__status {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  font-size: var(--fs-small);
  color: var(--ink-2);
  display: none;
}

.form__status.is-visible {
  display: block;
  animation: fade-up 0.4s var(--ease-out) both;
}

.contact-list li + li {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.contact-list__label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.contact-list__value {
  margin-top: 6px;
  font-size: var(--fs-lead);
  letter-spacing: -0.01em;
}

.faq__item {
  border-top: 1px solid var(--line);
}

.faq__item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  text-align: left;
  font-size: var(--fs-lead);
  font-weight: 400;
  letter-spacing: -0.012em;
}

.faq__icon {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.faq__icon::before {
  width: 13px;
  height: 1.5px;
}

.faq__icon::after {
  width: 1.5px;
  height: 13px;
}

.faq__item.is-open .faq__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq__a {
  overflow: hidden;
  height: 0;
  transition: height 0.36s var(--ease);
}

.faq__a-inner {
  padding-bottom: 22px;
  max-width: 76ch;
  color: var(--ink-2);
  line-height: 1.65;
}

.cta-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding: clamp(28px, 3.4vw, 44px);
  border-radius: var(--radius);
  background: linear-gradient(112deg, var(--brand-deep) 0%, var(--brand) 62%, #1150ad 100%);
  color: #fff;
  overflow: hidden;
}

/* тонкие «инверсионные следы» по мотивам первого экрана */
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background: repeating-linear-gradient(
    108deg,
    rgba(255, 255, 255, 0) 0 62px,
    rgba(255, 255, 255, 0.14) 62px 63px,
    rgba(255, 255, 255, 0) 63px 128px
  );
  -webkit-mask-image: linear-gradient(100deg, transparent 42%, #000 100%);
  mask-image: linear-gradient(100deg, transparent 42%, #000 100%);
}

.cta-band > * {
  position: relative;
  z-index: 1;
}

.cta-band .h2 {
  max-width: 22ch;
}

.cta-band__text {
  margin-top: 12px;
  max-width: 46ch;
  color: var(--on-brand-2);
  font-size: var(--fs-body);
}

/* --------------------------------------------------------------------------
   15. Появление при скролле
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* --------------------------------------------------------------------------
   14b. Квиз записи на консультацию
   -------------------------------------------------------------------------- */
.quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.quiz {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* ---------- полоса шагов ---------- */
.quiz-steps {
  display: flex;
  gap: 4px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.quiz-steps__item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

/* линия между кружками */
.quiz-steps__item::before {
  content: "";
  position: absolute;
  top: 15px;
  right: 50%;
  left: -50%;
  height: 2px;
  background: var(--line-strong);
}

.quiz-steps__item:first-child::before {
  display: none;
}

.quiz-steps__item.is-done::before,
.quiz-steps__item.is-current::before {
  background: var(--brand);
}

.quiz-steps__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}

.quiz-steps__item.is-done .quiz-steps__dot {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.quiz-steps__item.is-current .quiz-steps__dot {
  border-color: var(--brand);
  color: var(--brand);
}

.quiz-steps__label {
  font-size: var(--fs-micro);
  line-height: 1.35;
  color: var(--ink-3);
}

.quiz-steps__item.is-current .quiz-steps__label {
  font-weight: 600;
  color: var(--brand);
}

/* ---------- вопрос и карточки ответов ---------- */
.quiz__q {
  margin-bottom: 22px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.quiz__sub {
  margin: 28px 0 14px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.quiz-card {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 6px 14px;
  padding: 20px 44px 20px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s, box-shadow 0.16s, transform 0.16s;
}

.quiz-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 22px rgba(6, 42, 99, 0.08);
  transform: translateY(-1px);
}

.quiz-card.is-active {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.quiz-card__icon {
  width: 24px;
  height: 24px;
  color: var(--brand);
}

.quiz-card__title {
  align-self: center;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink);
}

.quiz-card__text {
  grid-column: 2;
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--ink-2);
}

.quiz-card__arrow {
  position: absolute;
  top: 20px;
  right: 18px;
  font-size: 16px;
  color: var(--ink-3);
  transition: color 0.16s, transform 0.16s;
}

.quiz-card:hover .quiz-card__arrow,
.quiz-card.is-active .quiz-card__arrow {
  color: var(--brand);
  transform: translateX(3px);
}

/* ---------- выбор дня ---------- */
.quiz-days {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quiz-day {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
}

.quiz-day:hover {
  border-color: var(--brand);
}

.quiz-day.is-active {
  border-color: var(--brand);
  background: rgba(11, 62, 143, 0.08);
}

.quiz-day__weekday {
  font-size: var(--fs-micro);
  color: var(--ink-2);
}

.quiz-day__date {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.quiz-day__free {
  font-size: 11px;
  line-height: 1.3;
  color: var(--ink-3);
}

.quiz-days__nav {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.quiz-arrow {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  font-size: 15px;
  color: var(--ink-2);
  cursor: pointer;
}

.quiz-arrow:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
}

.quiz-arrow:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ---------- выбор времени ---------- */
.quiz-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quiz-slot {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.16s;
}

.quiz-slot:hover {
  border-color: var(--brand);
}

.quiz-slot.is-active {
  border-color: var(--brand);
}

.quiz-slot__time {
  align-self: stretch;
  display: grid;
  place-items: center;
  padding: 14px 0;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-2);
  border-right: 1px solid var(--line);
}

.quiz-slot.is-active .quiz-slot__time {
  background: var(--brand);
  border-right-color: var(--brand);
  color: #fff;
}

.quiz-slot__who {
  display: block;
  padding: 10px 14px;
  font-size: var(--fs-small);
  color: var(--ink);
}

.quiz-slot__role {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--ink-3);
}

/* ---------- форма ---------- */
.quiz-form .form-row + .form-row,
.quiz-form .form-row + .form__field {
  margin-top: 16px;
}

.form__optional {
  font-weight: 400;
  color: var(--ink-3);
}

.quiz__hint {
  margin-top: 16px;
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--ink-3);
}

.quiz__error {
  margin-top: 18px;
  padding: 12px 16px;
  border-left: 3px solid var(--brand-red);
  background: rgba(219, 14, 22, 0.06);
  font-size: var(--fs-small);
  color: var(--ink);
}

/* ---------- подтверждение ---------- */
.quiz-sum {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.quiz-sum__row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 18px 20px;
}

.quiz-sum__row + .quiz-sum__row {
  border-top: 1px solid var(--line);
}

.quiz-sum__row--data {
  grid-template-columns: minmax(0, 1fr) auto;
}

.quiz-sum__row .quiz-card__icon {
  margin-top: 2px;
}

.quiz-sum__label {
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.quiz-sum__value {
  margin-top: 4px;
  font-size: var(--fs-body);
  line-height: 1.45;
  color: var(--ink);
}

.quiz-sum__list {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 6px 12px;
  margin: 10px 0 0;
  font-size: var(--fs-small);
}

.quiz-sum__list dt {
  color: var(--ink-3);
}

.quiz-sum__list dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.quiz-sum__edit {
  border: 0;
  background: none;
  padding: 0;
  font-size: var(--fs-small);
  color: var(--brand);
  cursor: pointer;
}

.quiz-sum__edit:hover {
  text-decoration: underline;
}

/* ---------- навигация и успех ---------- */
.quiz__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.quiz-done {
  padding: 20px 0;
  text-align: center;
}

.quiz-done__mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--brand);
  font-size: 30px;
  color: #fff;
}

.quiz-done__title {
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
}

.quiz-done__text {
  max-width: 460px;
  margin: 12px auto 0;
  line-height: 1.6;
  color: var(--ink-2);
}

.quiz-done__note {
  max-width: 460px;
  margin: 14px auto 22px;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--ink-3);
}

/* ---------- боковая карточка ---------- */
.quiz-aside {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.callback {
  padding: 24px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
}

.callback__title {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}

.callback__text {
  margin-top: 10px;
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--ink-2);
}

.callback__btn {
  width: 100%;
  margin-top: 18px;
}

.callback__btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.faq--wide {
  max-width: 860px;
}

/* --------------------------------------------------------------------------
   15a. Роли участников и условия
   -------------------------------------------------------------------------- */
.roles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.role {
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* средняя карточка — наша роль, выделяем фирменным цветом */
.role--accent {
  background: var(--brand);
  border-color: var(--brand);
}

.role__who {
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand);
}

.role--accent .role__who {
  border-bottom-color: var(--on-brand-line);
  color: #fff;
}

.role__list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.role__list li {
  position: relative;
  padding-left: 22px;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--ink-2);
}

.role__list li::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.role--accent .role__list li {
  color: var(--on-brand-2);
}

.role--accent .role__list li::before {
  background: #fff;
}

.role--accent .role__list b {
  color: #fff;
}

.terms {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.terms__item {
  background: var(--surface);
  padding: 26px 22px;
}

.terms__value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand);
}

.terms__label {
  margin-top: 8px;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--ink-2);
}

.terms__note {
  max-width: 760px;
  margin: 24px auto 0;
  text-align: center;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   15b. Брокерские выписки
   -------------------------------------------------------------------------- */
/* счётчик рядом с заголовком: «Отчёты по месяцам · 42 месяца подряд» */
.section-head__count {
  margin-left: 14px;
  font-size: var(--fs-small);
  font-weight: 400;
  color: var(--ink-3);
  white-space: nowrap;
}

.section-head__count::before {
  content: "· ";
}

.years {
  position: sticky;
  top: calc(var(--header-h) + 8px);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 8px 0;
  background: var(--bg);
}

.year {
  height: 40px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.year:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.year.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.statements__year + .statements__year {
  margin-top: 48px;
}

.statements__title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.statements__count {
  font-size: var(--fs-small);
  font-weight: 400;
  color: var(--ink-3);
}

.statements__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.statement {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.statement:hover {
  border-color: var(--brand);
  box-shadow: 0 10px 28px rgba(6, 42, 99, 0.1);
  transform: translateY(-2px);
}

/* кнопка-обёртка вокруг картинки: открывает выписку в полном размере */
.statement__view {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #fff;
  cursor: zoom-in;
}

.statement__view img {
  display: block;
  width: 100%;
  height: auto;
}

.statement__cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.statement__month {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
}

.statement__tag {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 62, 143, 0.08);
  font-size: var(--fs-micro);
  color: var(--brand);
}

.statements__note {
  margin-top: 24px;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--ink-3);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  padding: 40px 24px;
  overflow: auto;
  background: rgba(4, 28, 69, 0.9);
  -webkit-overflow-scrolling: touch;
}

.lightbox.is-open {
  display: block;
}

/* по умолчанию вписываем целиком, по клику — оригинальный размер с прокруткой */
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 80px);
  margin: 0 auto;
  border-radius: 6px;
  background: #fff;
  cursor: zoom-in;
}

.lightbox.is-zoomed .lightbox__img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.lightbox__hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: var(--fs-micro);
  color: #fff;
  pointer-events: none;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* --------------------------------------------------------------------------
   16. Адаптив
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .catalog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

/* ---------- Планшет: бургер-меню, одноколоночные сетки ---------- */
@media (max-width: 1000px) {
  :root {
    --gutter: 26px;
    --header-h: 72px;
  }

  /* сдвиг шапки и первого экрана вправо — только для десктопного макета */
  .header .container,
  .hero .container {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 22px;
    background: var(--brand-deep);
    border-bottom: 1px solid var(--on-brand-line);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
    box-shadow: 0 24px 40px -28px rgba(4, 28, 69, 0.9);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav__link {
    padding: 15px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--on-brand-line);
  }

  .nav__link::after {
    display: none;
  }

  .nav__cta {
    display: inline-flex;
    width: 100%;
    margin-top: 18px;
  }

  .burger {
    display: flex;
  }

  /* меню на телефоне — выключенная из потока панель, поэтому бургер
     сам прижимаем к правому краю */
  .header__actions {
    margin-left: auto;
  }

  .header__actions .btn {
    display: none;
  }

  .hero {
    padding-top: 34px;
    padding-bottom: 52px;
  }

  /* На узком экране текст занимает всю ширину — вуаль делаем плотнее */
  .hero__scrim {
    background: linear-gradient(
        170deg,
        rgba(247, 246, 246, 0.99) 0%,
        rgba(247, 246, 246, 0.96) 42%,
        rgba(247, 246, 246, 0.86) 64%,
        rgba(247, 246, 246, 0.45) 84%,
        rgba(247, 246, 246, 0) 100%
      ),
      linear-gradient(0deg, var(--bg) 0%, rgba(247, 246, 246, 0) 22%);
  }

  .hero__media {
    object-position: 68% 42%;
  }

  .hero__copy,
  .hero__text {
    max-width: 560px;
  }

  /* четыре колонки показателей уже не помещаются */
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    gap: 22px;
    padding: 22px 20px 24px 24px;
    min-height: 0;
  }

  .stat:nth-child(2n) {
    border-right: 0;
  }

  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .stat__icon {
    margin-top: 6px;
  }

  .catalog {
    grid-template-columns: minmax(0, 1fr);
  }

  /* фильтры сворачиваются в кнопку */
  .filters__toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #fff;
    font-size: var(--fs-small);
    color: var(--ink);
    text-align: left;
  }

  .filters__toggle svg {
    width: 16px;
    height: 16px;
    flex: none;
    color: var(--brand);
  }

  .filters__toggle > span:first-of-type {
    flex: 1;
  }

  .filters__toggle-chevron {
    width: 9px;
    height: 9px;
    flex: none;
    border-right: 1.6px solid var(--ink-3);
    border-bottom: 1.6px solid var(--ink-3);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.28s var(--ease);
  }

  .filters__toggle.is-open .filters__toggle-chevron {
    transform: rotate(225deg) translate(-3px, -3px);
  }

  .filters {
    position: static;
    display: none;
    margin-bottom: 16px;
  }

  .filters.is-open {
    display: block;
    animation: fade-up 0.3s var(--ease-out) both;
  }

  .profile {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile__aside {
    position: static;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
  }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .value-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  /* списочный режим на планшете превращается в обычную карточку */
  .catalog__grid.is-list .card {
    grid-template-columns: 43.5% minmax(0, 1fr);
    min-height: 289px;
  }

  .catalog__grid.is-list .card__content {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 21px 17px 13px;
  }

  .catalog__grid.is-list .card__spec {
    margin-top: 25px;
  }

  .catalog__grid.is-list .card__perf {
    margin-top: auto;
    padding-top: 22px;
  }
}

/* ---------- Телефон ---------- */
@media (max-width: 1000px) {
  .roles {
    grid-template-columns: minmax(0, 1fr);
  }

  /* боковая карточка уезжает под квиз */
  .quiz-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .quiz-aside {
    position: static;
  }

  .quiz {
    padding: 24px 20px;
  }

  /* на узком экране подписи шагов не помещаются — оставляем кружки */
  .quiz-steps__label {
    display: none;
  }

  .quiz-steps {
    gap: 0;
    margin-bottom: 26px;
  }

  .terms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .statements__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-head__count {
    display: block;
    margin-left: 0;
    margin-top: 6px;
  }

  .section-head__count::before {
    content: "";
  }

  .lightbox {
    padding: 60px 12px 20px;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 20px;
    --header-h: 66px;
  }

  .section--tight,
  .home-cta {
    padding-block: 34px;
  }

  .home-team {
    padding-top: 30px;
  }

  .home-partners {
    padding-top: 10px;
  }

  .logo img {
    height: 40px;
  }

  .footer .logo img {
    height: 52px;
  }

  .burger {
    width: 42px;
    height: 42px;
  }

  /* Первый экран */
  .hero {
    padding-top: 26px;
    padding-bottom: 40px;
  }

  .hero__title {
    font-size: clamp(28px, 8.4vw, 40px);
    line-height: 1.14;
    letter-spacing: -0.025em;
    /* на узкой колонке нельзя рвать слова посередине */
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .hero__text {
    margin-top: 20px;
    line-height: 23px;
  }

  .hero__cta {
    margin-top: 26px;
  }

  .hero__cta .btn {
    width: 100%;
    max-width: 320px;
  }

  .eyebrow {
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .display {
    font-size: clamp(28px, 8.4vw, 40px);
    line-height: 1.14;
  }

  .h2 {
    font-size: 22px;
  }

  .lead {
    font-size: 15px;
    line-height: 1.6;
  }

  /* Показатели: две колонки, содержимое в столбик */
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 14px 20px;
    min-height: 0;
  }

  .stat:nth-child(2n) {
    border-right: 0;
  }

  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .stat__icon {
    width: 28px;
    height: 26px;
    margin-top: 0;
  }

  .stat__value {
    font-size: 21px;
  }

  .stat__label {
    margin-top: 5px;
    font-size: 11.5px;
    line-height: 16px;
  }

  /* Карточка специалиста: компактная, фото слева */
  .cards-grid,
  .catalog__grid,
  .catalog__grid.is-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .card,
  .catalog__grid.is-list .card {
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: 172px;
  }

  .card__content,
  .catalog__grid.is-list .card__content {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 14px 14px 12px 15px;
  }

  /* должность и стаж — в одну строку */
  .card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
  }

  .card__name {
    width: 100%;
    font-size: 15px;
    line-height: 19px;
  }

  .card__role,
  .catalog__grid.is-list .card__role {
    margin-top: 0;
    font-size: 11.5px;
    line-height: 1.3;
  }

  .card__chip,
  .catalog__grid.is-list .card__chip {
    margin-top: 0;
    height: 22px;
    padding: 0 8px;
    font-size: 10.5px;
  }

  .card__spec,
  .catalog__grid.is-list .card__spec {
    margin-top: 10px;
  }

  /* подпись «Специализация:» на телефоне лишняя — значение говорит само за себя */
  .card__spec-label {
    display: none;
  }

  .card__spec-value {
    font-size: 11.5px;
    line-height: 15px;
  }

  .card__perf,
  .catalog__grid.is-list .card__perf {
    margin-top: auto;
    padding-top: 12px;
  }

  .card__perf-label {
    font-size: 10.5px;
    line-height: 14px;
  }

  .card__perf-label br {
    display: none;
  }

  .card__perf-row {
    margin-top: 4px;
    align-items: center;
  }

  .card__perf-value {
    font-size: 15px;
    padding-bottom: 0;
  }

  .spark {
    width: 64px;
    height: 26px;
  }

  /* Каталог */
  .catalog__toolbar {
    gap: 10px;
    margin-bottom: 12px;
  }

  .page-head {
    padding-block: 26px 18px;
  }

  .page-head__title {
    max-width: none;
  }

  .breadcrumbs {
    margin-top: 16px;
  }

  /* Профиль */
  .profile__aside {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .profile__photo {
    aspect-ratio: 4 / 5;
    width: 100%;
    max-width: 260px;
  }

  .profile__source {
    max-width: 260px;
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fact {
    padding: 14px 16px;
  }

  .fact:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .fact:nth-child(2n) {
    border-right: 0;
  }

  .fact:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .fact:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .fact__value {
    font-size: 17px;
  }

  .article {
    margin-top: 26px;
  }

  .article__intro {
    font-size: 15px;
  }

  .article__section {
    margin-top: 26px;
    padding-top: 22px;
  }

  .article__list li {
    padding-left: 30px;
    font-size: 14px;
  }

  .quote {
    padding: 20px 18px;
  }

  .profile__nav {
    gap: 12px;
  }

  .profile__nav .link-arrow {
    font-size: 12px;
  }

  /* Формы и контент-блоки */
  .terms,
  .form-row,
  .value-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel {
    padding: 20px 18px;
  }

  .contact-list__value {
    font-size: 15px;
    overflow-wrap: anywhere;
  }

  .faq__q {
    font-size: 15px;
    padding: 17px 0;
  }

  .cta-band {
    padding: 26px 20px;
    gap: 20px;
  }

  .cta-band .btn {
    width: 100%;
  }

  /* Партнёры */
  .partners {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 18px 20px;
  }

  .marquee {
    -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent);
    mask-image: linear-gradient(90deg, #000 86%, transparent);
  }

  .marquee__track {
    gap: 34px;
  }

  .partner {
    height: 20px;
  }

  /* Подвал */
  .footer {
    padding-block: 36px 26px;
    margin-top: 44px;
  }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 18px;
  }

  .footer__grid > :first-child {
    grid-column: 1 / -1;
  }

  /* ссылки в подвале — увеличиваем область нажатия под палец */
  .footer__list li + li {
    margin-top: 0;
  }

  .footer__list a,
  .footer__list span {
    display: inline-block;
    padding: 8px 0;
  }

  .footer__bottom {
    margin-top: 28px;
    gap: 8px;
  }
}

/* ---------- Совсем узкие экраны ---------- */
@media (max-width: 720px) {
  .quiz-grid,
  .quiz-grid--2,
  .quiz-slots {
    grid-template-columns: minmax(0, 1fr);
  }

  .quiz-days {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quiz__q {
    font-size: 19px;
  }

  /* кнопки «Назад / Далее» на всю ширину, чтобы попадать пальцем */
  .quiz__nav {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .quiz__nav .btn {
    width: 100%;
    justify-content: center;
  }

  .quiz__nav > span {
    display: none;
  }

  .quiz-sum__row {
    grid-template-columns: 20px minmax(0, 1fr);
    grid-template-areas: "icon body" ". edit";
    gap: 10px 12px;
  }

  .quiz-sum__row .quiz-card__icon {
    grid-area: icon;
  }

  .quiz-sum__body {
    grid-area: body;
  }

  .quiz-sum__edit {
    grid-area: edit;
    justify-self: start;
    padding: 6px 0;
  }

  .quiz-sum__row--data {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "body" "edit";
  }

  .quiz-sum__list {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .terms {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 400px) {
  :root {
    --gutter: 16px;
  }

  .card,
  .catalog__grid.is-list .card {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 168px;
  }

  .card__content,
  .catalog__grid.is-list .card__content {
    padding: 12px 12px 10px 13px;
  }

  .stat {
    padding: 16px 12px 18px;
  }

  .stat__value {
    font-size: 19px;
  }

  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   17. Печать и доступность
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .header,
  .footer,
  .filters,
  .cta-band {
    display: none;
  }

  body {
    background: #fff;
  }
}
