@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Montserrat:wght@600;700;800&display=swap');

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-alt: #eef4fb;
  --surface-2: #f9fbff;
  --surface-dark: #0f172a;
  --text: #0f172a;
  --text-soft: #475467;
  --text-muted: #667085;
  --white: #ffffff;
  --primary: #0052cc;
  --primary-hover: #003f9e;
  --primary-soft: rgba(0, 82, 204, 0.08);
  --primary-soft-2: rgba(0, 82, 204, 0.14);
  --border: #d9e3f5;
  --border-strong: #c7d5ee;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 18px 48px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 28px 72px rgba(15, 23, 42, 0.12);
  --radius-xs: 10px;
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --radius-xl: 40px;
  --radius-pill: 999px;
  --container: 1240px;
  --header-height: 88px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 20px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
  --space-9: 64px;
  --space-10: 80px;
  --space-11: 100px;
  --space-12: 120px;
  --transition-fast: .2s ease;
  --transition-base: .32s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fbfdff 0%, #f7f9fc 52%, #f4f8fd 100%);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
main { overflow: clip; }

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.section { padding: var(--space-12) 0; }
.section--compact { padding: var(--space-10) 0; }
.section--soft { background: linear-gradient(180deg, rgba(238,244,251,.64), rgba(255,255,255,.75)); }
.section--topline { border-top: 1px solid rgba(217, 227, 245, .72); }

.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin-bottom: 15px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  line-height: 1.12;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2.6rem, 5.4vw, 4.8rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3.4rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.92rem); }
h4 { font-size: 1.12rem; }
p { margin: 0; color: var(--text-soft); overflow-wrap: break-word; }

.btn, .dropdown-card strong, .dropdown-card span {
  overflow-wrap: break-word;
}
.site-nav .nav-list > li > a,
.site-nav .nav-trigger {
  overflow-wrap: normal;
  /* В меню не ломаем слова: лучше единая строка, чем разрезы “по буквам”. */
  white-space: nowrap;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); max-width: 760px; }
.small { font-size: .95rem; color: var(--text-muted); }
.text-center { text-align: center; }

.section-header {
  max-width: 860px;
  margin-bottom: var(--space-8);
}
.section-header.center {
  margin-inline: auto;
  text-align: center;
}
.section-title { margin-top: var(--space-4); }
.section-note { margin-top: var(--space-4); max-width: 720px; }
.section-header.center .section-note { margin-inline: auto; }

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.mt-16 { margin-top: var(--space-3); }
.mt-20 { margin-top: var(--space-4); }
.mt-24 { margin-top: var(--space-5); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 700;
  transition: var(--transition-base);
  cursor: pointer;
}
.btn--primary {
  color: var(--white);
  background: var(--primary);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn--secondary {
  background: rgba(255,255,255,.86);
  border-color: var(--border);
  color: var(--text);
}
.btn--secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn--ghost {
  border-color: rgba(255,255,255,.28);
  color: var(--white);
  background: transparent;
}
.btn--ghost:hover { background: rgba(255,255,255,.08); }

.badge-row, .hero-metrics {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.86);
  color: var(--text-soft);
  font-size: .92rem;
  font-weight: 600;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 253, 255, .84);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(217, 227, 245, .88);
}
.btn:focus-visible,
.site-nav a:focus-visible,
.site-nav .nav-trigger:focus-visible,
.nav-toggle:focus-visible,
.lang-switch button:focus-visible {
  outline: 3px solid rgba(0, 82, 204, .32);
  outline-offset: 2px;
}
.header-inner {
  height: var(--header-height);
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.brand img { width: 154px; height: auto; }
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  justify-content: center;
}
.brand-text strong { font-size: 1.8rem; font-weight: 900; }
.brand img {
  /* Фиксируем высоту логотипа, чтобы исключить layout shift при загрузке шрифтов. */
  height: 34px;
  object-fit: contain;
}
.brand-text span { font-size: .84rem; color: var(--text-muted); }

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  display: block;
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-nav .nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-nav .nav-list > li > a,
.site-nav .nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: .95rem;
  color: var(--text-soft);
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: var(--transition-fast);
}
.site-nav .nav-list > li > a:hover,
.site-nav .nav-list > li > a.is-active,
.site-nav .nav-trigger:hover,
.site-nav .nav-trigger.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}
.has-dropdown { position: relative; }
.nav-trigger::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: min(760px, 88vw);
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.98);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  /* visibility не анимируем: при быстром переключении hover не должно быть “двух открытых” слоёв */
  transition: opacity .08s ease, transform .08s ease;
}
.has-dropdown.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.dropdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.dropdown-card {
  /* Важно: якорь .dropdown-card наследует базовые стили `.site-nav a`
     (display: inline-flex и центрирование), из-за чего strong/span
     укладываются как flex-элементы и начинают визуально наслаиваться.
     Явно фиксируем верстку карточки. */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  min-height: 0;
  gap: 0;

  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition-fast);
  background: linear-gradient(180deg, rgba(247,250,254,.85), #fff);
}
.dropdown-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.dropdown-card.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.dropdown-card strong {
  display: block;
  margin-bottom: 6px;
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  word-break: normal;
}
.dropdown-card span {
  display: block;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.55;
  word-break: normal;
}

