/* Секции страницы — в порядке макета. Числа в комментариях — координаты фрейма 1400. */

.page {
  /* Декор шире экрана (карта и свечения до 1800) и ниже подвала: режем, как фрейм макета, без прокрутки. */
  overflow: clip;
  /* Декор секций с z-index: -1 уходит под содержимое всех секций, но не под фон страницы. */
  isolation: isolate;
  /* Контейнер для cqw в --container-width и для запросов @container page. */
  container: page / inline-size;
}

/*
 * Уже 1024: поля и расстояние между секциями меньше. Формулы контейнера повторены: переменная,
 * ссылающаяся на другую, вычисляется там, где объявлена, — иначе осталось бы поле 40.
 */
@container page (width < 1024px) {
  .page > * {
    --page-gutter: 32px;
    --section-gap: 48px;
    --container-width: min(var(--container-max), 100cqw - 2 * var(--page-gutter));
    --container-left: calc((100cqw - var(--container-width)) / 2);
  }

  .section-title {
    font-size: var(--h2-size);
    line-height: 1.15;
    text-wrap: balance;
  }
}

@container page (width < 768px) {
  .page > * {
    --page-gutter: 20px;
    --section-gap: 40px;
  }
}

/* Переносы строк из макета, которые на узких колонках рвали бы фразы. */
@container page (width < 1400px) {
  .br-wide {
    display: none;
  }
}

/* Переносы, заданные под карточку фиксированной ширины (цитата миссии), — только на десктопе. */
@container page (width < 1024px) {
  .br-desktop {
    display: none;
  }
}


main section {
  position: relative;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-control);
  white-space: nowrap;
  transition: filter 0.2s ease;
}

.btn:hover {
  filter: brightness(0.95);
}

.btn--sm {
  height: var(--control-height-md);
  padding: 8px 16px;
  font: var(--text-nav);
}

.btn--lg {
  height: var(--control-height-lg);
  padding: 12px 24px;
  font: var(--text-body);
}

.btn--primary {
  color: var(--color-white);
}

.btn--outline {
  padding: 12px 24px;
  border: 1px solid var(--color-accent);
  color: var(--color-text);
}

/*
 * Figma округляет ширину текстового слоя (и всего, что его обнимает) вверх до целого пикселя,
 * браузер — нет: в длинном ряду кнопок и меток набегает до 1.5 px. В Chromium повторяем
 * округление через calc-size(); Safari и Firefox берут ширину по содержимому.
 */
@supports (width: calc-size(fit-content, size)) {
  .btn {
    /* −0.05 px: ширина текста вида 86.0001 не должна превращаться в 87. */
    width: calc-size(fit-content, round(up, size - 0.05px, 1px));
  }
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

/* На синих блоках синяя рамка сливается с фоном. */
.cta__block :focus-visible,
.industries__block :focus-visible {
  outline-color: var(--color-white);
}

/* ---------- Glass: временная замена до отдельного этапа ---------- */

.glass {
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.75),
    inset 6px 6px 12px -6px rgb(10 30 50 / 0.06),
    inset -4px -4px 6px -3px rgb(255 255 255 / 0.9);
  backdrop-filter: blur(4px);
}

/* ---------- Шапка: 0–68 ---------- */

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  /* В макете обводка внутри слоя и на раскладку не влияет. */
  box-shadow: inset 0 -1px 0 var(--color-border);
}

.logo {
  display: block;
}

/*
 * Figma округляет ширину текстового слоя вверх до целого пикселя, браузер — нет,
 * и при gap 32 пункты съезжали бы до 3 px. Ширина меню из макета (576) и равные
 * промежутки ставят каждый пункт на место с точностью до 0.5 px.
 */
.header__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 576px;
}

.header__menu {
  display: contents;
}

.header__link {
  /* Блок: высоту строки задаёт шрифт ссылки 14/20, а не 16/24 от body. */
  display: block;
  font: var(--text-nav);
  color: var(--color-text);
  transition: color 0.2s ease;
}

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

/* Градиент пересчитан под размер кнопки 149×36 (tools/figma-css.mjs 5:2263). */
.header__cta {
  background: linear-gradient(157.06deg, var(--color-accent-light) 13.35%, var(--color-accent) 49.13%);
}

/* Бургер — только уже 900 (см. ниже). */
.header__burger {
  display: none;
}

/*
 * Уже 900 меню (576) с логотипом не помещается: бургер и выпадающая панель во всю ширину.
 * Панели в макете нет — фон страницы, граница как у шапки, мягкая тень.
 */
