/* ==========================================================================
   MicroAid — Design System Components
   Каждый компонент построен на токенах из design-tokens.css.
   Целенаправленная структура, минимум декора, сильные последовательности.
   ========================================================================== */

/* Fragment targets stop below the sticky header with a deliberate air gap. */
:where(section, article, div, h1, h2, h3, h4)[id] {
  scroll-margin-top: clamp(6.5rem, 8vw, 8rem);
}

/* --------------------------------------------------------------------------
   Eyebrow / tags — тихие технические метки (НЕ ALL-CAPS-бейджи)
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0 0 var(--sp-4);
}
.eyebrow::before {
  content: "";
  width: 1.1em;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.eyebrow--soft { color: var(--primary); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1;
  padding: 0.85em 1.4em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--primary-ink);
  color: var(--on-primary-ink);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn--outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn--ghost {
  background: transparent;
  color: var(--primary);
}
.btn--ghost:hover { background: var(--primary-tint); }

.btn--accent {
  background: var(--accent);
  color: var(--on-accent);
}
.btn--accent:hover { filter: brightness(0.97); color: var(--on-accent); }

.btn--lg { padding: 1em 1.7em; font-size: var(--step-1); }
.btn--sm { padding: 0.6em 1.1em; font-size: var(--step--1); }

/* Arrow affordance — single, deliberate */
.btn .arrow { transition: transform var(--dur-fast) var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 250, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  padding-block: var(--sp-3);
}

/* --- Логотип бренда: иконка (растр) + текстовая наборка -------------------
   Слово «MicroAid.ru» набрано живым текстом, а не картинкой: текстовая
   наборка не мылится на retina и при зуме, её читают поисковики и
   скринридеры. Пропорции сняты с прежнего растрового логотипа
   (Poppins Bold, cap-height 79 px при кегле 113 px), поэтому шапка и
   подвал сохраняют прежние высоту и ширину.
   Размеры заданы в em от font-size .brand — вся связка масштабируется
   одной строкой, иконка берётся в исходном разрешении (146×141), чего
   хватает даже для 3x (нужно ~104 px). */
.brand {
  --brand-accent: var(--brand-cyan);
  display: inline-flex;
  flex: none;           /* связку не сжимает шапка: иначе иконка и текст «съезжают» */
  align-items: center;
  gap: 0.24em;
  min-height: 2.4rem;   /* как у прежнего растрового лого — шапка не «съёжилась» */
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1.74rem;   /* cap-height 19.4 px — как в прежнем лого */
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--brand-ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand__mark {
  display: block;
  height: 1.25em;
  width: auto;
}
.brand__accent { color: var(--brand-accent); }
.brand__tld {
  margin-left: 0.14em;
  font-size: 0.667em;
  color: var(--muted);
}

/* Подвал: монохромная связка — как в прежнем чёрном логотипе */
.brand--footer {
  --brand-accent: var(--brand-ink);
  min-height: 2.75rem;   /* как у прежнего лого в подвале */
  font-size: 1.98rem;
}

.brand__dot {
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 560px) {
  .brand,
  .brand--footer { min-height: 1.9rem; font-size: 1.38rem; }   /* было: высота лого 1.9rem */
}

.nav { display: flex; align-items: center; gap: var(--sp-5); }
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-weight: 500;
  font-size: var(--step-0);
  text-decoration: none;
}
.nav__link:hover { color: var(--ink); background: rgba(14, 22, 48, 0.04); }
.nav__link.is-active { color: var(--primary); background: var(--primary-tint); }

/* Dropdown (Услуги) */
.nav__item { position: relative; }
.nav__dropdown {
  position: absolute;
  top: calc(100% + var(--sp-2));
  left: 0;
  min-width: 17rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--sp-2);
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              visibility var(--dur-fast) var(--ease);
}
.nav__item:hover .nav__dropdown,
.nav__item:focus-within .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav__dropdown a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
}
.nav__dropdown a:hover { background: var(--primary-tint); color: var(--primary); }

.nav__actions { display: flex; align-items: center; gap: var(--sp-2); }