/* Language-specific navigation typography
   (единый размер всем языкам не подходит: RU/EN/ZH отличаются по метрикам и плотности). */
[lang="ru"] .site-nav .nav-list > li > a,
[lang="ru"] .site-nav .nav-trigger {
  font-size: 0.98rem;
  padding: 0 12px;
  line-height: 1.12;
}
[lang="ru"] .site-nav .nav-list {
  gap: 6px;
}
[lang="ru"] .dropdown-card strong {
  font-size: 1.06rem;
  line-height: 1.18;
}
[lang="ru"] .dropdown-card span {
  font-size: .92rem;
  line-height: 1.6;
}

[lang="en"] .site-nav .nav-list > li > a,
[lang="en"] .site-nav .nav-trigger {
  font-size: .95rem;
  padding: 0 14px;
  line-height: 1.15;
}
[lang="en"] .dropdown-card strong {
  font-size: 1rem;
  line-height: 1.18;
}
[lang="en"] .dropdown-card span {
  font-size: .9rem;
  line-height: 1.55;
}

[lang="zh"] .site-nav .nav-list > li > a,
[lang="zh"] .site-nav .nav-trigger {
  font-size: .98rem;
  padding: 0 14px;
  line-height: 1.15;
}
[lang="zh"] .dropdown-card strong {
  font-size: .98rem;
  line-height: 1.18;
}
[lang="zh"] .dropdown-card span {
  font-size: .88rem;
  line-height: 1.6;
}
.lang-switch {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.94);
}
.lang-switch button {
  min-width: 48px;
  height: 38px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-soft);
  font-weight: 700;
  cursor: pointer;
}
.lang-switch button.is-active {
  background: var(--primary);
  color: var(--white);
}

.hero {
  padding: 36px 0 72px;
}
.page-hero {
  padding: 36px 0 34px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 56px;
  align-items: center;
}
.hero-grid > * {
  /* В grid-контейнерах min-width:auto может приводить к горизонтальному переполнению текста.
     Особенно заметно на длинных RU заголовках. */
  min-width: 0;
}
.hero-copy > * + * { margin-top: var(--space-5); }
.hero-copy { min-width: 0; }
.hero-visual {
  position: relative;
}
.figure-panel {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow-md);
}
.figure-panel::before {
  content: "";
  position: absolute;
  inset: auto auto -140px -90px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,82,204,.12), rgba(0,82,204,0));
  pointer-events: none;
}
.figure-panel img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217,227,245,.9);
  background: #f8fbff;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: var(--space-4);
}
.mini-stat {
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow-sm);
}
.mini-stat strong {
  display: block;
  font-size: 1.1rem;
}
.mini-stat span {
  display: block;
  color: var(--text-muted);
  font-size: .9rem;
}

