/* =========================================================
   Avangard Engineering — основная дизайн-система
   Переменные :root объявляются только здесь (см. PLAN.md, контракт)
   ========================================================= */

:root {
  --c-red: #DD2A12;
  --c-cyan: #00A9CE;
  --c-ink: #1E1E1E;
  --c-text: #2B2F33;
  --c-muted: #5F6670; /* QA: было #6B7280, на фоне #F4F5F6 давало 4,4:1 (<4,5) */
  --c-bg: #FFFFFF;
  --c-bg-alt: #F4F5F6;
  --c-line: #E3E5E8;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --font: 'Onest', system-ui, sans-serif;
  --container: 1240px;
  --header-h: 76px;
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--c-red); outline-offset: 3px; }
/* QA: main.js переносит фокус на цель якоря (tabindex="-1"); рамка вокруг всей секции не нужна */
main[tabindex="-1"]:focus,
section[tabindex="-1"]:focus { outline: none; }

/* ---------- Типографика ---------- */
h1, h2, h3 {
  color: var(--c-ink);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
h2 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.06; }
h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--c-ink);
  color: #fff;
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 30px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--c-red); color: #fff; }
.btn--primary:hover { background: #B9220E; }
.btn--ghost-light { border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--c-ink); border-color: #fff; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: .9375rem; }
.btn--block { width: 100%; }

/* ---------- Фирменные плашки ---------- */
.plate {
  position: absolute;
  display: block;
  pointer-events: none;
}
.plate--red { background: var(--c-red); }
.plate--cyan { background: var(--c-cyan); }

/* ---------- Шапка ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  color: #fff;
  background: transparent;
  transition: background-color .3s ease, box-shadow .3s ease, color .3s ease;
}
.site-header.is-scrolled,
body.nav-open .site-header {
  background: #fff;
  color: var(--c-ink);
  box-shadow: 0 1px 0 var(--c-line), 0 8px 24px rgba(0,0,0,.06);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}
.site-header__inner > .nav { margin-left: auto; } /* бренд слева, меню + язык справа */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand__logo { width: auto; height: 32px; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.brand__sub {
  margin-top: 4px;
  font-weight: 600;
  font-size: .6875rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: .72;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__list { display: flex; align-items: center; gap: 24px; }
.nav__link {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  white-space: nowrap;
  font-weight: 600;
  font-size: .9375rem;
  transition: opacity .2s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--c-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: 20px; }
.nav__phone { font-weight: 700; font-size: .9375rem; white-space: nowrap; }
.nav__phone:hover { color: var(--c-red); }

/* ---------- Переключатель языка ----------
   На тёмной прозрачной шапке белый, в .is-scrolled и при открытом меню тёмный (наследует color шапки).
   Активный язык красный: на тёмном фоне светлее (#FF5A3F, контраст ≈5:1), на белом фирменный. */
.lang-switch {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.lang-switch__btn {
  position: relative;
  min-width: 42px;
  min-height: 40px;
  padding: 4px 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
  opacity: .78;
  transition: opacity .2s ease, color .2s ease;
}
.lang-switch__btn + .lang-switch__btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 14px;
  margin-top: -7px;
  background: currentColor;
  opacity: .35;
}
.lang-switch__btn::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 6px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform .25s ease;
}
.lang-switch__btn:hover { opacity: 1; }
.lang-switch__btn[aria-pressed="true"] { opacity: 1; color: #FF5A3F; cursor: default; }
.lang-switch__btn[aria-pressed="true"]::after { transform: scaleX(1); }
/* разделитель перед активной кнопкой остаётся цвета шапки, а не красным */
.lang-switch__btn[aria-pressed="true"]::before { background: #fff; }
.site-header.is-scrolled .lang-switch__btn[aria-pressed="true"],
body.nav-open .site-header .lang-switch__btn[aria-pressed="true"] { color: var(--c-red); }
.site-header.is-scrolled .lang-switch__btn[aria-pressed="true"]::before,
body.nav-open .site-header .lang-switch__btn[aria-pressed="true"]::before { background: var(--c-ink); }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.nav-toggle__bar {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle__bar:nth-child(1) { top: 15px; }
.nav-toggle__bar:nth-child(2) { top: 21px; }
.nav-toggle__bar:nth-child(3) { top: 27px; }
body.nav-open .nav-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Герой ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 64px) 0 clamp(72px, 13vh, 140px);
  color: #fff;
  background: var(--c-ink);
  overflow: hidden;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(15,17,19,.55) 0%, rgba(15,17,19,0) 22%),
    linear-gradient(90deg, rgba(15,17,19,.86) 0%, rgba(15,17,19,.62) 42%, rgba(15,17,19,.18) 100%),
    linear-gradient(0deg, rgba(15,17,19,.5) 0%, rgba(15,17,19,0) 40%);
}
.hero__plate-red {
  right: 0;
  bottom: 0;
  width: clamp(120px, 24vw, 400px);
  height: clamp(110px, 30vh, 340px);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  z-index: 0;
}
.hero__plate-cyan {
  left: 0;
  top: var(--header-h);
  width: clamp(56px, 9vw, 150px);
  height: clamp(80px, 20vh, 220px);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  z-index: 0;
}
.hero__inner { position: relative; z-index: 1; }
.hero__kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.82);
}
.hero__kicker::before {
  content: "";
  width: 40px;
  height: 2px;
  background: var(--c-red);
  flex-shrink: 0;
}
.hero__title {
  max-width: 15ch;
  color: #fff;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.hero__slogan {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  margin-top: 32px;
  font-size: clamp(.9375rem, 1.3vw, 1.125rem);
  font-weight: 600;
  color: rgba(255,255,255,.92);
}
.hero__slogan span { padding: 0 16px; border-left: 1px solid rgba(255,255,255,.4); }
.hero__slogan span:first-child { padding-left: 0; border-left: 0; }
.hero__since {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin-top: 12px;
  font-size: .9375rem;
  color: rgba(255,255,255,.7);
}
.hero__since > span + span {
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,.35);
}
.hero__geo { color: rgba(255,255,255,.88); font-weight: 600; }
/* Казахский и английский заголовки длиннее русского */
html[lang="kk"] .hero__title { max-width: 18ch; font-size: clamp(2.25rem, 5.2vw, 4.75rem); }
html[lang="en"] .hero__title { max-width: 16ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 1;
  width: 26px;
  height: 44px;
  margin-left: -13px;
  border: 1.5px solid rgba(255,255,255,.55);
  border-radius: 14px;
}
.hero__scroll span {
  position: absolute;
  left: 50%;
  top: 9px;
  width: 2px;
  height: 8px;
  margin-left: -1px;
  background: #fff;
  border-radius: 2px;
  animation: hero-scroll 1.8s ease-in-out infinite;
}
@keyframes hero-scroll {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Цифры ---------- */
.stats {
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
}
.stats__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 48px 32px;
  border-left: 1px solid var(--c-line);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__num {
  position: relative;
  font-size: clamp(2.5rem, 4.4vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums;
}
.stat__num::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: 22px;
  background: var(--c-red);
}
.stat__num--text {
  font-size: clamp(1.5rem, 2.3vw, 2rem);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.stat__label { margin-top: auto; font-size: .9375rem; color: var(--c-muted); line-height: 1.45; max-width: 24ch; }

/* ---------- Секции, общие ---------- */
.section {
  position: relative;
  padding: clamp(80px, 10vw, 140px) 0;
}
.section--alt { background: var(--c-bg-alt); }

.section-head { max-width: 780px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head--row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px 64px;
  align-items: end;
  max-width: none;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-ink);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--c-red);
  flex-shrink: 0;
}
.eyebrow--light { color: rgba(255,255,255,.85); }
.section-head h2 + .lead { margin-top: 24px; }
.lead {
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  line-height: 1.65;
  color: var(--c-muted);
}
.block-title {
  margin-bottom: 24px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* ---------- О компании ---------- */
.about__top {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 64px;
  align-items: center;
  margin-bottom: clamp(56px, 7vw, 96px);
}
.about__top .section-head { margin-bottom: 0; }
.about__figure {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 4.4;
  background: var(--c-bg-alt);
}
.about__figure img { width: 100%; height: 100%; object-fit: cover; }
.about__plate {
  left: 0;
  top: 0;
  width: 26%;
  height: 22%;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.about__figure figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px 20px 16px;
  font-size: .8125rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,.6), rgba(0,0,0,0));
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 32px;
  counter-reset: feature;
}
.feature {
  position: relative;
  padding: 28px 0 40px;
  border-top: 1px solid var(--c-line);
  counter-increment: feature;
}
.feature::before {
  content: counter(feature, decimal-leading-zero);
  display: block;
  margin-bottom: 18px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--c-red);
}
.feature::after {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 40px;
  height: 2px;
  background: var(--c-ink);
}
.feature h3 { margin-bottom: 10px; }
.feature p { font-size: .9375rem; color: var(--c-muted); line-height: 1.6; }

