/* Спецраз.рф — Лендинг specraz.info
   Тёмная тема gcom-style + жёлтый акцент, mobile-first
   Версия: 2026-06-01-rev2 */

/* ============ ТОКЕНЫ ============ */
:root {
  --bg:          #08080F;
  --bg-2:        #0E0E14;
  --bg-card:     rgba(255,255,255,0.04);
  --bg-card-h:   rgba(255,255,255,0.06);
  --border:      rgba(255,255,255,0.07);
  --border-h:    rgba(255,255,255,0.16);
  --radius:      16px;
  --text:        #EDEDF5;
  --muted:       #9AA0B4;
  --accent:      #FEC748;
  --accent-h:    #FFD76B;
  --accent-glow: rgba(254,199,72,0.18);
  --nav-h:       64px;
  --danger:      #e05555;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --on-accent:   #0a0a10;                 /* текст на жёлтом */
  --surface-light: #fff;                  /* подложки логотипов и скриншотов ATI */
  --on-light:    #333;
  --accent-soft: rgba(254,199,72,0.08);   /* тинт акцента */
  --accent-line: rgba(254,199,72,0.2);    /* линия акцента */
  --ghost-border: rgba(255,255,255,0.25);
  --header-bg:   rgba(8,8,15,0.92);
  --overlay:     rgba(0,0,0,0.7);
  --overlay-strong: rgba(0,0,0,0.88);
  --rating:      #5CB85C;                 /* зелёные звёзды отзывов ATI */
  color-scheme: dark;                     /* нативные select, скроллбары, автозаполнение */
}

/* ============ ШРИФТ: Inter (variable 400–800), свой хостинг ============ */
/* Файлы — Google Fonts Inter v20 (SIL OFL 1.1). inter-rub — подмножество
   latin-ext только со знаком ₽ (U+20BD), чтобы не грузить 85 КБ ради одного символа. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/inter-rub.woff2) format('woff2');
  unicode-range: U+20BD;
}

/* ============ RESET + BASE ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--nav-h) + 12px); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  font: 16px/1.6 'Inter', system-ui, -apple-system, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
/* Атрибут hidden сильнее любых display у классов (.btn и др.) */
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }

/* ============ LAYOUT ============ */
.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}
section { padding: 72px 0; }

/* ============ ТИПОГРАФИКА ============ */
h1 {
  font-size: clamp(30px, 6vw, 52px);
  line-height: 1.1;
  font-weight: 800;
  margin: 0 0 18px;
  color: var(--text);
}
h2 {
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}
h3 {
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}
p { margin: 0 0 12px; }
.section-sub {
  color: var(--muted);
  margin-bottom: 36px;
  font-size: 17px;
}
.section-intro {
  font-size: 17px;
  max-width: 720px;
  margin-bottom: 36px;
  color: var(--muted);
}

