/* =========================================================================
   ITCS Group — сайт-визитка
   Значения (размеры, цвета, отступы) перенесены из макета ITCS Group.dc.html
   ========================================================================= */

:root {
  --ink:          #111a24;
  --blue:         #1b5e8f;
  --blue-dark:    #12456b;
  --accent:       #e08a5f;
  --accent-deep:  #c8552b;
  --danger:       #c2543a;

  --slate:        #33474f;
  --muted:        #5c6b73;
  --grey:         #7b8b92;
  --on-dark:      #9fb0b8;
  --on-dark-soft: #c7d4d9;
  --on-dark-dim:  #b9c9cf;

  --line:         #e2e8ea;
  --line-strong:  #d3dde0;
  --line-soft:    #eef2f3;
  --line-dark:    #26303c;

  --panel:        #f5f7f9;

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Manrope, Helvetica, Arial, sans-serif;

  --shell: 1240px;
  --gutter: 28px;
}

/* ── База ───────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

img { max-width: 100%; }
input, textarea, button { font-family: inherit; }
::placeholder { color: #94a3a8; }

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

/* Липкая шапка не должна накрывать якорные секции. Её высота зависит от ширины
   экрана (на узких кнопка и меню уезжают на свои строки), поэтому фактическое
   значение подставляет app.js; 92px — запасной вариант без JS. */
section[id], body[id] { scroll-margin-top: calc(var(--header-h, 92px) + 12px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ── Раскладка ──────────────────────────────────────────────────────────── */

.wrap {
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.sec { padding-top: 72px; padding-bottom: 72px; }
.sec--tight { padding-top: 60px; padding-bottom: 60px; }

.band {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.band--top { border-bottom: 0; }

/* ── Типографика ────────────────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 12px;
}
.eyebrow--accent { color: var(--accent); }

.h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -.015em;
  margin: 0;
}
.h2--light { color: #fff; }
.h2--spaced { margin-bottom: 32px; }
#services .h2--spaced { margin-bottom: 34px; }

.h3 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 26px;
}

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

.btn {
  display: inline-block;
  border: 0;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 20px;
  white-space: nowrap;
  cursor: pointer;
  text-align: center;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); color: #fff; }

.btn--accent {
  background: var(--accent);
  color: #2a1409;
  font-weight: 700;
  font-size: 15px;
  padding: 16px 30px;
}
.btn--accent:hover { background: #fff; color: #2a1409; }

.btn--ghost {
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  background: transparent;
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--outline {
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 22px;
}
.btn--outline:hover { border-color: var(--blue); }

.btn--quiet {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--slate);
  font-size: 14px;
  padding: 11px 20px;
}
.btn--quiet:hover { border-color: var(--blue); color: var(--blue); }

.btn--sm {
  padding: 11px 20px;
  font-size: 14.5px;
}
.btn--sm:hover { border-color: var(--blue); color: var(--blue); }

.btn--lg { font-size: 15px; padding: 15px 28px; }
/* Во всю ширину — значит переносится: на узких экранах длинная подпись
   иначе обрезается по nowrap из .btn. */
.btn--block {
  width: 100%;
  font-size: 15.5px;
  font-weight: 700;
  padding: 16px 24px;
  white-space: normal;
}

/* ── Дуотон-подложка под фотографии ─────────────────────────────────────── */

.duotone {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(155deg, rgba(27, 94, 143, .42) 0%, rgba(17, 26, 36, .30) 55%, rgba(224, 138, 95, .28) 100%),
    var(--img);
  background-size: cover, cover;
  background-position: center, var(--pos, center);
  filter: saturate(.72) contrast(1.06) brightness(.97);
}

/* ── Верхняя полоса ─────────────────────────────────────────────────────── */

.topbar {
  background: var(--ink);
  color: var(--on-dark);
  font-family: var(--mono);
  font-size: 12.5px;
}
.topbar__inner {
  padding-top: 9px;
  padding-bottom: 9px;
  display: flex;
  gap: 26px;
  align-items: center;
  flex-wrap: wrap;
}
.topbar a { color: var(--on-dark); }
.topbar a:hover { color: #fff; }
.topbar__region { margin-left: auto; color: var(--accent); }

/* ── Шапка ──────────────────────────────────────────────────────────────── */

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  padding-top: 14px;
  padding-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: nowrap;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--ink);
  flex: 0 0 auto;
}
.logo:hover { color: var(--ink); }
.logo__dot { color: var(--accent-deep); }

.nav {
  display: flex;
  gap: 18px;
  font-size: 14.5px;
  font-weight: 500;
  flex: 0 1 auto;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--slate); }
.nav a:hover { color: var(--blue); }

.header__cta { margin-left: auto; flex: 0 0 auto; }

/* ── Герой ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 620px;
  background: var(--ink);
  overflow: hidden;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}
.hero__veil {
  position: absolute;
  inset: 0;
  /* Сверху — градиент из макета. Под ним подложка слева: фотография светлее
     той заглушки, под которую макет рисовался, и без неё мелкий текст тонет. */
  background:
    linear-gradient(78deg, rgba(17, 26, 36, .94) 0%, rgba(27, 94, 143, .62) 52%, rgba(224, 138, 95, .22) 100%),
    linear-gradient(90deg, rgba(17, 26, 36, .80) 0%, rgba(17, 26, 36, .62) 58%, rgba(17, 26, 36, 0) 100%);
}
.hero__inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero__box { max-width: 680px; }
/* Осветлённый оттенок того же акцента: на фотографии #e08a5f не добирает
   до контраста 4.5 ни при какой подложке — поверх лежит синий слой градиента. */
.hero .eyebrow { margin-bottom: 20px; color: #f7c9ae; }

.hero__title {
  font-size: 52px;
  line-height: 1.08;
  font-weight: 800;
  color: #fff;
  margin: 0 0 20px;
  letter-spacing: -.02em;
  text-wrap: pretty;
}
.hero__lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--on-dark-soft);
  margin: 0 0 32px;
  max-width: 560px;
  text-wrap: pretty;
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Цифры ──────────────────────────────────────────────────────────────── */

.stats {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-top: 0;
  padding-bottom: 0;
}
.stat {
  padding: 26px 24px;
  border-right: 1px solid var(--line);
}
.stat:first-child { padding-left: 0; }
.stat:last-child { padding-right: 0; border-right: 0; }

.stat__num {
  font-family: var(--mono);
  font-size: 28px;
  color: var(--blue);
}
.stat__label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 5px;
}

