/* Дизайн «Галерея / журнал»: монохром, тонкие линии, крупная лёгкая типографика. */

:root {
  --ink: #111111;
  --ink-soft: #444444;
  --muted: #555555;
  --line: #d4d4d4;
  --bg: #ffffff;
  --ph-1: #ececec;
  --ph-2: #dcdcdc;
  --pad: 40px;
  --font: "Inter Tight", -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Скрытое должно оставаться скрытым, даже если у элемента свой display. */
[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--muted); }
img { display: block; max-width: 100%; }

.wrap { padding-inline: var(--pad); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
}

.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--ink);
}

.logo { display: flex; flex-direction: column; line-height: 1.15; }
.logo-top {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.logo-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

.nav-links { display: flex; gap: 32px; font-size: 14px; }
.nav-links a[aria-current="page"] { border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

.nav-cta {
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
  padding: 6px 0;
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink);
}
.burger svg { width: 24px; height: 24px; }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 16px var(--pad) 32px;
  border-bottom: 1px solid var(--ink);
  background: var(--bg);
}
.mobile-menu a {
  padding: 14px 0;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.03em;
  border-bottom: 1px solid var(--line);
}
.mobile-menu.is-open { display: flex; }

/* ---------- Типографика ---------- */

.display {
  margin: 0;
  font-size: clamp(52px, 9vw, 140px);
  line-height: 0.95;
  font-weight: 300;
  letter-spacing: -0.05em;
}

.h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.1;
  font-weight: 300;
  letter-spacing: -0.035em;
}

.h3 { margin: 12px 0 8px; font-size: 20px; font-weight: 500; }

.lead { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-soft); }
.text { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.small { font-size: 14px; color: var(--muted); }

/* ---------- Первый экран ---------- */

.hero { padding-top: 80px; }

.hero-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}
.hero-head .display { flex: 1 1 700px; }
.hero-head .lead { flex: 0 1 340px; }

.hero-hook {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}
.hook {
  margin: 0;
  flex: 1 1 560px;
  max-width: 760px;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.25;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }

/* Первый раздел сразу после первого экрана — ближе, чтобы проекты были видны сразу. */
.section--first { padding-top: 96px; }

.hero-media {
  margin-top: 64px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
}
.hero-media .ph { height: clamp(320px, 45vw, 640px); }

/* ---------- Заглушки под фото ---------- */

.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--ph-1);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.ph--alt { background: var(--ph-2); }

/* Фото на месте заглушки: та же высота, кадр заполняет блок без искажений. */
img.ph {
  display: block;
  width: 100%;
  padding: 0;
  object-fit: cover;
}

/* ---------- Разделы с номером слева ---------- */

.section { padding-top: 140px; }
.section:last-of-type { padding-bottom: 80px; }

.section-row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  border-top: 1px solid var(--ink);
  padding-top: 24px;
}
.section-label { flex: 0 0 240px; font-size: 14px; color: var(--muted); }
.section-body { flex: 1 1 600px; min-width: 0; }

.section-more { flex: 1 1 600px; text-align: right; font-size: 14px; font-weight: 500; }

/* ---------- Список-каталог ---------- */

