/* MAPROUTE — стили сайта. Все стили вынесены из инлайна. */

:root {
  --bg: #0f1012;
  --panel: #17191c;
  --panel-2: #141619;
  --border: #1f2125;
  --border-2: #25282c;
  --border-3: #2a2c30;
  --border-4: #3a3c40;
  --text: #eeeeea;
  --text-dim: #a3a4a0;
  --text-dim-2: #d6d6d2;
  --text-dim-3: #7d7e7a;
  --accent: oklch(0.86 0.18 128);
  --accent-rgb: 178, 225, 75;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font-body: 'Golos Text', sans-serif;
  --font-display: 'Unbounded', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --container: 1440px;
  --pad-x: clamp(20px, 3.3vw, 48px);
}

/* ── база ─────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.page {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
input, textarea, button { font: inherit; }
::selection { background: var(--accent); color: var(--bg); }
[hidden] { display: none !important; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  box-sizing: border-box;
}
.section { padding: 160px var(--pad-x) 0; max-width: var(--container); margin: 0 auto; }
/* контейнер внутри .section/.benefits не добавляет второй боковой отступ */
.section > .container, .benefits > .container { padding-left: 0; padding-right: 0; }
.h2 {
  margin: 0;
  font: 500 clamp(40px, 4.4vw, 64px)/1 var(--font-display);
  letter-spacing: -0.025em;
}

/* ── кнопки ───────────────────────────────────────────── */
.btn { display: inline-block; white-space: nowrap; }
.btn--cta {
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
}
.btn--cta:hover { color: var(--bg); transform: translateY(-1px); }
.btn--light {
  padding: 19px 30px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 17px;
  font-weight: 600;
}
.btn--light:hover { background: var(--accent); color: var(--bg); }
.btn--ghost {
  padding: 19px 30px;
  border-radius: 999px;
  border: 1px solid var(--border-4);
  font-size: 17px;
  font-weight: 500;
}
.btn--ghost:hover { border-color: var(--accent); }
.btn--sm { padding: 14px 22px; font-size: 15px; }

/* ── шапка ──────────────────────────────────────────────
   Правила шапки вынесены в css/header.css — он общий для всех
   страниц сайта (главная, услуги, контакты, юрстраницы). */

/* ── герой ────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, transparent 0%, var(--bg) 85%);
}
.hero__inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 112px var(--pad-x) 96px;
  display: flex;
  flex-direction: column;
  gap: 56px;
  pointer-events: none;
}
.hero__badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-3);
  background: rgba(23, 25, 28, .8);
  font-size: 14px;
  color: var(--text-dim-2);
}
.hero__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s infinite;
}
@media (max-width: 640px) {
  .hero__badge-geo { display: none; }
}
@keyframes pulse {
  from { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .6); }
  to { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); }
}
.hero__title {
  margin: 0;
  font: 500 clamp(44px, 6.4vw, 96px)/1.02 var(--font-display);
  letter-spacing: -0.035em;
  max-width: 1300px;
}
.hero__line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__line-in { display: block; }
.hero__line--accent .hero__line-in { color: var(--accent); }
.hero__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-end;
  justify-content: space-between;
}
.hero__lead {
  flex: 1 1 420px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  pointer-events: auto;
}
.hero__text { margin: 0; font-size: 20px; line-height: 1.6; color: var(--text-dim); text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── терминал ─────────────────────────────────────────── */
.terminal {
  flex: 1 1 520px;
  max-width: 640px;
  border-radius: 20px;
  background: rgba(23, 25, 28, .92);
  border: 1px solid var(--border-3);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .6);
  overflow: hidden;
  pointer-events: auto;
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-3);
}
.terminal__dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border-4); }
.terminal__title { margin-left: 12px; font: 400 13px/1 var(--font-mono); color: var(--text-dim-3); }
.terminal__body {
  padding: 22px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font: 400 14px/1.4 var(--font-mono);
  min-height: 226px;
}
.terminal__line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .4s, transform .4s;
  color: var(--text-dim);
}
.terminal__line.is-on { opacity: 1; transform: translateX(0); }
.terminal__line--cmd { color: var(--text); }
.terminal__line--ok { color: var(--accent); }
.terminal__status { color: var(--accent); }