/* ============ КНОПКИ ============ */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .1s;
  line-height: 1.3;
  font-family: inherit;
}
.btn:hover {
  background: var(--accent-h);
  color: var(--on-accent);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  border: 2px solid var(--ghost-border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
  box-shadow: none;
}
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-submit { margin-top: 8px; padding: 16px 36px; font-size: 17px; width: 100%; }
@media (min-width: 480px) { .btn-submit { width: auto; } }

/* ============ ШАПКА ============ */
.site-header {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(1100px, 92%);
  margin: 0 auto;
}
/* Логотип-картинка в шапке */
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-img { height: 45px; width: auto; display: block; }
/* Узкие экраны: логотип прежнего размера, чтобы звонок + «Заявка» + меню влезали в 320 px */
@media (max-width: 359px) { .logo-img { height: 36px; } }

/* Навигация */
.header-nav {
  display: flex;
  gap: 4px;
  margin-left: 16px;
  flex-wrap: nowrap;
}
.header-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.header-nav a:hover { color: var(--text); background: var(--bg-card); }

.header-contacts {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}
.header-phone {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.3;
}
.header-phone:hover { color: var(--accent); }
.header-hint {
  font-size: 11px;
  color: var(--muted);
}
.header-cta { flex-shrink: 0; }
/* Мессенджеры: MAX, WhatsApp, Telegram */
.header-messengers { display: none; gap: 8px; align-items: center; flex-shrink: 0; }
@media (min-width: 1100px) { .header-messengers { display: flex; } }
.header-messengers a, .footer-messengers a { display: block; line-height: 0; border-radius: 50%; transition: transform .15s; }
.header-messengers a:hover, .footer-messengers a:hover { transform: translateY(-1px); }
.header-messengers img { width: 28px; height: 28px; }
.footer-messengers { display: flex; gap: 12px; margin-top: 6px; }
.footer-messengers img { width: 32px; height: 32px; }
.nav-messenger { display: flex !important; align-items: center; gap: 10px; }
.nav-messenger img { width: 24px; height: 24px; }
/* Мобильные элементы шапки: на десктопе скрыты */
.header-call, .nav-contacts, .cta-short { display: none; }

/* Бургер */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  margin-left: 8px;
  flex-shrink: 0;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.burger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger--open span:nth-child(2) { opacity: 0; }
.burger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .burger { display: flex; }
  .header-nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg); /* непрозрачный: под backdrop-filter шапки полупрозрачный фон просвечивал hero */
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
    margin-left: 0;
    z-index: 190;
    /* Шапка sticky — длинное меню (контакты) прокручивается внутри,
       иначе в альбомной ориентации нижние пункты недостижимы */
    max-height: calc(100vh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .header-nav.nav-open { display: flex; }
  .header-nav a {
    padding: 12px 20px;
    border-radius: 0;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
  }
  .header-nav a:last-child { border-bottom: 0; }
  .header-contacts { display: none; }
  /* Звонок + короткий CTA + бургер — прижаты вправо */
  .header-inner { gap: 8px; }
  .header-call {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--accent);
    flex-shrink: 0;
  }
  .header-call:hover { color: var(--accent-h); border-color: var(--border-h); }
  .header-cta {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
  }
  .cta-full { display: none; }
  .cta-short { display: inline; }
  .burger { width: 44px; height: 44px; margin-left: 0; }
  /* Контакты в выпадающем меню */
  .nav-contacts { display: flex; flex-direction: column; margin-top: 8px; }
  .nav-contacts a { color: var(--text); }
}

/* ============ HERO (full-bleed) ============ */
#hero {
  padding: 0;
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
/* hero-fg (AVIF/WebP) — full-bleed фон */
.hero-fullbg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-layer {
  position: absolute;
  inset: 0;
}
.hero-bg-layer picture { display: block; width: 100%; height: 100%; }
.hero-bg-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* скрим-градиент слева → читаемость текста */
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(8,8,15,0.90) 0%,
    rgba(8,8,15,0.72) 45%,
    rgba(8,8,15,0.28) 75%,
    rgba(8,8,15,0.05) 100%
  );
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 100px 0;
  width: min(1100px, 92%);
  margin: 0 auto;
}
.hero-text { max-width: 580px; }
.hero-text h1 { color: var(--text); }
.hero-sub { font-size: 18px; color: var(--muted); margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 767px) {
  .hero-inner { padding: 72px 0 60px; }
  .hero-scrim {
    background: rgba(8,8,15,0.78);
  }
}
/* Hero A/B (#4599): на широких экранах машина справа от текста, а не под ним —
   слой картинки начинается с 38 %, левый край растворяется в фон */
@media (min-width: 900px) {
  .hero-bg-layer {
    left: 38%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%);
    mask-image: linear-gradient(to right, transparent 0, #000 22%);
  }
  .hero-bg-layer img { object-position: left center; }
  /* Текст hero может заходить на край картинки — мягкая тень для читаемости */
  .hero-text h1, .hero-sub { text-shadow: 0 1px 16px rgba(8,8,15,0.85); }
  .hero-scrim {
    background: linear-gradient(
      to right,
      rgba(8,8,15,0.6) 0%,
      rgba(8,8,15,0.35) 45%,
      rgba(8,8,15,0.1) 70%,
      rgba(8,8,15,0) 100%
    );
  }
}
/* Узкие экраны: кадр смещён к кабине */
@media (max-width: 899px) {
  .hero-bg-layer img { object-position: 22% center; }
}

