/* ============================================================
   DDCom Engineering — Проектирование и строительство · dd.com.kz
   Вариант 3: «Современный инженерный»
   ============================================================ */

/* ---------- 1. Переменные ---------- */
:root {
  /* Цвет */
  --bg:           #F4F6F9;
  --bg-alt:       #ECF1F8;
  --surface:      #FFFFFF;
  --navy:         #0E2A47;
  --navy-deep:    #0A1F36;
  --ink:          #16314F;
  --ink-soft:     #3F5570;
  --accent:         #D7261E;  /* фирменный красный — акцент действий */
  --accent-ink:     #B7211A;  /* красный для мелкого текста на светлом фоне (AA) */
  --accent-soft:    #FBE9E8;  /* красная подложка ховеров и активных пунктов */
  --accent-on-dark: #FF9B92;  /* красный акцент на тёмном фоне подвала */
  --blueprint:      #1F6FEB;  /* «чертёжная» синь — линии, сетки, графика */
  --blueprint-ink:  #155BD0;  /* синий для мелких подписей на светлом (AA) */
  --blueprint-soft: #E5EEFC;  /* синяя подложка иконок и тегов */
  --line:         #D7E3F4;
  --line-strong:  #BFD4EF;
  --on-navy:      #E8EFF9;
  --on-navy-soft: #9FB4CD;

  /* Типографика */
  --font-sans: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, "Courier New", monospace;

  /* Геометрия */
  --radius:    16px;
  --radius-sm: 12px;
  --header-h:  72px;
  --container: 1180px;

  /* Тени */
  --shadow-sm: 0 1px 2px rgba(14, 42, 71, .05), 0 6px 20px rgba(14, 42, 71, .07);
  --shadow-md: 0 2px 4px rgba(14, 42, 71, .06), 0 14px 36px rgba(14, 42, 71, .12);
  --shadow-btn: 0 6px 16px rgba(215, 38, 30, .32);

  /* Анимация */
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. Базовые стили ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

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

ul[role="list"], ol[role="list"] { padding: 0; list-style: none; }

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

a { color: var(--accent-ink); text-decoration: none; }

a:hover { text-decoration: none; }

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

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

[tabindex="-1"]:focus { outline: none; }

/* Якоря: отступ под фиксированную шапку */
section[id], [id] { scroll-margin-top: calc(var(--header-h) + 20px); }

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}

.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--navy);
  color: #fff;
  border-radius: 0 0 10px 10px;
  font-weight: 600;
  transition: top .2s var(--ease);
}

.skip-link:focus { top: 0; }

/* ---------- 3. Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background-color .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: #B7211A;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(215, 38, 30, .4);
}

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

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

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-sm { padding: 10px 20px; font-size: .9375rem; }
.btn-lg { padding: 16px 34px; font-size: 1.0625rem; }
.btn-block { width: 100%; }

/* ---------- 4. Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

/* Фон и блюр вынесены в псевдоэлемент: backdrop-filter на самом
   хедере сделал бы его containing block для fixed-меню. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(244, 246, 249, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(14, 42, 71, .07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  /* currentColor в логотипе: тёмные части (штамб «D», ENGINEERING) */
  color: var(--navy);
}

.logo-mark {
  height: 48px;
  width: auto;
  aspect-ratio: 310 / 100;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.nav-link {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 500;
  font-size: .9688rem;
  color: var(--ink);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.nav-link:hover { color: var(--accent-ink); background: var(--accent-soft); }

.nav-link.is-active { color: var(--accent-ink); background: var(--accent-soft); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.header-phone {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--navy);
  transition: color .2s var(--ease);
}

.header-phone:hover { color: var(--accent-ink); }

.nav-extra { display: none; }

/* Бургер */
.burger {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.burger-line {
  position: absolute;
  left: 12px;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform .25s var(--ease), opacity .2s var(--ease), top .25s var(--ease);
}

.burger-line:nth-child(1) { top: 15px; }
.burger-line:nth-child(2) { top: 22px; }
.burger-line:nth-child(3) { top: 29px; }

body.menu-open .burger-line:nth-child(1) { top: 22px; transform: rotate(45deg); }
body.menu-open .burger-line:nth-child(2) { opacity: 0; }
body.menu-open .burger-line:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* Переключатель языка / Language switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.lang-sep { color: var(--line-strong); }

.lang-current {
  font-weight: 700;
  color: var(--navy);
}

.lang-link {
  padding: 4px 2px;
  color: var(--ink-soft);
  transition: color .2s var(--ease);
}

.lang-link:hover { color: var(--accent-ink); }

.nav-extra .lang-switch {
  justify-content: center;
  font-size: .9063rem;
}

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 110px);
  overflow: hidden;
  background-image:
    linear-gradient(rgba(31, 111, 235, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 111, 235, .055) 1px, transparent 1px),
    linear-gradient(rgba(31, 111, 235, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 111, 235, .035) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 140px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--blueprint-ink);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--blueprint);
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(2.1rem, 4.4vw + .6rem, 3.85rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.022em;
  color: var(--navy);
}

.hero-sub {
  max-width: 56ch;
  margin-top: 24px;
  font-size: clamp(1.0625rem, .5vw + .95rem, 1.1875rem);
  color: var(--ink-soft);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 44px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px dashed var(--line-strong);
}

.hero-trust li { display: grid; gap: 2px; }

.trust-num {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--navy);
}