/* ── преимущества ─────────────────────────────────────── */
.benefits { max-width: var(--container); margin: 0 auto; padding: 0 var(--pad-x); }
.benefits__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  padding: 0;
}
.benefit {
  padding: 32px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.benefit__num { font: 500 14px/1 var(--font-mono); color: var(--accent); }
.benefit__title { font-size: 21px; font-weight: 600; }
.benefit__text { font-size: 16px; line-height: 1.6; color: var(--text-dim); }

/* ── услуги ───────────────────────────────────────────── */
.services { display: flex; flex-direction: column; gap: 56px; }
.section__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}
.section__note { margin: 0; max-width: 480px; font-size: 17px; line-height: 1.6; color: var(--text-dim); }
.services__layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.services__tabs {
  flex: 1 1 300px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.services__tab {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text-dim-2);
  cursor: pointer;
  text-align: left;
  transition: background .3s, color .3s, border-color .3s;
}
.services__tab:hover { color: var(--text); }
.services__tab.is-active { border-color: var(--text); background: var(--text); color: var(--bg); }
.services__tab-num { font: 500 13px/1 var(--font-mono); opacity: .7; }
.services__tab-title { flex: 1; font-size: 18px; font-weight: 600; }
.services__tab-count { font: 400 13px/1 var(--font-mono); opacity: .7; }
.services__panels { flex: 3 1 560px; display: flex; flex-direction: column; gap: 20px; }
.services__panel-head {
  padding: 36px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-end;
}
.services__panel-info { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.services__panel-num { font: 500 14px/1 var(--font-mono); color: var(--accent); }
.services__panel-title { font: 500 34px/1.15 var(--font-display); letter-spacing: -0.02em; }
.services__panel-lead { font-size: 17px; line-height: 1.6; color: var(--text-dim); }
.services__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.service-card {
  position: relative;
  padding: 30px;
  border-radius: 24px;
  border: 1px solid var(--border-3);
  background:
    radial-gradient(420px circle at var(--mx, -600px) var(--my, -600px), rgba(var(--accent-rgb), .13), transparent 45%),
    var(--panel-2);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 280px;
  transition: border-color .3s, transform .3s;
}
.service-card:hover { border-color: #4a5a2a; transform: translateY(-4px); color: var(--text); }
.service-card__top { display: flex; justify-content: space-between; align-items: center; }
.service-card__code { font: 500 13px/1 var(--font-mono); color: var(--text-dim-3); }
.service-card__arrow { font-size: 22px; color: var(--accent); }
.service-card__title { font-size: 22px; font-weight: 600; line-height: 1.25; }
.service-card__text { font-size: 15px; line-height: 1.6; color: var(--text-dim); flex: 1; }
.service-card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.service-card__tags span {
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--border-2);
  color: var(--text-dim-2);
}
.service-card__actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.service-card__more { border-color: var(--border-2); }
/* анимация смены вкладки */
.js .services__panel.is-animating .services__panel-head { animation: panel-in .5s var(--ease) both; }
.js .services__panel.is-animating .service-card { animation: card-in .6s var(--ease) both; }
.js .services__panel.is-animating .service-card:nth-child(2) { animation-delay: 130ms; }
.js .services__panel.is-animating .service-card:nth-child(3) { animation-delay: 200ms; }
.js .services__panel.is-animating .service-card:nth-child(4) { animation-delay: 270ms; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* ── технологии (бегущие строки) ──────────────────────── */
.tech { padding: 160px 0 0; display: flex; flex-direction: column; gap: 14px; }
.tech__head { padding: 0 var(--pad-x) 32px; box-sizing: content-box; }
.tech__viewport { overflow: hidden; }
.tech__row { display: flex; gap: 14px; width: max-content; animation: marquee 45s linear infinite; }
.tech__row[data-marquee="rev"] { animation-direction: reverse; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tech__pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 30px 18px 24px;
  border-radius: 999px;
  font-size: 22px;
  font-weight: 500;
  white-space: nowrap;
}
.tech__pill--outline { border: 1px solid var(--border-3); }
.tech__pill--fill { background: var(--panel); color: var(--text-dim); }

/* бегущая строка — мобильные пилюли меньше */
@media (max-width: 640px) {
  .tech { gap: 10px; }
  .tech__head { padding-bottom: 22px; }
  .tech__row { gap: 10px; }
  .tech__pill { font-size: 15px; padding: 10px 16px 10px 14px; }
}

/* ── проекты ──────────────────────────────────────────── */
/* ── проекты: кейс на главной (полная версия — /kejsy/<слаг>/) ── */
.cases { display: flex; flex-direction: column; gap: 32px; }
/* явная ширина: во flex-колонке auto-маргины .container иначе сжимают его до контента и центрируют */
.cases__head, .cases__grid, .tech__head, .section__head, .services__layout { width: 100%; }
.cases__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.case {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--border-2);
  background: linear-gradient(180deg, var(--panel) 0%, #121316 100%);
  padding: clamp(22px, 3.4vw, 56px);
  display: flex;
  flex-direction: column;
  gap: clamp(26px, 3vw, 44px);
}
.case::before {
  content: '';
  position: absolute;
  left: -20%; right: -20%; top: -40%;
  height: 70%;
  background: radial-gradient(55% 90% at 32% 100%, rgba(47, 92, 245, .17), transparent 72%);
  pointer-events: none;
}
.case > * { position: relative; }
.case__head {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
}
.case__brand { display: flex; align-items: center; gap: 20px; }
.case__logo {
  width: 64px; height: 64px;
  flex: 0 0 auto;
  border-radius: 18px;
  background: linear-gradient(135deg, #3D68F8, #1F3DC9);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .09) inset, 0 14px 36px rgba(47, 92, 245, .38);
}
.case__name { margin: 0; font: 500 clamp(26px, 3vw, 36px)/1 var(--font-display); letter-spacing: -0.02em; }
.case__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.case__tag {
  font-size: 13px; line-height: 1;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(93, 128, 246, .38);
  background: rgba(47, 92, 245, .10);
  color: #aebdf7;
  white-space: nowrap;
}
.case__status { font: 400 13px/1.5 var(--font-mono); color: var(--text-dim-3); display: flex; align-items: center; gap: 10px; }
.case__status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb), .9); flex: 0 0 auto; }
.case__lead { margin: 0; max-width: 940px; font-size: clamp(15px, 1.35vw, 17.5px); line-height: 1.68; color: var(--text-dim-2); }

