/* ==========================================================================
   SITE.CSS — Лендинг веб-студии (дизайн-система 2026)
   --------------------------------------------------------------------------
    Архитектура (Desktop First):
     1.  Variables      — дизайн-токены (:root)
     2.  Base           — сброс, типографика, фокус, доступность
     3.  Layout         — контейнер, секции, сетки Grid
     4.  Components     — кнопки, карточки, header, hero, преимущества,
                          тарифы, калькулятор, галерея, FAQ, контакты,
                          модалка, lightbox, cookie, тосты
     5.  Utilities      — вспомогательные классы
     6.  Motion         — reveal-анимации, prefers-reduced-motion
    7.  Responsive     — брейкпоинты (Desktop First: max-width)
   ========================================================================== */

/* ==========================================================================
   1. VARIABLES
   ========================================================================== */
:root {
  /* Цвета: глубокий доверительный фон + яркие контрастные акценты */
  --bg: #0e1628; /* основной фон (глубокий navy) */
  --bg-elev: #0e1628; /* фон повышенных слоёв */
  --surface: #131d33; /* карточки */
  --surface-2: #1a2742; /* hover/активные карточки */
  --line: rgba(148, 163, 184, 0.14);
  --text: #eaf0f8; /* основной текст (AA) */
  --text-2: #c2cede; /* вторичный текст */
  --muted: #8b98ad; /* приглушённый текст (AA) */
  --accent: #6ea8ff; /* ссылки/акценты на тёмном */
  --accent-btn: #2563eb; /* заливка CTA (белый текст AA) */
  --accent-btn-h: #1d4ed8; /* hover CTA */
  --accent-soft: rgba(37, 99, 235, 0.16);
  --gold: #f6b83d; /* бейджи/выделения */
  --gold-soft: rgba(246, 184, 61, 0.16);
  --success: #34d399;
  --danger: #ff6b6b;

  /* Геометрия */
  --radius: 16px; /* основной радиус (12–16px) */
  --radius-sm: 12px;
  --radius-full: 999px;
  --wrap: 1180px;

  /* Типографика: современный системный гротеск (без внешних шрифтов) */
  --font: "Mulish", Arial, sans-serif !important;
  --font-display: var(--font);

  /* Тени и движение */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-2: 0 24px 64px rgba(0, 0, 0, 0.42);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 0.28s;
}

/* ==========================================================================
   2. BASE
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.gold {
  color: var(--gold);
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Видимый фокус для доступности (WCAG) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Скринридер-класс */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

/* ==========================================================================
   3. LAYOUT
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: 40px;
}

.reverse-mesh {
  background:
    radial-gradient(
      60% 50% at 15% 90%,
      rgba(37, 99, 235, 0.22),
      transparent 60%
    ),
    radial-gradient(
      50% 45% at 85% 80%,
      rgba(246, 184, 61, 0.12),
      transparent 60%
    ),
    radial-gradient(
      55% 55% at 60% 10%,
      rgba(110, 168, 255, 0.14),
      transparent 65%
    );
}

.section {
  padding-block: clamp(20px, 8vw, 50px);
  position: relative;
  z-index: 1;
}

.section__head {
  margin-bottom: 40px;
}

.section__title {
  font-size: clamp(1.75rem, 4.2vw, 2.7rem);
  margin-top: 14px;
}

.section__sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 12px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* ==========================================================================
   4. COMPONENTS
   ========================================================================== */
/* Мягкий mesh-градиент */
.mesh {
  background:
    radial-gradient(
      60% 50% at 15% 10%,
      rgba(37, 99, 235, 0.22),
      transparent 60%
    ),
    radial-gradient(
      50% 45% at 85% 20%,
      rgba(246, 184, 61, 0.12),
      transparent 60%
    ),
    radial-gradient(
      55% 55% at 60% 90%,
      rgba(110, 168, 255, 0.14),
      transparent 65%
    );
}

/* Шумовая текстура поверх mesh */
.noise::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Кнопки ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  transition:
    transform var(--dur) var(--ease),
    background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent-btn);
  color: #fff;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
}