@container page (width < 900px) {
  .header {
    position: relative;
    z-index: 10;
  }

  .header__burger {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-right: -8px;
    border-radius: var(--radius-control);
  }

  .header__burger-lines,
  .header__burger-lines::before,
  .header__burger-lines::after {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
    background: var(--color-text);
    transition: transform 0.2s ease, background-color 0.2s ease;
  }

  .header__burger-lines {
    position: relative;
  }

  .header__burger-lines::before,
  .header__burger-lines::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .header__burger-lines::before {
    top: -7px;
  }

  .header__burger-lines::after {
    top: 7px;
  }

  [data-menu-open] .header__burger-lines {
    background-color: transparent;
  }

  [data-menu-open] .header__burger-lines::before {
    transform: translateY(7px) rotate(45deg);
  }

  [data-menu-open] .header__burger-lines::after {
    transform: translateY(-7px) rotate(-45deg);
  }

  .header__nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: auto;
    padding: 8px var(--page-gutter) 24px;
    background: var(--color-page);
    box-shadow: 0 16px 32px rgb(14 17 22 / 0.08);
  }

  [data-menu-open] .header__nav {
    display: flex;
  }

  .header__menu {
    display: flex;
    flex-direction: column;
  }

  .header__link {
    padding-block: 12px;
    font-size: 16px;
    line-height: 24px;
    box-shadow: inset 0 -1px 0 var(--color-border);
  }

  .header__cta {
    width: 100%;
    height: var(--control-height-lg);
    margin-top: 16px;
    font: var(--text-body);
  }
}

/* ---------- Первый экран: 68–909 ---------- */

.hero {
  isolation: isolate;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: 32px;
  text-align: center;
}