.card {
  height: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.card__body { padding: 28px; }
.card__icon,
.card__number {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}
.card__body > * + * { margin-top: 14px; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.metric {
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.92);
  transition: var(--transition-fast);
}
.metric:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.metric strong {
  display: block;
  font-size: 1.55rem;
  margin-bottom: 8px;
}

.band {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 28px;
  align-items: center;
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}
.band:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.band--accent {
  background: linear-gradient(135deg, rgba(0,82,204,.95), rgba(33,114,235,.88));
  color: var(--white);
  border-color: rgba(0,82,204,.24);
}
.band--accent p,
.band--accent li,
.band--accent .small { color: rgba(255,255,255,.92); }
.band--accent .eyebrow {
  background: rgba(255,255,255,.14);
  color: rgba(255,255,255,.95);
}
.band img {
  border-radius: var(--radius-md);
  border: 1px solid rgba(217,227,245,.9);
  background: #fff;
}
.band-copy > * + * { margin-top: var(--space-3); }

.list-check {
  display: grid;
  gap: 12px;
}
.list-check li {
  position: relative;
  padding-left: 28px;
  color: var(--text-soft);
}
.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
}
.band--accent .list-check li {
  color: rgba(255,255,255,.96);
}
.band--accent .list-check li::before { background: var(--white); }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.tile {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,254,.9));
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}
.tile:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.tile h3, .tile h4 { margin-bottom: 10px; }

.legal-doc a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.legal-doc a:hover { color: var(--primary-hover); }
.legal-doc__body > * + * { margin-top: 14px; }
.legal-doc__body h2 { margin-top: 30px; font-size: clamp(1.45rem, 2.4vw, 2.1rem); }
.legal-doc__body h3 { margin-top: 22px; font-size: clamp(1.15rem, 1.8vw, 1.55rem); }
.legal-doc__body ul {
  display: grid;
  gap: 10px;
  padding-left: 20px;
  list-style: disc;
}
.legal-doc__body li { color: var(--text-soft); }
.legal-doc__body strong { color: var(--text); }

.legal-table-wrap {
  margin-top: 16px;
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-sm);
}
.legal-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}
.legal-table th,
.legal-table td {
  padding: 14px 16px;
  vertical-align: top;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: .98rem;
}
.legal-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-alt);
  border-top: none;
  color: var(--text);
  font-weight: 800;
}
.legal-table tbody tr:hover td { background: rgba(0, 82, 204, 0.03); }

.timeline {
  display: grid;
  gap: 16px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.94);
}
.timeline-item__num {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  color: var(--primary);
  font-weight: 800;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}
.related-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.related-card strong {
  font-family: "Montserrat", sans-serif;
  font-size: 1.06rem;
}
.related-card span {
  color: var(--text-muted);
  font-size: .94rem;
}
.related-card .link-arrow {
  margin-top: auto;
  color: var(--primary);
  font-weight: 700;
}

.contact-slab {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0f172a, #14233f);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}
.contact-slab p,
.contact-slab .small { color: rgba(255,255,255,.78); }
.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 28px;
  align-items: center;
}
.contact-lines {
  display: grid;
  gap: 14px;
}
.contact-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--white);
  width: fit-content;
}

.logo-cloud {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.96);
  font-weight: 700;
  color: var(--text-soft);
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.case-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-sm);
}
.case-card img {
  width: 100%;
  aspect-ratio: 1.35 / 1;
  object-fit: cover;
  background: #f7fbff;
}
.case-card__body {
  padding: 20px;
}
.case-card__body > * + * { margin-top: 10px; }

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.note-box {
  padding: 22px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.note-box strong {
  display: block;
  margin-bottom: 10px;
  font-family: "Montserrat", sans-serif;
}

.kicker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.kicker {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.92);
}
.kicker strong {
  display: block;
  font-family: "Montserrat", sans-serif;
  margin-bottom: 8px;
}

.placeholder-shell {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--border-strong);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,254,.88));
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
}
.placeholder-shell__inner {
  max-width: 520px;
}
.placeholder-shell__icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.6rem;
}