.btn--primary:hover {
  background: var(--accent-btn-h);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn--gold {
  background: var(--gold);
  color: #0a0f1c;
  box-shadow: 0 10px 28px rgba(246, 184, 61, 0.3);
}

.btn--gold:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn--block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--sm {
  padding: 11px 18px;
  font-size: 0.9rem;
}

/* ---- Бейджи и пилюли ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
}

.badge--gold {
  background: var(--gold);
  border-color: transparent;
  color: #0a0f1c;
  font-weight: 800;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
}

/* ---- Карточка ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

/* ---- Header (sticky, glass) ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 15, 28, 0.72);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 16px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo em {
  font-style: normal;
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  position: relative;
  transition: color var(--dur) var(--ease);
}

.nav a:hover {
  color: var(--text);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: right var(--dur) var(--ease);
}

.nav a:hover::after {
  right: 0;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header__phone {
  font-weight: 700;
  display: inline;
}

/* Гамбургер (мобильное меню) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition:
    transform var(--dur) var(--ease),
    opacity var(--dur) var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0 20px;
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu a {
  padding: 14px 6px;
  font-weight: 600;
  color: var(--text-2);
  border-bottom: 1px solid var(--line);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding-block: clamp(48px, 8vw, 100px);
  overflow: hidden;
}

.hero__content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hero .mesh {
  position: absolute;
  inset: 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 65px;
  align-items: center;
  position: relative;
}

.hero__title {
  font-size: clamp(2.2rem, 6.5vw, 4rem);
  margin-bottom: 20px;
}

.hero__title mark {
  background: none;
  color: var(--accent);
}

.hero__sub {
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 32px;
}

.modal-form a {
  text-decoration: underline;
}

.hero__cta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: auto;
}

.hero__cta .btn {
  width: 250px;
}

/* Панель-витрина (вместо фото — метрики и mesh-арт) */
.hero__visual {
  position: relative;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(
      70% 60% at 85% 10%,
      rgba(246, 184, 61, 0.12),
      transparent 55%
    ),
    radial-gradient(
      60% 60% at 10% 90%,
      rgba(110, 168, 255, 0.16),
      transparent 55%
    ),
    linear-gradient(160deg, rgba(19, 29, 51, 0.92), rgba(14, 22, 40, 0.7));
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.hero__metric {
  position: relative;
  margin-bottom: 24px;
}

.hero__metric:last-child {
  margin-bottom: 0;
}

.hero__metric strong {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.hero__metric span {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---- Stats ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat__num {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  text-wrap: nowrap;
  font-weight: 800;
  color: var(--text);
}

.stat__label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Широкая CTA-панель */
.banner {
  position: relative;
  margin-top: 24px;
  padding: clamp(28px, 5vw, 48px);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.banner h3 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  margin-bottom: 8px;
}

.banner p {
  color: var(--muted);
}

/* ---- Преимущества (Grid карточек) ---- */
.adv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.adv-card {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition:
    transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.adv-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: var(--shadow-1);
}

.adv-card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
}

.adv-card__icon svg {
  width: 24px;
  height: 24px;
}

.adv-card h3 {
  font-size: 1.12rem;
  margin-bottom: 8px;
}

.adv-card p {
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---- Тарифы ---- */
.tariff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: stretch;
}

.tariff-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition:
    transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.tariff-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-1);
}

/* Рекомендуемый тариф */
.tariff-card--featured {
  border-color: var(--accent);
  background: linear-gradient(170deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-2);
}

.tariff-card--featured:hover {
  transform: translateY(-6px) scale(1.01);
}

.tariff-card__badge {
  position: absolute;
  top: -12px;
  right: 22px;
}

.tariff-card__name {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.tariff-card__price {
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--accent);
}

.tariff-card__list {
  margin: 24px 0;
  flex: 1;
  display: grid;
  gap: 12px;
}

.tariff-card__btn {
  margin-top: 8px;
}

.tariff-card__list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-2);
  font-size: 0.95rem;
}

.tariff-grid__toggle {
  display: block;
  margin: 28px auto 0;
}

.check {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.check svg {
  width: 12px;
  height: 12px;
}

/* ---- Калькулятор ---- */
.calc {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  padding: clamp(22px, 4vw, 40px);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.calc__field h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text-2);
  font-weight: 700;
}