/* Mobile toggle (progressive) */
.nav__toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.4rem;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav__list,
  .nav__actions .btn--ghost { display: none; }
  .nav__toggle { display: inline-flex; }

  /* Раскрытое мобильное меню */
  body.nav-open .nav__list {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: var(--sp-3);
    gap: var(--sp-1);
    z-index: 60;
  }
  body.nav-open .nav__item { position: static; }
  body.nav-open .nav__dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    padding-left: var(--sp-4);
  }
  body.nav-open .nav__actions { display: flex; }
}
.site-header__inner { position: relative; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding-block: var(--sp-8); }
.section--tight { padding-block: var(--sp-6); }
.section--paper { background: var(--paper); }
.section--surface { background: var(--surface); }
.section--ink {
  background: var(--ink);
  color: var(--paper);
}
.section--ink h2,
.section--ink h3 { color: var(--paper); }

.section__head {
  max-width: var(--measure);
  margin-bottom: var(--sp-7);
}
.section__head--center {
  margin-inline: auto;
  text-align: center;
}
.section__head .lead {
  font-size: var(--step-1);
  color: var(--muted);
  line-height: var(--lh-body);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: var(--sp-9) var(--sp-8);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--sp-8);
  align-items: center;
}
.hero__grid--single {
  grid-template-columns: minmax(0, 1fr);
}
.hero .hero__grid--single h1 {
  max-width: 18ch;
}
.hero__grid--single .hero__lead {
  max-width: 70ch;
}
.hero h1 {
  font-size: var(--step-5);
  line-height: 1.02;
  max-width: 14ch;
}
.hero__lead {
  font-size: var(--step-1);
  color: var(--muted);
  max-width: var(--measure);
  margin-bottom: var(--sp-6);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  margin-top: var(--sp-7);
}
.pi {
  min-width: 7rem;
}
.pi__num {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.pi__label { font-size: var(--step--1); color: var(--muted); margin-top: var(--sp-1); }

/* Hero visual — grounded, not a floating stock mock */
.hero__visual {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--primary-tint), var(--accent-tint));
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: end center;
}
.hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(14,22,48,0.35), transparent);
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .hero { padding-block: var(--sp-7) var(--sp-7); }
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.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)); }

@media (max-width: 900px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--primary-tint);
}
.card__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--primary-tint);
  color: var(--primary);
  font-size: 1.25rem;
}
.card__icon--accent { background: var(--accent-tint); color: var(--accent); }
.card__title { font-size: var(--step-1); margin-bottom: 0; }
.card__body { color: var(--muted); font-size: var(--step-0); margin: 0; }
.card__meta { margin-top: auto; padding-top: var(--sp-3); border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--muted); padding-top: 1rem;}

/* Price footer */
.card__price {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  font-size: var(--step-2);
}
.card__price small { font-weight: 400; font-size: var(--step-0); color: var(--muted); }

/* --------------------------------------------------------------------------
   Market cases — compact evidence ledger inside the existing card language
   -------------------------------------------------------------------------- */
.market-cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-5);
  align-items: stretch;
}
.market-cases--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.market-cases--3 .market-case__head {
  min-height: 9rem;
}
.market-cases--3 .market-case__section {
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}
.market-case {
  min-width: 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.market-case__head {
  padding: var(--sp-5);
  min-height: 8rem;
}
.market-case__head .card__title {
  font-size: var(--step-1);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.market-case__company {
  margin: var(--sp-2) 0 0;
  color: var(--primary);
  font-size: var(--step--1);
  font-weight: 600;
}
.market-case__section {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--line);
}
.market-case__section--result {
  background: var(--primary-tint);
}
.market-case h4.market-case__label {
  margin: 0;
  padding-top: 0.12em;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--ink);
}
.market-case__section p {
  margin: 0;
  color: var(--muted);
  font-size: var(--step--1);
  line-height: 1.55;
}
.market-case__results {
  display: grid;
  gap: var(--sp-2);
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
  line-height: 1.5;
}
.market-case__results li::marker {
  color: var(--primary);
}
.market-case__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-4);
  margin-top: auto;
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--step--1);
}
.market-case__link {
  flex: 0 0 auto;
  font-weight: 700;
}

@media (max-width: 760px) {
  .market-cases { grid-template-columns: 1fr; }
  .market-case__head { min-height: 0; }
}

@media (max-width: 900px) {
  .market-cases--3 { grid-template-columns: 1fr; }
  .market-cases--3 .market-case__head { min-height: 0; }
}

@media (max-width: 520px) {
  .market-case__section { grid-template-columns: 1fr; gap: var(--sp-2); }
  .market-case__footer { align-items: flex-start; flex-direction: column; }
}

/* --------------------------------------------------------------------------
   Process steps — genuine sequence, so numbering belongs here
   -------------------------------------------------------------------------- */