/* экран продукта: тёмная подложка + скругления + мягкая тень */
.case__screen-wrap { display: flex; flex-direction: column; gap: 22px; }
.case__screen {
  display: block;
  padding: clamp(14px, 2vw, 28px);
  border-radius: 24px;
  background: #121418;
  border: 1px solid var(--border-2);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}
.case__screen:hover { border-color: #3a4a78; }
.case__screen img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.case__screen-cta { display: flex; justify-content: center; }
.case__more {
  display: inline-block;
  padding: 15px 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #3D68F8, #1F3DC9);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(47, 92, 245, .35);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.case__more:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(47, 92, 245, .45);
}

/* плитка-лого картинкой (кейс Тудым) */
.case__logo--img { background: #0F1013; box-shadow: 0 0 0 1px rgba(255, 255, 255, .09) inset, 0 14px 36px rgba(0, 0, 0, .45); }
.case__logo--img img { display: block; width: 100%; height: auto; border-radius: inherit; }

/* одиночный мобильный экран в подложке (кейс Тудым) */
.case__screen--mob { display: flex; justify-content: center; max-width: 480px; margin-inline: auto; }
.case__screen--mob img { width: auto; max-width: 100%; height: auto; max-height: 660px; }
@media (max-width: 640px) {
  .case__screen--mob { max-width: 400px; }
  .case__screen--mob img { width: 82%; max-height: none; }
}

/* стек и роадмап */
.case__extra { display: flex; flex-direction: column; gap: 14px; }
.case__label { font: 500 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim-3); }
.case__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.case__pill {
  font: 400 13px/1 var(--font-mono);
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--border-2);
  color: var(--text-dim-2);
}
.case__pill--next { background: transparent; border: 1px dashed var(--border-4); color: var(--text-dim-3); }
.case__label--next { margin-top: 8px; }