/* География работы */
.geo {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 32px 64px;
  align-items: center;
  margin-top: clamp(32px, 4vw, 56px);
  padding: clamp(28px, 4.5vw, 56px);
  border-radius: var(--radius);
  background: var(--c-bg-alt);
  overflow: hidden;
}
.geo__plate {
  right: 0;
  top: 0;
  width: clamp(48px, 7vw, 96px);
  height: clamp(48px, 7vw, 96px);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.geo__body { position: relative; }
.geo__title {
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.geo__text { margin-top: 16px; font-size: 1.0625rem; line-height: 1.65; color: var(--c-muted); max-width: 52ch; }
.geo__points { position: relative; border-top: 1px solid #D5D9DE; }
.geo__point {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #D5D9DE;
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1.4;
}
.geo__icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--c-red);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.about__bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: clamp(40px, 5vw, 72px);
  padding-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--c-line);
}
.values__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--c-line);
  border-left: 1px solid var(--c-line);
}
.value {
  padding: 24px;
  border-right: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}
.value dt { font-weight: 800; font-size: 1.125rem; color: var(--c-ink); }
.value dd { margin-top: 6px; font-size: .9375rem; color: var(--c-muted); }

.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tags li {
  padding: 9px 16px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--c-text);
  background: #fff;
}