.rows a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.rows .big {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.rows .meta { font-size: 15px; color: var(--muted); white-space: nowrap; }

/* ---------- Сетки ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 40px 16px;
}
.cards .ph { height: 420px; }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.card-caption { margin: 14px 0 0; font-size: 15px; }
.card-caption strong { font-weight: 500; }
.card-caption span { color: var(--muted); }

.duo { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.duo > :first-child { flex: 3 1 560px; min-width: 0; }
.duo > :first-child .ph { height: clamp(360px, 50vw, 720px); }
.duo > :last-child { flex: 2 1 380px; min-width: 0; margin-top: 160px; }
.duo > :last-child .ph { height: clamp(320px, 36vw, 520px); }

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-end;
}
.split .h2 { flex: 1 1 480px; }

/* ---------- Плитки проектов (Layout Grid) ---------- */
/* По клику проект плавно вырастает из своей плитки в крупное окно с описанием. */

.lg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: clamp(220px, 24vw, 340px);
  gap: 16px;
}
.lg-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--ph-1);
  cursor: zoom-in;
  text-align: left;
  font: inherit;
  color: #fff;
}
.lg-card--wide { grid-column: span 2; }
.lg-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.lg-card:hover img { transform: scale(1.04); }
.lg-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0) 45%);
}
.lg-name {
  position: absolute;
  z-index: 1;
  left: 20px;
  bottom: 16px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.lg-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.35s;
}
.lg-overlay.is-open { opacity: 1; }
.lg-panel {
  position: fixed;
  z-index: 61;
  overflow: hidden;
  background: #111;
  color: #fff;
  transition: top 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), left 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lg-panel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lg-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0) 50%);
}
.lg-info {
  position: absolute;
  z-index: 1;
  left: 40px;
  right: 40px;
  bottom: 36px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s, transform 0.35s;
}
.lg-panel.is-open .lg-info { opacity: 1; transform: none; transition-delay: 0.3s; }
.lg-info h2 { margin: 0; font-size: clamp(32px, 5vw, 72px); font-weight: 300; letter-spacing: -0.045em; line-height: 1; }
.lg-info p { margin: 12px 0 0; max-width: 520px; font-size: 17px; color: rgba(255, 255, 255, 0.85); }
.lg-info a { color: #fff; border-bottom: 1px solid #fff; padding-bottom: 4px; white-space: nowrap; }
.lg-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lg-close svg { width: 20px; height: 20px; }

@media (max-width: 760px) {
  .lg { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .lg-card--wide { grid-column: auto; }
  .lg-info { left: 20px; right: 20px; bottom: 20px; }
}

/* ---------- Страница проекта: обложка, сетка фото, просмотр ---------- */

.project-cover { margin-top: 64px; }
.project-cover img {
  width: 100%;
  height: clamp(320px, 52vw, 760px);
  object-fit: cover;
  background: var(--ph-1);
}

/* Сетка «кирпичиками»: фото сохраняют свои пропорции, колонки идут без пустот. */
.gallery { columns: 2; column-gap: 16px; }
.gallery-item {
  display: block;
  margin-bottom: 16px;
  break-inside: avoid;
  overflow: hidden;
  background: var(--ph-1);
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%;
  height: auto;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.4s;
}
.gallery-item:hover img { transform: scale(1.03); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 88px;
  background: rgba(255, 255, 255, 0.97);
  opacity: 0;
  transition: opacity 0.35s;
}
.lightbox.is-open { opacity: 1; }
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform: scale(0.97);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s;
}
.lightbox.is-open .lightbox-img { transform: none; }
.lightbox-img.is-switching { opacity: 0; }
.lightbox-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-btn:hover { color: var(--muted); }
.lightbox-btn svg { width: 28px; height: 28px; }
.lightbox-close { top: 16px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-count {
  position: absolute;
  left: 32px;
  bottom: 24px;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .gallery { columns: 1; }
  .lightbox { padding: 64px 12px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 8px; transform: none; }
  .lightbox-prev { left: auto; right: 72px; }
  .lightbox-next { right: 16px; }
  .lightbox-count { left: 20px; bottom: 22px; }
}

/* ---------- Вопрос-ответ ---------- */
/* Нативные <details>: работают без скрипта; там, где браузер умеет, ответ раскрывается плавно. */

.faq { border-top: 1px solid var(--line); interpolate-size: allow-keywords; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  display: block;
  padding: 28px 56px 28px 0;
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 400;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--muted); }
/* Плюс из двух линий; при открытии поворачивается в крестик. */
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::before { transform: rotate(45deg); }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details::details-content {
  height: 0;
  overflow: hidden;
  transition: height 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), content-visibility 0.45s allow-discrete;
}
.faq details[open]::details-content { height: auto; }
.faq details p {
  margin: 0;
  padding: 0 56px 28px 0;
  max-width: 720px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- Заголовок страницы: мысль слева, кнопка справа ---------- */

.head-split {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 40px;
}
.head-split .lead { max-width: 560px; margin: 0; }

/* ---------- Шаги «Как мы работаем» ---------- */
/* Линия слева закрашивается при прокрутке (--tl от 0 до 1 ставит timeline.js),
   название шага «прилипает», пока читаешь его текст. */

.tl { list-style: none; margin: 0; padding: 0 0 0 48px; position: relative; }
.tl::before,
.tl::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  width: 1px;
}
.tl::before { bottom: 0; background: var(--line); }
.tl::after { height: calc(var(--tl, 0) * 100%); width: 2px; left: 5.5px; background: var(--ink); }
.tl-step {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 24px 64px;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.tl-step::before {
  content: "";
  position: absolute;
  left: -48px;
  top: 66px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--ink);
  transition: background 0.4s;
}
.tl-step.is-passed::before { background: var(--ink); }
.tl-head { position: sticky; top: 110px; align-self: start; }
.tl-num { font-size: 14px; color: var(--muted); }
.tl-title {
  margin: 10px 0 0;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.tl-text { margin: 0; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--ink-soft); }