/* ============ ЛЕНТА ЛОГОТИПОВ (MARQUEE) ============ */
#clients-marquee {
  background: var(--bg-2);
  padding: 48px 0 36px;
  overflow: hidden;
}
.marquee-title {
  text-align: center;
  font-size: clamp(20px, 3vw, 28px);
  margin-bottom: 28px;
}
.marquee-outer {
  overflow: hidden;
  width: 100%;
  position: relative;
}
.marquee-outer::before,
.marquee-outer::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.marquee-outer::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-2), transparent);
}
.marquee-outer::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-2), transparent);
}
.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
}
.marquee-outer:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee-outer { overflow-x: auto; }
}
.marquee-item { flex-shrink: 0; }
.client-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-light);
  border-radius: 10px;
  padding: 10px 18px;
  min-width: 160px;
  height: 88px;
  white-space: nowrap;
}
.client-chip img {
  height: 64px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.client-chip span {
  font-size: 14px;
  font-weight: 600;
  color: var(--on-light);
  line-height: 1.2;
}

/* ============ СТЕКЛЯННЫЕ КАРТОЧКИ ============ */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* ============ ПОД КОГО ============ */
#dlya-kogo { background: var(--bg-2); }
.grid-triggers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 580px) { .grid-triggers { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .grid-triggers { grid-template-columns: repeat(3, 1fr); } }
.trigger-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.trigger-icon { color: var(--accent); line-height: 0; margin-bottom: 12px; }
.trigger-card h3 { color: var(--text); }
.trigger-card p { color: var(--muted); margin: 0; }

/* ============ CTA КАРТА РАМОК ============ */
.cta-ramki-block {
  background: linear-gradient(90deg, rgba(254,199,72,0.12) 0%, rgba(254,199,72,0.05) 100%);
  border-top: 1px solid var(--accent-line);
  border-bottom: 1px solid var(--accent-line);
  padding: 32px 0;
}
.cta-ramki-inner {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.cta-ramki-text {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cta-ramki-text strong { font-size: 17px; color: var(--text); }
.cta-ramki-text span { font-size: 15px; color: var(--muted); }

/* ============ УСЛУГИ ============ */
#services { background: var(--bg); }
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 8px;
}
@media (min-width: 580px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .services-grid { grid-template-columns: repeat(4, 1fr); } }
/* 3 карточки без «Сопровождения» */
@media (min-width: 580px) { .services-grid--3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .services-grid--3 { grid-template-columns: repeat(3, 1fr); } }
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Иконки — Lucide (ISC), inline SVG, цвет через currentColor */
.service-icon {
  color: var(--accent);
  line-height: 0;
  margin-bottom: 4px;
}
.service-card h3 { color: var(--text); margin: 0; }
.service-card p { color: var(--muted); margin: 0; font-size: 14px; }

/* ============ ЭКСПЕРТНОСТЬ (фоновая подложка) ============ */
.expertise-bg-section {
  position: relative;
  background: var(--bg-2);
  overflow: hidden;
}
.expertise-bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.expertise-bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.18;
}
.expertise-bg-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(14,14,20,0.5) 0%, rgba(14,14,20,0.7) 100%);
}
.expertise-bg-section .container { position: relative; z-index: 1; }
.expertise-grid {
  margin-bottom: 28px;
}
.expertise-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.expertise-card h3 { color: var(--text); }
.expertise-card p { color: var(--muted); margin: 0; }
.expertise-aside {
  color: var(--muted);
  font-size: 15px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.expertise-aside a { color: var(--accent); }

/* ============ КАК РАБОТАЕМ ============ */
#how { background: var(--bg); }
.steps-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-bottom: 36px;
}
@media (min-width: 768px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
  display: flex;
  flex-direction: column;   /* иллюстрация уходит вниз через margin-top: auto */
}
.step-num {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: var(--on-accent);
  margin-bottom: 14px;
}
.step-illustration {
  margin: auto 0 0;          /* прижата к низу карточки */
  padding-top: 20px;
  text-align: center;
}
.step-illustration img {
  max-height: 140px;
  width: auto;
  margin: 0 auto;
  opacity: 0.8;
  /* у иллюстраций свой почти чёрный фон (#09080F) — lighten растворяет его в фоне карточки */
  mix-blend-mode: lighten;
}
.step h3 { color: var(--text); }
.step p { color: var(--muted); margin: 0; font-size: 15px; }
.how-cta { text-align: center; }