/* подвал кейса */
.case__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-2);
  padding-top: 28px;
}
.case__site-label { font: 400 13px/1 var(--font-mono); color: var(--text-dim-3); margin-bottom: 10px; }
.case__site-link {
  font: 600 clamp(22px, 2.4vw, 30px)/1 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--text);
  transition: color .3s;
}
.case__site-link:hover { color: #7d94f8; }

/* кейс — мобайл */
@media (max-width: 720px) {
  .case__head { flex-direction: column; align-items: flex-start; }
  .case__status { width: auto !important; white-space: normal !important; }
  .case__foot { flex-direction: column; align-items: flex-start; }
}

/* кейсы — десктоп: две карточки в ряд, компактнее */
@media (max-width: 1023px) {
  .cases__grid { display: flex; flex-direction: column; gap: 24px; }
}
@media (min-width: 1024px) {
  .cases__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; align-items: start; }
  .cases__grid .case { padding: clamp(22px, 2.4vw, 40px); gap: clamp(22px, 2.2vw, 30px); border-radius: 24px; }
  .cases__grid .case__screen { padding: 16px; }
  .cases__grid .case__screen--mob { max-width: 400px; }
  .cases__grid .case__foot { margin-top: auto; }
}
/* развёрнутые кейсы: подложки экранов одной высоты — кнопки «Смотреть продукт» на одной линии */
.cases__grid .case.is-open .case__screen,
.cases__grid .case:not(.is-foldable) .case__screen {
  height: min(32vh, 330px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cases__grid .case.is-open .case__screen img,
.cases__grid .case:not(.is-foldable) .case__screen img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
}
/* свёрнутые кейсы в десктоп-сетке: подложки экранов одной высоты — кнопки на одной линии */
@media (min-width: 1024px) {
  .cases__grid .case.is-foldable:not(.is-open) .case__screen {
    height: min(28vh, 240px);
    box-sizing: border-box;
  }
  .cases__grid .case.is-foldable:not(.is-open) .case__screen img {
    max-height: 100%;
  }
}

/* кейс — мобайл: свёрнутая карточка + кнопка «Развернуть» (кнопку создаёт app.js) */
.case__toggle {
  display: none;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  margin-top: -6px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-3);
  background: transparent;
  color: var(--text-dim-2);
  font: 500 13px/1 var(--font-mono);
  letter-spacing: .04em;
  cursor: pointer;
  transition: border-color .25s, color .25s;
}
.case__toggle::after { content: '▾'; font-size: 11px; color: var(--text-dim-3); transition: transform .25s var(--ease); }
.case__toggle:hover { border-color: var(--border-4); color: var(--text); }
.case.is-open .case__toggle::after { transform: rotate(180deg); }

