/* ==========================================================================
   XP Transfer — дизайн-система
   ========================================================================== */

:root {
  /* Палитра */
  --blue-900: #171fa1;
  --blue-700: #1f2bbd;
  --blue-600: #1f6dbf;
  --blue-400: #4189d8;
  --blue-300: #a3cdf7;
  --blue-100: #e6f0fd;
  --cream: #f6f5f3;
  --white: #fff;
  --ink: rgba(0, 0, 0, 0.8);
  --muted: #646d79;
  --dark: #1f2124;
  --line: rgba(0, 0, 0, 0.1);
  /* --line годится для декоративных рамок, но проваливает 1.4.11 (3:1)
     там, где линия несёт смысл — например подчёркивание неактивной вкладки */
  --line-strong: rgba(0, 0, 0, 0.42);

  /* Типографика */
  --font: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Раскладка */
  --container: 1280px;
  --gutter: 20px;
  --header-h: 100px;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --radius-pill: 100px;

  /* Тени */
  --shadow-sm: 0 2px 8px rgba(23, 31, 161, 0.06);
  --shadow: 0 12px 32px rgba(23, 31, 161, 0.1);
  --shadow-lg: 0 24px 64px rgba(23, 31, 161, 0.14);

  /* Ритм секций */
  --section-y: clamp(56px, 7vw, 120px);
}

/* --------------------------------------------------------- Сброс и база */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Ровно высота липкой шапки — иначе якорь уводит заголовок под неё */
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  /* clip, а не hidden: hidden делает body скролл-контейнером
     и ломает переходы по якорям и scroll-behavior: smooth */
  overflow-x: clip;
}

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

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--blue-900);
  font-weight: 500;
  line-height: 1.2;
}

p {
  margin: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--blue-900);
  color: var(--white);
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* Текст только для скринридеров — например статичная замена бегущей строке */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.accent {
  color: var(--blue-400);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 24px;
  padding: 6px 21px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-900);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}