.hero__eyebrow {
  font: var(--text-label);
  letter-spacing: var(--eyebrow-letter-spacing);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.hero__title {
  margin-top: 16px;
  /* Не переносится: при сужении до 1024 строка (1004) выходит за контейнер поровну в обе стороны. */
  white-space: nowrap;
  font: var(--text-h1);
  color: var(--color-text);
}

/* Пробел перед «Fast» входит в слой градиента, как в макете (537×48). */
.hero__title-accent {
  display: inline-block;
  white-space: pre;
  background: linear-gradient(171.1deg, var(--color-blue-start) 13.35%, var(--color-blue-end) 85.61%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  margin-top: 16px;
  font: var(--text-lead);
  color: var(--color-text-secondary);
}

.hero__actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

/* 180×50 (5:2289). */
.hero__cta {
  background: linear-gradient(154.05deg, var(--color-accent-light) 13.35%, var(--color-accent) 49.13%);
}

.hero__note {
  margin-top: 16px;
  font: var(--text-small);
  color: var(--color-text-secondary);
}

/*
 * Сцена с картой: от y 378 до начала следующей секции (909), 1400×531. Всё внутри в единицах
 * --u = 1/1400 ширины сцены: на 1400 это ровно 1 px, при сужении сцена уменьшается целиком.
 */
.hero__stage {
  --u: calc(100cqw / 1400);
  position: relative;
  width: min(1400px, 100%);
  margin-inline: auto;
  aspect-ratio: 1400 / 531;
  container-type: inline-size;
}

.hero__glow,
.hero__map,
.hero__arcs,
.hero__pulse,
.hero__avatar {
  position: absolute;
  max-width: none;
}

/*
 * Свечение 8:26 — эллипс 1600×800 с прогрессивным размытием (100 сверху → 0 снизу),
 * в CSS такого нет, поэтому готовый рендер из Figma. PNG шире слоя на радиус размытия:
 * 1800×1000 от x −200, y 218.
 */
.hero__glow {
  top: calc(-160 * var(--u));
  left: calc(-200 * var(--u));
  width: calc(1800 * var(--u));
  height: auto;
}

/* 1280×561 (x 60, y 378) — 6:108. Дуги и центральный узел — отдельным слоем поверх точек: в нём анимация. */
.hero__map,
.hero__arcs {
  top: 0;
  left: calc(60 * var(--u));
  width: calc(1280 * var(--u));
  height: auto;
}

.hero__avatar {
  z-index: 1;
  top: calc(var(--y) * var(--u));
  left: calc(var(--x) * var(--u));
  padding: calc(10 * var(--u));
  border-radius: calc(30 * var(--u));
}

.hero__avatar img {
  width: calc(100 * var(--u));
  height: auto;
  border-radius: calc(20 * var(--u));
}

/* Кольцо у центрального узла карты (x 678, y 105 от верха карты) — только для пульса. */
.hero__pulse {
  top: calc(97 * var(--u));
  left: calc(670 * var(--u));
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
  border: 2px solid var(--color-blue-end);
  border-radius: 50%;
  opacity: 0;
}

/*
 * Появление при загрузке: дуги прочерчиваются кругом, расходящимся от центрального узла,
 * карточки всплывают по очереди, узел дважды пульсирует. Анимации конечные и заканчиваются
 * за 2.4 с — в покое первый экран совпадает с макетом.
 */
@media (prefers-reduced-motion: no-preference) {
  .hero__arcs {
    animation: hero-arcs 1.3s linear both;
  }

  .hero__pulse {
    animation: hero-pulse 0.9s ease-out 1.1s 2 forwards;
  }

  .hero__avatar {
    animation: hero-avatar 0.45s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  }

  .hero__avatar:nth-of-type(1) { animation-delay: 0.25s; }
  .hero__avatar:nth-of-type(2) { animation-delay: 0.33s; }
  .hero__avatar:nth-of-type(3) { animation-delay: 0.41s; }
  .hero__avatar:nth-of-type(4) { animation-delay: 0.49s; }
  .hero__avatar:nth-of-type(5) { animation-delay: 0.57s; }
  .hero__avatar:nth-of-type(6) { animation-delay: 0.65s; }
  .hero__avatar:nth-of-type(7) { animation-delay: 0.73s; }
  .hero__avatar:nth-of-type(8) { animation-delay: 0.81s; }
  .hero__avatar:nth-of-type(9) { animation-delay: 0.89s; }
  .hero__avatar:nth-of-type(10) { animation-delay: 0.97s; }
}

@keyframes hero-arcs {
  from {
    clip-path: circle(0% at 48.28% 18.72%);
  }

  to {
    clip-path: circle(150% at 48.28% 18.72%);
  }
}

@keyframes hero-pulse {
  from {
    opacity: 0.55;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(7);
  }
}

@keyframes hero-avatar {
  from {
    opacity: 0;
    transform: scale(0.7);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Уже 1024 заголовок переносится и плавно уменьшается. */
@container page (width < 1024px) {
  .hero__title {
    font-size: var(--h1-size);
    line-height: 1.1;
    white-space: normal;
    text-wrap: balance;
  }

  .hero__title-accent {
    display: inline;
    white-space: normal;
  }
}

/*
 * Телефон: кнопки во всю ширину; сцена с картой шире экрана (600) и обрезана по краям —
 * аватары 51 px вместо ~28, четыре крайних скрыты; остальные шесть видны целиком от 390.
 */
@container page (width < 768px) {
  .hero__lead {
    font: var(--text-body);
  }

  .hero__actions {
    flex-direction: column;
    align-self: stretch;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__stage {
    width: 600px;
    margin-left: calc(50% - 300px);
  }

  .hero__avatar--edge {
    display: none;
  }
}

/* ---------- Общие для секций ---------- */

.section-title {
  font: var(--text-h2);
  color: var(--color-text);
}

.card-title {
  font: var(--text-title);
  color: var(--color-text);
}

.card-text {
  font: var(--text-body);
  color: var(--color-text-secondary);
}

/* ---------- Hiring: 909–1271 ---------- */

.hiring {
  padding-bottom: var(--section-gap);
}

.hiring__text {
  margin-top: 16px;
  font: var(--text-body);
  color: var(--color-text-secondary);
}

.hiring__cards {
  display: flex;
  gap: 40px;
  margin-top: 32px;
}

.hiring__card {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 162px;
  padding: 24px;
  border-radius: var(--radius-block);
}

/* В макете содержимое (164) на 2 px выше карточки (162) и выходит за неё. */
.hiring__card > :last-child {
  margin-bottom: -2px;
}

.hiring__num {
  font: var(--text-label);
  color: var(--color-brand);
}

/* Уже 900 три карточки в ряд слишком узкие — одна колонка. */
@container page (width < 900px) {
  .hiring__cards {
    flex-direction: column;
    gap: 16px;
  }
}

/* ---------- Staff Augmentation / Team Extension: 1271–1692 ---------- */

.services {
  height: 421px;
}

/* Пятна 460×260 с размытием 120: PNG 700×500 от (x − 120, y − 120). */
.services__glow {
  position: absolute;
  z-index: -1;
  max-width: none;
}

.services__glow--blue {
  top: -164px;
  left: calc(var(--container-left) - 180px);
}

.services__glow--orange {
  top: -144px;
  left: calc(50% - 80px);
}

/* Колонки 200 · 200 · линия · 200 · 200 с равными промежутками — как в макете (space-between). */
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 200px) 0 repeat(2, 200px);
  row-gap: 32px;
  justify-content: space-between;
}

.services__title {
  /* Не переносится: при сужении заголовок (455) шире двух колонок, справа — свободный промежуток. */
  white-space: nowrap;
}

.services__title--left {
  grid-column: 1 / 3;
}

.services__title--right {
  grid-column: 4 / 6;
}

.services__item {
  display: flex;
  flex-direction: column;
  row-gap: 10px;
}

/*
 * Описанный квадрат повёрнутой на 5° рамки 160×160. В макете подпись начинается с y 1540.34;
 * Chrome ставит базовую линию на целый пиксель, поэтому подпись опущена до 1541 — так
 * ближе к рисунку Figma (−0.6 → +0.4 px).
 */
.services__media {
  position: relative;
  width: 173.34px;
  height: 173.34px;
  margin-bottom: 14.66px;
}

.services__frame {
  position: absolute;
  top: 6.67px;
  left: 6.67px;
  width: 160px;
  height: 160px;
  border-radius: var(--radius-block);
  transform: rotate(var(--rotate));
}

/* Картинка выгружена уже повёрнутой; описанный квадрат скруглённой рамки — 148.5. */
.services__image {
  position: absolute;
  width: 148.5px;
  height: 148.5px;
  top: 12.42px;
  left: 12.42px;
}

/* Пустая средняя колонка: даёт четыре равных промежутка, как в макете. */
.services__axis {
  grid-column: 3;
  grid-row: 2;
}

/*
 * Линия по центру страницы: от ряда картинок Staff Augmentation (y 1343) до 35 px над концом
 * Process (y 2343) — на 1400 это 1000 px, как в макете; затухание по 100 px с концов (10%).
 */
.services-process {
  position: relative;
}

.services-process::before {
  content: "";
  position: absolute;
  top: 72px;
  bottom: 35px;
  left: 50%;
  width: 1px;
  background: linear-gradient(rgb(63 170 240 / 0), var(--color-blue-start) 100px, var(--color-blue-start) calc(100% - 100px), rgb(63 170 240 / 0));
}

/* ---------- Staffing Process: 1692–2378 ---------- */

.process {
  padding-bottom: 40px;
}

/* Фото 570×326 (x 60, y 1955) — ниже всех слоёв макета; при сужении уменьшается вместе с контейнером. */
.process__image {
  position: absolute;
  z-index: -1;
  top: 263px;
  left: calc(var(--container-left) - var(--container-width) * 60 / 1160);
  width: calc(var(--container-width) * 570 / 1160);
  max-width: none;
  height: auto;
}

/* Пятно 592×428, повёрнуто и размыто: PNG 743×592 от x −47. */
.process__glow {
  position: absolute;
  z-index: -1;
  top: -14px;
  left: calc(var(--container-left) - var(--container-width) * 167 / 1160);
  width: calc(var(--container-width) * 743 / 1160);
  max-width: none;
  height: auto;
}

/* Колонка шагов начинается за 80 px до центра: метки Step стоят на линии. */
.process__inner {
  display: grid;
  grid-template-columns: calc(50% - 80px) 1fr;
}

.process__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 360px;
}

.process__text {
  margin-top: 16px;
  font: var(--text-body);
  color: var(--color-text-secondary);
}

.process__cta {
  margin-top: 32px;
  /* 155×50 (66:79). */
  background: linear-gradient(150.53deg, var(--color-accent-light) 13.35%, var(--color-accent) 49.13%);
}

.process__step {
  display: flex;
  align-items: center;
  gap: 40px;
}

.process__badge {
  flex: none;
  width: 160px;
  padding: 10px;
  border-radius: var(--radius-media);
}

.process__label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--control-height-md);
  border-radius: var(--radius-control);
  font: var(--text-nav);
  color: var(--color-white);
  /* 140×36 (66:85). */
  background: linear-gradient(155.75deg, var(--color-blue-start) 13.35%, var(--color-blue-end) 85.61%);
}

