/* ═══════════════════════════════════════════════════════
   CREATIVE SMART DESIGN — светлая тема, Liquid Glass
   Бренд: красный из фирменного лого, полупрозрачное «жидкое» стекло
   ═══════════════════════════════════════════════════════ */

:root {
  --paper: #ffffff;        /* фон страницы */
  --off: #f7f6f4;          /* чередующиеся секции */
  --ink: #14151a;          /* текст */
  --muted: #6d7280;
  --brand: #d92e2a;        /* красный фирменного лого */
  --brand-dark: #b52320;
  --line: #e8e7e3;         /* тонкие линии */
  --amber: #f5a623;        /* звёзды отзывов */

  --font-display: 'Unbounded', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --container: 1200px;
  --radius: 14px;
  --shadow: 0 10px 32px rgba(20, 21, 26, .08);
  --header-h: 64px;
  --header-top: 12px;

  /* Liquid Glass */
  --glass-fill: linear-gradient(160deg, rgba(255, 255, 255, .78) 0%, rgba(255, 255, 255, .5) 100%);
  --glass-rim: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .15) 38%, rgba(255, 255, 255, .1) 62%, rgba(255, 255, 255, .8));
  --glass-shadow:
    0 1px 1px rgba(20, 21, 26, .04),
    0 12px 36px rgba(60, 30, 40, .09),
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 -1px 0 rgba(255, 255, 255, .35);
  --glass-blur: blur(22px) saturate(180%);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html.modal-open { overflow: hidden; }
section[id] { scroll-margin-top: calc(var(--header-top) + var(--header-h) + 8px); }
body {
  font-family: var(--font-body);
  background: #f5f3f4;
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ── Типографика ── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
  margin-bottom: 20px;
}
.section-sub {
  color: var(--muted);
  font-size: 17px;
  max-width: 640px;
  margin-bottom: 48px;
}
.lead { font-size: 17px; margin-bottom: 18px; }
.lead--muted { color: var(--muted); margin-bottom: 32px; }

.section { padding: 100px 0; }

/* ── Кнопки ── */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .03em;
  padding: 16px 32px;
  border-radius: 999px;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
  text-align: center;
}
.btn--primary {
  background: linear-gradient(180deg, #ec4a45 0%, var(--brand) 55%, #c4231f 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .45),
    inset 0 -3px 8px rgba(120, 10, 10, .22),
    0 8px 24px rgba(217, 46, 42, .3);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    inset 0 -3px 8px rgba(120, 10, 10, .22),
    0 14px 34px rgba(217, 46, 42, .4);
}
.btn--primary:disabled { opacity: .7; cursor: progress; transform: none; }
.btn--ghost {
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .9);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 6px 20px rgba(60, 30, 40, .08);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, .85);
  transform: translateY(-2px);
}
.btn--sm { padding: 11px 22px; font-size: 12px; }
.btn--full { width: 100%; }

/* ── Шапка ── */
.site-header {
  position: fixed;
  top: var(--header-top);
  left: 0;
  right: 0;
  z-index: 100;
  pointer-events: none;
}
/* Стекло — на псевдоэлементе: backdrop-filter на самой шапке
   сделал бы её контейнером для position: fixed у мобильного меню */