.site-footer {
  padding: 48px 0 28px;
  background: var(--surface);
  border-top: 1px solid rgba(217, 227, 245, .92);
  color: var(--text);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.15fr) auto;
  gap: 24px 32px;
  align-items: center;
  padding-bottom: 32px;
}

.footer-top__brand .brand {
  align-self: center;
}

.footer-top__block {
  display: grid;
  gap: 6px;
  align-content: center;
  justify-items: start;
  min-width: 0;
}

.footer-top__block--support {
  justify-items: start;
}

.footer-caption {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.footer-phone {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-phone:hover,
.footer-phone:focus-visible {
  color: var(--primary);
}

.footer-email {
  font-weight: 700;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition-fast);
}

.footer-email:hover,
.footer-email:focus-visible {
  color: var(--primary);
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  transition: var(--transition-base);
  white-space: nowrap;
}

.footer-cta:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.footer-cta:focus-visible {
  outline: 3px solid rgba(0, 82, 204, .32);
  outline-offset: 2px;
}

.footer-mid {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

/* Меню футера: 1 колонка (узкий мобильный), 2 колонки (широкий мобильный / планшет), 4 на десктопе */
.footer-nav-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px 28px;
  align-items: start;
}

@media (min-width: 480px) {
  .footer-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .footer-nav-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 32px;
  }
}

.footer-nav-col {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: start;
}

.footer-nav-col strong {
  font-family: "Montserrat", sans-serif;
  font-size: .95rem;
  color: var(--text);
  margin-bottom: 2px;
}

.footer-nav-col a {
  color: var(--text-soft);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  padding: 2px 0;
  border-radius: 6px;
  transition: var(--transition-fast);
}

.footer-nav-col a:hover {
  color: var(--primary);
}

.footer-nav-col a:focus-visible {
  outline: 3px solid rgba(0, 82, 204, .32);
  outline-offset: 2px;
}

.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px 32px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: .92rem;
}

.footer-bottom__left {
  display: grid;
  gap: 6px;
  max-width: 520px;
}

.footer-bottom__left > span:first-child {
  color: var(--text-soft);
  font-weight: 600;
}

.footer-address {
  line-height: 1.45;
}

.footer-bottom__note {
  margin: 0;
  max-width: 420px;
  line-height: 1.45;
  text-align: right;
}

@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-cta {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .footer-bottom__note {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}

/* Статические HTML в frontend: старая разметка футера */
.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr .75fr;
  gap: 28px;
  align-items: start;
}
.footer-description {
  margin-top: var(--space-4);
  max-width: 520px;
}
.footer-nav,
.footer-contacts {
  display: grid;
  gap: 10px;
  align-content: start;
  justify-items: start;
}
.footer-contacts {
  gap: 6px;
}
.footer-contacts a {
  padding: 6px 12px;
}
.footer-nav a,
.footer-contacts a {
  color: var(--text-soft);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  width: fit-content;
}
.footer-nav a:hover,
.footer-contacts a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}
.footer-nav a:focus-visible,
.footer-contacts a:focus-visible {
  outline: 3px solid rgba(0, 82, 204, .32);
  outline-offset: 2px;
}
.footer-nav strong,
.footer-contacts strong {
  font-family: "Montserrat", sans-serif;
}
.footer-contacts a,
.footer-contacts span {
  display: inline;
  width: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  line-height: 1.45;
}
.footer-contacts a {
  color: var(--text);
  font-weight: 600;
}
.footer-contacts a:hover,
.footer-contacts a:focus-visible {
  color: var(--primary);
  background: transparent;
  text-decoration: underline;
  outline: none;
}
.footer-grid + .footer-bottom {
  margin-top: 28px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Auth / 404 (единый визуальный язык сайта) */
.auth-shell {
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 56px;
  align-items: center;
}

.auth-panel {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-sm);
}