.process__card {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
}

/*
 * Уже 1024 две группы в ряд не помещаются (заголовки наезжают друг на друга с ~975):
 * группы друг под другом, в каждой две карточки; общая линия скрыта — у шагов Process своя.
 */
@container page (width < 1024px) {
  .services {
    height: auto;
    padding-bottom: var(--section-gap);
  }

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

  .services__title {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .services__title--left {
    order: 1;
  }

  .services__item:nth-of-type(1) {
    order: 2;
  }

  .services__item:nth-of-type(2) {
    order: 3;
  }

  .services__title--right {
    order: 4;
    margin-top: 16px;
  }

  .services__item:nth-of-type(3) {
    order: 5;
  }

  .services__item:nth-of-type(4) {
    order: 6;
  }

  .services__axis {
    display: none;
  }

  /* Оранжевое пятно — за заголовком второй группы, примерно на середине секции. */
  .services__glow--orange {
    top: calc(50% - 250px);
    left: calc(var(--container-left) - 170px);
  }

  /* Рамка и картинка — в долях описанного квадрата 173.34, чтобы уменьшаться вместе с колонкой. */
  .services__media {
    width: min(173.34px, 100%);
    height: auto;
    aspect-ratio: 1;
  }

  .services__frame {
    top: 3.848%;
    left: 3.848%;
    width: 92.304%;
    height: 92.304%;
  }

  .services__image {
    top: 7.165%;
    left: 7.165%;
    width: 85.67%;
    height: 85.67%;
  }

  .services-process::before {
    display: none;
  }

  /* Process: вступление сверху, иллюстрация справа от него, шаги ниже — с линией через метки. */
  .process__inner {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 40px;
  }

  .process__intro {
    width: auto;
    max-width: 50%;
  }

  .process__image {
    top: 0;
    right: var(--container-left);
    left: auto;
    width: min(45%, 360px);
  }

  .process__glow {
    left: auto;
    right: calc(var(--container-left) - 120px);
    width: min(60%, 480px);
  }

  .process__steps {
    position: relative;
  }

  .process__steps::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 80px;
    width: 1px;
    background: linear-gradient(rgb(63 170 240 / 0), var(--color-blue-start) 60px, var(--color-blue-start) calc(100% - 60px), rgb(63 170 240 / 0));
  }

  .process__badge {
    position: relative;
  }
}