.steps {
  counter-reset: step;
  display: grid;
  gap: var(--sp-5);
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: var(--sp-4);
  align-items: start;
  padding: var(--sp-4) 0;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-2);
  color: var(--primary);
  line-height: 1;
  padding-top: 0.15em;
}
.step + .step { border-top: 1px solid var(--line); }
.step__title { font-size: var(--step-1); margin-bottom: var(--sp-1); }
.step__body { color: var(--muted); margin: 0; }

/* --------------------------------------------------------------------------
   Feature list — check ticks, not bullets
   -------------------------------------------------------------------------- */
.ticks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--sp-3);
}
.ticks li {
  position: relative;
  padding-left: 2rem;
  color: var(--ink-soft);
}
.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.3rem;
  height: 1.3rem;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--on-primary);
  background: var(--primary);
  border-radius: 50%;
}

/* Team copy — the operational capabilities replace decorative animation. */
.team-copy {
  max-width: var(--container);
}
.team-copy > .lead {
  max-width: 72ch;
  color: var(--ink-soft);
  font-size: var(--step-1);
}
.team-copy > p:not(.lead) {
  max-width: var(--measure);
  color: var(--muted);
}
.team-copy__capabilities {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
  margin-block: var(--sp-6);
}

@media (max-width: 900px) {
  .team-copy__capabilities { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Magazine feature — журнальный разворот: портрет + текст о основателе
   -------------------------------------------------------------------------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: var(--sp-7);
  align-items: start;
}
.feature__media {
  margin: 0;
  position: sticky;
  top: clamp(6.5rem, 8vw, 8rem);
}
.feature__media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.feature__caption {
  margin-top: var(--sp-3);
  font-size: var(--step--1);
  color: var(--muted);
}
.feature__body { max-width: var(--measure); }
.feature__text {
  margin: 0;
  font-size: var(--step-0);
  line-height: var(--lh-body);
  color: var(--ink-soft);
}
/* Подзаголовки разворота — всегда отдельной строкой (block-level, а не inline-flex) */
.feature__body > .eyebrow {
  display: flex;
  margin: 0 0 var(--sp-3);
}
.feature__body > .eyebrow:not(:first-child) {
  margin-top: var(--sp-7);
}

/* Подход студии — выделенный принцип в развороте (не часть основного текста) */
.approach {
  margin: var(--sp-7) 0 0;
  padding: var(--sp-5) var(--sp-6);
  background: var(--primary-tint);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
}
.approach > .eyebrow {
  display: flex;            /* всегда отдельной строкой */
  margin: 0 0 var(--sp-2);
  color: var(--primary-ink);
}
.approach > .eyebrow::before { background: var(--primary-ink); }
.approach__text {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Requisites — читаемая сетка «метка → значение» (страница /requisites/)
   -------------------------------------------------------------------------- */
.requisites {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--sp-6);
  margin: var(--sp-7) 0 0;
}
/* Под своим подзаголовком реквизиты идут вплотную — воздух даёт сам подзаголовок */
.eyebrow + .requisites { margin-top: 0; }
.requisites__row {
  padding-block: var(--sp-4);
  border-top: 1px solid var(--line);
}
.requisites__row--wide { grid-column: 1 / -1; }
.requisites dt {
  margin-bottom: var(--sp-1);
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  color: var(--muted);
}
.requisites dd {
  margin: 0;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.requisites dd a { color: var(--primary-ink); }
.requisites__value--pre {
  font-weight: 400;
  color: var(--ink-soft);
  white-space: pre-line;
}

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: var(--sp-6); }
  .feature__media { position: static; max-width: 20rem; }
}

/* В узкой колонке статьи реквизиты читаются в одну колонку. */
@media (max-width: 1100px) {
  .requisites { grid-template-columns: 1fr; }
  .requisites__row--wide { grid-column: auto; }
}

/* --------------------------------------------------------------------------
   Testimonial
   -------------------------------------------------------------------------- */
.quote {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.quote__text {
  font-size: var(--step-1);
  color: var(--ink-soft);
  line-height: var(--lh-body);
  margin: 0;
}
.quote__footer {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: auto;
}
.quote__avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-tint);
}
.quote__name { font-weight: 600; color: var(--ink); }
.quote__role { font-size: var(--step--1); color: var(--muted); }

/* --------------------------------------------------------------------------
   Person / portrait block — безрамочная «живая форма»
   (никакой карточки-рамки и подписи: чистое открытое поле для алгоритма)
   -------------------------------------------------------------------------- */