.auth-side {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(217,227,245,.85);
  background: rgba(255,255,255,.86);
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.field:first-child {
  margin-top: 0;
}

.field > span {
  font-weight: 700;
  color: var(--text);
  font-size: .95rem;
}

.field input {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0 14px;
  outline: none;
  transition: var(--transition-fast);
}

.field input:focus {
  border-color: rgba(0, 82, 204, .55);
  box-shadow: 0 0 0 4px rgba(0, 82, 204, .14);
}

.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.auth-links a {
  color: var(--primary);
  font-weight: 700;
  transition: var(--transition-fast);
}

.auth-links a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.auth-actions {
  margin-top: 18px;
}

.auth-side img {
  width: 100%;
  margin-top: 16px;
}

.helper-list {
  display: grid;
  gap: 10px;
}

.notfound-wrap {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 56px;
  align-items: center;
}

.error-code {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 800;
  font-family: "Montserrat", sans-serif;
  color: var(--text);
  line-height: 1;
}

.notfound-panel {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-sm);
}

.notfound-illustration {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(217,227,245,.85);
  background: rgba(255,255,255,.86);
}

.notfound-illustration img {
  width: 100%;
  margin-top: 18px;
}

@media (max-width: 1120px) {
  .hero-grid,
  .band,
  .contact-grid,
  .footer-grid,
  .grid-2,
  .two-column,
  .auth-shell,
  .notfound-wrap {
    grid-template-columns: 1fr;
  }
  .grid-3, .tile-grid, .case-gallery, .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-4, .metric-grid, .logo-cloud, .kicker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .auth-shell { gap: 28px; }
  .auth-panel,
  .auth-side { padding: 22px; }
  .notfound-wrap { gap: 28px; }
  .nav-wrap {
    position: absolute;
    left: 20px;
    right: 20px;
    top: calc(100% + 12px);
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(255,255,255,.98);
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: stretch;
    flex-direction: column;
    /* Чтобы при длинном меню не “упиралось” в нижний край viewport:
       скролл должен быть внутри выпадающего меню, а не всей страницы. */
    max-height: calc(100vh - var(--header-height) - 20px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .nav-wrap.is-open { display: flex; }
  .site-nav .nav-list {
    flex-direction: column;
    align-items: stretch;
  }
  .site-nav .nav-list > li {
    width: 100%;
  }
  .site-nav .nav-list > li > a,
  .site-nav .nav-trigger {
    width: 100%;
    justify-content: space-between;
  }
  .nav-dropdown {
    position: static;
    width: 100%;
    margin-top: 0;
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: none;
    pointer-events: none;
    transition: none;
    padding: 0;
  }
  .has-dropdown.is-open .nav-dropdown {
    max-height: none;
    overflow: visible;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* Возвращаем реальные отступы карточек dropdown в открытом состоянии. */
    margin-top: var(--space-1);
    padding: 18px;
  }
  .dropdown-grid {
    grid-template-columns: 1fr;
  }
  .hero,
  .page-hero {
    padding: 72px 0 44px;
  }
  .hero-stats, .grid-3, .grid-4, .tile-grid, .case-gallery, .related-grid, .metric-grid, .logo-cloud, .kicker-grid {
    grid-template-columns: 1fr;
  }
  .brand img { width: 140px; }

  /* На mobile dropdown открывается кликом: отключаем hover-движения карточек. */
  .dropdown-card:hover {
    transform: none;
    border-color: var(--border);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; transform: none; opacity: 1; }
  .nav-dropdown { transition: none; }
  .card, .tile, .metric, .band, .dropdown-card, .related-card {
    transition: none !important;
  }
  .card:hover, .tile:hover, .metric:hover, .band:hover,
  .dropdown-card:hover, .related-card:hover {
    transform: none !important;
  }
}

@media (max-width: 560px) {
  .container { width: min(100% - 28px, var(--container)); }
  .section { padding: 84px 0; }
  .hero, .page-hero { padding: 58px 0 30px; }
  .field input { height: 48px; }
  .card__body, .contact-slab, .band, .tile, .related-card, .placeholder-shell {
    padding: 22px;
  }
  .timeline-item {
    grid-template-columns: 46px 1fr;
  }
  .timeline-item__num {
    width: 46px;
    height: 46px;
  }
  .footer-bottom { flex-direction: column; }
}