/* ── Заголовок секции ───────────────────────────────────────────────────── */

.sec__head {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}
.sec__head--catalog { margin-bottom: 30px; }
.sec__note {
  margin: 0 0 4px auto;
  max-width: 420px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  text-wrap: pretty;
}

/* ── Плитки отраслей ────────────────────────────────────────────────────── */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 20px;
}
.tile {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: var(--ink);
}
.tile__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 26, 36, .05) 30%, rgba(17, 26, 36, .88) 100%);
}
.tile__body {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
}
.tile__title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.28;
  margin: 0;
  text-wrap: pretty;
}
.tile__text {
  font-size: 13.5px;
  color: var(--on-dark-dim);
  line-height: 1.45;
  margin: 6px 0 0;
  text-wrap: pretty;
}

/* ── Каталог ────────────────────────────────────────────────────────────── */

.search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 12px 16px;
  min-width: 330px;
}
.search:focus-within { border-color: var(--blue); }
.search__icon {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--blue);
}
.search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--ink);
  font-size: 14.5px;
}
.search input::-webkit-search-cancel-button { cursor: pointer; }

.cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 12px;
}
.cat {
  background: #fff;
  border: 1px solid var(--line);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink);
  transition: border-color .16s ease;
}
.cat:hover { border-color: var(--blue); color: var(--ink); }
.cat[hidden] { display: none; }
.cat__name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-wrap: pretty;
}
.cat__subs {
  font-size: 12.5px;
  color: var(--grey);
  line-height: 1.45;
}

.cats__empty {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

.cats__foot {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.cats__count {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--grey);
}
.cats__ask {
  margin-left: auto;
  font-size: 14.5px;
  font-weight: 600;
}

/* ── Услуги ─────────────────────────────────────────────────────────────── */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 28px;
}
.card { border: 1px solid var(--line); }
.card__media {
  height: 240px;
  position: relative;
  background: var(--ink);
}
.card__body { padding: 28px 26px 30px; }
.card__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
}
.card__text {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 18px;
  text-wrap: pretty;
}

.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14.5px;
  color: var(--slate);
}
.ticks li {
  display: flex;
  gap: 10px;
  line-height: 1.5;
}
.ticks li::before {
  content: "—";
  color: var(--blue);
  flex: 0 0 auto;
}

/* ── Производители ──────────────────────────────────────────────────────── */

.brands { background: var(--ink); color: #fff; }
.brands .sec { padding-top: 68px; padding-bottom: 68px; }

.brands__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}
.brand {
  background: var(--ink);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #fff;
  transition: background-color .16s ease, color .16s ease;
}
.brand:hover { background: #1a2836; color: var(--accent); }
.brand__name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.brand__note {
  font-size: 13.5px;
  color: var(--on-dark);
  line-height: 1.45;
}

/* ── О компании ─────────────────────────────────────────────────────────── */

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 52px;
  align-items: center;
}
.about__media {
  height: 420px;
  position: relative;
  background: var(--ink);
}
.about__lead {
  font-size: 16.5px;
  color: var(--muted);
  line-height: 1.68;
  margin: 0 0 26px;
  text-wrap: pretty;
}

.audiences {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.audiences li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
  font-size: 15px;
  color: var(--slate);
  line-height: 1.5;
}
.audiences__no {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--blue);
  flex: 0 0 auto;
}

/* ── Заказчики ──────────────────────────────────────────────────────────── */

.clients {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 14px;
}
.client {
  background: #fff;
  border: 1px solid var(--line);
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.client img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: .9;
}

/* ── Новости ────────────────────────────────────────────────────────────── */

