/* Base */
:root {
  /* Светлая тема в духе Apple / нео-минимализм */
  --color-bg: #f5f5f7;
  --color-surface: #ffffff;
  --color-border: #e8e8ed;
  --color-text: #1d1d1f;
  --color-text-muted: #6e6e73;
  --color-accent: #0071e3;
  --color-accent-hover: #0077ed;
  --color-btn-primary: #16a34a;
  --color-btn-secondary: #0088cc;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
  --max-width: 1200px;
  --header-height: 4rem;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);

  /* Типографика и отступы */
  --font-size-lg: 2rem;
  --font-size-md: 1.125rem;
  --font-size-sm: 0.9rem;
  --space-xl: 3rem;
  --space-lg: 2rem;
  --space-md: 1.5rem;
  --space-sm: 1rem;
  --section-step: 1.75rem;

  /* Тёмный футер */
  --footer-bg: #1d1d1f;
  --footer-text: #f5f5f7;
  --footer-text-muted: #a1a1a6;
  --footer-border: rgba(255, 255, 255, 0.1);
  --footer-link-hover: rgb(0, 118, 223);

  /* Полоса CTA — мягкий зелёный (вариант 7: «go», связь с кнопкой звонка) */
  --cta-band-gradient: linear-gradient(180deg, #f3fcf6 0%, #ecfdf5 42%, #d8f3e4 100%);
  --cta-band-text: #14532d;
  --cta-band-muted: #4a5d4c;
  --cta-band-border-top: rgba(22, 101, 52, 0.12);
  --cta-band-border-bottom: rgba(22, 101, 52, 0.1);
  --cta-band-highlight-strong: rgba(22, 163, 74, 0.14);
  --cta-band-highlight-soft: rgba(34, 197, 94, 0.09);
  --cta-band-shadow: 0 -4px 24px rgba(20, 83, 45, 0.07), 0 10px 32px rgba(0, 0, 0, 0.06);
  /* Telegram (официальный оттенок бренда) */
  --telegram-brand: #229ed9;
  --telegram-brand-hover: #1b8ec4;

  /* Текст «над» градиентом/сеткой — hero и page-header */
  --text-float-eyebrow:
    0 1px 0 rgba(255, 255, 255, 0.95),
    0 2px 8px rgba(255, 255, 255, 0.9),
    0 4px 14px rgba(0, 0, 0, 0.06);
  --text-float-title:
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 6px rgba(255, 255, 255, 0.75),
    0 6px 22px rgba(255, 255, 255, 0.65),
    0 5px 14px rgba(0, 0, 0, 0.07),
    0 10px 28px rgba(0, 113, 227, 0.07);
  --text-float-body:
    0 1px 0 rgba(255, 255, 255, 0.92),
    0 3px 10px rgba(255, 255, 255, 0.8),
    0 4px 16px rgba(0, 0, 0, 0.055);
}

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

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--color-border);
  isolation: isolate;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(251, 251, 253, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.16em;
}

.site-logo:hover {
  color: var(--color-accent-hover);
}

/* Navigation */
.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__link {
  display: block;
  padding: 0.4rem 0.5rem;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
}

.site-nav__link:hover {
  color: var(--color-text);
}

.site-nav__link--active {
  color: var(--color-accent);
}

/* Burger (скрыт на desktop) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.burger__line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.burger[aria-expanded="true"] .burger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger__line:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] .burger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

/* Focus visible */
.site-nav__link:focus-visible,
.site-logo:focus-visible,
.card:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Main */
.main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) 1.5rem 4rem;
}

/* Иначе под шапкой сайта видна полоса --color-bg (hero / page-header с полноширинным фоном) */
.main:has(> .hero:first-child),
.main:has(> .page-header:first-child) {
  padding-top: 0;
}

/*
  CTA после </main>. Padding снизу у main давал полосу цвета body между голубой зеброй и CTA
  (фон зебры только у .section). Отступ переносим в последнюю секцию main.
*/
.main:has(+ .home-freeform-cta) {
  padding-bottom: 0;
}

.main:has(+ .home-freeform-cta) > section:last-of-type {
  padding-bottom: var(--space-xl);
}