.header-inner {
  position: relative;
  isolation: isolate;
  pointer-events: auto;
  width: calc(100% - 24px);
  max-width: calc(var(--container) - 24px);
  height: var(--header-h);
  padding: 0 10px 0 18px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.header-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 22px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: background .3s ease, box-shadow .3s ease;
}
.site-header.scrolled .header-inner::before {
  background: rgba(255, 255, 255, .68);
  box-shadow: var(--glass-shadow), 0 16px 40px rgba(60, 30, 40, .1);
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { width: 38px; height: 38px; border-radius: 50%; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-main {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: .05em;
  color: var(--ink);
}
.logo-sub {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: .34em;
  color: var(--muted);
}

.nav { margin-left: auto; }
.nav-list { display: flex; gap: 26px; }
.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav-link:hover {
  color: var(--ink);
  border-bottom-color: var(--brand);
}
.nav-extra { display: none; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.lang-switch {
  display: flex;
  padding: 3px;
  background: rgba(20, 21, 26, .05);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(20, 21, 26, .06);
}
.lang-switch button {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--muted);
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
.lang-switch button.active {
  background: rgba(255, 255, 255, .95);
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(20, 21, 26, .12), inset 0 1px 0 #fff;
}
.header-phone {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.header-phone:hover { color: var(--brand); }

.burger {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.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); }

/* ── Hero ── */
.hero {
  padding: calc(var(--header-top) + var(--header-h) + 64px) 0 90px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 72px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.14;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-title span { display: block; }
.hero-accent { color: var(--brand); }
.hero-city { font-size: .6em; font-weight: 700; color: var(--muted); }
.hero-sub {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 34px;
  max-width: 480px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* Коллаж из реальных работ */
.hero-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.collage-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 20px;
  border: 4px solid rgba(255, 255, 255, .7);
  box-shadow: var(--glass-shadow);
}
.collage-img--a { transform: translateY(18px); }
.collage-img--c { transform: translateY(18px); }

/* Статистика — строгая табличка */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 26px 28px;
  border-left: 1px solid rgba(20, 21, 26, .07);
}
.stat:first-child { border-left: none; }
.stat-num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 34px;
  color: var(--brand);
  line-height: 1.2;
}
.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 64px;
  align-items: center;
}
.about-photo {
  width: 100%;
  border-radius: 24px;
  border: 5px solid rgba(255, 255, 255, .7);
  box-shadow: var(--glass-shadow);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ── Услуги ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.service-card {
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.service-card:hover { transform: translateY(-4px); }
.service-card--wide { grid-column: span 2; }
.service-card--wide .service-photo { height: 220px; }
.service-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px) saturate(170%);
  -webkit-backdrop-filter: blur(10px) saturate(170%);
}
/* Кнопка «Заказать» растянута на всю карточку — кликабельна вся карточка */
.service-order {
  margin: auto 18px 16px;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s ease;
}
.service-order::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
}
.service-order:focus-visible { outline: none; }
.service-card:has(.service-order:focus-visible) { outline: 2px solid var(--brand); outline-offset: 3px; }
.service-card:hover .service-order { color: var(--brand); }
.service-photo {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-bottom: 3px solid transparent;
  transition: border-color .3s ease;
}
.service-card:hover .service-photo { border-bottom-color: var(--brand); }
.service-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  padding: 16px 18px 10px;
}
/* ── Процесс ── */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 48px;
}
.step-card { padding: 28px 26px; }
.step-num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 44px;
  line-height: 1;
  color: var(--brand);
  margin-bottom: 18px;
}
.step-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 10px;
}
.step-desc { font-size: 14px; color: var(--muted); }

/* ── Портфолио ── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.work-card { transition: transform .3s ease, box-shadow .3s ease; }
.work-card:hover { transform: translateY(-4px); }
.work-photo {
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: transform .4s ease;
}
.work-card:hover .work-photo { transform: scale(1.04); }
.work-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 13px 16px;
  position: relative;
}
.work-card:hover .work-tag { color: var(--brand); }

/* ── Партнёры ── */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.partners-grid img {
  width: 100%;
  height: 96px;
  object-fit: contain;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: var(--glass-shadow);
  border-radius: 20px;
  padding: 20px 28px;
  filter: grayscale(1);
  opacity: .75;
  transition: filter .3s ease, opacity .3s ease, transform .3s ease;
}
.partners-grid img:hover {
  filter: none;
  opacity: 1;
  transform: translateY(-3px);
}

/* ── Преимущества ── */
.adv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 48px;
}
.adv-card { padding: 26px 24px; }
.adv-card .adv-title::before {
  content: "";
  display: block;
  width: 28px;
  height: 4px;
  border-radius: 4px;
  background: var(--brand);
  margin-bottom: 16px;
}
.adv-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 12px;
}
.adv-desc { font-size: 14px; color: var(--muted); }

/* ── Отзывы ── */
.slider {
  max-width: 760px;
  margin: 48px auto 0;
  overflow: hidden;
}
.slider-track {
  display: flex;
  transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}
.slider { padding: 6px; }
.review-card {
  flex: 0 0 100%;
  padding: 40px 44px;
  text-align: center;
}
.review-stars {
  color: var(--amber);
  font-size: 18px;
  letter-spacing: .3em;
  margin-bottom: 20px;
}
.review-text {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 22px;
}
.review-author {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
}
.slider-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 26px;
}
.slider-btn {
  width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: rgba(255, 255, 255, .6);
  box-shadow: var(--glass-shadow);
  color: var(--muted);
  font-size: 17px;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.slider-btn:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}
.slider-dots { display: flex; gap: 10px; }
.slider-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(20, 21, 26, .15);
  transition: background .2s ease, transform .2s ease;
}
.slider-dots button.active {
  background: var(--brand);
  transform: scale(1.25);
}

/* ── Контакты ── */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: start;
}
.contact-list { margin-top: 40px; display: grid; gap: 26px; }
.contact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.contact-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
}
a.contact-value:hover { color: var(--brand); }

