/* Типографика утверждена: Onest (заголовки) + PT Sans (текст).
   Палитра утверждена: синий акцентный, тёплый почти-белый фон.
   См. CLAUDE.md → Дизайн. */

@font-face {
  font-family: 'Onest';
  src: url('../fonts/Onest-Variable.woff2') format('woff2-variations'),
       url('../fonts/Onest-Variable.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PT Sans';
  src: url('../fonts/PTSans-Regular.woff2') format('woff2'),
       url('../fonts/PTSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PT Sans';
  src: url('../fonts/PTSans-Bold.woff2') format('woff2'),
       url('../fonts/PTSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #F8F8F7;
  --ink: #1C1E1F;
  --ink-muted: rgba(28, 30, 31, 0.64);
  --accent: #132A45;
  --accent-soft: #4C6E8F;
  --accent-contrast: #F5F7FA;
  --line: #E4E1DA;

  /* Семантические цвета состояний формы — не часть брендовой палитры,
     это отдельная конвенция UI (ошибка/успех), не считается вторым акцентом. */
  --state-error: #B3261E;
  --state-error-bg: #FBEDEC;
  --state-success: #2E7D46;

  --header-h: 5.5rem;
  --radius: 10px;
  --shadow-card-soft: 0 2px 8px rgba(28, 30, 31, 0.06);
  --font-display: 'Onest', -apple-system, sans-serif;
  --font-body: 'PT Sans', -apple-system, sans-serif;
}

* { box-sizing: border-box; }
/* Блоки переключаются целиком. Это НАТИВНЫЙ scroll-snap, а не скролл-джекинг:
   доводку делает браузер, колесо и клавиатура работают штатно, JS не вмешивается. */
html {
  -webkit-text-size-adjust: 100%;
  scroll-snap-type: y mandatory;
}
.hero,
.services,
.site-footer {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  scroll-margin-top: var(--header-h);
}
/* Хиро тоже должен занимать ровно экран, иначе на стыке с первым блоком
   видно оба сразу. */
.hero {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
}
.hero > .container { width: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
a { color: inherit; }
button, input, select { font-family: inherit; }

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

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

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--canvas);
  padding: 1.1rem 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.header-left {
  display: flex;
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  display: block;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}
.brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.header-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  font-size: 1.15rem;
}
.header-contact .phone {
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}
.header-contact .messenger-icons {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.header-contact .messenger-icons a {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.header-contact .messenger-icons a:hover {
  border-color: var(--accent);
  background: rgba(19, 42, 69, 0.06);
}
.header-contact .messenger-icons svg { width: 24px; height: 24px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--canvas);
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 108% 22%;
  z-index: 0;
  pointer-events: none;
}
/* Смягчаем фон под текстовой колонкой: иллюстрация заходит влево и спорит
   с заголовком и цифрами, поэтому гасим её плотность именно там. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to right,
    var(--canvas) 0%,
    var(--canvas) 36%,
    rgba(248, 248, 247, 0.82) 48%,
    rgba(248, 248, 247, 0.35) 62%,
    rgba(248, 248, 247, 0) 76%
  );
}
/* На узком экране колонки схлопываются в одну, и горизонтальный градиент
   больше не спасает: иллюстрация лезет прямо под заголовок и цифры.
   Уводим её вниз кадра и гасим до уровня фактуры. */
@media (max-width: 760px) {
  .hero-bg {
    object-position: right bottom;
    opacity: 0.38;
  }
  .hero::after {
    background: linear-gradient(
      to bottom,
      var(--canvas) 0%,
      var(--canvas) 30%,
      rgba(248, 248, 247, 0.75) 55%,
      rgba(248, 248, 247, 0.55) 100%
    );
  }
}

/* Форма уехала в модалку — хиро стал одноколоночным: текст держится слева,
   иллюстрация справа больше ничем не перекрыта. */
.hero .container {
  position: relative;
  z-index: 1;
}
/* Одна ширина на весь блок: надзаголовок, заголовок и кнопка выравнены
   по общему правому краю (32rem ≈ ширина заголовка при его 11ch). */
.hero-copy {
  padding-top: 0.5rem;
  max-width: min(100%, 32rem);
}
.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 1.1rem;
}
.hero-copy .eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--accent-soft);
  font-weight: 700;
  max-width: 100%;
  margin-bottom: 1.4rem;
}
h1.hero-title {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 100%;
  text-wrap: balance;
  margin-bottom: 1.5rem;
}
.hero-sub {
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  color: var(--ink-muted);
  max-width: 36ch;
  line-height: 1.5;
}