/* У голубых полос зебры уже padding-bottom 1.25rem — продлеваем фон до CTA */
.main:has(+ .home-freeform-cta):not(:has(> .hero)) > .section:nth-of-type(odd):last-of-type,
.main:has(+ .home-freeform-cta):has(> .hero) .hero ~ .section:nth-of-type(even):last-of-type {
  padding-bottom: calc(1.25rem + var(--space-xl));
}

.page-title {
  margin: 0 0 0.5rem;
  font-size: var(--font-size-lg);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.page-description {
  margin: 0 0 2rem;
  color: var(--color-text-muted);
  font-size: var(--font-size-md);
}

.page-header .hero__eyebrow {
  margin-left: auto;
  margin-right: auto;
}

.page-header .page-title {
  max-width: min(42rem, 100%);
  margin-left: auto;
  margin-right: auto;
}

.page-header .page-description {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

/* Главная (.hero) и внутренние (.page-header): один фон — градиент + сетка */
.hero,
.page-header {
  position: relative;
  isolation: isolate;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: max(1.25rem, calc((100vw - var(--max-width)) / 2 + 1.25rem));
  padding-right: max(1.25rem, calc((100vw - var(--max-width)) / 2 + 1.25rem));
  box-sizing: border-box;
  text-align: center;
  background: linear-gradient(
    180deg,
    #e8f1fb 0%,
    #eef5ff 32%,
    rgba(245, 247, 250, 0.98) 68%,
    var(--color-bg) 100%
  );
}

.hero::after,
.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.72;
  background-image:
    linear-gradient(rgba(0, 113, 227, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 113, 227, 0.065) 1px, transparent 1px),
    linear-gradient(rgba(0, 113, 227, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 113, 227, 0.11) 1px, transparent 1px);
  background-size:
    32px 32px,
    32px 32px,
    128px 128px,
    128px 128px;
  background-position: center top;
  mask-image: linear-gradient(180deg, #000 0%, #000 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 90%, transparent 100%);
}

.hero > *,
.page-header > * {
  position: relative;
  z-index: 1;
}

/* Главная: полноэкранный блок по центру */
.hero {
  padding-top: calc(var(--space-xl) + 1rem);
  padding-bottom: var(--space-xl);
  min-height: calc(100vh - var(--header-height) - env(safe-area-inset-top, 0px));
  min-height: calc(100svh - var(--header-height) - env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Внутренние: тот же фон, компактная высота */
.page-header {
  padding-top: calc(var(--space-xl) + 1rem);
  padding-bottom: var(--space-xl);
}

.hero__eyebrow {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
}

.hero__title {
  margin: 0 0 1rem;
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.hero__subtitle {
  margin: 0 auto 2rem;
  color: var(--color-text-muted);
  font-size: 1.25rem;
  line-height: 1.5;
  max-width: 68ch;
}

.hero__note {
  margin: -0.75rem auto 1.5rem;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  max-width: 64ch;
  font-style: italic;
}

.hero .hero__eyebrow,
.page-header .hero__eyebrow {
  text-shadow: var(--text-float-eyebrow);
}

.hero .hero__title,
.page-header .page-title {
  text-shadow: var(--text-float-title);
}

.hero .hero__subtitle,
.hero .hero__note,
.page-header .page-description {
  text-shadow: var(--text-float-body);
}

/* Buttons */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__actions {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

/* Hero CTA — в духе apple.com: синий pill, типографика, без «офисной» рамки */
.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.65rem 1.65rem;
  border: none;
  border-radius: 980px;
  background: var(--color-accent);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 4px 12px rgba(0, 113, 227, 0.22);
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.hero__cta:hover {
  background: var(--color-accent-hover);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.08),
    0 8px 20px rgba(0, 113, 227, 0.28);
}

.hero__cta:active {
  transform: scale(0.98);
}

.hero__cta:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(0, 113, 227, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 4px 12px rgba(0, 113, 227, 0.22);
}

.hero__cta-icon {
  display: inline-flex;
  color: inherit;
  opacity: 0.92;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hero__cta:hover .hero__cta-icon {
  opacity: 1;
  transform: translateX(3px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 980px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.btn__icon {
  display: inline-flex;
  margin-right: 0.5rem;
}

.btn--primary {
  background: transparent;
  color: var(--color-btn-primary);
  border-color: var(--color-btn-primary);
}

.btn--primary:hover {
  background: rgba(22, 163, 74, 0.06);
  border-color: var(--color-btn-primary);
}

.btn--ghost {
  background: transparent;
  color: var(--color-btn-secondary);
  border-color: var(--color-btn-secondary);
}

.btn--ghost:hover {
  border-color: var(--color-btn-secondary);
  background: rgba(0, 136, 204, 0.06);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.card {
  display: block;
  padding: 1.75rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
}

.card--link {
  border-color: var(--color-btn-secondary);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: background-color var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card--link:hover {
  background: rgba(0, 136, 204, 0.06);
}

.card__more-icon {
  display: inline-flex;
  color: var(--color-btn-secondary);
  transition: transform var(--transition);
}

.card-grid--services .card__more {
  display: inline-flex;
  align-self: flex-end;
  margin-top: 0.625rem;
}

.card-grid--services .card__text {
  flex: 1;
}

.card-grid--services .card--link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition:
    background-color var(--transition),
    box-shadow var(--transition),
    border-color var(--transition),
    transform 0.2s ease;
}

.card-grid--services .card--link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(9, 55, 117, 0.1);
  border-color: #9fc2ec;
}

.card-grid--services .card--link:hover .card__more-icon {
  transform: translateX(3px);
}

.card--muted {
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.card__title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.card__text {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Главная: карточки в секции "Кейсы" */
.card-grid--cases .card {
  border-color: #c9dcf5;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.card-grid--cases .card--link {
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.card-grid--cases .card--link:hover {
  transform: translateY(-2px);
  border-color: #9fc2ec;
  background: linear-gradient(180deg, #ffffff 0%, #f3f9ff 100%);
  box-shadow: 0 10px 24px rgba(9, 55, 117, 0.11);
}

.card-grid--cases .card__title {
  margin-bottom: 0.75rem;
}

.card-grid--cases .card__text {
  line-height: 1.65;
}

.card-grid--cases .card__text strong {
  display: inline-block;
  min-width: 6.6rem;
  color: #103b6a;
  font-weight: 600;
}

/* Footer */
.site-footer {
  margin-top: 0;
  padding: 1.1rem 1.25rem 1rem;
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  color: var(--footer-text-muted);
  font-size: 0.8125rem;
}

.site-footer__copyright {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--footer-text-muted);
}

/* Минимальный футер (одинаковый на всех страницах) */
.site-footer > .site-footer__copyright {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.site-footer > .site-footer__copyright + .site-footer__copyright {
  margin-top: 0.35rem;
}

.site-footer__site-link {
  color: var(--footer-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.site-footer__site-link:hover {
  color: var(--footer-link-hover);
}

/* Content (inner pages) */
.content-block {
  max-width: 65ch;
}

.content-block p {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}

.contact-list {
  margin: 0 0 1rem;
  padding-left: 0;
  list-style: none;
  color: var(--color-text-muted);
}

.contact-list li + li {
  margin-top: 0.25rem;
}

/* Contacts: контент в .contacts-premium; секция — те же .section + зебра, что на остальных страницах */
.contacts-premium {
  max-width: 40rem;
  width: 100%;
  padding: 0 0.25rem;
}

/* Каналы — список карточек */
.contacts-premium__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contacts-premium__card {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
  padding: 0.85rem 1.15rem 0.85rem 1.25rem;
  text-decoration: none;
  color: inherit;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  /* одна линия контура; inset убран, чтобы не дублировать рамку */
  border: 1px solid rgba(0, 113, 227, 0.3);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 12px 28px -14px rgba(0, 113, 227, 0.08);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .contacts-premium__card {
    background: var(--color-surface);
    border-color: rgba(0, 113, 227, 0.28);
  }
}

.contacts-premium__card:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 113, 227, 0.48);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.06),
    0 16px 36px -14px rgba(0, 113, 227, 0.12);
}

.contacts-premium__card:focus-visible {
  outline: none;
  border-color: var(--color-accent);
  box-shadow:
    0 0 0 2px rgba(0, 113, 227, 0.35),
    0 0 0 4px rgba(255, 255, 255, 0.85),
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 12px 28px -14px rgba(0, 113, 227, 0.1);
  position: relative;
  z-index: 1;
}

.contacts-premium__glyph {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid rgba(0, 113, 227, 0.28);
}

.contacts-premium__glyph--phone {
  color: #1d7a3d;
}

.contacts-premium__glyph--telegram {
  color: #229ed9;
}

.contacts-premium__glyph--mail {
  color: var(--color-accent);
}

.contacts-premium__logo {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.contacts-premium__meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.contacts-premium__kind {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-text-muted);
}

.contacts-premium__line {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.022em;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.contacts-premium__chev {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.15rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.35;
  color: var(--color-text-muted);
}

/* Сноска под панелью */
.contacts-premium__footnote {
  margin-top: 2.25rem;
  padding: 1.5rem 1.35rem 1.6rem;
  text-align: left;
  border-radius: 18px;
  background: rgba(0, 113, 227, 0.035);
  border: 1px solid rgba(0, 113, 227, 0.22);
}

.contacts-premium__footnote-title {
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.contacts-premium__footnote-list {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.55;
  letter-spacing: -0.012em;
  color: var(--color-text-muted);
}

.contacts-premium__footnote-list li {
  position: relative;
  padding-left: 1.1rem;
  margin: 0 0 0.4rem;
  text-align: left;
  max-width: 60ch;
}

.contacts-premium__footnote-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(0, 113, 227, 0.45);
}

.contacts-premium__footnote-note {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--color-text-muted);
  max-width: 60ch;
}

/* Sections */
.section {
  margin-top: var(--space-xl);
  padding: var(--space-xl) 0 0;
  border-top: none;
}

.section__header {
  margin-bottom: var(--space-md);
}

.section__title {
  margin: 0 0 1rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.section__subtitle {
  margin: 0;
  padding-left: var(--section-step);
  color: var(--color-text-muted);
  max-width: 60ch;
  line-height: 1.6;
}

.section__subtitle--after-grid {
  margin-top: 1.25rem;
  max-width: min(48rem, 100%);
}

.section > *:not(.section__header) {
  margin-left: auto;
  margin-right: auto;
}

/* Zebra rhythm (default): first content section is blue */
.main > .section:nth-of-type(odd) {
  background: #eef5ff;
  border-top: 1px solid #d6e7ff;
  border-bottom: 1px solid #d6e7ff;
  border-radius: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: var(--space-xl) max(1.25rem, calc((100vw - var(--max-width)) / 2 + 1.25rem)) 1.25rem;
}

.main > .section:nth-of-type(even) {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Pages with section.hero before content need shifted zebra */
.main > .hero ~ .section:nth-of-type(odd) {
  background: transparent;
  border-top: none;
  border-bottom: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.main > .hero ~ .section:nth-of-type(even) {
  background: #eef5ff;
  border-top: 1px solid #d6e7ff;
  border-bottom: 1px solid #d6e7ff;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: var(--space-xl) max(1.25rem, calc((100vw - var(--max-width)) / 2 + 1.25rem)) 1.25rem;
}

.steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.steps-list__item {
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.steps-list__title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.steps-list__text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

/* Unified freeform CTA — мятный фон + зелёная типографика */
.home-freeform-cta {
  width: 100%;
  margin: 0;
  padding: var(--space-lg) 1.5rem calc(var(--space-lg) + 0.25rem);
  background: var(--cta-band-gradient);
  color: var(--cta-band-text);
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-top: 1px solid var(--cta-band-border-top);
  border-bottom: 1px solid var(--cta-band-border-bottom);
  box-shadow: var(--cta-band-shadow);
}

.home-freeform-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 105% 75% at 50% -30%, var(--cta-band-highlight-strong), transparent 56%),
    radial-gradient(ellipse 65% 50% at 95% 105%, var(--cta-band-highlight-soft), transparent 48%);
  pointer-events: none;
  z-index: 0;
}

.home-freeform-cta__card {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.home-freeform-cta__title {
  margin: 0 auto 0.75rem;
  max-width: 42rem;
  font-size: clamp(1.25rem, 2.8vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.28;
  color: var(--cta-band-text);
}

.home-freeform-cta__subtitle {
  margin: 0 auto 1.35rem;
  max-width: 40rem;
  color: var(--cta-band-muted);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.015em;
  font-style: italic;
}

.home-freeform-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem 0.85rem;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.stat__value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.stat__label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Architecture flow */
.architecture-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  margin-top: 2rem;
}

.architecture-flow__item {
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.35;
}

.architecture-flow__item small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

.architecture-flow__arrow {
  color: var(--color-text-muted);
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Trust list */
.trust-list {
  margin: 0 auto;
  padding: 0;
  list-style: none;
  -webkit-columns: 2;
  columns: 2;
  column-gap: 2rem;
  max-width: 100ch;
}

.trust-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.trust-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-btn-primary);
}

.trust-list li:last-child {
  margin-bottom: 0;
}

/* Страница 404 */
.error-page .page-description {
  margin-bottom: 1.5rem;
}

.error-page__cta {
  display: flex;
  justify-content: center;
}

.error-page__cards {
  width: 100%;
  margin-top: var(--space-lg);
  padding-bottom: var(--space-xl);
}

.card-grid--error {
  margin-top: 0;
}

/* Comparison table */
.comparison {
  margin-top: var(--space-lg);
}

.comparison__title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.comparison-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid #dbe7f7;
  background: #f9fcff;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 0.9375rem;
  background: var(--color-surface);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.comparison-table__caption {
  caption-side: top;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  background: #f2f8ff;
  border-bottom: 1px solid #dbe7f7;
}

.comparison-table th,
.comparison-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
  font-weight: 600;
  background: #edf5ff;
  color: #1b3350;
}

.comparison-table tbody tr:nth-child(even):not(.comparison-table__row--primary) {
  background: #fbfdff;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table td:first-child {
  font-weight: 600;
}

.comparison-table__row--primary {
  background: linear-gradient(180deg, #eaf3ff 0%, #f4f9ff 100%);
}

.comparison-table__row--primary td {
  color: #0b2d56;
  font-weight: 600;
}

.comparison-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.1rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
}

.comparison-chip--yes {
  color: #0f6a33;
  background: #e8f8ee;
  border-color: #b7e7c6;
}

.comparison-chip--no {
  color: #7a2935;
  background: #fcecef;
  border-color: #f1c1cb;
}

.comparison-chip--value {
  color: #0f3a68;
  background: #eaf3ff;
  border-color: #bfd9fb;
}

/* Tags (integrations, stack) */
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
}

.tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 980px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
}

/* Clients logos */
.clients-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.clients-logos__item {
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* FAQ accordion */
.faq-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 100ch;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item__q {
  margin: 0;
  padding: 1rem 2rem 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: color var(--transition);
}

.faq-item__q::-webkit-details-marker {
  display: none;
}

.faq-item__q::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  margin-top: -4px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--color-text-muted);
  transition: transform var(--transition);
}

.faq-item[open] .faq-item__q::after {
  transform: rotate(180deg);
}

.faq-item__q:hover {
  color: var(--color-accent);
}

.faq-item__a {
  margin: 0;
  padding: 0 0 1rem 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Responsive — бургер-меню */
@media (max-width: 768px) {
  .site-logo,
  .burger {
    position: relative;
    z-index: 100;
  }

  .burger {
    display: flex;
  }

  .site-header__inner {
    flex-wrap: nowrap;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    background: rgba(251, 251, 253, 0.98);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: calc(env(safe-area-inset-top, 0px) + var(--header-height) + 1rem) 1.5rem 1.5rem;
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: visibility var(--transition), opacity var(--transition);
    z-index: 99;
  }

  body.nav-open .site-nav {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav__list {
    flex-direction: column;
    gap: 0;
    padding-top: 1rem;
  }

  .site-nav__list li {
    border-bottom: 1px solid var(--color-border);
  }

  .site-nav__link {
    display: block;
    padding: 1rem 0;
    font-size: 1.2rem;
  }
}

/* Responsive */
@media (max-width: 640px) {
  .main {
    padding: var(--space-lg) 1rem 3rem;
  }

  .main:has(> .hero:first-child),
  .main:has(> .page-header:first-child) {
    padding-top: 0;
  }

  .main:has(+ .home-freeform-cta) > section:last-of-type {
    padding-bottom: var(--space-lg);
  }

  .main:has(+ .home-freeform-cta):not(:has(> .hero)) > .section:nth-of-type(odd):last-of-type,
  .main:has(+ .home-freeform-cta):has(> .hero) .hero ~ .section:nth-of-type(even):last-of-type {
    padding-bottom: calc(1.25rem + var(--space-lg));
  }

  .site-header__inner {
    padding: 0 1rem;
    align-items: center;
    flex-wrap: nowrap;
  }

  .section__subtitle {
    padding-left: 0;
  }

  .main > .section:nth-of-type(odd),
  .main > .section:nth-of-type(even) {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .main > .section:nth-of-type(odd) {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .main > .hero ~ .section:nth-of-type(odd) {
    margin-left: 0;
    margin-right: 0;
  }

  .main > .hero ~ .section:nth-of-type(even) {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .site-nav__link {
    padding: 0.75rem 0.75rem;
    font-size: 1.1rem;
  }

  .hero__title {
    font-size: 2rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

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

  .architecture-flow {
    flex-direction: column;
  }

  .architecture-flow__arrow {
    transform: rotate(90deg);
  }

  .trust-list {
    -webkit-columns: 1;
    columns: 1;
    max-width: 60ch;
  }

  .contacts-premium__list {
    gap: 0.85rem;
  }

  .contacts-premium__card {
    min-height: 4rem;
    padding: 0.75rem 1rem;
    gap: 0.85rem;
    border-radius: 16px;
  }

  .contacts-premium__glyph {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .contacts-premium__footnote {
    margin-top: 1.75rem;
    padding: 1.25rem 1rem;
    text-align: left;
  }

  .contacts-premium__footnote-list li {
    margin-left: 0;
    margin-right: 0;
  }

  .home-freeform-cta {
    padding: var(--space-md) 1rem calc(var(--space-md) + 0.2rem);
  }

  .home-freeform-cta__title {
    margin-bottom: 0.65rem;
    max-width: none;
  }

  .home-freeform-cta__subtitle {
    margin-bottom: 1.05rem;
    font-size: 0.9375rem;
    max-width: none;
  }

  .home-freeform-cta__actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .hero__subtitle {
    font-size: 1.05rem;
    padding: 0 0.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Cookie notice */
.cookie-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 0 0.85rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.cookie-notice--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-notice--hiding {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

.cookie-notice__inner {
  --cookie-row-h: 2rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem 0.4rem;
  max-width: 34rem;
  margin: 0 auto;
  padding: 0.48rem 0.4rem 0.48rem 0.75rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cookie-notice__inner {
    background: rgba(255, 255, 255, 0.98);
  }
}

.cookie-notice__text {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding-left: 0.1rem;
  font-size: 0.8125rem;
  line-height: var(--cookie-row-h);
  letter-spacing: -0.01em;
  color: var(--color-text);
  white-space: nowrap;
}

.cookie-notice__text a {
  color: #1a9b4a;
  text-decoration: none;
  font-weight: 500;
}

.cookie-notice__text a:hover {
  text-decoration: underline;
}

.cookie-notice__text a:focus-visible {
  outline: 2px solid #1a9b4a;
  outline-offset: 2px;
  border-radius: 2px;
}

.cookie-notice__close {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-accent);
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: color var(--transition);
}

.cookie-notice__close span {
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
}

.cookie-notice__close::before {
  content: '';
  position: absolute;
  inset: -6px;
}

.cookie-notice__close:hover {
  color: var(--color-accent-hover);
}

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

@media (max-width: 640px) {
  .cookie-notice {
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .cookie-notice__inner {
    gap: 0.2rem 0.3rem;
    max-width: none;
    margin: 0;
    padding: 0.42rem 0.3rem 0.42rem 0.55rem;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  }

  .cookie-notice__text {
    padding-left: 0.2rem;
    font-size: clamp(0.5625rem, calc((100vw - 4.25rem) / 32), 0.75rem);
    letter-spacing: -0.02em;
  }

  .cookie-notice__close {
    margin-right: 0.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-notice,
  .cookie-notice--visible,
  .cookie-notice--hiding {
    transition: none;
    transform: none;
  }
}