.contact-form {
  padding: 36px;
  display: grid;
  gap: 20px;
}
.contact-form[hidden] { display: none; }
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.form-field input[type="text"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
  width: 100%;
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(20, 21, 26, .09);
  box-shadow: inset 0 1px 2px rgba(20, 21, 26, .05);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  resize: vertical;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  background: var(--paper);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(217, 46, 42, .12);
}
.form-field.error input,
.form-field.error textarea { border-color: var(--brand); background: #fdf1f1; }
.field-error {
  display: none;
  font-size: 12px;
  color: var(--brand);
  margin-top: 6px;
}
.form-field.error .field-error { display: block; }
.form-status {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  text-align: center;
}
.form-status[hidden] { display: none; }
.form-field--check .check-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  cursor: pointer;
}
.form-field--check input { margin-top: 3px; accent-color: var(--brand); }

.form-success {
  padding: 56px 36px;
  text-align: center;
  animation: success-in .5s ease both;
}
@keyframes success-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.success-icon {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  background: var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(217, 46, 42, .35);
}
.form-success h3 {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 8px;
}
.form-success p { color: var(--muted); }

/* ── Футер ── */
.site-footer {
  background: linear-gradient(180deg, #1b1c22, var(--ink));
  border-radius: 32px 32px 0 0;
  color: #d6d7dc;
  padding: 56px 0 0;
}
.logo--footer .logo-main { color: #fff; }
.logo--footer .logo-sub { color: #8b8e99; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}
.footer-note { color: #8b8e99; font-size: 14px; margin-top: 14px; max-width: 300px; }
.footer-nav { display: grid; gap: 10px; align-content: start; }
.footer-nav a, .footer-contacts a, .footer-contacts span {
  font-size: 14px;
  color: #8b8e99;
}
.footer-nav a:hover, .footer-contacts a:hover { color: #fff; }
.footer-contacts { display: grid; gap: 10px; align-content: start; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  padding-bottom: 22px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 13px;
  color: #8b8e99;
}

/* ═══════════════ Liquid Glass ═══════════════ */

/* Цветной «жидкий» фон под стеклом. Статичный и фиксированный:
   никакой анимации — чтобы backdrop-filter не перерисовывался каждый кадр */
.liquid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42vmax 42vmax at 6% 8%, rgba(217, 46, 42, .20), transparent 62%),
    radial-gradient(36vmax 36vmax at 96% 14%, rgba(255, 168, 112, .30), transparent 62%),
    radial-gradient(44vmax 44vmax at 82% 96%, rgba(132, 146, 255, .20), transparent 62%),
    radial-gradient(38vmax 38vmax at 10% 92%, rgba(255, 112, 158, .16), transparent 62%),
    radial-gradient(30vmax 30vmax at 50% 50%, rgba(255, 255, 255, .6), transparent 70%),
    #f5f3f4;
}

/* Стеклянная поверхность: полупрозрачная заливка + световой ободок + блик.
   Размытие фона (backdrop-filter) включаем только там, где под стеклом
   есть резкий контент (шапка, меню, модалка) — карточки лежат на мягком
   градиенте, им хватает прозрачности, а страница не тормозит на телефонах */
.glass {
  position: relative;
  background: var(--glass-fill);
  border-radius: 22px;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, -20%), rgba(255, 255, 255, .5), transparent 65%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.glass:hover::after { opacity: 1; }
.glass:hover { box-shadow: var(--glass-shadow), 0 18px 44px rgba(60, 30, 40, .12); }

/* select в стиле полей */
.form-field select {
  appearance: none;
  -webkit-appearance: none;
  padding: 14px 44px 14px 16px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236d7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}

/* ═══════════════ Модалка заявки ═══════════════ */
.lead-dialog {
  margin: auto;
  width: min(460px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
  color: var(--ink);
}
.lead-dialog::backdrop {
  background: rgba(30, 18, 22, .28);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
}
.lead-dialog[open] { animation: lead-in .32s cubic-bezier(.2, .9, .3, 1.15) both; }
.lead-dialog[open]::backdrop { animation: fade-in .25s ease both; }
.lead-dialog.closing { animation: lead-out .18s ease both; }
.lead-dialog.closing::backdrop { animation: fade-in .18s ease reverse both; }
@keyframes lead-in {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
@keyframes lead-out {
  to { opacity: 0; transform: translateY(10px) scale(.97); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.lead-panel {
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 34px 32px 28px;
  border-radius: 30px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .7));
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), 0 30px 80px rgba(40, 10, 20, .25);
}
.lead-panel::after { display: none; }
.lead-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  background: rgba(20, 21, 26, .06);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.lead-close:hover { background: rgba(20, 21, 26, .12); color: var(--ink); transform: rotate(90deg); }
.lead-form { display: grid; gap: 16px; position: relative; z-index: 3; }
.lead-form[hidden], .lead-success[hidden] { display: none; }
.lead-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  padding-right: 40px;
}
.lead-sub { color: var(--muted); font-size: 15px; margin: -8px 0 4px; }
.lead-form .form-field label { margin-bottom: 6px; }
.label-opt { text-transform: none; letter-spacing: 0; font-weight: 500; opacity: .8; }
.lead-form textarea { resize: none; }
.lead-consent { font-size: 12px; color: var(--muted); text-align: center; margin-top: -4px; }
.lead-form .form-status { margin-top: 0; }
.lead-success { text-align: center; padding: 24px 0 8px; position: relative; z-index: 3; }
.lead-success h3 { font-family: var(--font-display); font-size: 20px; margin-bottom: 8px; }
.lead-success p { color: var(--muted); margin-bottom: 24px; }

/* ── Reveal-анимации (только при включённом JS: класс .js ставит main.js) ── */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Адаптив ── */
@media (max-width: 1024px) {
  .services-grid, .process-grid, .adv-grid, .portfolio-grid, .partners-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid rgba(20, 21, 26, .07); }
  .hero-inner, .about-grid, .contacts-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-collage { max-width: 560px; }
  .header-phone { display: none; }
}

@media (max-width: 768px) {
  .section { padding: 68px 0; }
  .header-cta { display: none; }
  .burger { display: flex; }

  /* .nav уходит в off-canvas (position: fixed), поэтому его margin-left:auto
     больше не раздвигает шапку — прижимаем действия к правому краю сами */
  .header-actions { margin-left: auto; }

  /* Hero: убираем лишнюю пустоту сверху и поджимаем вертикальный ритм */
  .hero { padding: calc(var(--header-top) + var(--header-h) + 26px) 0 56px; }
  .hero-inner { margin-bottom: 40px; }
  .hero-sub { font-size: 17px; margin-bottom: 26px; }

  .nav {
    position: fixed;
    top: calc(var(--header-top) + var(--header-h) + 8px);
    right: 12px;
    width: min(320px, calc(100% - 24px));
    max-height: calc(100dvh - var(--header-top) - var(--header-h) - 20px);
    background: rgba(255, 255, 255, .72);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 24px;
    box-shadow: var(--glass-shadow), 0 24px 60px rgba(40, 10, 20, .16);
    padding: 28px 26px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(.97);
    transform-origin: top right;
    transition: opacity .25s ease, transform .3s cubic-bezier(.2, .9, .3, 1.15), visibility .3s;
    overflow-y: auto;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav-list { flex-direction: column; gap: 20px; }
  .nav-link { font-size: 17px; }
  .nav-extra {
    display: grid;
    gap: 18px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(20, 21, 26, .08);
  }
  .nav-phone {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
  }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 520px) {
  .container { padding: 0 18px; }
  /* Hero на смартфоне: меньше воздуха сверху, аккуратный надзаголовок */
  .hero { padding: calc(var(--header-top) + var(--header-h) + 18px) 0 48px; }
  .hero .eyebrow { letter-spacing: .12em; font-size: 12px; margin-bottom: 14px; }
  /* Unbounded широкий: уменьшаем и разрешаем переносы длинных слов */
  .hero-title {
    font-size: clamp(20px, 6.4vw, 30px);
    line-height: 1.1;
    margin-bottom: 18px;
    hyphens: auto;
    overflow-wrap: break-word;
  }
  .hero-sub { font-size: 16px; margin-bottom: 24px; }
  .hero-cta { gap: 12px; }
  .hero-cta .btn { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 18px 16px; }
  .stat-num { font-size: 26px; }
  .services-grid, .process-grid, .adv-grid, .portfolio-grid { grid-template-columns: 1fr; }
  .partners-grid { grid-template-columns: repeat(2, 1fr); }
  .collage-img { height: 130px; }
  .review-card { padding: 28px 22px; }
  .contact-form { padding: 24px 18px; }
  .service-card--wide { grid-column: auto; }
  .service-card--wide .service-photo { height: 180px; }
  .lead-panel { padding: 28px 20px 22px; border-radius: 26px; }
  .lead-title { font-size: 19px; }
  /* 16px — чтобы iOS не зумил страницу при фокусе на поле */
  .form-field input, .form-field select, .form-field textarea { font-size: 16px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