/*
 * Телефон: карточки Staff Aug — две узкие колонки; Process — иллюстрация между вступлением
 * и шагами, метка «Step» над заголовком шага, линия слева от меток.
 */
@container page (width < 768px) {
  .services__grid {
    column-gap: 20px;
  }

  .process {
    display: flex;
    flex-direction: column;
  }

  .process__inner {
    display: contents;
  }

  .process__intro,
  .process__steps {
    width: var(--container-width);
    max-width: none;
    margin-inline: auto;
  }

  .process__intro {
    order: 1;
  }

  /*
   * Как в макете, иллюстрация ниже пятна. У элемента гибкой раскладки с order порядок отрисовки
   * берётся из order, а не из разметки, поэтому уровень задан явно.
   */
  .process__image {
    position: relative;
    z-index: -2;
    order: 2;
    right: auto;
    width: min(100%, 420px);
    margin: 24px auto 16px;
  }

  .process__glow {
    right: -160px;
    width: 480px;
  }

  .process__steps {
    order: 3;
    padding-left: 20px;
  }

  .process__steps::before {
    left: 0;
  }

  .process__step {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .process__card {
    padding: 12px 0 24px;
  }
}

/* ---------- Talent: 2378–2950 ---------- */

.talent {
  padding-bottom: var(--section-gap);
}

.talent__cards {
  display: flex;
  gap: 40px;
  margin-top: 32px;
}

.talent__item {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  max-width: 260px;
}

/* В макете у этой раскладки первый слой сверху: фото лежит поверх карточки. */
.talent__photo {
  position: relative;
  z-index: 1;
  width: 140px;
  height: 140px;
}

/* Карточка наезжает на фото на 70 px (gap −70 в макете). */
.talent__card {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: -70px;
  padding: 86px 24px 24px;
  border-radius: var(--radius-block);
}

.talent__text {
  flex: 1;
  min-height: 120px;
}

.talent__text b {
  font-weight: 700;
}

/* Уже 1024 четыре карточки в ряд слишком узкие — по две. */
@container page (width < 1024px) {
  .talent__cards {
    flex-wrap: wrap;
    row-gap: 32px;
  }

  .talent__item {
    flex: 0 0 calc((100% - 40px) / 2);
    max-width: none;
  }
}

/*
 * Телефон: вкладки — одна строка с прокруткой от края до края экрана (отступ сверху и снизу —
 * чтобы прокрутка не срезала рамку фокуса); карточки — лента со свайпом, видна одна и край следующей.
 */
@container page (width < 768px) {
  .talent__cards {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--page-gutter));
    padding-inline: var(--page-gutter);
    scroll-padding-inline: var(--page-gutter);
  }

  .talent__cards::-webkit-scrollbar {
    display: none;
  }

  .talent__cards {
    flex-wrap: nowrap;
    gap: 16px;
    margin-top: 28px;
    padding-block: 4px;
    scroll-snap-type: x mandatory;
  }

  .talent__item {
    flex: 0 0 min(260px, 100% - 60px);
    scroll-snap-align: start;
  }
}