/* ============ ЦЕНЫ ============ */
#prices { background: var(--bg-2); }
.prices-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-bottom: 20px;
}
@media (min-width: 640px) { .prices-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .prices-grid--4 { grid-template-columns: repeat(4, 1fr); } }
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.price-card h3 { color: var(--text); }
.price-small { font-size: 12px; color: var(--muted); margin: 0; }
.price-card .price-for { color: var(--text); font-size: 14px; font-weight: 600; }
.price-inline { color: var(--accent); font-weight: 700; white-space: nowrap; }
.price-list {
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.price-list strong { color: var(--text); font-weight: 600; }
.price-card .btn { margin-top: auto; text-align: center; }
/* Рекомендуемый тариф (Абонент) */
.price-card--featured {
  border-color: var(--accent);
  border-width: 2px;
  box-shadow: 0 0 24px var(--accent-glow);
  position: relative;
}
.price-amount {
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--accent);
}
.price-unit { font-size: 16px; font-weight: 400; color: var(--muted); }
.price-card .price-period { margin-top: -6px; color: var(--muted); font-size: 14px; }
.price-card p { color: var(--muted); font-size: 14px; margin: 0; }
.prices-note { font-size: 14px; color: var(--muted); }
.prices-note a { color: var(--accent); }

/* ============ ДОВЕРИЕ ============ */
#trust { background: var(--bg); }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
@media (min-width: 640px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
}
.trust-stat strong {
  display: block;
  font-size: clamp(22px, 3.5vw, 30px);
  color: var(--accent);
}
.trust-stat span { font-size: 13px; color: var(--muted); }

.trust-regions { color: var(--muted); font-size: 15px; }

/* ============ FAQ ============ */
#faq { background: var(--bg-2); }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item[open] {
  border-color: var(--border-h);
}
.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 300;
  color: var(--accent);
  transition: transform .2s;
  flex-shrink: 0;
  margin-left: 14px;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-item p {
  padding: 18px 22px;
  margin: 0;
  color: var(--muted);
}
.faq-item a { color: var(--accent); }

/* ============ ФОРМА ============ */
#zayavka { background: var(--bg); }
#lead-form { max-width: 720px; }
.field-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text);
}
.field-section-label {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin: 22px 0 6px;
}
.req { color: var(--danger); }
.field-hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.field {
  display: block;
  width: 100%;
  padding: 12px 16px;
  margin: 4px 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  background: var(--bg-2);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.field::placeholder { color: var(--muted); opacity: 0.7; }
.field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
select.field { cursor: pointer; }
select.field option { background: var(--bg-2); color: var(--text); }
.field-short { width: 160px; }
textarea.field { resize: vertical; min-height: 90px; }
.field-group { border: 0; padding: 0; margin: 0 0 16px; }
.field-group legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; color: var(--text); }
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  color: var(--text);
  transition: border-color .15s, background .15s;
}
.radio-label:hover {
  border-color: var(--border-h);
  background: var(--bg-card);
}
.radio-label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}
.radio-label input { accent-color: var(--accent); }
.field-row { margin-bottom: 14px; }
.form-privacy { font-size: 12px; color: var(--muted); margin-top: 8px; }
.error { color: var(--danger); font-size: 14px; min-height: 20px; margin-bottom: 8px; }

