/* =========================================================
   OMNIX AI — стили лендинга
   Структура:
   1. Переменные и сброс
   2. Базовые элементы (контейнер, кнопки, типографика)
   3. Шапка и мобильное меню
   4. Секции по порядку: hero → услуги → этапы → технологии
      → почему мы → кейсы → форма → футер
   5. Анимации появления
   6. Адаптив
   ========================================================= */

/* ---------- 1. Переменные и сброс ---------- */
:root {
  /* Фон и поверхности */
  --bg: #07080c;
  --bg-alt: #0b0d14;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);

  /* Текст */
  --text: #f4f5f8;
  --text-muted: #9aa0b4;
  --text-dim: #5f6579;

  /* Акцент: синий → фиолетовый */
  --blue: #4f7cff;
  --violet: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, var(--blue) 0%, var(--violet) 100%);
  --error: #ff6b81;

  /* Размеры */
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(96px, 14vw, 180px);
  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 76px;

  /* Анимации */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.25s var(--ease);
  --t: 0.5s var(--ease);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Блокировка прокрутки при открытом мобильном меню */
body.is-locked {
  overflow: hidden;
}

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

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

ul,
ol {
  list-style: none;
}

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

::selection {
  background: rgba(139, 92, 246, 0.35);
}

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

/* ---------- 2. Базовые элементы ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  position: relative;
  padding: var(--section-y) 0;
}

/* Чередующийся фон секций с тонкой границей сверху */
.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section__head {
  max-width: 760px;
  margin-bottom: clamp(56px, 8vw, 88px);
}

/* Надзаголовок секции */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent-gradient);
}

.section__title {
  font-size: clamp(34px, 5.2vw, 60px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.section__lead {
  margin-top: 24px;
  max-width: 520px;
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--text-muted);
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.link {
  color: var(--text);
  border-bottom: 1px solid var(--border-hover);
  transition: border-color var(--t-fast);
}

.link:hover {
  border-color: var(--violet);
}

/* Кнопки */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 30px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--t-fast), box-shadow var(--t-fast),
    background-color var(--t-fast), border-color var(--t-fast);
}

.btn--sm {
  height: 42px;
  padding: 0 20px;
  font-size: 14px;
}

.btn--block {
  width: 100%;
}

.btn--primary {
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: 0 8px 32px -8px rgba(98, 105, 255, 0.55);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -8px rgba(98, 105, 255, 0.75);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-hover);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn__icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--t-fast);
}

.btn:hover .btn__icon {
  transform: translateX(4px);
}

/* Состояние загрузки кнопки формы */
.btn.is-loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn.is-loading .btn__label::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Логотип */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo__mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--accent-gradient);
  box-shadow: 0 0 20px rgba(110, 100, 255, 0.5);
  position: relative;
}

.logo__mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--bg);
}

.logo__ai {
  margin-left: 2px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ---------- 3. Шапка ---------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
}

/* Фон шапки вынесен в псевдоэлемент: backdrop-filter на самой шапке
   ломает position: fixed у мобильного меню внутри неё */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(7, 8, 12, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transition: opacity var(--t);
}

/* Фон шапки появляется после начала прокрутки */
.header.is-scrolled::before {
  opacity: 1;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__link {
  position: relative;
  font-size: 15px;
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-fast);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--text);
}

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

.nav__cta {
  margin-left: 8px;
}

/* Бургер (виден только на мобильных) */
.burger {
  display: none;
  position: relative;
  z-index: 110;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
}

.burger span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform var(--t-fast), top var(--t-fast);
}

.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }

.burger[aria-expanded="true"] span:first-child {
  top: 21px;
  transform: rotate(45deg);
}

.burger[aria-expanded="true"] span:last-child {
  top: 21px;
  transform: rotate(-45deg);
}

/* ---------- 4.1 Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 64px) 0 96px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Тонкая сетка, растворяющаяся к краям */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}

/* Световые пятна, медленно «дышат» */
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: float 16s ease-in-out infinite alternate;
}

.hero__glow--blue {
  width: 560px;
  height: 560px;
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, rgba(79, 124, 255, 0.7), transparent 70%);
}