.person {
  position: relative;
  width: 100%;
  display: block;
  /* Без бордера, радиуса, тени и подложки — блок «растворяется» в фоне секции */
}
.person__screen {
  position: relative;
  width: 100%;
  height: clamp(360px, 54vh, 620px);
  /* Прозрачный фон — никакого тёмного «экрана», палитру дают сами частицы */
}
.person__screen canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* Мысль-«подпись» алгоритма: философское в хаосе, «решение» в собранной форме.
   Буквы «печатаются» по одной, как вырезанные из бумаги (letterpress),
   полупрозрачно в углу — форме не мешает. Показывается JS по фазе (opacity). */
.person__note {
  position: absolute;
  top: var(--sp-4);
  left: var(--sp-5);
  max-width: min(21rem, 85%);
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step--1);
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  opacity: 0;
  pointer-events: none;
  user-select: none;
}
/* Слова — атомарны: перенос происходит только по пробелу МЕЖДУ словами,
   а не в середине слова (поэтому буквы-«вырезки» внутри слова не рвутся). */
.person__note .w {
  white-space: nowrap;
}
.person__note .l {
  display: inline-block;
  color: var(--ink-soft);
  /* «вырезанная из бумаги» буква: светлое ребро снизу + мягкая тень (letterpress) */
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92),
    1px 2px 0 rgba(255, 255, 255, 0.45),
    0 2px 6px rgba(14, 22, 48, 0.22);
  animation: person-note-stamp 0.17s var(--ease);
}
@keyframes person-note-stamp {
  from { opacity: 0; transform: translateY(0.16em) scale(0.68); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* --------------------------------------------------------------------------
   CTA banner
   -------------------------------------------------------------------------- */
.cta {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding: var(--sp-7) var(--sp-6);
}
.cta::before {
  content: "";
  position: absolute;
  right: -8rem;
  top: -6rem;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,168,232,0.5), transparent 70%);
  pointer-events: none;
}
.cta h2 { color: var(--paper); font-size: var(--step-3); max-width: 20ch; }
.cta__text { color: rgba(247,248,250,0.75); max-width: var(--measure); }
.cta__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
.cta { display: grid; gap: var(--sp-4); grid-template-columns: 1fr auto; align-items: center; }
.cta__text { align-self: start; }
@media (max-width: 800px) { .cta { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Form
   -------------------------------------------------------------------------- */
.field { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.field__label { font-weight: 600; font-size: var(--step-0); color: var(--ink); }
.input {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.85em 1em;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input::placeholder { color: var(--muted); }
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}
/* Select: та же рамка, радиус и паддинги, что у текстовых полей,
   плюс собственный шеврон вместо системной стрелки браузера */
.select {
  position: relative;
  display: block;
}
.select__control {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  line-height: normal;
  padding-right: 2.75em;
  cursor: pointer;
  text-overflow: ellipsis;
}
.select__control::-ms-expand { display: none; }
.select::after {
  content: "";
  position: absolute;
  top: calc(50% - 0.25em);
  right: 1.25em;
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
  transition: border-color var(--dur-fast) var(--ease);
}
.select:focus-within::after { border-color: var(--primary); }
.select__control option,
.select__control optgroup { color: var(--ink); background: var(--surface); }
/* Приглушённая подпись, пока значение не выбрано (класс ставит promo.js) */
.select__control.is-placeholder { color: var(--muted); }
.field__hint { font-size: var(--step--1); color: var(--muted); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: var(--sp-7);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(15rem, 1.7fr) repeat(4, minmax(8rem, 1fr));
  gap: var(--sp-5);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--line);
}
.footer__col { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.footer__head { font-size: var(--step--1); text-transform: none; letter-spacing: 0.02em; color: var(--muted); margin-bottom: var(--sp-3); }
.footer__link { color: var(--ink-soft); text-decoration: none; font-size: var(--step-0); }
.footer__link:hover { color: var(--primary); }
.footer__brand p { color: var(--muted); max-width: 30ch; font-size: var(--step-0); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: space-between;
  padding-top: var(--sp-5);
  font-size: var(--step--1);
  color: var(--muted);
}

@media (max-width: 1080px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__brand { grid-column: auto; }
}

/* --------------------------------------------------------------------------
   Legal documents
   -------------------------------------------------------------------------- */
.legal-document {
  max-width: 52rem;
}
.legal-document__meta {
  margin: 0 0 var(--sp-6);
  color: var(--muted);
  font-size: var(--step--1);
}
.legal-document__notice {
  margin-bottom: var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  background: var(--primary-tint);
}
.legal-document__notice p:last-child { margin-bottom: 0; }
.legal-document section + section { margin-top: var(--sp-7); }
.legal-document h2 {
  margin-bottom: var(--sp-3);
  font-size: var(--step-2);
}
.legal-document h3 {
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-2);
  font-size: var(--step-1);
}
.legal-document p,
.legal-document li {
  color: var(--ink-soft);
}
.legal-document ul,
.legal-document ol {
  display: grid;
  gap: var(--sp-2);
  padding-left: 1.35rem;
}
.legal-document a { overflow-wrap: anywhere; }
.legal-table-wrap {
  overflow-x: auto;
  margin-top: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.legal-table {
  width: 100%;
  min-width: 38rem;
  border-collapse: collapse;
  background: var(--surface);
}
.legal-table th,
.legal-table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: var(--step--1);
}
.legal-table th { color: var(--ink); }
.legal-table tr:last-child td { border-bottom: 0; }
.consent-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
  margin: var(--sp-4) 0;
  color: var(--ink-soft);
  font-size: var(--step--1);
  line-height: 1.5;
}
.consent-control input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.18rem;
  accent-color: var(--primary);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq {
  display: grid;
  gap: var(--sp-3);
  max-width: var(--measure);
}
.faq__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-4) var(--sp-5);
}
.faq__item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-size: var(--step-2);
  color: var(--primary);
  line-height: 1;
  transition: transform var(--dur-fast) var(--ease);
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { margin: var(--sp-3) 0 0; color: var(--muted); }