/* ---------- Услуги ---------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.service {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px 36px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.service:nth-child(9),
.service:nth-child(10) { grid-column: span 2; }
.service::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--c-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.service:hover {
  border-color: #CDD1D6;
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}
.service:hover::after { transform: scaleX(1); }
.service__num {
  position: absolute;
  top: 28px;
  right: 28px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--c-muted);
}
.service__icon {
  width: 44px;
  height: 44px;
  margin-bottom: 40px;
  fill: none;
  stroke: var(--c-red);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service h3 { margin-bottom: 10px; hyphens: auto; overflow-wrap: break-word; }
.service p { font-size: .9375rem; color: var(--c-muted); line-height: 1.55; }

/* ---------- Портфолио: только обёртка, остальное в portfolio.css ---------- */
.portfolio__filters { margin-bottom: 32px; }

/* ---------- Инженерия ---------- */
.engineering { background: var(--c-bg-alt); overflow: hidden; }
.engineering .container { position: relative; z-index: 1; }
.engineering__plate-red {
  right: 0;
  top: 0;
  width: clamp(60px, 10vw, 160px);
  height: clamp(60px, 10vw, 160px);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.engineering__plate-cyan {
  left: 0;
  bottom: 0;
  width: clamp(48px, 7vw, 110px);
  height: clamp(48px, 7vw, 110px);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}
.clients {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin-bottom: 48px;
  padding: 26px 0;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}
.clients__title {
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.clients__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 0;
}
.clients__list li {
  padding: 0 22px;
  border-left: 1px solid #CDD1D6;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.005em;
  color: var(--c-ink);
  white-space: nowrap;
}
.clients__list li:first-child { padding-left: 0; border-left: 0; }
.engineering__tabs { margin-bottom: 28px; }

/* ---------- Технологии ---------- */
.software {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 32px;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.software__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 0 28px;
  border-top: 1px solid var(--c-line);
}
.software__name { font-weight: 800; font-size: 1.125rem; color: var(--c-ink); line-height: 1.3; }
.software__role { font-size: .875rem; color: var(--c-muted); }

.aad {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px 72px;
  align-items: end;
  padding: clamp(36px, 6vw, 72px);
  border-radius: var(--radius);
  background: var(--c-ink);
  color: rgba(255,255,255,.78);
  overflow: hidden;
  isolation: isolate;
}
.aad__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(120deg, transparent 15%, #000 85%);
  mask-image: linear-gradient(120deg, transparent 15%, #000 85%);
}
.aad__plate {
  right: 0;
  top: 0;
  width: clamp(70px, 12vw, 180px);
  height: clamp(70px, 12vw, 180px);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.aad__body { position: relative; }
.aad__title {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
}
.aad__text { margin-top: 20px; font-size: 1.0625rem; line-height: 1.65; max-width: 46ch; }
.aad__benefits { position: relative; }
.aad__benefits li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,.14);
  font-weight: 700;
  color: #fff;
}
.aad__benefits li:first-child { border-top: 1px solid rgba(255,255,255,.14); }
.aad__benefits li::before {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  background: var(--c-red);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  transform: translateY(1px);
}

/* ---------- Как мы работаем ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0 24px;
  counter-reset: none;
}
.step {
  position: relative;
  padding-top: 36px;
  border-top: 2px solid var(--c-line);
}
.step::before {
  content: "";
  position: absolute;
  left: 0;
  top: -7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-bg-alt);
  border: 2px solid var(--c-red);
}
.step__num {
  display: block;
  margin-bottom: 20px;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--c-ink);
}
.step h3 { margin-bottom: 10px; font-size: 1.25rem; }
.step p { font-size: .9375rem; color: var(--c-muted); line-height: 1.6; }

/* ---------- Контакты ---------- */
.contacts__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contacts__list { border-top: 1px solid var(--c-line); }
.contacts__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--c-line);
}
.contacts__row dt {
  padding-top: 4px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.contacts__row dd {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: clamp(1.0625rem, 1.6vw, 1.3125rem);
  font-weight: 700;
  color: var(--c-ink);
  overflow-wrap: anywhere;
}
.contacts__row dd.contacts__geo { font-size: clamp(1rem, 1.4vw, 1.125rem); }
.contacts__row a { transition: color .2s ease; }
.contacts__row a:hover { color: var(--c-red); }

.form {
  position: relative;
  padding: clamp(28px, 4vw, 48px);
  background: var(--c-bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
}
.form__plate {
  right: 0;
  top: 0;
  width: 72px;
  height: 72px;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.form__title { margin-bottom: 28px; font-size: 1.5rem; font-weight: 800; }
.form__field { margin-bottom: 18px; }
.form__field label {
  display: block;
  margin-bottom: 8px;
  font-size: .875rem;
  font-weight: 700;
  color: var(--c-ink);
}
.form__field label .form__req { color: var(--c-red); }
.form input,
.form textarea {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #D5D9DE;
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--c-ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form textarea { min-height: 128px; resize: vertical; }
.form input::placeholder,
.form textarea::placeholder { color: #6E7580; } /* QA: было #9AA0A8 (2,6:1) */
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--c-ink);
  box-shadow: 0 0 0 3px rgba(221,42,18,.18);
}
.form input[aria-invalid="true"],
.form textarea[aria-invalid="true"],
.form .is-invalid { border-color: var(--c-red); }
.form .btn { margin-top: 8px; }
.form__note { margin-top: 14px; font-size: .8125rem; color: var(--c-muted); }
.form-status { min-height: 1.5em; margin-top: 10px; font-size: .9375rem; font-weight: 600; color: var(--c-ink); }
.form-status:empty { margin-top: 0; }
.form-status.is-error { color: #B9220E; } /* QA: #DD2A12 на #F4F5F6 = 4,4:1 */
.form-status.is-success { color: #0F7A3A; }

/* ---------- Подвал ---------- */
.site-footer {
  position: relative;
  padding: 48px 0;
  background: var(--c-ink);
  color: rgba(255,255,255,.66);
  font-size: .9375rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
}
.brand--footer { color: #fff; }
.site-footer__slogan { font-weight: 600; color: rgba(255,255,255,.85); }

/* ---------- Появление при скролле ----------
   Прячем только при работающем JS (класс .js на <html>) */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Адаптив ---------- */
/* QA: шапка (логотип + 6 пунктов + телефон + кнопка) не помещалась в контейнер
   1101–1279 px и 821–~1010 px. Телефон показываем от 1280 px, кнопку прячем
   на узком планшете (CTA есть в герое). */
/* Этап 2: в шапке появился переключатель языка, а казахские и английские пункты длиннее русских.
   Телефон в шапке показываем от 1440 px (на казахском не показываем: он есть в меню на мобильном,
   в контактах и в герое), кнопку «Обсудить проект» прячем на 821–1100 px, подпись логотипа на 821–1000 px. */
@media (max-width: 1439px) {
  .nav__phone { display: none; }
}
@media (min-width: 821px) {
  html[lang="kk"] .nav__phone { display: none; }
}
@media (min-width: 1101px) and (max-width: 1279px) {
  .site-header__inner { gap: 20px; }
  .nav { gap: 20px; }
  .nav__list { gap: 18px; }
}
@media (min-width: 821px) and (max-width: 1100px) {
  .site-header__inner { gap: 20px; }
  .nav__actions { display: none; }
  .nav .nav__list { gap: 16px; } /* специфичнее правила из блока 1100px ниже */
}
@media (min-width: 821px) and (max-width: 1000px) {
  .site-header .brand__text { display: none; }
}

@media (max-width: 1100px) {
  .nav { gap: 24px; }
  .nav__list { gap: 20px; }
  .nav__phone { display: none; }

  .stat { padding: 40px 20px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .service:nth-child(9),
  .service:nth-child(10) { grid-column: auto; }
  .software { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 48px 24px; }
  .about__top { gap: 48px; }
  .about__bottom { gap: 48px; }
  .contacts__inner { gap: 48px; }
}

@media (max-width: 820px) {
  :root { --header-h: 68px; }

  .site-header__inner { gap: 12px; }
  .lang-switch { margin-left: auto; } /* меню вынесено из потока: язык прижимаем к бургеру */
  .nav-toggle { display: block; margin-right: -8px; flex-shrink: 0; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 32px;
    padding: 16px 24px 32px;
    background: #fff;
    color: var(--c-ink);
    border-top: 1px solid var(--c-line);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .25s ease, transform .25s ease, visibility 0s;
  }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list li { border-bottom: 1px solid var(--c-line); }
  .nav__link { display: block; padding: 18px 0; font-size: 1.375rem; font-weight: 700; }
  .nav__link::after { bottom: -1px; }
  .nav__actions { flex-direction: column; align-items: stretch; gap: 16px; }
  .nav__phone { display: block; font-size: 1.125rem; }
  .nav__actions .btn { min-height: 54px; }

  .hero { align-items: flex-end; }
  .hero__scroll { display: none; }
  .hero::before {
    background:
      linear-gradient(180deg, rgba(15,17,19,.6) 0%, rgba(15,17,19,.25) 30%, rgba(15,17,19,.55) 60%, rgba(15,17,19,.88) 100%);
  }

  .stats__list { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 36px 20px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--c-line); }

  .section-head--row { grid-template-columns: 1fr; }
  .about__top { grid-template-columns: 1fr; }
  .about__figure { aspect-ratio: 4 / 3; }
  .about__bottom { grid-template-columns: 1fr; }
  .geo { grid-template-columns: 1fr; }
  .software { grid-template-columns: repeat(2, 1fr); }
  .aad { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .contacts__inner { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .container { padding-inline: 16px; }
  .nav { padding-inline: 16px; }
  .brand__logo { height: 28px; }
  .brand__name { font-size: .9375rem; }
  .brand__sub { font-size: .625rem; }
  .site-header__inner { gap: 8px; }
  .lang-switch__btn { min-width: 34px; padding: 4px 4px; font-size: .75rem; letter-spacing: .04em; }
  .lang-switch__btn::after { left: 6px; right: 6px; }

  .hero__title { font-size: clamp(2.125rem, 10vw, 2.75rem); }
  html[lang="kk"] .hero__title { max-width: none; font-size: clamp(1.875rem, 8.6vw, 2.5rem); }
  html[lang="en"] .hero__title { max-width: none; }
  .hero__since { display: block; }
  .hero__since > span { display: block; }
  .hero__since > span + span { margin: 4px 0 0; padding: 0; border: 0; }
  .hero__kicker { font-size: .6875rem; letter-spacing: .12em; margin-bottom: 20px; }
  .hero__kicker::before { width: 24px; }
  .hero__slogan { margin-top: 24px; }
  .hero__slogan span { padding: 0 10px; }
  .hero__actions { margin-top: 32px; }
  .hero__actions .btn { flex: 1 1 auto; }

  .stats__list { grid-template-columns: 1fr; }
  .stat { padding: 28px 0; border-left: 0; }
  .stat:nth-child(n+2) { border-top: 1px solid var(--c-line); }
  .stat__num::before { margin-bottom: 16px; }

  .features { grid-template-columns: 1fr; }
  .feature { padding-bottom: 28px; }
  .values__list { grid-template-columns: 1fr; }
  .tags li { font-size: .875rem; padding: 8px 14px; }
  .services__grid { grid-template-columns: 1fr; }
  .service { padding: 28px 24px 30px; }
  .service__icon { margin-bottom: 28px; }
  .clients { gap: 14px; }
  .clients__list li { padding: 0 14px; }
  .software { grid-template-columns: 1fr; gap: 0; }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .contacts__row { grid-template-columns: 1fr; gap: 6px; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
  .geo__point { gap: 12px; padding: 14px 0; }
}

/* Узкие телефоны: логотип, переключатель языка и бургер в одну строку */
@media (max-width: 400px) {
  .site-header .brand { gap: 8px; }
  .site-header .brand__sub { letter-spacing: .2em; }
}
@media (max-width: 340px) {
  .site-header .brand__text { display: none; }
}

/* ---------- Уменьшение анимаций ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .hero__scroll span { animation: none; }
}