.trust-label { font-size: .875rem; color: var(--ink-soft); }

.hero-art { min-width: 0; }

.hero-drawing {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 48px rgba(14, 42, 71, .14));
}

/* ---------- 6. Секции (общее) ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }

.section-alt { background: var(--bg-alt); }

.section-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-title {
  font-size: clamp(1.7rem, 2.2vw + .9rem, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.018em;
  color: var(--navy);
}

.section-sub {
  margin-top: 16px;
  font-size: 1.0625rem;
  color: var(--ink-soft);
}

/* ---------- 7. Услуги ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--blueprint-soft);
  color: var(--blueprint-ink);
}

.service-icon svg { width: 38px; height: 38px; }

.service-title {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
}

.service-card p { font-size: .9375rem; color: var(--ink-soft); }

/* ---------- 8. О компании ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}

.about-copy p + p { margin-top: 18px; }

.about-copy p { color: var(--ink-soft); }

.about-copy .section-title { margin-bottom: 24px; }

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

.counter {
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.counter-num {
  font-size: clamp(1.9rem, 1.6vw + 1.2rem, 2.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--blueprint-ink);
}

.counter-label { font-size: .9063rem; color: var(--ink-soft); }

/* ---------- 9. Проекты ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.project-media {
  position: relative;
  aspect-ratio: 18 / 11;
  background:
    linear-gradient(rgba(31, 111, 235, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 111, 235, .07) 1px, transparent 1px),
    linear-gradient(165deg, #EEF4FD 0%, #DFEAFA 100%);
  background-size: 22px 22px, 22px 22px, 100% 100%;
  border-bottom: 1px solid var(--line);
}

.project-media svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 22px 24px 26px;
}

.project-tag {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--blueprint-soft);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--blueprint-ink);
}

.project-title {
  font-size: 1.1563rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--navy);
}

.project-meta {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  font-size: .875rem;
  color: var(--ink-soft);
}

/* ---------- 10. Этапы ---------- */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
  counter-reset: step;
  margin: 0;
}

.steps::before {
  content: "";
  position: absolute;
  top: 31px;
  /* от центра первого штампа до центра последнего (5 колонок, зазор 28px) */
  left: 31px;
  right: calc((100% - 112px) / 5 - 31px);
  border-top: 2px dashed rgba(31, 111, 235, .4);
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-stamp {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 2px dashed var(--accent);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 6px var(--bg-alt);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent-ink);
  transform: rotate(-4deg);
}

.step-title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--navy);
}

.step p { font-size: .9063rem; color: var(--ink-soft); }

/* ---------- 11. Преимущества ---------- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.benefit {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}

.benefit:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.benefit-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: var(--navy);
  color: #CFE0FA;
}

.benefit-icon svg { width: 34px; height: 34px; }

.benefit-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy);
}

.benefit p { font-size: .9375rem; color: var(--ink-soft); }

/* ---------- 12. Контакты ---------- */
.section-contacts {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(31, 111, 235, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 111, 235, .04) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px;
}

.contacts-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 4.5vw, 64px);
  align-items: start;
}

.contacts-list {
  display: grid;
  gap: 26px;
}

.contacts-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contacts-item-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--blueprint-soft);
  color: var(--blueprint-ink);
}

.contacts-item-icon svg { width: 24px; height: 24px; }

.contacts-label {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.contacts-value {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--navy);
}

.contacts-value a {
  color: var(--navy);
  transition: color .2s var(--ease);
}

.contacts-value a:hover { color: var(--accent-ink); }

.contacts-note {
  margin-top: 32px;
  font-size: .875rem;
  color: var(--blueprint-ink);
}

/* Форма */
.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: clamp(26px, 3vw, 40px);
}

.form-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 22px;
}

.form-field { margin-bottom: 18px; }

.form-field label {
  display: block;
  margin-bottom: 8px;
  font-size: .9063rem;
  font-weight: 600;
  color: var(--navy);
}

.label-optional { font-weight: 400; color: var(--ink-soft); }

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}

.form-field textarea { resize: vertical; min-height: 110px; }

.form-field input::placeholder,
.form-field textarea::placeholder { color: #7A8CA3; }

/* Фокус полей — «чертёжный» синий: красный зарезервирован под ошибки */
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--blueprint);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(31, 111, 235, .15);
}