/* ============ КВИЗ (#4606) ============ */
.quiz-progress { margin-bottom: 20px; }
.quiz-progress-text { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.quiz-bar { height: 6px; border-radius: 3px; background: var(--bg-card-h); overflow: hidden; }
.quiz-bar-fill { display: block; height: 100%; width: 25%; background: var(--accent); transition: width .25s ease; }
@media (prefers-reduced-motion: reduce) { .quiz-bar-fill { transition: none; } }
.quiz-step { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.quiz-step-title { font-size: clamp(20px, 3vw, 24px); font-weight: 700; color: var(--text); margin-bottom: 16px; padding: 0; }
.quiz-step-title:focus { outline: none; }
.quiz-step-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.quiz-sub { margin: 18px 0 8px; }
.quiz-hint { display: block; margin: -6px 0 12px; font-size: 14px; }
/* Без JS (нет .is-quiz) шаги идут подряд с отступом */
#lead-form:not(.is-quiz) .quiz-step + .quiz-step { margin-top: 28px; }
.quiz-more { margin: 4px 0 8px; }
.quiz-more summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 8px 0; }
.quiz-more[open] summary { margin-bottom: 10px; }
.quiz-nav { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.quiz-nav .btn-submit { margin-top: 0; }
#lead-form.is-quiz .quiz-nav .btn { min-width: 140px; text-align: center; }
@media (max-width: 479px) {
  #lead-form.is-quiz .quiz-nav .btn { flex: 1 1 0; min-width: 0; width: auto; padding-left: 12px; padding-right: 12px; }
}

/* Honeypot */
.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ============ СЕТКИ ============ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 16px;
}
@media (min-width: 580px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 16px;
}
@media (min-width: 580px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ============ СТРАНИЦА-СПАСИБО ============ */
#thankyou {
  padding: 80px 0;
  text-align: center;
  background: var(--bg);
}
#thankyou h2 { margin-bottom: 12px; }
#thankyou p { color: var(--muted); margin-bottom: 20px; }
#thankyou .btn { margin: 6px; }

/* ============ EXIT-INTENT ============ */
.exit-intent-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.exit-intent-modal {
  background: var(--bg-2);
  border: 1px solid var(--border-h);
  border-radius: var(--radius);
  padding: 36px 28px;
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow: 0 16px 60px rgba(0,0,0,0.6);
}
.exit-intent-close {
  position: absolute;
  top: 14px; right: 18px;
  background: none;
  border: 0;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  transition: color .15s;
}
.exit-intent-close:hover { color: var(--text); }
.exit-intent-modal h3 { margin-bottom: 12px; color: var(--text); }
.exit-intent-modal p { color: var(--muted); margin-bottom: 16px; }
.exit-intent-modal small { color: var(--muted); }
.exit-intent-modal a { color: var(--accent); }

/* ============ ФУТЕР ============ */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: 52px 0 36px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 48px; } }

/* Бренд-колонка */
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-logo-link { display: inline-block; }
.footer-logo-img { height: 40px; width: auto; display: block; }
.footer-tagline { font-size: 13px; color: var(--muted); line-height: 1.5; max-width: 260px; }
.footer-req { font-size: 12px; color: var(--muted); line-height: 1.5; }
.footer-req a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.footer-req a:hover { color: var(--accent); }
.footer-copy { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Навигационные колонки */
.footer-nav-col, .footer-contacts-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-nav-col h4, .footer-contacts-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 4px;
}
.footer-nav-col a, .footer-contacts-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color .15s;
}
.footer-nav-col a:hover, .footer-contacts-col a:hover { color: var(--accent); }

/* ============ OSI.HTML специфичные стили ============ */
.article-header {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 40px;
}
.article-header h1 { color: var(--text); margin-bottom: 12px; }
.article-lead { color: var(--muted); font-size: 18px; max-width: 700px; margin: 0; }
.article-body { padding: 48px 0; }
.article-body h2 { margin-top: 36px; color: var(--text); }
.article-body p { color: var(--muted); max-width: 760px; }
.article-body ul { max-width: 760px; padding-left: 20px; color: var(--muted); }
.article-body li { margin-bottom: 8px; }

.osi-image-block {
  margin: 32px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: inline-block;
  max-width: 100%;
}
.osi-image-block img { border-radius: calc(var(--radius) - 4px); max-width: 100%; height: auto; }
.osi-image-caption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}
.osi-image-caption a { color: var(--accent); }

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  padding: 16px 20px;
  max-width: 760px;
  margin: 24px 0;
  font-size: 15px;
  color: var(--muted);
}
.callout strong { display: block; margin-bottom: 4px; color: var(--text); }
.callout a { color: var(--accent); }

.cta-article {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  color: var(--text);
  padding: 60px 0;
  text-align: center;
}
.cta-article h2 { color: var(--text); margin-bottom: 12px; }
.cta-article p { color: var(--muted); margin-bottom: 24px; max-width: 560px; margin-left: auto; margin-right: auto; }

