/* ============================================================
   СТРОЙСОСТАВ — style.css
   Палитра: графит + сигнальный оранжевый.
   Смена акцента: поменяйте --accent и --accent-dark ниже.
   Варианты: оранжевый #EA580C/#C2410C · жёлтый #CA8A04/#A16207 · синий #1D4ED8/#1E40AF
   ============================================================ */

:root {
  /* Цветовые токены */
  --accent: #EA580C;
  --accent-dark: #C2410C;
  --on-accent: #FFFFFF;

  --graphite-900: #16181B;
  --graphite-800: #1F2226;
  --graphite-700: #2B2F34;
  --graphite-600: #3D4249;

  --ink: #22262B;          /* основной текст на светлом */
  --ink-soft: #4B5158;     /* вторичный текст, контраст ≥ 4.5:1 на #fff */
  --paper: #FFFFFF;
  --paper-soft: #F4F5F6;
  --border: #DDE0E3;
  --border-dark: #3A3F45;  /* разделители на тёмном */

  --success: #15803D;
  --error: #DC2626;

  /* Типографика */
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-body: 1rem;         /* 16px */
  --fs-small: 0.875rem;
  --lh-body: 1.6;

  /* Ритм 8px */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-6: 3rem;
  --s-8: 4rem;

  --radius: 6px;
  --container: 73.75rem;   /* 1180px */
  --shadow-1: 0 1px 3px rgba(22, 24, 27, .08), 0 1px 2px rgba(22, 24, 27, .06);
  --shadow-2: 0 8px 24px rgba(22, 24, 27, .12);

  /* z-index шкала */
  --z-header: 100;
  --z-float: 200;
  --z-modal: 1000;
  --z-cookie: 900;
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 var(--s-2); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 var(--s-2); }
ul, ol { margin: 0 0 var(--s-2); padding-left: 1.25rem; }

h1 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.125rem); }
h3 { font-size: 1.25rem; }

/* Фокус для клавиатурной навигации */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--on-accent);
  padding: var(--s-1) var(--s-2); z-index: calc(var(--z-modal) + 1);
}
.skip-link:focus { left: var(--s-2); }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-2);
}
@media (min-width: 768px)  { .container { padding-inline: var(--s-3); } }
@media (min-width: 1024px) { .container { padding-inline: var(--s-4); } }

.section { padding-block: var(--s-6); }
@media (min-width: 768px) { .section { padding-block: var(--s-8); } }
.section--soft { background: var(--paper-soft); }
.section--dark { background: var(--graphite-900); color: #E8EAEC; }
.section--dark h2 { color: #fff; }

.section-lead { color: var(--ink-soft); max-width: 44rem; margin-bottom: var(--s-4); }
.section--dark .section-lead { color: #B9BEC4; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .75rem 1.5rem;
  border: 2px solid transparent; border-radius: var(--radius);
  font-weight: 600; text-decoration: none; text-align: center;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
  cursor: pointer;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--accent-dark); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--ghost:hover, .btn--ghost:focus-visible { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover, .btn--outline:focus-visible { background: var(--ink); color: #fff; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn .spinner {
  width: 1.1em; height: 1.1em; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin .7s linear infinite; display: none;
}
.btn.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--graphite-900); color: #fff;
  border-bottom: 1px solid var(--border-dark);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-2); min-height: 4rem;
}
.logo {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 800; font-size: 1.125rem; letter-spacing: .02em;
  text-decoration: none; color: #fff; text-transform: uppercase;
}
.logo__mark { width: 1.5rem; height: 1.5rem; flex: none; }
.logo b { color: var(--accent); font-weight: 800; }

.nav { display: none; }
.header__phone { display: none; }

.burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 2.75rem; height: 2.75rem; padding: .6rem;
  background: none; border: 0;
}
.burger span { display: block; height: 2px; background: #fff; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  background: var(--graphite-800);
  border-top: 1px solid var(--border-dark);
  padding: var(--s-2) 0 var(--s-3);
}
.mobile-menu.is-open { display: block; }
.mobile-menu a {
  display: block; padding: .75rem var(--s-2);
  color: #E8EAEC; text-decoration: none; font-weight: 500;
}
.mobile-menu a:hover { color: #fff; background: var(--graphite-700); }
.mobile-menu a[aria-current="page"] { color: var(--accent); }
.mobile-menu .mobile-menu__cta { margin: var(--s-2) var(--s-2) 0; }

@media (min-width: 1024px) {
  .burger, .mobile-menu { display: none !important; }
  .nav { display: flex; gap: var(--s-3); }
  .nav a {
    text-decoration: none; color: #C9CDD2; font-weight: 500; font-size: var(--fs-small);
    padding: .5rem 0; border-bottom: 2px solid transparent;
    transition: color .2s;
  }
  .nav a:hover { color: #fff; }
  .nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent); }
  .header__phone {
    display: inline-flex; align-items: center; gap: .5rem;
    color: #fff; text-decoration: none; font-weight: 700;
  }
  .header__phone:hover { color: var(--accent); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--graphite-900) url("../img/hero.webp") center / cover no-repeat;
  color: #fff;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(22,24,27,.92) 35%, rgba(22,24,27,.6));
}
.hero__inner { position: relative; padding-block: var(--s-8); max-width: 46rem; }
@media (min-width: 1024px) { .hero__inner { padding-block: 6.5rem; } }
.hero h1 { color: #fff; }
.hero__sub { font-size: 1.125rem; color: #D3D7DB; max-width: 38rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.hero__trust {
  display: inline-flex; align-items: center; gap: .6rem;
  margin-top: var(--s-3); font-size: var(--fs-small); color: #E8EAEC;
}
.hero__trust svg { color: var(--accent); flex: none; }

/* ---------- Карточки боли ---------- */
.pain-grid { display: grid; gap: var(--s-2); }
@media (min-width: 768px) { .pain-grid { grid-template-columns: repeat(3, 1fr); } }
.pain-card {
  background: var(--paper); border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: var(--s-3);
  font-weight: 500;
}
.pain-outro { margin-top: var(--s-3); font-size: 1.125rem; font-weight: 700; }

/* ---------- Карточки услуг ---------- */
.service-grid { display: grid; gap: var(--s-2); }
@media (min-width: 768px)  { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .service-grid { grid-template-columns: repeat(4, 1fr); } }
.service-card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-3); text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
.service-card:hover { border-color: var(--accent); box-shadow: var(--shadow-2); }
.service-card__icon { color: var(--accent); margin-bottom: var(--s-2); }
.service-card h3 { font-size: 1.125rem; }
.service-card ul { color: var(--ink-soft); font-size: var(--fs-small); list-style: none; padding: 0; }
.service-card ul li { padding-left: 1rem; position: relative; }
.service-card ul li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }
.service-card__pay {
  margin-top: auto; padding-top: var(--s-2);
  font-size: var(--fs-small); font-weight: 600; color: var(--ink);
}
.service-card__more { color: var(--accent); font-weight: 600; font-size: var(--fs-small); }

/* ---------- Степпер ---------- */
.stepper { display: grid; gap: var(--s-3); counter-reset: step; list-style: none; padding: 0; }
@media (min-width: 1024px) { .stepper { grid-template-columns: repeat(5, 1fr); gap: var(--s-2); } }
.stepper li { position: relative; padding-left: 3.25rem; counter-increment: step; }
.stepper li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-weight: 700;
}
@media (min-width: 1024px) {
  .stepper li { padding-left: 0; padding-top: 3.25rem; }
  .stepper li::after {
    content: ""; position: absolute; top: 1.25rem; left: 3rem; right: 0;
    height: 2px; background: var(--border-dark);
  }
  .stepper li:last-child::after { display: none; }
}
.stepper h3 { font-size: 1rem; margin-bottom: .25rem; }
.stepper p { font-size: var(--fs-small); color: var(--ink-soft); margin: 0; }
.section--dark .stepper p { color: #B9BEC4; }
.stepper .stepper__time { display: block; font-size: .8125rem; font-weight: 600; color: var(--accent); margin-top: .25rem; }

/* ---------- Доверие 2×3 ---------- */
.trust-grid { display: grid; gap: var(--s-2); }
@media (min-width: 768px)  { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-item {
  display: flex; gap: var(--s-2); align-items: flex-start;
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-3);
}
.trust-item svg { color: var(--accent); flex: none; margin-top: .1rem; }
.trust-item h3 { font-size: 1rem; margin-bottom: .25rem; }
.trust-item p { font-size: var(--fs-small); color: var(--ink-soft); margin: 0; }

/* ---------- Формы ---------- */
.form-wrap {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-3);
}
@media (min-width: 768px) { .form-wrap { padding: var(--s-4); } }
.section--dark .form-wrap { background: var(--graphite-800); border-color: var(--border-dark); }