/* ---------- Industries: 2950–3314 ---------- */

.industries {
  padding-bottom: var(--section-gap);
}

/* Свечение 67:241 — эллипс 1600×364 с прогрессивным размытием: PNG 1800×564 от x −200, y 2786. */
.industries__glow {
  position: absolute;
  z-index: -1;
  top: -164px;
  left: calc(50% - 900px);
  max-width: none;
}

.industries__block {
  position: relative;
  /* Высота из макета: после удаления меток блок стал ниже, и картинка выступала вниз на 136 px вместо 52. */
  min-height: 300px;
  padding: 24px;
  border-radius: var(--radius-block);
  /* 1160×300 (67:202). */
  background: linear-gradient(155.63deg, var(--color-blue-start) 13.35%, var(--color-blue-end) 85.61%);
}

.industries__title-line {
  display: block;
}

.industries__title-line--accent {
  color: var(--color-white);
}

.industries__text {
  margin-top: 32px;
  font: var(--text-body);
  color: var(--color-white);
}

/* Текст — левее картинки: на 1400 место до неё 709, всё помещается как в макете. */
.industries__content {
  max-width: calc(100% - 403px);
}

/* 340×320 (x 877, y 2982, 63 px от правого края блока) — выходит за низ блока на 52 px. */
.industries__image {
  position: absolute;
  top: 32px;
  right: 63px;
  width: 340px;
  height: 320px;
  max-width: none;
}

/* Планшет: картинка справа меньше, текст — левее неё. */
@container page (width < 1024px) {
  .industries__content {
    max-width: calc(100% - min(36%, 260px) - 16px);
  }

  .industries__image {
    top: 24px;
    right: 24px;
    width: min(36%, 260px);
    height: auto;
  }
}

/* Телефон: картинка под текстом и, как в макете, выходит за низ синего блока. */
@container page (width < 768px) {
  .industries__content {
    max-width: none;
  }

  .industries__image {
    position: static;
    display: block;
    width: min(100%, 280px);
    margin: 24px auto -48px;
  }
}

/* ---------- Engagement Models: 3314–3736 ---------- */

.engagement {
  padding-bottom: var(--section-gap);
}

.engagement__cards {
  display: flex;
  gap: 40px;
  margin-top: 32px;
}

.engagement__card {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 360px;
  padding: 24px;
  border-radius: var(--radius-block);
}

.engagement__list {
  margin-top: 24px;
}

.engagement__list li::before {
  content: "• ";
}

.engagement__note {
  margin-top: 32px;
}

/* Уже 900 три карточки в ряд слишком узкие — одна колонка. */
@container page (width < 900px) {
  .engagement__cards {
    flex-direction: column;
    gap: 16px;
  }

  .engagement__card {
    max-width: none;
  }
}

/* ---------- Testimonials: 3736–4214 ---------- */

.testimonials {
  padding-bottom: var(--section-gap);
}

.testimonials__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.testimonials__controls {
  display: flex;
  gap: 10px;
}

/* 40×40 (78:64); стрелка — контур из выгрузки кнопки целиком, «назад» — зеркально. */
.testimonials__arrow {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-round);
  background: linear-gradient(119.72deg, var(--color-blue-start) 13.35%, var(--color-blue-end) 85.61%);
  transition: filter 0.2s ease;
}

.testimonials__arrow:hover {
  filter: brightness(0.95);
}

.testimonials__arrow img {
  position: absolute;
  inset: 0;
}

.testimonials__viewport {
  margin-top: 32px;
  overflow: clip;
}

.testimonials__track {
  display: flex;
  gap: 40px;
}

.testimonials__card {
  display: flex;
  flex: 0 0 calc((100% - 40px) / 2);
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: var(--radius-block);
}

.testimonials__quote {
  flex: 1;
  font: var(--text-lead);
  color: var(--color-text);
}

.testimonials__author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.testimonials__photo {
  width: 60px;
  height: 60px;
}

/* Уже 1024 — одна карточка; стрелки остаются, на телефоне ещё и свайп (js/main.js). */
@container page (width < 1024px) {
  .testimonials__card {
    flex-basis: 100%;
  }

  .testimonials__viewport {
    touch-action: pan-y;
  }
}