.tl-get {
  margin: 28px 0 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.45;
}
.tl-get .cell-label { display: block; margin-bottom: 6px; }
.js .tl-step .tl-body,
.js .tl-step .tl-head {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .tl-step .tl-body { transition-delay: 0.12s; }
.js .tl-step.is-in .tl-body,
.js .tl-step.is-in .tl-head { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .tl { padding-left: 32px; }
  .tl-step { grid-template-columns: 1fr; padding: 40px 0; }
  .tl-step::before { left: -32px; top: 46px; }
  .tl-head { position: static; }
}

/* ---------- Отзывы: скриншоты в рамках «кирпичиками» ---------- */

.reviews { columns: 3; column-gap: 24px; }
.review { display: block; margin-bottom: 24px; break-inside: avoid; }
.review-shot { display: flex; margin: 12px; overflow: hidden; }
.review-shot img { width: 100%; height: auto; display: block; }
.review-block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.review-block .cell { border-bottom: 0; }
.review-block .cell + .cell { border-left: 1px solid var(--line); }

@media (max-width: 1080px) { .reviews { columns: 2; } }
@media (max-width: 640px) { .reviews { columns: 1; } }

/* ---------- Лист проекта (страница «Проекты») ---------- */
/* Как лист из альбома чертежей: тонкая рамка, фото внутри с полями, снизу штамп. */

.sheet { border: 1px solid var(--ink); background: var(--bg); }
.sheet-media {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  height: clamp(360px, 46vw, 660px);
  padding: 12px;
}
.sheet-img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  background: var(--ph-1);
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s;
}
.sheet-img--main { grid-row: span 2; }
.sheet-media { overflow: hidden; }
.sheet-media:hover .sheet-img { filter: brightness(0.96); }

.sheet-block {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 0.7fr) minmax(0, 0.9fr);
  border-top: 1px solid var(--ink);
}
.cell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 16px 20px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cell:first-child { border-left: 0; }
.cell-label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.cell-value { font-size: 17px; }
.cell-name { margin: 0; font-size: clamp(28px, 3vw, 44px); font-weight: 300; letter-spacing: -0.035em; line-height: 1; }
.cell--wide { grid-column: span 4; border-left: 0; border-bottom: 0; }
.cell--cta {
  justify-content: center;
  border-bottom: 0;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 500;
  transition: background 0.3s;
}
.cell--cta:hover { background: #333; color: var(--bg); }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; line-height: 1.2; }

/* Страница проекта: обложка, галерея и следующий проект — тоже листы. */
.project-sheet { margin-top: 64px; }
.sheet-media--cover { display: block; height: clamp(360px, 52vw, 760px); }
.sheet-gallery { padding: 12px; column-gap: 12px; }
.sheet-gallery .gallery-item { margin-bottom: 12px; }
.sheet-block--row { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 0.9fr); }
.sheet-block--row .cell { border-bottom: 0; }