.form-grid { display: grid; gap: var(--s-2); }
@media (min-width: 768px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .form-field--full { grid-column: 1 / -1; }
}
.form-field label {
  display: block; font-size: var(--fs-small); font-weight: 600; margin-bottom: .375rem;
}
.form-field .req { color: var(--error); }
.section--dark .form-field label { color: #E8EAEC; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; min-height: 3rem;
  padding: .625rem .875rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
}
.form-field textarea { min-height: 6rem; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(234, 88, 12, .2);
}
.form-field input[aria-invalid="true"] { border-color: var(--error); }
.field-error { display: none; color: var(--error); font-size: .8125rem; margin-top: .25rem; }
.form-field.has-error .field-error { display: block; }
.section--dark .field-error { color: #F87171; }

.consent { display: flex; gap: .625rem; align-items: flex-start; font-size: var(--fs-small); color: var(--ink-soft); }
.section--dark .consent { color: #B9BEC4; }
.consent input { width: 1.25rem; height: 1.25rem; margin-top: .1rem; flex: none; accent-color: var(--accent); }
.consent a { color: var(--accent); }

/* honeypot — прячем от людей, оставляем для ботов */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-status { display: none; border-radius: var(--radius); padding: var(--s-2) var(--s-3); margin-top: var(--s-2); font-weight: 500; }
.form-status.is-success { display: block; background: #ECFDF3; color: var(--success); border: 1px solid #BBF7D0; }
.form-status.is-error { display: block; background: #FEF2F2; color: var(--error); border: 1px solid #FECACA; }

/* ---------- FAQ ---------- */
.faq { max-width: 50rem; }
.faq details {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: var(--s-1); background: var(--paper);
}
.faq summary {
  padding: var(--s-2) var(--s-3); font-weight: 600; cursor: pointer;
  list-style: none; position: relative; padding-right: 3rem;
  min-height: 44px; display: flex; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: var(--s-3); top: 50%;
  width: .625rem; height: .625rem;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details > div { padding: 0 var(--s-3) var(--s-2); color: var(--ink-soft); }

/* ---------- Таблицы ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.table th, .table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background: var(--paper-soft); font-weight: 700; white-space: nowrap; }
.table td:last-child { white-space: nowrap; }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs { padding-block: var(--s-2); font-size: var(--fs-small); color: var(--ink-soft); }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .375rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .375rem; color: var(--border); }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--accent); }

/* ---------- Страничный hero (внутренние) ---------- */
.page-hero { background: var(--graphite-900); color: #fff; padding-block: var(--s-6); }
.page-hero h1 { color: #fff; margin-bottom: var(--s-1); }
.page-hero p { color: #C9CDD2; max-width: 44rem; margin: 0; font-size: 1.0625rem; }

/* hero с фото: тёмный оверлей поверх снимка, текст остаётся читаемым */
.page-hero--photo { position: relative; background-size: cover; background-position: center; }
.page-hero--photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(22,24,27,.9) 30%, rgba(22,24,27,.55)); }
.page-hero--photo .container { position: relative; }
@media (min-width: 768px) { .page-hero--photo { padding-block: var(--s-8); } }

/* ---------- Фотосетка (мозаика) ---------- */
.photo-grid { display: grid; gap: var(--s-2); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .photo-grid { grid-template-columns: repeat(4, 1fr); } }
.photo-grid figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.photo-grid figure:first-child { grid-column: span 2; grid-row: span 2; }
.photo-grid figure:first-child img { aspect-ratio: 4 / 3; }
.photo-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: var(--s-2); font-size: var(--fs-small); font-weight: 600; color: #fff;
  background: linear-gradient(transparent, rgba(22,24,27,.85));
}

/* ---------- Фото в две колонки с текстом ---------- */
.media-split img { border-radius: var(--radius); width: 100%; object-fit: cover; }

/* ---------- Вакансии ---------- */
.vacancy {
  display: grid; gap: var(--s-1);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-3); margin-bottom: var(--s-2); background: var(--paper);
}
@media (min-width: 768px) {
  .vacancy { grid-template-columns: 1fr auto; align-items: center; }
}
.vacancy h3 { margin-bottom: .25rem; }
.vacancy__meta { color: var(--ink-soft); font-size: var(--fs-small); margin: 0; }
.vacancy__rate { font-weight: 700; font-size: 1.125rem; white-space: nowrap; }

/* ---------- Два столбца ---------- */
.cols-2 { display: grid; gap: var(--s-4); }
@media (min-width: 1024px) { .cols-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Чек-листы вкл/не вкл ---------- */
.include-list { list-style: none; padding: 0; }
.include-list li { display: flex; gap: .625rem; align-items: flex-start; padding-block: .375rem; }
.include-list svg { flex: none; margin-top: .2rem; }
.include-list--yes svg { color: var(--success); }
.include-list--no svg { color: var(--error); }

/* ---------- Подвал ---------- */
.footer {
  background: var(--graphite-900); color: #B9BEC4;
  padding-block: var(--s-6) var(--s-3); font-size: var(--fs-small);
}
.footer a { color: #D3D7DB; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; gap: var(--s-4); margin-bottom: var(--s-4); }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; } }
.footer h3 { color: #fff; font-size: .9375rem; text-transform: uppercase; letter-spacing: .05em; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { padding-block: .25rem; }
.footer__legal {
  border-top: 1px solid var(--border-dark); padding-top: var(--s-3);
  display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: space-between;
}
.footer__rusprofile {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1px solid var(--border-dark); border-radius: var(--radius);
  padding: .5rem .875rem; margin-top: var(--s-2);
}
.footer__rusprofile:hover { border-color: var(--accent); text-decoration: none !important; }

/* ---------- Плавающие кнопки (мобайл) ---------- */
.float-contacts {
  position: fixed; right: var(--s-2); bottom: var(--s-2); z-index: var(--z-float);
  display: flex; flex-direction: column; gap: .625rem;
}
.float-contacts a {
  width: 3.25rem; height: 3.25rem; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; box-shadow: var(--shadow-2); text-decoration: none;
}
.float-contacts .fc-phone { background: var(--accent); }
.float-contacts .fc-tg { background: #229ED9; }
.float-contacts .fc-wa { background: #25D366; }
@media (min-width: 1024px) { .float-contacts { display: none; } }

/* ---------- Модалка заявки ---------- */
.modal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: none; align-items: flex-end; justify-content: center;
  background: rgba(22, 24, 27, .55); padding: 0;
}
@media (min-width: 768px) { .modal { align-items: center; padding: var(--s-3); } }
.modal.is-open { display: flex; }
.modal__box {
  background: var(--paper); border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 34rem; max-height: 92dvh; overflow-y: auto;
  padding: var(--s-3);
}
@media (min-width: 768px) { .modal__box { border-radius: var(--radius); padding: var(--s-4); } }
.modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-2); }
.modal__close {
  background: none; border: 0; padding: .5rem; margin: -0.5rem -0.5rem 0 0;
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center; color: var(--ink-soft);
}
.modal__close:hover { color: var(--ink); }

/* ---------- Баннер тестового запуска ---------- */
.test-banner {
  background: var(--graphite-900); color: #E8EAEC;
  text-align: center; font-size: var(--fs-small);
  padding: .5rem var(--s-2);
}

/* ---------- Cookie ---------- */
.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-cookie);
  background: var(--graphite-800); color: #E8EAEC;
  padding: var(--s-2); display: none;
}
.cookie-bar.is-visible { display: block; }
.cookie-bar__inner {
  display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; justify-content: space-between;
}
.cookie-bar p { margin: 0; font-size: var(--fs-small); }
.cookie-bar a { color: var(--accent); }

/* ---------- Утилиты ---------- */
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.text-center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Печать ---------- */
@media print {
  .header, .footer, .float-contacts, .cookie-bar, .modal, .test-banner { display: none !important; }
}