.hero__glow--violet {
  width: 640px;
  height: 640px;
  bottom: -25%;
  right: -10%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.6), transparent 70%);
  animation-delay: -8s;
}

@keyframes float {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.12); }
}

.hero__inner {
  position: relative;
}

.hero__title {
  max-width: 980px;
  font-size: clamp(42px, 7.6vw, 96px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero__subtitle {
  max-width: 620px;
  margin-top: 32px;
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.65;
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 48px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 64px;
  margin-top: clamp(72px, 10vw, 120px);
  padding-top: 40px;
  border-top: 1px solid var(--border);
  max-width: 820px;
}

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

.stat__value {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat__label {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- 4.2 Услуги ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  position: relative;
  padding: 40px 36px 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--t), border-color var(--t), background-color var(--t);
}

/* Подсветка, следующая за курсором (координаты задаёт JS) */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 0%),
    rgba(110, 100, 255, 0.12),
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--t);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.card:hover::before {
  opacity: 1;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 32px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(79, 124, 255, 0.16), rgba(139, 92, 246, 0.16));
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.card__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #b7b2ff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card__title {
  margin-bottom: 12px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.card__text {
  font-size: 15.5px;
  color: var(--text-muted);
}

/* ---------- 4.3 Как работаем ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

/* Градиентная линия, заполняющаяся при появлении шага */
.step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s var(--ease) 0.3s;
}

.step.is-visible::before {
  transform: scaleX(1);
}

.step__num {
  font-size: 14px;
  font-weight: 500;
  color: var(--violet);
  letter-spacing: 0.08em;
}

.step__title {
  margin: 20px 0 14px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.step__text {
  flex-grow: 1;
  padding-right: 12px;
  font-size: 15.5px;
  color: var(--text-muted);
}

.step__time {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- 4.4 Технологии ---------- */
.tech {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.tech__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  aspect-ratio: 16 / 10;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--t);
}

.tech__item img {
  width: 36px;
  height: 36px;
  /* Исходные SVG чёрные — делаем их светлыми и приглушёнными */
  filter: invert(1);
  opacity: 0.5;
  transition: opacity var(--t), transform var(--t);
}

.tech__item span {
  font-size: 14px;
  color: var(--text-dim);
  transition: color var(--t);
}

.tech__item:hover {
  background: var(--surface);
}

.tech__item:hover img {
  opacity: 1;
  transform: scale(1.08);
}

.tech__item:hover span {
  color: var(--text);
}

/* ---------- 4.5 Почему мы ---------- */
.why {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 80px;
  align-items: start;
}

.why__head {
  position: sticky;
  top: calc(var(--header-h) + 40px);
  margin-bottom: 0;
}

.why__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px 40px;
}