/* Сегментный выбор типа сайта */
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented label {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.segmented label:hover {
  color: var(--text);
}

.segmented input:checked + span,
.segmented label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Видимый фокус для скрытых radio (доступность) */
.segmented input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.check-list {
  display: grid;
  gap: 10px;
}

.check-list label {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
}

.check-list label:hover {
  border-color: var(--accent);
}

.check-list input {
  accent-color: var(--accent);
  min-width: 18px;
  min-height: 18px;
}

.calc__row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.calc__row label {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.92rem;
}

.calc__input {
  width: 90px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  transition: border-color var(--dur) var(--ease);
}

.calc__input:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.calc__input::-webkit-outer-spin-button,
.calc__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.calc__error {
  display: none;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--danger);
}

.calc__error.is-visible {
  display: block;
}

/* Результат (появляется при валидных данных) */
.calc__result {
  display: none;
  margin-top: 65px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.calc__result.is-visible {
  display: block;
  animation: fade-up 0.4s var(--ease);
}

.calc__price {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  color: var(--accent);
}

.calc__discount {
  margin-top: 4px;
  font-weight: 700;
  color: var(--gold);
}

.calc__note {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.calc__submit {
  margin-top: 20px;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Галерея (асимметричный Grid / Masonry) ---- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  grid-auto-flow: dense;
}

.work {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 260px;
  border: 1px solid var(--line);
  background: var(--surface);
}

/* Асимметрия на десктопе */
.work--tall {
  grid-row: span 2;
}

.work--wide {
  grid-column: span 3;
}

.work__link {
  position: absolute;
  inset: 0;
  display: block;
  color: inherit;
  z-index: 1;
}

.work__link--placeholder .work__media {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  font-size: 1.3rem;
  background: linear-gradient(150deg, var(--surface-2), var(--surface));
}

.work__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface);
  transition: transform 0.6s var(--ease);
}

.work:hover .work__media {
  transform: scale(1.05);
}

.work::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(8, 12, 22, 0.58) 0%,
    rgba(8, 12, 22, 0.2) 42%,
    rgba(8, 12, 22, 0) 70%
  );
  opacity: 1;
  transition: opacity var(--dur) var(--ease);
}

.work:hover::after {
  opacity: 0;
}

.work__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  opacity: 1;
  transition: opacity var(--dur) var(--ease);
}

.work__title {
  font-size: 1.05rem;
  font-weight: 800;
  transition: color var(--dur) var(--ease);
}

.work__desc {
  color: rgba(245, 248, 255, 0.92);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 4px;
  transition: color var(--dur) var(--ease);
}

.work__metric {
  margin-top: 12px;
  color: var(--gold);
  font-weight: 800;
  font-size: 0.9rem;
}

.work:hover .work__title,
.work:hover .work__desc,
.work:hover .work__metric {
  color: var(--gold);
}

/* ---- FAQ (аккордеон на <details>) ---- */
.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}