/* свёрнутая карточка кейса (все ширины; кнопку создаёт app.js) */
.case.is-foldable .case__toggle { display: inline-flex; }
.case.is-foldable:not(.is-open) { gap: 18px; }
.case.is-foldable:not(.is-open) .case__lead {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.case.is-foldable:not(.is-open) .case__extra,
.case.is-foldable:not(.is-open) .case__foot { display: none; }
.case.is-foldable:not(.is-open) .case__tag:not(:first-child) { display: none; }
.case.is-foldable:not(.is-open) .case__screen-wrap { gap: 14px; }
.case.is-foldable:not(.is-open) .case__screen { padding: 12px; width: fit-content; margin-inline: auto; }
.case.is-foldable:not(.is-open) .case__screen img { width: auto; max-width: 100%; max-height: min(28vh, 240px); }

/* ── процесс ──────────────────────────────────────────── */
.process { display: flex; flex-direction: column; gap: 64px; }
.process__track { position: relative; }
.process__line { position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--border-2); }
.process__line--accent { background: var(--accent); transform-origin: left; }
.process__steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}
.process__step { display: flex; flex-direction: column; gap: 16px; }
.process__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-sizing: border-box;
}
.process__num { font: 500 15px/1 var(--font-mono); color: var(--accent); margin-top: 12px; }
.process__title { font-size: 22px; font-weight: 600; }
.process__text { font-size: 15px; line-height: 1.6; color: var(--text-dim); }