.why__item {
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.why__title {
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.why__text {
  font-size: 15.5px;
  color: var(--text-muted);
}

/* ---------- 4.6 Кейсы ---------- */
.cases {
  display: grid;
  gap: 20px;
}

.case {
  display: grid;
  grid-template-columns: 4fr 7fr;
  grid-template-areas:
    "meta  body"
    "title body";
  grid-template-rows: auto 1fr;
  gap: 24px 64px;
  padding: clamp(32px, 4.5vw, 56px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t), background-color var(--t);
}

.case:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.case__meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: #c4bfff;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 999px;
}

.case__title {
  grid-area: title;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.case__body {
  grid-area: body;
  display: grid;
  gap: 28px;
}

.case__row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.case__row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.case__row dt {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-top: 3px;
}

.case__row dd {
  color: var(--text-muted);
  font-size: 16px;
}

.case__result {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
}

.case__result span {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.case__result strong {
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 4.7 Форма связи ---------- */
.section--contact {
  overflow: hidden;
  border-top: 1px solid var(--border);
}

.contact__glow {
  position: absolute;
  left: 50%;
  bottom: -40%;
  width: 900px;
  height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(98, 105, 255, 0.22), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}

.contact {
  position: relative;
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 96px;
  align-items: start;
}

.contact__list {
  margin-top: 56px;
  display: grid;
  gap: 20px;
}

.contact__list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: baseline;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.contact__list span {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.contact__list a {
  font-size: 18px;
  transition: color var(--t-fast);
}

.contact__list a:hover {
  color: #b7b2ff;
}

.form {
  position: relative;
  display: grid;
  gap: 20px;
  padding: clamp(28px, 4vw, 48px);
  background: rgba(14, 16, 24, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  display: grid;
  gap: 8px;
}

.field__label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.field__input {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  font-size: 16px; /* 16px — чтобы iOS не зумил поле при фокусе */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--t-fast), background-color var(--t-fast), box-shadow var(--t-fast);
}

.field__input--area {
  height: auto;
  min-height: 130px;
  padding: 16px 18px;
  resize: vertical;
  line-height: 1.5;
}

.field__input::placeholder {
  color: var(--text-dim);
}

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

.field__input:focus {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.field.is-invalid .field__input {
  border-color: rgba(255, 107, 129, 0.6);
}

.field__error {
  min-height: 0;
  font-size: 13px;
  color: var(--error);
}

.field__error:empty {
  display: none;
}

.field__error--consent {
  margin-top: -12px;
}

/* Скрытое поле-ловушка для ботов */
.form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Кастомный чекбокс */
.checkbox {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.5;
}

.checkbox input {
  position: absolute;
  opacity: 0;
  width: 20px;
  height: 20px;
}

.checkbox__box {
  flex-shrink: 0;
  position: relative;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}

.checkbox__box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform var(--t-fast);
}

.checkbox input:checked + .checkbox__box {
  background: var(--accent-gradient);
  border-color: transparent;
}

.checkbox input:checked + .checkbox__box::after {
  transform: rotate(45deg) scale(1);
}

.checkbox input:focus-visible + .checkbox__box {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Экран успешной отправки поверх формы */
.form__success {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
  background: #0d0f17;
  border-radius: inherit;
  animation: fade-in 0.5s var(--ease);
}

.form__success[hidden] {
  display: none;
}

.form__success h3 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.form__success p {
  color: var(--text-muted);
}

.form__success-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 40px rgba(110, 100, 255, 0.5);
}

.form__success-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes fade-in {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 4.8 Футер ---------- */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}

.footer__tagline {
  max-width: 320px;
  margin-top: 20px;
  font-size: 15px;
  color: var(--text-muted);
}

.footer__nav,
.footer__contacts {
  display: grid;
  gap: 12px;
  align-content: start;
  font-size: 15px;
}

.footer__nav a,
.footer__contacts a {
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.footer__nav a:hover,
.footer__contacts a:hover {
  color: var(--text);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-dim);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

.footer__bottom .link {
  color: var(--text-dim);
  border-color: transparent;
}

.footer__bottom .link:hover {
  color: var(--text-muted);
}

/* ---------- 5. Анимации появления при скролле ---------- */
/* Класс .reveal скрывает элемент, JS добавляет .is-visible при попадании в экран.
   Если JS отключён, элементы видимы (класс .js ставится скриптом на <html>). */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0s);
}

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

/* Уважаем системную настройку «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

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

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

  .steps {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 56px;
  }

  .why {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .why__head {
    position: static;
  }

  .case {
    grid-template-columns: 1fr;
    grid-template-areas:
      "meta"
      "title"
      "body";
    gap: 20px;
  }

  .case__body {
    margin-top: 16px;
  }

  .contact {
    grid-template-columns: 1fr;
    gap: 56px;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 64px;
  }

  /* Мобильное меню на весь экран */
  .burger {
    display: block;
  }

  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    background: rgba(7, 8, 12, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t), visibility var(--t);
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav__link {
    font-size: 28px;
    font-weight: 500;
    color: var(--text);
  }

  .nav__link::after {
    display: none;
  }

  .nav__cta {
    margin: 16px 0 0;
    height: 52px;
    padding: 0 28px;
    font-size: 16px;
  }

  .tech {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .hero {
    align-items: flex-end;
  }

  .hero__actions .btn {
    flex: 1 1 100%;
  }

  .hero__stats {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }

  .cards,
  .steps,
  .why__list,
  .form__row {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 32px 28px 36px;
  }

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

  .case__row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .contact__list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer__bottom {
    flex-direction: column;
  }
}