.faq details[open] {
  border-color: var(--accent);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform var(--dur) var(--ease);
  flex-shrink: 0;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq__a {
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 0.96rem;
}

/* ---- Контакты / финальный CTA ---- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact__headline {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  margin-bottom: 16px;
}

.contact__phone {
  display: inline-block;
  margin: 20px 0 8px;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--accent);
}

.contact__meta {
  color: var(--muted);
}

/* Карточка формы захвата */
.contact__form {
  padding: clamp(24px, 4vw, 36px);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.contact__form a {
  text-decoration: underline;
}

/* Мессенджеры */
.messengers {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.messengers a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  transition:
    transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.messengers a:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Форма ---- */
.field {
  margin-bottom: 14px;
}

.input,
.textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  transition:
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted);
}

.input:focus-visible,
.textarea:focus-visible {
  border-color: var(--accent);
  background: var(--surface);
  outline: none;
}

.textarea {
  resize: vertical;
  min-height: 96px;
}

.input--error {
  border-color: var(--danger);
}

.field__error {
  display: none;
  margin-top: 6px;
  font-size: 0.84rem;
  color: var(--danger);
}

.field__error.is-visible {
  display: block;
}

.fine {
  display: block;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.fine a {
  text-decoration: underline;
}

/* ---- Модальное окно ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 8, 15, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--dur) ease,
    visibility var(--dur) ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-dialog {
  position: relative;
  width: min(92vw, 520px);
  max-height: calc(100dvh - 40px);
  padding: 32px 28px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  transform: translateY(12px);
  transition: transform var(--dur) var(--ease);
  overflow-y: auto;
  scrollbar-width: none;
}

.modal-dialog::-webkit-scrollbar {
  display: none;
}

.modal-backdrop.is-open .modal-dialog {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
  border-color: var(--accent);
}

.modal-header h3 {
  font-size: clamp(1.2rem, 3.2vw, 1.5rem);
  margin: 8px 0 6px;
}

.modal-header p {
  color: var(--muted);
  font-size: clamp(0.9rem, 3.2vw, 1.1rem);
  margin-bottom: 18px;
}

.quiz-question {
  border: 0;
  margin-bottom: 18px;
}

.quiz-question legend {
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: 0.92rem;
  font-weight: 700;
}

.quiz-options {
  display: grid;
  gap: 8px;
}

.quiz-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text-2);
  cursor: pointer;
  transition:
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.quiz-options label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.quiz-options input {
  accent-color: var(--accent);
}

body.modal-open {
  overflow: hidden;
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--dur) ease,
    visibility var(--dur) ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 15, 0.85);
  cursor: zoom-out;
}

.lightbox__content {
  position: relative;
  z-index: 1;
  max-width: 92vw;
  max-height: 92vh;
}

.lightbox__image {
  display: block;
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(10, 15, 28, 0.7);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.lightbox__close:hover {
  background: var(--accent-btn);
}

body.lightbox-open {
  overflow: hidden;
}

/* ---- Cookie ---- */
.cookie-consent {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  font-size: 0.9rem;
  color: var(--text-2);
}

.cookie-consent a {
  color: var(--accent);
  text-decoration: underline;
}

.cookie-btn {
  margin-left: auto;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent-btn);
  color: #fff;
  font-weight: 700;
}

.cookie-btn:hover {
  background: var(--accent-btn-h);
}

/* ---- Тосты ---- */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1300;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-2);
  animation: fade-up 0.35s var(--ease);
}

.toast--success {
  background: var(--success);
  color: #0a0f1c;
}

.toast--error {
  background: var(--danger);
}

/* ---- Footer ---- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding-block: 40px;
  background: var(--bg-elev);
}

.footer__inner {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 1fr 1fr;
}

.footer__brand {
  font-weight: 800;
  font-size: 1.1rem;
}

.footer__note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px;
  max-width: 420px;
}

.footer__links {
  color: var(--muted);
  font-size: 0.9rem;
  display: grid;
  gap: 8px;
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__copy {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ==========================================================================
   5. UTILITIES
   ========================================================================== */
.u-hide {
  display: none !important;
}

/* ==========================================================================
   6. MOTION (reveal + reduced motion)
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   7. RESPONSIVE
   ========================================================================== */
@media (width <= 1179px) {
  .container {
    padding-inline: 28px;
  }

  .hero__sub {
    max-width: 800px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__cta {
    justify-content: flex-start;
  }

  .hero__visual {
    display: none;
  }
}

@media (width <= 959px) {
  .nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header__phone {
    display: none;
  }

  .hero__grid {
    grid-template-columns: 1fr;
  }

  .adv-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calc {
    grid-template-columns: 1fr;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .work--tall {
    grid-row: auto;
  }

  .work--wide {
    grid-column: auto;
  }

  .work:hover .work__overlay {
    opacity: 0;
  }

  .stats,
  .contact {
    grid-template-columns: 1fr 1fr;
  }
}

@media (width <= 639px) {
  .container {
    padding-inline: 20px;
  }

  .section {
    padding-block: clamp(64px, 9vw, 50px);
  }

  .mobile-hidden {
    display: none;
  }

  .stats,
  .adv-grid,
  .contact,
  .tariff-grid,
  .footer__inner {
    grid-template-columns: 1fr;
  }
}

@media (width <= 500px) {
  .section,
  .hero {
    padding-block: clamp(10px, 5vw, 50px);
  }

  .calc__result {
    margin-top: 20px;
  }

  .hero__cta .btn {
    width: 100%;
  }

  .hero__cta .btn.btn--ghost {
    display: none;
  }
}