/* ── контакты и форма ─────────────────────────────────── */
.contacts__card {
  padding: clamp(32px, 5vw, 72px);
  border-radius: 32px;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
}
.contacts__info { flex: 1 1 380px; display: flex; flex-direction: column; gap: 20px; }
.contacts__title {
  margin: 0;
  font: 500 clamp(36px, 4vw, 58px)/1.05 var(--font-display);
  letter-spacing: -0.025em;
}
.contacts__lead { margin: 0; font-size: 18px; line-height: 1.6; max-width: 460px; }
.contacts__mail {
  font-size: 22px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.contacts__mail:hover { color: var(--bg); opacity: .7; }
.contacts__hours { font-size: 15px; line-height: 1.6; color: var(--text-dim); }
.form { flex: 1 1 420px; display: flex; flex-direction: column; gap: 12px; }
.form__label { font-size: 14px; font-weight: 600; }
.form__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.form__chip {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--bg);
  background: transparent;
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.form__chip:hover { color: var(--bg); }
.form__chip.is-picked { background: var(--bg); color: var(--accent); }
.form__input {
  padding: 20px 24px;
  border-radius: 16px;
  border: 0;
  background: #f4f7ea;
  font-size: 16px;
  outline: none;
  color: var(--bg);
}
.form__input--textarea { resize: none; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__submit {
  padding: 20px;
  border-radius: 999px;
  border: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s;
}
.form__submit:hover { transform: translateY(-2px); color: var(--text); }
.form__submit:disabled { opacity: .6; cursor: wait; transform: none; }
.form__note { font-size: 13px; line-height: 1.5; }
.form__error {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(15, 16, 18, .85);
  color: #ffb4a8;
  font-size: 14px;
  line-height: 1.5;
}
.form__success {
  flex: 1 1 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  border-radius: 24px;
  background: #f4f7ea;
}
.form__success-title { font: 500 30px/1.2 var(--font-display); }
.form__success-text { font-size: 17px; line-height: 1.6; }

/* ── подвал ─────────────────────────────────────────────
   Правила подвала вынесены в css/footer.css — он общий для всех
   страниц сайта (главная, услуги, юрстраницы). */

/* ── появление при скролле ────────────────────────────── */
.js [data-reveal="up"] { opacity: 0; transform: translateY(40px); }
.js [data-reveal="mask"] { transform: translateY(105%); }
.js [data-reveal="line"] { transform: scaleX(0); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal="up"].is-visible { transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal="mask"].is-visible { transition: transform 1.1s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal="line"].is-visible { transition: transform 1.8s var(--ease); }

/* ── адаптив ──────────────────────────────────────────── */
@media (max-width: 1023px) {
  .hero__inner { padding-top: 72px; }
}
@media (max-width: 640px) {
  .section, .tech { padding-top: 96px; }

  /* Unbounded — широкий шрифт: длинные слова («инфраструктура»,
     «автоматизация») обрезались на узком экране, уменьшаем размеры */
  .hero__title { font-size: clamp(34px, 9.5vw, 44px); }
  .h2 { font-size: clamp(28px, 7.6vw, 40px); }
  .contacts__title { font-size: clamp(28px, 7.6vw, 36px); }
  .services__panel-title {
    font-size: clamp(21px, 6.2vw, 28px);
    -webkit-hyphens: auto; /* крайний случай: перенос по слогам вместо обрезки */
    hyphens: auto;
  }

  .services__panel-head { padding: 20px; }
  .service-card { padding: 22px; }

  .terminal__body { min-height: 0; }
  .contacts__card { gap: 36px; }
}

/* ── отзывы ───────────────────────────────────────────── */
.reviews__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.review-card {
  margin: 0;
  padding: 30px;
  border-radius: 24px;
  border: 1px solid var(--border-3);
  background: var(--panel-2);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.review-card__text { margin: 0; font-size: 16px; line-height: 1.7; color: var(--text-dim); }
.review-card__author {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.review-card__name { font-weight: 600; }
.review-card__role { font-size: 14px; color: var(--text-dim); }
.review-card__project { font: 500 13px/1 var(--font-mono); color: var(--accent); }

/* ── кнопка «наверх» ──────────────────────────────────── */
.totop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-3);
  background: var(--panel);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s,
    background-color .15s, color .15s, border-color .15s;
}
.totop.is-on { opacity: 1; visibility: visible; transform: none; }
.totop:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.totop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) { .totop { right: 14px; bottom: 14px; } }

/* ── популярные запросы в панелях услуг ───────────────── */
.services__popular {
  margin-top: 28px;
}
.services__popular-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim-3);
  list-style: none;
  user-select: none;
}
.services__popular-label::-webkit-details-marker { display: none; }
.services__popular-label::after {
  content: '+';
  font-size: 14px;
  line-height: 1;
  transition: transform .25s var(--ease);
}
.services__popular[open] > .services__popular-label::after { transform: rotate(45deg); }
.services__popular-label:hover { color: var(--text-dim); }
.services__popular-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.services__popular-tags a {
  font: 400 13px/1.3 var(--font-mono);
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--border-2);
  color: var(--text-dim-2);
  transition: background-color .15s, color .15s;
}
.services__popular-tags a:hover { background: var(--border-3); color: var(--accent); }
.services__popular-tags a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) {
  .services__popular { margin-top: 18px; }
  .services__popular-label { flex-basis: 100%; font-size: 10px; letter-spacing: .12em; }
  .services__popular-tags {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .services__popular-tags::-webkit-scrollbar { display: none; }
  .services__popular-tags a {
    flex: 0 0 auto;
    font-size: 12px;
    line-height: 1.2;
    padding: 7px 11px;
    background: var(--border);
    color: var(--text-dim-3);
    white-space: nowrap;
  }
  .services__popular-tags a:hover { background: var(--border-2); }
}

/* ── популярные запросы (плитка анкоров) ──────────────── */
.queries {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px var(--pad-x) 0;
}
.queries__summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: 400 12px/1.4 var(--font-body);
  color: var(--text-dim-3);
  list-style: none;
  user-select: none;
}
.queries__summary::-webkit-details-marker { display: none; }
.queries__summary::after {
  content: '+';
  font-size: 14px;
  line-height: 1;
  transition: transform .25s var(--ease), color .15s;
}
.queries__fold[open] .queries__summary::after { transform: rotate(45deg); }
.queries__summary:hover { color: var(--text-dim); }
.queries__tile {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.queries__tile a {
  font: 400 13px/1.3 var(--font-mono);
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--border-2);
  color: var(--text-dim-2);
  transition: background-color .15s, color .15s;
}
.queries__tile a:hover { background: var(--border-3); color: var(--accent); }
.queries__tile a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) { .queries { padding-top: 32px; } }

/* ── доступность: меньше движения ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .tech__row { animation: none; }
  .hero__pulse { animation: none; }
}