.breadcrumb {
  font-size: 14px;
  color: var(--muted);
  padding: 16px 0 0;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 6px; }

/* OSI illustration */
.osi-illustration {
  margin: 32px 0;
  text-align: left;
}
.osi-illustration img {
  max-height: 160px;
  width: auto;            /* иначе width="400" из разметки сплющивает картинку */
  opacity: 0.7;
}

/* ============ БЛАГОДАРСТВЕННЫЕ ПИСЬМА С ЦИТАТАМИ ============ */
.letters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 8px;
}
@media (min-width: 640px) { .letters-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .letters-grid { grid-template-columns: repeat(3, 1fr); } }

.letter-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.letter-card[data-lb-src]:hover {
  border-color: var(--border-h);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}
.letter-scan {
  position: relative;
  overflow: hidden;
}
.letter-scan img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform .3s;
}
.letter-card[data-lb-src]:hover .letter-scan img { transform: scale(1.03); }
.letter-scan-zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  transition: background .2s;
}
.letter-scan-zoom::after {
  content: '';
  width: 28px;
  height: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8' /%3E%3Cline x1='21' x2='16.65' y1='21' y2='16.65' /%3E%3Cline x1='11' x2='11' y1='8' y2='14' /%3E%3Cline x1='8' x2='14' y1='11' y2='11' /%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0;
  transition: opacity .2s;
}
.letter-card[data-lb-src]:hover .letter-scan-zoom { background: rgba(0,0,0,0.3); }
.letter-card[data-lb-src]:hover .letter-scan-zoom::after { opacity: 1; }

.letter-body {
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.letter-body blockquote {
  margin: 0;
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.55;
}
.letter-body cite {
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  color: var(--text);
  margin-top: auto;
}

/* Карточка только текст (без скана) */
.letter-card--text-only {
  cursor: default;
}
.letter-card--text-only .letter-body { padding: 24px; }

/* Карточка только скан (маленький) */
.letter-card--scan-only .letter-scan img { height: 130px; }
.letter-card--scan-only .letter-body { padding: 10px 14px; }
.letter-card--scan-only .letter-body cite { font-size: 13px; }

/* ============ ГАЛЕРЕЯ ОТЗЫВОВ / ПИСЕМ ============ */
.gallery-section { margin-bottom: 48px; }
.gallery-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.gallery-section-header h3 {
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.ati-badge-img {
  height: 40px;
  width: auto;
  display: block;
}
/* Отзывы ATI.SU — текстом, ссылка на рейтинг */
.ati-badge-link { display: inline-block; line-height: 0; border-radius: 6px; }
.ati-reviews {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) { .ati-reviews { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ati-reviews { grid-template-columns: repeat(3, 1fr); } }
.ati-review {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}
.ati-review blockquote {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}
.ati-review figcaption {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* Оценка ATI: серые звёзды под зелёными, ширина зелёных = оценка/5 */
.ati-summary { margin: -8px 0 16px; color: var(--muted); font-size: 15px; }
.ati-summary strong { color: var(--rating); }
.stars { position: relative; display: inline-block; width: 90px; height: 18px; line-height: 0; }
.stars-bg { color: var(--border-h); }
.stars-fg { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--rating); }
.stars svg { display: block; width: 90px; height: 18px; }
.ati-review-company { font-size: 14px; font-weight: 600; color: var(--text); }
.ati-review-meta { font-size: 13px; color: var(--muted); }
.ati-all { margin: 16px 0 0; font-size: 15px; }
.ati-all a { display: inline-flex; align-items: center; gap: 6px; }

/* ============ ЛАЙТБОКС ============ */
#lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay-strong);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#lb-overlay.lb-open { display: flex; }
#lb-img {
  max-width: 100%;
  max-height: 90svh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.8);
  display: block;
}
#lb-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  z-index: 2001;
}
#lb-close:hover { background: rgba(255,255,255,0.2); }
#lb-close:focus-visible, .exit-intent-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Карточки-превью (письма, ATI) открываются с клавиатуры — gallery.js */
[data-lb-src]:focus-visible,
.letter-scan:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.letter-scan:focus-visible { outline-offset: -3px; }