.news {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}
.post { border: 1px solid var(--line); }
.post__media {
  height: 180px;
  position: relative;
  background: var(--ink);
}
.post__body { padding: 22px 22px 24px; }
.post__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
}
.post__tag {
  background: #eef3f7;
  color: var(--blue);
  padding: 4px 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.post__meta time { color: var(--grey); }
.post__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  text-wrap: pretty;
}

/* ── Стать дилером ──────────────────────────────────────────────────────── */

.dealer {
  position: relative;
  background: var(--ink);
  overflow: hidden;
}
.dealer__bg {
  position: absolute;
  inset: 0;
  opacity: .45;
}
.dealer__inner {
  position: relative;
  padding-top: 64px;
  padding-bottom: 64px;
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}
.dealer__text { flex: 1; min-width: 300px; }
.dealer__title { font-size: 30px; margin: 0 0 12px; }
.dealer__lead {
  font-size: 16px;
  color: var(--on-dark-soft);
  line-height: 1.6;
  margin: 0;
  max-width: 620px;
  text-wrap: pretty;
}

/* ── Контакты ───────────────────────────────────────────────────────────── */

.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 52px;
}
.contact__lead {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 30px;
  text-wrap: pretty;
}
.contact__items {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact__label {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--grey);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.contact__value {
  font-size: 16px;
  line-height: 1.5;
  display: block;
}
.contact__links {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

/* ── Форма ──────────────────────────────────────────────────────────────── */

.formbox {
  border: 1px solid var(--line);
  background: #fff;
  padding: 34px 32px;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form[hidden] { display: none; }
.form__title { font-size: 21px; font-weight: 700; margin: 0; }
.form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field__label {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--grey);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.field input,
.field textarea {
  background: #fff;
  border: 1px solid var(--line-strong);
  padding: 13px 14px;
  color: var(--ink);
  font-size: 15px;
  outline: none;
  width: 100%;
  min-width: 0;
  transition: border-color .16s ease;
}
.field textarea { resize: vertical; }
.field input:focus,
.field textarea:focus { border-color: var(--blue); }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--danger); }

.form__error {
  font-size: 13.5px;
  color: var(--danger);
  margin: 0;
}
.form__note {
  font-size: 12.5px;
  color: var(--grey);
  line-height: 1.55;
  margin: 0;
}

.sent {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.sent[hidden] { display: none; }
.sent__eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0;
}
.sent__title { font-size: 22px; font-weight: 700; margin: 0; }
.sent__text {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.sent .btn--primary { font-size: 15px; padding: 14px 26px; }

/* ── Подвал ─────────────────────────────────────────────────────────────── */

.footer { background: var(--ink); color: var(--on-dark); }

.footer__top {
  padding-top: 52px;
  padding-bottom: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 44px;
}
.footer__logo {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: .1em;
  color: #fff;
  margin-bottom: 12px;
}
.footer__dot { color: var(--accent); }
.footer__tagline {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
}
.footer__col a { color: var(--on-dark-soft); }
.footer__col a:hover { color: #fff; }

.footer__mid { padding-bottom: 30px; }
.footer__mid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 22px 32px;
  font-size: 13.5px;
  line-height: 1.6;
  border-top: 1px solid var(--line-dark);
  padding-top: 26px;
}
.footer__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 7px;
}

.footer__bottom {
  padding-top: 18px;
  padding-bottom: 36px;
  border-top: 1px solid var(--line-dark);
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
}
.footer__bottom a { color: var(--on-dark); }
.footer__bottom a:hover { color: #fff; }
.footer__bin { margin-left: auto; }

/* =========================================================================
   Адаптив — контрольные точки взяты из макета
   ========================================================================= */

@media (max-width: 1000px) {
  :root { --gutter: 20px; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat {
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .stat:first-child { padding-left: 20px; }
  .stat:last-child { padding-right: 20px; }

  .about__media { height: 260px; }
  .hero { height: 540px; }
  .hero__title { font-size: 38px; }
  .h2 { font-size: 28px; }
  .search { min-width: 100%; }
}

@media (max-width: 860px) {
  .header__inner {
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .nav {
    order: 3;
    width: 100%;
    flex: 1 0 100%;
    gap: 16px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 640px) {
  .sec { padding-top: 44px; padding-bottom: 44px; }
  .sec--tight { padding-top: 44px; padding-bottom: 44px; }

  .stats__grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }

  .topbar__inner { gap: 12px; font-size: 11.5px; }
  .topbar__region { margin-left: 0; }

  .hero { height: 500px; }
  .hero__title { font-size: 31px; }
  .hero__lead { font-size: 16px; }
  .h2 { font-size: 25px; }

  .dealer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }
  .dealer__text { min-width: 0; }

  .tile { height: 210px; }
  .about__media { height: 220px; }

  /* Кнопки героя всё равно переносятся — пусть встают одинаковой ширины,
     а не по длине подписи. */
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }

  .header__cta { padding: 10px 16px; font-size: 13.5px; }

  .formbox { padding: 26px 22px; }
  .footer__bin { margin-left: 0; }
}