.form-field input[aria-invalid="true"] {
  border-color: #C8362B;
  background: #FDF3F2;
}

.field-error {
  margin-top: 7px;
  font-size: .8438rem;
  font-weight: 500;
  color: #B02A20;
}

.form-note {
  margin-top: 14px;
  font-size: .8125rem;
  color: var(--ink-soft);
  text-align: center;
}

.form-success {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 4px;
}

.form-success[hidden] { display: none; }

.form-success-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #E3F4E8;
  color: #1B7B3D;
}

.form-success-icon svg { width: 30px; height: 30px; }

.form-success-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy);
}

/* ---------- 13. Подвал ---------- */
.site-footer {
  background: var(--navy-deep);
  color: var(--on-navy-soft);
  padding: clamp(48px, 6vw, 72px) 0 0;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .7fr) minmax(0, .8fr);
  gap: clamp(32px, 4vw, 64px);
  padding-bottom: clamp(36px, 4vw, 56px);
  border-bottom: 1px solid rgba(159, 180, 205, .2);
}

.brand-invert {
  /* currentColor в логотипе — светлый на тёмном подвале */
  color: var(--on-navy);
}

.brand-invert .logo-mark { height: 40px; }

.footer-line {
  margin-top: 18px;
  max-width: 40ch;
  font-size: .9375rem;
}

.footer-nav ul {
  display: grid;
  gap: 10px;
}

.footer-nav a {
  color: var(--on-navy);
  font-weight: 500;
  font-size: .9688rem;
  transition: color .2s var(--ease);
}

.footer-nav a:hover { color: var(--accent-on-dark); }

.footer-contacts {
  display: grid;
  gap: 10px;
  align-content: start;
  font-size: .9375rem;
}

.footer-contacts a {
  color: var(--on-navy);
  font-weight: 500;
  transition: color .2s var(--ease);
}

.footer-contacts a:hover { color: var(--accent-on-dark); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 26px;
  font-size: .875rem;
}

.footer-bottom .mono { color: var(--accent-on-dark); }

/* ---------- 14. Появление при скролле ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
  transition-delay: var(--d, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn, .service-card, .project-card, .benefit {
    transition: none;
  }
  .btn-primary:hover, .btn-ghost:hover,
  .service-card:hover, .project-card:hover, .benefit:hover {
    transform: none;
  }
}

/* ============================================================
   Адаптив
   ============================================================ */

/* --- ≤ 1100px --- */
@media (max-width: 1100px) {
  .header-phone { display: none; }

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

  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 28px; }
  .steps::before { display: none; }
}

/* --- ≤ 960px: мобильное меню --- */
@media (max-width: 960px) {
  .header-phone, .header-cta { display: none; }
  /* в шапке остаётся только бургер: язык переключается из меню */
  .header-lang { display: none; }
  .burger { display: block; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 28px 24px 40px;
    background: var(--bg);
    border-top: 1px solid var(--line);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }

  body.menu-open .site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .nav-link {
    display: block;
    padding: 14px 16px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--navy);
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--line);
  }

  .nav-extra {
    display: grid;
    gap: 16px;
    margin-top: auto;
  }

  .nav-phone {
    font-size: 1.1875rem;
    font-weight: 700;
    color: var(--navy);
    text-align: center;
  }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 620px; }

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

  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav { transition: none; transform: none; }
}

/* --- ≤ 720px --- */
@media (max-width: 720px) {
  .container { width: calc(100% - 36px); }

  .steps { grid-template-columns: 1fr; gap: 0; }

  .step {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    column-gap: 20px;
    row-gap: 0;
    padding-bottom: 34px;
  }

  .step:last-child { padding-bottom: 0; }

  .step::before {
    content: "";
    position: absolute;
    top: 68px;
    bottom: 4px;
    left: 30px;
    border-left: 2px dashed rgba(31, 111, 235, .4);
  }

  .step:last-child::before { display: none; }

  .step-stamp { grid-row: 1 / span 2; }

  .step-title { grid-column: 2; align-self: center; }

  .step p { grid-column: 2; margin-top: 10px; }

  .projects-grid { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr; }
}

/* --- ≤ 520px --- */
@media (max-width: 520px) {
  .container { width: calc(100% - 32px); }

  .services-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
  .counters { grid-template-columns: 1fr 1fr; gap: 14px; }
  .counter { padding: 20px 18px; }

  .hero-cta .btn { width: 100%; }
  .hero-trust { gap: 14px 28px; }

  .logo-mark { height: 40px; }

  .form-success { flex-direction: column; text-align: center; }
}

/* --- ≥ 1500px: широкие экраны --- */
@media (min-width: 1500px) {
  :root { --container: 1280px; }
  body { font-size: 1.0625rem; }
}