@container page (width < 768px) {
  .testimonials__head {
    gap: 16px;
  }

  .testimonials__quote {
    font: var(--text-body);
    color: var(--color-text);
  }
}

/* ---------- CTA-форма: 4214–4552 ---------- */

.cta {
  padding-bottom: var(--section-gap);
}

/* Свечение 79:168 — эллипс 1600×338 с прогрессивным размытием: PNG 1800×538 от x −200, y 4050. */
.cta__glow {
  position: absolute;
  z-index: -1;
  top: -164px;
  left: calc(50% - 900px);
  max-width: none;
}

.cta__block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 48px;
  padding: 48px;
  border-radius: var(--radius-block);
  /* 1160×274 (79:112). */
  background: linear-gradient(157.52deg, var(--color-blue-start) 13.35%, var(--color-blue-end) 85.61%);
}

.cta__title {
  align-self: stretch;
  text-align: center;
}

.cta__title-accent {
  color: var(--color-white);
}

.cta__fields {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  align-items: flex-end;
  gap: 16px;
}

.cta__row {
  display: flex;
  gap: 10px;
  width: 100%;
}

/* Общая основа 348: с flex-basis 0 внутренние отступы кнопки (48) и полей (26) делали их разной ширины. */
.cta__input,
.cta__submit {
  flex: 1 1 348px;
  min-width: 0;
}

.cta__input {
  height: var(--control-height-lg);
  padding: 0 13px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--color-white);
  font: var(--text-input);
  color: var(--color-text);
}

.cta__input::placeholder {
  color: var(--color-placeholder);
  opacity: 1;
}

/* 348×50 (79:123). */
.cta__submit {
  background: linear-gradient(165.87deg, var(--color-accent-light) 13.35%, var(--color-accent) 49.13%);
}

/* Согласие — строка текста под кнопкой: галочку заказчик убрал (docs/differences.md). */
.cta__consent {
  font: var(--text-body);
  color: var(--color-white);
}

/* В макете линия на 2 px ниже базовой (у браузера по умолчанию — на 1). */
.cta__policy {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Планшет: отступы блока меньше, согласие — слева под полями. */
@container page (width < 1024px) {
  .cta__block {
    gap: 32px;
    padding: 32px;
  }

  .cta__consent {
    align-self: flex-start;
    width: auto;
  }
}

/* Телефон: поля и кнопка друг под другом во всю ширину. */
@container page (width < 768px) {
  .cta__block {
    gap: 24px;
    padding: 24px 20px;
  }

  .cta__row {
    flex-direction: column;
    gap: 12px;
  }

  .cta__input,
  .cta__submit {
    flex: none;
    width: 100%;
  }
}

/* ---------- Mission: 4552–4912 ---------- */

/* Секция теперь короткая: заголовок и три пункта (цитата, подпись и фото убраны заказчиком). */
.mission {
  padding-bottom: var(--section-gap);
}

/* Ряд 1080 (x 160) — на 40 px уже контейнера с каждой стороны, как в макете. */
.mission__inner {
  position: relative;
  width: calc(var(--container-width) - 80px);
  max-width: 1080px;
  margin-inline: auto;
}

/* Пятно 394×223 с размытием 120: PNG 634×463 от x 184, y 4626. */
.mission__glow {
  position: absolute;
  z-index: -1;
  top: 74px;
  left: calc(var(--container-left) + 64px);
  max-width: none;
}

.mission__offer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: auto;
  max-width: 375px;
}

.mission__title {
  font: var(--text-title);
  color: var(--color-black);
}

.mission__list {
  font: var(--text-body);
  color: var(--color-black);
}

.mission__list li::before {
  content: "• ";
}

/* ---------- Подвал: 4912–5060 ---------- */

.footer {
  height: 148px;
  padding-top: 40px;
  background: var(--color-footer);
}

.footer__inner {
  display: flex;
  gap: 40px;
}