.eyebrow--light {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.prose {
  color: var(--ink);
  line-height: 1.6;
}

.prose > * + * {
  margin-top: 16px;
}

.prose h2 {
  margin-top: 40px;
  font-size: clamp(24px, 2.4vw, 32px);
}

.prose h3 {
  margin-top: 32px;
  font-size: clamp(19px, 1.8vw, 22px);
}

.prose a {
  color: var(--blue-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose ul,
.prose ol {
  padding-left: 22px;
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: 8px;
}

.prose b,
.prose strong {
  color: var(--blue-900);
  font-weight: 600;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-pill);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn--primary {
  background: var(--blue-900);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--blue-700);
  transform: translateY(-1px);
}

.btn--ghost {
  color: var(--blue-900);
  box-shadow: inset 0 0 0 1.5px var(--blue-900);
}

.btn--ghost:hover {
  color: var(--white);
  background: var(--blue-900);
  transform: translateY(-1px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn .icon {
  width: 16px;
  height: 16px;
  flex: none;
}

/* --------------------------------------------------------- Шапка */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

/* Три колонки: логотип — меню по центру страницы — действия справа.
   Grid, а не margin: auto, иначе меню смещается на половину ширины логотипа. */
.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.site-header__logo {
  justify-self: start;
}

.site-header__logo img {
  width: 150px;
  height: auto;
}

.site-header__actions {
  justify-self: end;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav__item {
  position: relative;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 16px;
  font-size: 14px;
  color: var(--blue-900);
  border-radius: var(--radius-pill);
  transition: background-color 0.2s ease;
}

.site-nav__link:hover {
  background: var(--blue-100);
}

/* «Услуги»: ссылка + кнопка раскрытия в одной пилюле */
.site-nav__group {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  transition: background-color 0.2s ease;
}

.site-nav__group:hover {
  background: var(--blue-100);
}

.site-nav__group .site-nav__link {
  padding-right: 6px;
}

.site-nav__group .site-nav__link:hover {
  background: none;
}

.site-nav__toggle {
  display: inline-grid;
  place-items: center;
  padding: 12px 14px 12px 2px;
  color: var(--blue-900);
  border-radius: var(--radius-pill);
}

.site-nav__toggle .icon {
  width: 10px;
  height: 10px;
  transition: transform 0.2s ease;
}

.site-nav__item.is-open .site-nav__toggle .icon {
  transform: rotate(180deg);
}

.site-nav__sub {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 268px;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.site-nav__item.is-open .site-nav__sub {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.site-nav__sub a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--blue-900);
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease;
}

.site-nav__sub a:hover,
.site-nav__sub a.is-active,
.site-nav__sub a[aria-current="page"] {
  background: var(--blue-100);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0 12px;
  border-radius: 50%;
  background: var(--blue-100);
}

.burger span {
  display: block;
  height: 2px;
  background: var(--blue-900);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.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;
  border-top: 1px solid var(--line);
  background: var(--white);
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
  padding-block: 16px 32px;
}

.mobile-menu__list > li + li {
  border-top: 1px solid var(--line);
}

.mobile-menu__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 16px 4px;
  font-size: 17px;
  color: var(--blue-900);
  text-align: left;
}

.mobile-menu__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu__toggle {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 44px;
  padding: 16px 8px;
  color: var(--blue-900);
}

.mobile-menu__toggle .icon {
  width: 13px;
  height: 13px;
  flex: none;
  transition: transform 0.2s ease;
}

.mobile-menu__toggle[aria-expanded="true"] .icon {
  transform: rotate(180deg);
}

.mobile-menu__sub {
  display: none;
  padding-bottom: 8px;
  padding-left: 16px;
  border-left: 2px solid var(--blue-100);
  margin-left: 4px;
}

.mobile-menu__sub a {
  font-size: 15px;
  padding: 11px 4px;
  color: var(--ink);
}

.mobile-menu__item.is-open .mobile-menu__sub {
  display: block;
}

.mobile-menu__cta {
  margin-top: 24px;
  width: 100%;
  justify-content: center;
}

/* --------------------------------------------------------- Главная: hero */

.hero__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-block: 90px 60px;
}

.hero__title {
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1;
  letter-spacing: -0.01em;
}

.hero__cta {
  flex: none;
}

.hero__media img {
  width: 100%;
  height: clamp(280px, 44vw, 720px);
  object-fit: cover;
}

/* --------------------------------------------------------- Показатели */

.highlights {
  position: relative;
  margin-top: clamp(-70px, -6vw, -80px);
  padding-bottom: var(--section-y);
  background: linear-gradient(180deg, transparent 90px, var(--cream) 90px);
}

.highlights__grid {
  display: grid;
  grid-template-columns: 1.75fr 1fr 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.hcard {
  position: relative;
  padding: 40px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hcard--offices {
  display: grid;
  align-content: start;
  gap: 24px;
}

.hcard__title {
  font-size: clamp(22px, 2vw, 30px);
}

.hcard__list {
  display: grid;
  gap: 2px;
  list-style: disc;
  padding-left: 20px;
  color: var(--ink);
}

.hcard__icon {
  display: block;
  width: 24px;
  height: 24px;
  margin-bottom: 44px;
  color: var(--blue-900);
}

/* Три строки минимум: подписи занимают 1–3 строки, и без резерва крупные
   значения в соседних карточках стоят на разной высоте */
.hcard__label {
  min-height: calc(15px * 1.4 * 3);
  font-size: 15px;
  line-height: 1.4;
}

.hcard__value {
  margin-top: 10px;
  font-size: clamp(24px, 2vw, 30px);
  font-weight: 500;
  color: var(--blue-900);
}

.hcard__suffix {
  margin-top: 8px;
  font-size: 15px;
}


.hcard--featured {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), var(--blue-900));
  box-shadow: var(--shadow-lg);
}

.hcard--featured .hcard__icon,
.hcard--featured .hcard__value {
  color: var(--white);
}

/* --------------------------------------------------------- О нас */

.about {
  padding-block: var(--section-y);
  background: var(--cream);
}

.about__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(32px, 5vw, 96px);
  align-items: end;
}

.about__title {
  margin-bottom: 40px;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.5px;
}

.tabs__list {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.tabs__list {
  flex-wrap: wrap;
}

.tabs__tab {
  padding: 5px 10px 9px;
  font-size: 15px;
  color: var(--muted);
  border-bottom: 2px solid var(--line-strong);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tabs__tab:hover {
  color: var(--blue-900);
}

.tabs__tab[aria-selected="true"] {
  color: var(--blue-900);
  border-bottom-color: var(--blue-900);
}

.tabs__panel {
  font-size: 16px;
  line-height: 1.6;
}

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

.services {
  padding-block: var(--section-y);
  background: var(--cream);
}

.services > .container {
  padding: clamp(40px, 5vw, 90px) clamp(24px, 3.5vw, 60px);
  background: var(--blue-600);
  border-radius: var(--radius-lg);
}

.services__title {
  margin-bottom: 48px;
  max-width: 20ch;
  font-size: clamp(28px, 3.4vw, 48px);
  color: var(--white);
  letter-spacing: -0.5px;
}

.services__title .accent {
  color: rgba(255, 255, 255, 0.68);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.scard__link {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  padding: 8px;
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.scard__link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.scard__media {
  display: block;
  border-radius: 14px;
  overflow: hidden;
}

.scard__media img {
  width: 100%;
  aspect-ratio: 411 / 400;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.scard__link:hover .scard__media img {
  transform: scale(1.04);
}

.scard__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 12px 28px 12px;
}

.scard__title {
  font-size: clamp(15px, 1.2vw, 17px);
  font-weight: 500;
  color: var(--blue-900);
  line-height: 1.35;
}

.scard__arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: 50%;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.scard__arrow .icon {
  width: 15px;
  height: 15px;
  color: var(--blue-900);
  transition: color 0.2s ease;
}

.scard__link:hover .scard__arrow {
  background: var(--blue-900);
}

.scard__link:hover .scard__arrow .icon {
  color: var(--white);
}

/* --------------------------------------------------------- Почему выбирают нас */

.whyus {
  padding-block: var(--section-y);
  background: var(--cream);
}

.whyus__title {
  margin-bottom: 48px;
  font-size: clamp(26px, 3vw, 40px);
}

.whyus__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.wcard {
  padding: 32px 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wcard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.wcard__title {
  margin-bottom: 20px;
  font-size: 21px;
  line-height: 1.3;
}

.wcard__list {
  display: grid;
  gap: 12px;
  padding-left: 20px;
  list-style: disc;
  font-size: 15px;
  line-height: 1.5;
}

.wcard__list b {
  color: var(--blue-900);
  font-weight: 600;
}

.wcard__list a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--blue-300);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.wcard__list a:hover {
  color: var(--blue-600);
  text-decoration-color: currentColor;
}

.acc__content a {
  color: var(--blue-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------- География */

.locations {
  position: relative;
  padding-block: var(--section-y);
  background: var(--cream);
  overflow: hidden;
}

.locations__map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.9;
}

.locations__inner {
  position: relative;
}

.locations__panel {
  max-width: 600px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.locations__title {
  font-size: clamp(28px, 3.4vw, 48px);
  letter-spacing: -0.5px;
}

.locations__title .rotator {
  display: flex;
  min-height: 1.2em;
}

.locations__regions {
  margin-block: 32px;
}

.locations__regions-title {
  margin-bottom: 12px;
  font-size: 16px;
}

.locations__regions ul {
  display: grid;
  gap: 2px;
  padding-left: 20px;
  list-style: disc;
}

/* Бегущая строка (typing) */

.rotator {
  display: inline-flex;
  align-items: center;
  color: var(--blue-600);
}

.rotator__caret {
  display: inline-block;
  width: 0.36em;
  height: 1em;
  margin-left: 2px;
  background: var(--blue-300);
  border-radius: 2px;
  animation: caret 1s steps(2, start) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

/* --------------------------------------------------------- Клиенты */

.clients {
  padding-block: var(--section-y);
  background: var(--cream);
  text-align: center;
}

.clients__title {
  margin-bottom: 56px;
  font-size: clamp(26px, 3.4vw, 48px);
  letter-spacing: -0.5px;
}

.clients__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 5vw, 80px);
}

.clients__grid img {
  /* Фиксированная высота, а не max-height: иначе до загрузки логотипа
     строка имеет нулевую высоту и вёрстка «прыгает» (ломает якоря) */
  height: 44px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.65;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.clients__grid img:hover {
  filter: none;
  opacity: 1;
}

/* --------------------------------------------------------- FAQ */

.faq {
  padding-block: var(--section-y);
  background: var(--cream);
}

.faq__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.faq__title {
  font-size: clamp(26px, 3.4vw, 48px);
  letter-spacing: -0.5px;
}

.faq__subtitle {
  margin-top: 20px;
  color: var(--muted);
}

/* Аккордеон */

.acc {
  border-bottom: 1px solid var(--line);
}

.acc__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--blue-900);
  cursor: pointer;
  list-style: none;
}

.acc__summary::-webkit-details-marker {
  display: none;
}

.acc__icon {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}

.acc__icon::before,
.acc__icon::after {
  content: "";
  position: absolute;
  /* calc, а не 50%: top: 50% ставит линию от центра, а не по центру.
     2px вместо 1.5px — дробная высота по-разному округляется на 1× и 2× */
  inset: calc(50% - 1px) 0 auto 0;
  height: 2px;
  background: var(--blue-900);
  border-radius: 2px;
  transition: transform 0.25s ease;
}

.acc__icon::after {
  transform: rotate(90deg);
}

.acc[open] .acc__icon::after {
  transform: rotate(0deg);
}

.acc__content {
  padding-bottom: 24px;
  font-size: 15px;
  line-height: 1.6;
}

.acc__content > * + * {
  margin-top: 12px;
}

.acc__content ul {
  padding-left: 20px;
  list-style: disc;
  display: grid;
  gap: 8px;
}

.acc__content b {
  color: var(--blue-900);
  font-weight: 600;
}

/* --------------------------------------------------------- CTA */

.cta {
  padding-block: var(--section-y);
  background: var(--white);
}

.cta__inner {
  padding: clamp(48px, 6vw, 110px) clamp(24px, 4vw, 80px);
  background: var(--cream);
  border-radius: var(--radius-lg);
}

.cta__title {
  max-width: 16ch;
  font-size: clamp(28px, 3.4vw, 48px);
  letter-spacing: -0.5px;
}

.cta__text {
  margin-block: 24px 32px;
  color: var(--muted);
  line-height: 1.5;
}

/* Пункт меню «Контакты» ведёт на эту секцию — контакт должен читаться,
   а не прятаться под подписью кнопки */
.cta__contact {
  margin-top: 24px;
  font-size: 15px;
  color: var(--muted);
}

.cta__contact a {
  color: var(--blue-600);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.site-footer {
  padding-block: 32px;
  background: var(--white);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.site-footer__bottom a:hover {
  color: var(--blue-600);
}

.site-footer__tg {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  color: var(--blue-900);
  background: var(--cream);
  border-radius: 50%;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-footer__tg:hover {
  color: var(--white);
  background: var(--blue-900);
}

.site-footer__tg .icon {
  width: 16px;
  height: 16px;
}

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

/* padding, а не голый текст: без него высота ссылки 19px — ниже минимума 24px */
.site-footer__legal a {
  display: inline-block;
  padding-block: 6px;
}

.site-footer__legal a:hover {
  color: var(--blue-600);
}

/* Кнопка «наверх» */

.to-top {
  /* Иконка Telegram в подвале прижата к правому краю контейнера, а тот не
     шире 1320px — на любом окне уже ~1424px кнопка наезжает на неё. Поэтому
     кнопка поднимается на видимую часть подвала: --to-top-lift ставит JS. */
  --to-top-gap: 24px;
  position: fixed;
  right: var(--to-top-gap);
  bottom: calc(var(--to-top-gap) + var(--to-top-lift, 0px));
  z-index: 90;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--blue-900);
  color: var(--white);
  border-radius: 50%;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top .icon {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   Страница услуги
   ========================================================================== */

.breadcrumbs {
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--blue-600);
}

.shero {
  padding-block: 48px 0;
  background: var(--cream);
}

.shero__row {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  padding-bottom: 56px;
}

.shero__title {
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1.14;
  letter-spacing: -0.5px;
}

.shero__subtitle {
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.5;
}

.shero__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.shero__media img {
  width: 100%;
  height: clamp(240px, 34vw, 520px);
  object-fit: cover;
}

.shero--index {
  padding-bottom: 8px;
}

/* Описание услуги */

.sdesc {
  padding-block: var(--section-y);
  background: var(--cream);
}

.sdesc__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

/* Без аккордеона описание занимает одну колонку с комфортной длиной строки.
   Выравнивание по левому краю — как в двухколоночном варианте: иначе при
   переходе между услугами заголовок прыгает из левого края в центр */
.sdesc__grid--single {
  grid-template-columns: minmax(0, 80ch);
}

.sdesc__title {
  margin-bottom: 24px;
  font-size: clamp(24px, 2.6vw, 36px);
}

.sdesc__main .btn {
  margin-top: 32px;
}

.sdesc__features {
  padding-top: 8px;
}

/* Преимущества */

.sadv {
  padding-bottom: var(--section-y);
  background: var(--cream);
}

.sadv__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

/* Фото абсолютным позиционированием, иначе его собственная высота (вертикальный
   кадр 933×1400) растягивала строку грида и голубая панель оставалась пустой
   на треть-половину */
.sadv__media {
  position: relative;
  min-height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
}

.sadv__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sadv__panel {
  padding: clamp(28px, 3vw, 44px);
  background: var(--blue-300);
  border-radius: var(--radius);
}

.sadv__panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.sadv__panel .eyebrow {
  background: rgba(255, 255, 255, 0.55);
  border-color: transparent;
}

.sadv__badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  color: var(--white);
  background: var(--blue-900);
  border-radius: 50%;
}

.sadv__badge svg {
  width: 20px;
  height: 20px;
}

.sadv__title {
  margin-bottom: 24px;
  font-size: clamp(26px, 2.8vw, 40px);
  line-height: 1.16;
}

.sadv__title .accent {
  color: var(--blue-600);
}

.sadv__list {
  display: grid;
  gap: 12px;
  padding-left: 20px;
  list-style: disc;
  font-size: 15px;
  line-height: 1.5;
}

.sadv__list b {
  color: var(--blue-900);
  font-weight: 600;
}

/* Процесс работы */

.process {
  padding-block: var(--section-y);
  background: var(--white);
}

.process > .container {
  padding: clamp(40px, 5vw, 80px) clamp(24px, 3.5vw, 60px);
  background: var(--cream);
  border-radius: var(--radius-lg);
  text-align: center;
}

.process__title {
  margin-bottom: 48px;
  font-size: clamp(26px, 3.2vw, 44px);
}

.process__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  text-align: left;
}

.pcard {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 16px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius);
}

.pcard__num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 40px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-900);
  background: var(--blue-300);
  border-radius: 50%;
}

.pcard__title {
  font-size: 18px;
  line-height: 1.25;
}

.pcard__text {
  font-size: 14px;
  line-height: 1.5;
}

.pcard__text ul {
  margin-top: 8px;
  padding-left: 18px;
  list-style: disc;
  display: grid;
  gap: 6px;
}

.process__cta {
  margin-top: 48px;
}

/* Почему XP Transfer */

.swhy {
  position: relative;
  padding-block: clamp(60px, 8vw, 140px);
  overflow: hidden;
}

.swhy__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swhy > .container {
  position: relative;
}

.swhy__panel {
  max-width: 560px;
  padding: clamp(28px, 3vw, 44px);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.swhy__title {
  font-size: clamp(28px, 3.2vw, 44px);
  letter-spacing: -0.5px;
}

.swhy__panel .rotator {
  display: flex;
  min-height: 1.6em;
  margin-block: 12px 28px;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 500;
}

/* ==========================================================================
   Юридические страницы
   ========================================================================== */

.legal {
  padding-block: 48px var(--section-y);
}

.legal__title {
  margin-bottom: 40px;
  font-size: clamp(30px, 3.6vw, 50px);
  letter-spacing: -0.5px;
}

.legal__body {
  max-width: 80ch;
}

/* ==========================================================================
   Адаптив
   ========================================================================== */

@media (max-width: 1200px) {
  .process__grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 1024px) {
  .site-nav {
    display: none;
  }

  .burger {
    display: flex;
  }

  /* Меню скрыто — остаются две колонки: логотип и бургер */
  .site-header__inner {
    grid-template-columns: 1fr auto;
  }

  .site-header.is-open .mobile-menu {
    display: block;
  }

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

  .hcard--offices {
    grid-column: span 2;
  }

  .about__grid,
  .faq__grid,
  .sdesc__grid,
  .sadv__grid,
  .shero__row {
    grid-template-columns: 1fr;
  }

  .about__grid,
  .shero__row {
    align-items: start;
  }

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

  .locations__map {
    opacity: 0.5;
  }
}

@media (max-width: 767px) {
  :root {
    --gutter: 16px;
    --radius-lg: 24px;
  }

  .hero__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding-block: 48px 40px;
  }

  .highlights {
    margin-top: -40px;
    background: linear-gradient(180deg, transparent 60px, var(--cream) 60px);
  }

  .highlights__grid,
  .services__grid,
  .whyus__grid,
  .process__grid {
    grid-template-columns: 1fr;
  }

  .hcard--offices {
    grid-column: auto;
  }

  .hcard {
    padding: 28px 24px;
  }

  .hcard__icon {
    margin-bottom: 24px;
  }

  /* В одну колонку карточки идут друг за другом — выравнивать нечего */
  .hcard__label {
    min-height: 0;
  }

  .sadv__media {
    min-height: 240px;
  }

  .pcard__num {
    margin-bottom: 8px;
  }

  .locations__panel,
  .swhy__panel {
    padding: 28px 24px;
  }

  .to-top {
    --to-top-gap: 16px;
  }

  .btn {
    padding: 15px 22px;
  }
}