.sheet--next { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.sheet--next .sheet-media { display: block; height: auto; min-height: 340px; }
.sheet--next .sheet-block {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-content: stretch;
  border-top: 0;
  border-left: 1px solid var(--ink);
}
.sheet--next .cell--title { grid-column: span 2; }
.sheet--next .cell:nth-child(2) { border-left: 0; }
.sheet--next .cell--wide { grid-column: span 2; border-bottom: 1px solid var(--line); }
.sheet--next .cell--cta { grid-column: span 2; border-left: 0; padding: 18px 20px; }

/* Компактные листы: бары, кафе, кухни. */
.sheets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.sheets--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sheet--small { display: flex; flex-direction: column; }
.sheet--small .sheet-media { display: block; height: clamp(240px, 24vw, 340px); }
.sheet--small .sheet-block { flex: 1; grid-template-columns: minmax(0, 1fr) auto; }
.sheet--small .cell--wide { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
.sheet--small .cell--cta { grid-column: 1 / -1; padding: 14px 20px; }
.sheet--small .cell-name { font-size: 26px; }

@media (max-width: 900px) {
  .sheet-media { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 2fr 1fr; height: clamp(360px, 90vw, 560px); }
  .sheet-img--main { grid-row: auto; grid-column: span 2; }
  .sheet-block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell--title { grid-column: span 2; }
  .cell:nth-child(even) { border-left: 0; }
  .cell--wide { grid-column: span 2; border-bottom: 1px solid var(--line); }
  .cell--cta { grid-column: span 2; padding: 18px 20px; border-left: 0; }
  .sheets, .sheets--3 { grid-template-columns: 1fr; }
  .sheet-media--cover { height: clamp(260px, 70vw, 480px); }
  .sheet-block--row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-block--row .cell { border-bottom: 1px solid var(--line); }
  .sheet-block--row .cell:last-child { border-bottom: 0; }
  .sheet--next { grid-template-columns: 1fr; }
  .sheet--next .sheet-media { min-height: 0; height: clamp(220px, 60vw, 360px); }
  .sheet--next .sheet-block { border-left: 0; border-top: 1px solid var(--ink); }
}

/* ---------- Инфографика (страница «Дизайнерам») ---------- */

.stats {
  margin: 72px 0 0;
  display: grid;
  /* Столько колонок, сколько цифр: строка делится поровну без пустого места. */
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  border-top: 1px solid var(--ink);
}
.stat { padding: 24px 24px 0 0; }
.stat-num {
  font-size: clamp(64px, 8vw, 120px);
  font-weight: 300;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat dd { margin: 12px 0 0; max-width: 220px; font-size: 15px; line-height: 1.45; color: var(--ink-soft); }

/* Путь клиента: четыре шага в ряд, на телефоне — столбиком. */
.flow {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.flow-step {
  position: relative;
  min-height: 170px;
  padding: 24px;
  background: #f2f2f2;
  font-size: 17px;
  line-height: 1.4;
}
.flow-step--dark { background: var(--ink); color: var(--bg); }
.flow-num { display: block; margin-bottom: 40px; font-size: 14px; color: var(--muted); }
.flow-step--dark .flow-num { color: #aaa; }
/* Стрелка между шагами. */
.flow-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  z-index: 1;
  right: -20px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 26px;
  text-align: center;
}

.checks {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
}
.checks li {
  position: relative;
  padding: 18px 0 18px 40px;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.4;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink) 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.5'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* position: relative — чтобы скрытые подписи меток не выходили за рамку прокрутки. */
.table-wrap { position: relative; margin-top: 56px; overflow-x: auto; }
.resp { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 17px; }
.resp caption { text-align: left; padding-bottom: 16px; font-size: 20px; font-weight: 500; }
.resp th, .resp td { padding: 18px 0; border-bottom: 1px solid var(--line); text-align: left; }
.resp thead th { font-size: 14px; font-weight: 400; color: var(--muted); border-bottom-color: var(--ink); }
.resp tbody th { font-weight: 400; padding-right: 24px; }
.resp td, .resp thead th:not(:first-child) { width: 140px; text-align: center; }
.mark {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--line);
  vertical-align: middle;
}
.mark--main { background: var(--ink); border-color: var(--ink); }
.mark--help { border-color: var(--ink); background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
.legend { display: flex; gap: 28px; flex-wrap: wrap; margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.legend .mark { margin-right: 8px; }

/* Этапы на одной линии; что дизайнер получает на каждом. */
.timeline {
  list-style: none;
  margin: 64px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}
.timeline li { position: relative; padding: 32px 20px 0 0; }
.timeline li::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ink);
}
.timeline strong { display: block; font-size: 18px; font-weight: 500; }
.timeline span { display: block; margin-top: 8px; font-size: 15px; line-height: 1.45; color: var(--ink-soft); }

.send { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.send li {
  display: flex;
  align-items: baseline;
  gap: 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 300;
  letter-spacing: -0.02em;
}
.send-num { flex: none; width: 32px; font-size: 14px; letter-spacing: 0; color: var(--muted); }

@media (max-width: 900px) {
  .resp { min-width: 0; font-size: 15px; }
  .resp td, .resp thead th:not(:first-child) { width: 84px; }
  .flow { grid-template-columns: 1fr; }
  .flow-step { min-height: 0; }
  .flow-num { margin-bottom: 16px; }
  .flow-step:not(:last-child)::after { content: "↓"; right: auto; left: 24px; top: auto; bottom: -20px; margin-top: 0; }
  .checks { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--ink); margin-left: 6px; }
  .timeline li { padding: 0 0 28px 28px; }
  .timeline li::before { top: 4px; left: -7px; }
}

/* ---------- Появление блоков снизу при прокрутке ---------- */
/* Только когда работает скрипт (класс js на <html>): без него всё видно сразу. */

.js .reveal {
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 1s cubic-bezier(0.2, 0.7, 0.2, 1), transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.is-in { opacity: 1; transform: none; }
/* Пункты внутри блока — по очереди, с небольшой задержкой (--i — номер пункта). */
.js .reveal [style*="--i"] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(0.3s + var(--i) * 0.08s);
}
.js .reveal.is-in [style*="--i"] { opacity: 1; transform: none; }

.js .reveal-item {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}
.js .reveal-item.is-in { opacity: 1; transform: none; }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-block;
  font-size: 16px;
  font-weight: 500;
  border: 1px solid var(--ink);
  padding: 16px 28px;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: var(--bg); color: var(--ink); }

.link-line { border-bottom: 1px solid var(--ink); padding-bottom: 4px; font-weight: 500; }

/* ---------- Контакты ---------- */

.contact-big {
  display: block;
  font-size: clamp(36px, 6vw, 96px);
  font-weight: 300;
  letter-spacing: -0.045em;
  line-height: 1.05;
}
.contact-mid {
  display: block;
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 300;
  letter-spacing: -0.04em;
  color: var(--muted);
}
.contact-links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  align-items: baseline;
  margin-top: 48px;
  font-size: 16px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 64px;
}
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { margin: 8px 0 0; font-size: 18px; }

/* ---------- Подвал ---------- */

/* Снизу запас под кнопку «Написать», чтобы в конце страницы она не закрывала подвал. */
.footer { margin-top: 40px; padding-bottom: 104px; font-size: 13px; color: var(--muted); }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px 40px;
  padding: 32px 0;
  border-top: 1px solid var(--ink);
}
.footer-phone {
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; }
.footer-links a { color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.footer-links a:hover { border-color: var(--ink); color: var(--ink); }
.footer-row {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Кнопка «Написать» в углу экрана ---------- */

.fab { position: fixed; right: 24px; bottom: 24px; z-index: 40; }
.fab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.3s;
}
.fab-btn::-webkit-details-marker { display: none; }
.fab-btn:hover { background: #333; transform: translateY(-2px); }
.fab-btn svg { width: 20px; height: 20px; }
.fab[open] .fab-btn { background: #333; }
.fab-menu {
  position: absolute;
  right: 0;
  bottom: 64px;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--ink);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  animation: fab-in 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.fab-menu a { padding: 15px 20px; font-size: 16px; border-bottom: 1px solid var(--line); }
.fab-menu a:last-child { border-bottom: 0; }
.fab-menu a:hover { background: #f2f2f2; color: var(--ink); }
@keyframes fab-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .fab { right: 16px; bottom: 16px; }
  .fab-btn { height: 48px; padding: 0 18px 0 16px; }
}

/* ---------- Внутренние страницы ---------- */

.page-head { padding-top: 80px; }
.page-head .lead { max-width: 560px; margin-top: 32px; }

/* ---------- Телефон ---------- */

@media (max-width: 1080px) {
  .nav-links,
  .nav-cta { display: none; }
  .burger { display: inline-flex; align-items: center; justify-content: center; }
}

@media (max-width: 900px) {
  :root { --pad: 20px; }
  .hero { padding-top: 48px; }
  .hero-media { grid-template-columns: 1fr; margin-top: 40px; }
  .section { padding-top: 88px; }
  .section-row { gap: 16px; }
  .section-label { flex-basis: 100%; }
  .section-more { text-align: left; }
  .duo > :last-child { margin-top: 0; }
  .rows a { flex-direction: column; gap: 4px; padding: 20px 0; }
  .cards .ph { height: 300px; }
}