.footer__inner > * {
  flex: 1;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer__tagline,
.footer__copyright {
  font: var(--text-footer);
  color: var(--color-text-secondary);
}

/* Две колонки ссылок: x 520 и 718.65, шаг строк 28. */
.footer__nav {
  display: grid;
  grid-template-columns: 198.65px auto;
  align-content: start;
  row-gap: 8px;
}

.footer__link {
  justify-self: start;
  font: var(--text-footer);
  color: var(--color-text);
}

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



/* Планшет: логотип и меню в ряд, юридические ссылки ниже. */
@container page (width < 1024px) {
  .footer {
    height: auto;
    padding-block: 40px 32px;
  }

  .footer__inner {
    flex-wrap: wrap;
    row-gap: 24px;
  }

  .footer__legal {
    flex-basis: 100%;
  }
}

/* Телефон: одна колонка, меню — в две. */
@container page (width < 768px) {
  .footer__inner {
    flex-direction: column;
  }

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

/* ---------- Поп-ап с формой ---------- */

/*
 * Родной <dialog>: затемнение — ::backdrop, Esc и удержание фокуса внутри — от браузера.
 * Элемент лежит вне .page, поэтому ширины здесь — обычные @media, а не @container page.
 */
.modal {
  /* Сброс в base.css снимает margin, а <dialog> центрируется именно им (inset: 0 + margin: auto). */
  margin: auto;
  width: min(440px, 100% - 40px);
  max-height: calc(100dvh - 40px);
  padding: 40px 32px 32px;
  border: 0;
  border-radius: var(--radius-block);
  background: var(--color-white);
  box-shadow: 0 24px 64px rgb(14 17 22 / 0.18);
  color: var(--color-text);
}

.modal::backdrop {
  background: rgb(14 17 22 / 0.6);
}

/* Появление: плавно на открытие и закрытие (discrete — чтобы display и top-layer тоже анимировались). */
@media (prefers-reduced-motion: no-preference) {
  .modal,
  .modal::backdrop {
    transition:
      opacity 0.2s ease,
      transform 0.2s ease,
      overlay 0.2s allow-discrete,
      display 0.2s allow-discrete;
  }

  .modal,
  .modal::backdrop {
    opacity: 0;
  }

  .modal {
    transform: translateY(8px) scale(0.98);
  }

  .modal[open],
  .modal[open]::backdrop {
    opacity: 1;
  }

  .modal[open] {
    transform: none;
  }

  @starting-style {
    .modal[open],
    .modal[open]::backdrop {
      opacity: 0;
    }

    .modal[open] {
      transform: translateY(8px) scale(0.98);
    }
  }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--color-placeholder);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.modal__close:hover {
  background: var(--color-page);
  color: var(--color-text);
}

.modal__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal__title {
  font: var(--text-h2);
  font-size: 28px;
  line-height: 1.15;
  text-align: center;
}

/* Акцент — тот же синий градиент по тексту, что в заголовке первого экрана. */
.modal__title-accent {
  background: linear-gradient(171.1deg, var(--color-blue-start) 13.35%, var(--color-blue-end) 85.61%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.modal__fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.modal__input {
  height: var(--control-height-lg);
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-white);
  font: var(--text-input);
  color: var(--color-text);
}

.modal__input::placeholder {
  color: var(--color-placeholder);
  opacity: 1;
}

/* Телефон — одно поле: флаг со списком стран, код страны и сам номер под общей рамкой. */
.modal__phone {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--control-height-lg);
  padding-left: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-white);
}

/* Поле телефона — из нескольких частей, поэтому контур фокуса рисуем вокруг всего поля,
 * чтобы он совпадал с контуром поля имени. */
.modal__phone:has(.modal__input--phone:focus-visible) {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.modal__country {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--color-placeholder);
}

.modal__flag {
  font-size: 18px;
  line-height: 1;
}

/* Список стран — родной <select> поверх флага: на телефоне открывается системный выбор. */
.modal__select {
  position: absolute;
  inset: -6px -4px;
  opacity: 0;
  cursor: pointer;
}

/* Сам <select> прозрачный, поэтому рамку фокуса рисуем вокруг флага. */
.modal__country:has(.modal__select:focus-visible) {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.modal__dial {
  font: var(--text-input);
  color: var(--color-text);
}

.modal__input--phone {
  flex: 1;
  min-width: 0;
  /* Своя высота 50 перекрыла бы рамку общего поля на 1 px сверху и снизу — тянемся по содержимому. */
  align-self: stretch;
  height: auto;
  padding-left: 0;
  border: 0;
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: transparent;
}

.modal__input--phone:focus {
  outline: none;
}

/* Ширину задаём после @supports-правила для .btn (там fit-content) — поэтому 100% остаётся за нами. */
.modal__submit {
  width: 100%;
  margin-top: 4px;
  background: linear-gradient(165.87deg, var(--color-accent-light) 13.35%, var(--color-accent) 49.13%);
  font: var(--text-body-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal__note {
  font: var(--text-small);
  color: var(--color-placeholder);
  text-align: center;
}

.modal__policy {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Телефон: карточка уже, отступы меньше. */
@media (width < 480px) {
  .modal {
    padding: 32px 20px 24px;
  }

  .modal__title {
    font-size: 24px;
  }
}