.hero-copy .hero-cta {
  width: 100%;
  margin-top: clamp(2.2rem, 4.5vw, 3rem);
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  padding: 1.35rem 3rem;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(19, 42, 69, 0.26);
}
.hero-copy .hero-cta:hover {
  box-shadow: 0 14px 32px rgba(19, 42, 69, 0.32);
}

/* ---------- lead modal ---------- */
.lead-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 30rem);
  width: 100%;
  margin: auto;
  overflow: visible;
}
.lead-modal::backdrop {
  background: rgba(28, 30, 31, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lead-modal-inner {
  position: relative;
}
.lead-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.lead-modal-close:hover {
  background: rgba(28, 30, 31, 0.07);
  color: var(--ink);
}
.lead-modal-close svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: no-preference) {
  .lead-modal[open] { animation: modalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) both; }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ---------- lead form ---------- */
.lead-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.lead-modal .lead-form {
  padding: 1.9rem 1.7rem 1.7rem;
  box-shadow: 0 24px 60px rgba(28, 30, 31, 0.22);
}
.lead-modal .lead-form h2 { padding-right: 2.2rem; }
.lead-form h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.lead-form .form-note {
  font-size: 0.86rem;
  color: var(--ink-muted);
  margin-bottom: 1.3rem;
}
/* ---------- multi-step progress ---------- */
.form-progress {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.6rem;
}
.progress-track {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0.5);
  transform-origin: left;
  background: var(--accent);
  border-radius: 999px;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.form-step-label {
  font-size: 0.8rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ---------- step transitions ---------- */
.form-steps {
  display: grid;
}
.form-step {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.form-step.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  position: relative;
}
@media (prefers-reduced-motion: reduce) {
  .form-step { transition: opacity 0.15s linear; transform: none; }
}

.step-actions {
  display: flex;
  gap: 0.8rem;
}
.step-actions .btn-primary { flex: 1; }
.btn-secondary {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.95rem 1.3rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.btn-secondary:hover { border-color: var(--accent); background: rgba(19, 42, 69, 0.05); }

/* ---------- custom select ---------- */
.custom-select { position: relative; }
.native-select-fallback { display: none; }
.custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  text-align: left;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--canvas);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.custom-select-trigger:hover { border-color: rgba(28, 30, 31, 0.32); }
.custom-select-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(19, 42, 69, 0.12);
}
.custom-select-trigger .chevron {
  width: 18px;
  height: 18px;
  color: var(--ink-muted);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.custom-select.is-open .custom-select-trigger .chevron { transform: rotate(180deg); }
.custom-select-list {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  z-index: 20;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(28, 30, 31, 0.12);
  padding: 0.4rem;
  list-style: none;
  margin: 0;
  max-height: 260px;
  overflow-y: auto;
}
.custom-select-list[hidden] { display: none; }
.custom-select-list li {
  padding: 0.65rem 0.7rem;
  border-radius: 6px;
  font-size: 0.94rem;
  cursor: pointer;
}
.custom-select-list li:hover,
.custom-select-list li.is-highlighted { background: rgba(19, 42, 69, 0.06); }
.custom-select-list li[aria-selected="true"] { color: var(--accent); font-weight: 700; }

/* ---------- field live-validation checkmark ---------- */
.input-with-check { position: relative; }
.input-with-check input { padding-right: 2.6rem; }
.check-icon {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  width: 20px;
  height: 20px;
  color: var(--state-success);
  opacity: 0;
  transform: translateY(-50%) scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.field.is-valid .check-icon { opacity: 1; transform: translateY(-50%) scale(1); }

/* ---------- custom checkbox ---------- */
.checkbox-visual { position: relative; width: 20px; height: 20px; flex-shrink: 0; margin-top: 0.1rem; }
.checkbox-visual input {
  position: absolute;
  inset: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.custom-checkbox {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.custom-checkbox svg {
  width: 12px;
  height: 12px;
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.checkbox-visual input:checked + .custom-checkbox { background: var(--accent); border-color: var(--accent); }
.checkbox-visual input:checked + .custom-checkbox svg { opacity: 1; transform: scale(1); }
.checkbox-visual input:focus-visible + .custom-checkbox { outline: 2px solid var(--accent); outline-offset: 2px; }

.field {
  margin-bottom: 1.1rem;
}
.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.field .optional {
  font-weight: 400;
  color: var(--ink-muted);
}
.field input,
.field select {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--canvas);
  color: var(--ink);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.field input::placeholder { color: rgba(28, 30, 31, 0.38); }
.field input:hover, .field select:hover { border-color: rgba(28, 30, 31, 0.32); }
.field input:focus-visible, .field select:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(19, 42, 69, 0.12);
}
.field.is-error input {
  border-color: var(--state-error);
  background: var(--state-error-bg);
}
.field.is-error .field-message {
  color: var(--state-error);
}
.field.is-valid input {
  border-color: var(--state-success);
}
.field-message {
  display: block;
  min-height: 1.1em;
  font-size: 0.82rem;
  margin-top: 0.35rem;
  color: var(--ink-muted);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.4;
  margin-bottom: 1.2rem;
  cursor: pointer;
}
.consent a { text-decoration: underline; color: var(--ink-muted); }

.captcha-field {
  margin-bottom: 1.2rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--accent);
  color: var(--accent-contrast);
  border: none;
  border-radius: 8px;
  padding: 0.95rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
}
.btn-primary:hover { background: #0E1E32; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.form-status {
  margin-top: 0.9rem;
  font-size: 0.86rem;
}
.form-status[data-state="success"] { color: var(--state-success); }
.form-status[data-state="error"] { color: var(--state-error); }

/* .form-progress/.form-steps/.form-success задают свой display (flex/grid),
   который иначе перебивает атрибут [hidden] — явно возвращаем скрытие. */
.form-progress[hidden], .form-steps[hidden], .form-success[hidden] { display: none; }

.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.9rem;
  padding: 1.4rem 0.5rem;
}
.form-success-icon {
  width: 44px;
  height: 44px;
  color: var(--state-success);
}
.form-success p {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

/* ---------- entrance ---------- */
.hero-copy, .lead-form {
  opacity: 0;
  transform: translateY(8px);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy, .lead-form {
    animation: heroIn 0.5s ease both;
  }
  .lead-form { animation-delay: 0.08s; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-copy, .lead-form { opacity: 1; transform: none; }
}
@keyframes heroIn {
  to { opacity: 1; transform: none; }
}

/* ---------- services ---------- */
.services {
  padding: clamp(2rem, 5vh, 4rem) 0;
  height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
}
/* Двухколоночный каркас: заголовок слева «прилипает», содержимое едет справа.
   Это position: sticky, а НЕ скролл-джекинг — скорость прокрутки остаётся
   у пользователя, JS не вмешивается (см. бриф: без parallax/скролл-джекинга). */
.services > .container {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  width: 100%;
}
.section-head {
  position: sticky;
  top: clamp(2rem, 12vh, 7rem);
}
.section-body { min-width: 0; }
/* Карточки не ужимаем под экран — вместо этого список прокручивается внутри
   блока. Блок остаётся на месте, ощущения «напихали» нет. */
.section-body.is-scrollable {
  max-height: calc(100vh - var(--header-h) - clamp(4rem, 10vh, 8rem));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.6rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(19, 42, 69, 0.28) transparent;
  /* мягкое затухание сверху и снизу, чтобы обрез списка не выглядел обрывом */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
}
.section-body.is-scrollable::-webkit-scrollbar { width: 6px; }
.section-body.is-scrollable::-webkit-scrollbar-track { background: transparent; }
.section-body.is-scrollable::-webkit-scrollbar-thumb {
  background: rgba(19, 42, 69, 0.24);
  border-radius: 999px;
}
/* тень карточки не должна срезаться контейнером прокрутки */
.section-body.is-scrollable .services-grid { padding: 6px 6px 10px; margin: -6px -6px -10px; }

/* Узкий экран: одна колонка, sticky выключаем (липнущий заголовок на телефоне
   съедает и без того малую высоту), полноэкранность снимаем — иначе
   короткие блоки растягиваются пустотой. */
@media (max-width: 860px) {
  html { scroll-snap-type: none; }
  .hero { min-height: 0; display: block; }
  .services {
    height: auto;
    min-height: 0;
    display: block;
  }
  .section-body.is-scrollable {
    max-height: none;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
    padding-right: 0;
  }
  .services > .container {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .section-head { position: static; }
  .service-body { max-width: 100%; }
  .service-illo { opacity: 0.5; width: 110px; height: 110px; }
}
.services.has-pattern {
  position: relative;
  overflow: hidden;
}
.services.has-pattern > .container {
  position: relative;
  z-index: 1;
}
.section-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.section-pattern svg {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: clamp(360px, 40vw, 560px);
  height: auto;
  color: var(--accent);
  opacity: 0.05;
}
.section-pattern.pattern-left svg {
  right: auto;
  left: -20px;
  transform: scaleX(-1);
}
.services-title {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
/* Карточка услуги. Композиция и hover перенесены с 21st.dev
   (@lavikatiyar/service-card): подъём карточки, иллюстрация в правом нижнем
   углу с выходом за край, сдвиг стрелки. В оригинале это framer-motion,
   здесь тот же результат на чистом CSS — JS не нужен. */
.service-item {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 168px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-card-soft);
  padding: 1.5rem 1.7rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-item:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(28, 30, 31, 0.12);
}
.service-body {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 150px);
}
.service-item h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  transition: color 0.15s ease;
}
.service-item:hover h3 { color: var(--accent); }
.service-item p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-muted);
  margin-bottom: 0.9rem;
}
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
}
.service-item:hover .service-link { text-decoration: underline; }
.service-arrow {
  display: inline-block;
  transition: transform 0.3s ease-in-out;
}
.service-item:hover .service-arrow { transform: translateX(5px); }

/* Иллюстрация: выходит за нижний правый угол, на hover подрастает,
   слегка поворачивается и уезжает вправо — как в оригинале. */
.service-illo {
  position: absolute;
  right: 1.4rem;
  bottom: 1rem;
  width: 118px;
  height: 118px;
  object-fit: contain;
  opacity: 0.9;
  z-index: 0;
  pointer-events: none;
  transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}
.service-item:hover .service-illo {
  opacity: 1;
  transform: scale(1.08) rotate(3deg) translateX(6px);
}
@media (prefers-reduced-motion: reduce) {
  .service-item,
  .service-item:hover,
  .service-illo,
  .service-item:hover .service-illo,
  .service-arrow,
  .service-item:hover .service-arrow { transition: none; transform: none; }
}
.services-more {
  margin-top: clamp(2.6rem, 5vw, 3.6rem);
  font-size: 0.95rem;
}
.services-more a { color: var(--accent); font-weight: 700; }

.contact-block {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.contact-name {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
}
.contact-name img { width: 22px; height: 22px; }
.contact-block .phone {
  font-size: 1.15rem;
  font-weight: 700;
}
.contact-address {
  font-style: normal;
  color: var(--ink-muted);
  font-size: 0.94rem;
}
.phone { text-decoration: none; }

.map-embed {
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.map-embed iframe { display: block; }

/* ---------- scroll reveal (below-the-fold sections only) ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
html.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 1.6rem 0;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.86rem;
  color: var(--ink-muted);
}
.site-footer a { text-decoration: underline; color: var(--ink-muted); }
.site-footer a:hover { color: var(--ink); }

/* ---------- legal / document pages ---------- */
.legal-main {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) 1.5rem 4rem;
}
.draft-notice {
  background: var(--state-error-bg);
  border: 1px solid rgba(179, 38, 30, 0.25);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  font-size: 0.88rem;
  color: var(--state-error);
  margin-bottom: 2.2rem;
  line-height: 1.5;
}
.legal-main h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.legal-updated {
  font-size: 0.86rem;
  color: var(--ink-muted);
  margin-bottom: 2.4rem;
}
.legal-main h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2.2rem 0 0.8rem;
}
.legal-main p, .legal-main li {
  font-size: 1rem;
  line-height: 1.65;
  color: #333537;
}
.legal-main p { margin-bottom: 1rem; }
.legal-main ul { margin: 0 0 1rem; padding-left: 1.3rem; }
.legal-main li { margin-bottom: 0.4rem; }

.ph {
  background: rgba(179, 38, 30, 0.08);
  border-bottom: 1px dashed var(--state-error);
  color: var(--state-error);
  font-weight: 600;
  padding: 0 0.2em;
  white-space: nowrap;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero .container {
    grid-template-columns: 1fr;
  }
  .services-grid { grid-template-columns: 1fr; }
}

/* Отдельная (не резиновая) раскладка шапки для мобильной ширины — не сжатая
   десктопная версия, а два ряда: лого+название сверху, контакты снизу.
   На одну строку "Телефон+Telegram+Макс+полное название" в 375px реально
   не помещается ни при каком читаемом размере шрифта — два ряда решают
   это, и телефон/мессенджеры остаются видимыми всегда, без display:none. */
@media (max-width: 640px) {
  .site-header .container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }
  .header-left { width: 100%; }
  .brand { gap: 0.55rem; }
  .brand-mark { width: 28px; height: 28px; }
  .brand span {
    font-size: 1.05rem;
    white-space: nowrap;
  }
  .header-contact {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.92rem;
  }
  .header-contact .messenger-icons { gap: 0.4rem; }
  .header-contact .messenger-icons a { width: 34px; height: 34px; }
  .header-contact .messenger-icons svg { width: 17px; height: 17px; }
}

@media (max-width: 360px) {
  .header-contact { font-size: 0.85rem; }
}

/* ---------- узкий экран: переопределения идут последними, иначе их
     перебивают более поздние правила карточек ---------- */
@media (max-width: 860px) {
  html { scroll-snap-type: none; }
  .hero { min-height: 0; display: block; }
  .services {
    height: auto;
    min-height: 0;
    display: block;
  }
  .services > .container { grid-template-columns: 1fr; gap: 1.8rem; }
  .section-head { position: static; }
  .section-body.is-scrollable {
    max-height: none;
    overflow: visible;
    padding-right: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .section-body.is-scrollable .services-grid { padding: 0; margin: 0; }
  .service-body { max-width: calc(100% - 104px); }
  .service-illo {
    width: 92px;
    height: 92px;
    right: 0.9rem;
    bottom: 0.9rem;
  }
  .service-item { min-height: 0; }
}
@media (max-width: 460px) {
  .service-body { max-width: 100%; }
  .service-illo {
    position: static;
    width: 76px;
    height: 76px;
    margin-top: 0.9rem;
    opacity: 0.85;
  }
  .service-item:hover .service-illo { transform: none; }
}