/* --------------------------------------------------------------------------
   Pricing list (варианты/тарифы)
   -------------------------------------------------------------------------- */
.pricing {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.pricing__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: grid;
  gap: var(--sp-2);
}
.pricing__item--featured { border-color: var(--primary); box-shadow: var(--shadow-md); }
.pricing__name { font-weight: 600; color: var(--ink); font-size: var(--step-1); }
.pricing__desc { color: var(--muted); font-size: var(--step-0); }
.pricing__price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-2);
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Styleguide scaffolding
   -------------------------------------------------------------------------- */
.sg-block { margin-bottom: var(--sp-8); }
.sg-block > h2 { font-size: var(--step-2); }
.sg-block__desc { color: var(--muted); max-width: var(--measure); }
.sg-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.sg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: var(--sp-3); }
.sg-swatch {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.sg-swatch__chip { height: 4.5rem; }
.sg-swatch__meta { padding: var(--sp-2) var(--sp-3); font-size: var(--step--1); color: var(--muted); }
.sg-swatch__meta strong { display: block; color: var(--ink); font-size: var(--step-0); font-weight: 600; }

.sg-type { display: grid; gap: var(--sp-4); }
.sg-type__item > div:first-child { font-family: var(--font-display); }

/* --------------------------------------------------------------------------
   Cookie consent — согласие на необязательные Cookie (веб-аналитика)
   -------------------------------------------------------------------------- */
.cookie-consent {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.cookie-consent[hidden] { display: none; }
.cookie-consent__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
}
.cookie-consent__text {
  margin: 0;
  max-width: var(--measure);
  font-size: var(--step--1);
  line-height: var(--lh-body);
  color: var(--ink-soft);
}
.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

/* --------------------------------------------------------------------------
   Error pages — 400 / 403 / 404 / 500
   -------------------------------------------------------------------------- */
.error-page { padding-block: clamp(var(--sp-8), 14vh, var(--sp-9)); }
.error-page__inner {
  display: grid;
  justify-items: center;
  gap: var(--sp-4);
  max-width: 42rem;
  margin-inline: auto;
  text-align: center;
}
.error-page__badge {
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: var(--radius-pill);
  background: var(--accent-tint);
  color: var(--accent);
}
.error-page__code { margin-bottom: 0; }
.error-page__title {
  max-width: 24ch;
  margin: 0;
  font-size: var(--step-3);
}
.error-page__text {
  max-width: var(--measure);
  margin: 0;
  color: var(--muted);
  font-size: var(--step-0);
  line-height: var(--lh-body);
}
.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}
.error-page__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4) var(--sp-5);
  width: 100%;
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
}
.error-page__links a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.error-page__links a:hover { color: var(--primary-ink); border-color: var(--primary); }
