/* Пропорции перенесены с референсов (hero/каталог — макет 1672×941, услуги — 1536×1024). Мобильная версия в потоке, десктоп от 1024px. */
:root {
  --night: #0c0c0d;
  --night-card: #0b0b0c;
  --bone: #e9e5dd;
  --ash: #a19c94;
  --ash-dim: #8f8a83;
  --line-dark: rgba(233, 229, 221, 0.28);

  --paper: #e7e5e0;
  --ink: #161616;
  --ink-soft: #2b2b2b;
  --stone: #64615c;
  --stone-dim: #85827c;
  --line-light: rgba(22, 22, 22, 0.2);

  --error-dark: #ff9b9b;

  --f-flex: "Roboto Flex", "Roboto", "Arial Narrow", Arial, sans-serif;
  --f-mono: "Roboto Mono", ui-monospace, Consolas, monospace;

  --pad: 16px;
  --bar-h: 68px;

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font: 400 15px/1.5 var(--f-flex);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.dash {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  vertical-align: middle;
}

.arrow {
  display: inline-block;
  width: 34px;
  height: 8px;
  vertical-align: middle;
  flex: none;
}

/* ---------- Верхняя строка: одна на всю страницу, закреплена ---------- */

.bar {
  --bar-fg: var(--bone);
  --bar-nav: #d5d0c8;
  --bar-bg: var(--night);
  --bar-line: var(--line-dark);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  height: var(--bar-h);
  padding-left: max(var(--pad), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad), env(safe-area-inset-right, 0px));
  color: var(--bar-fg);
  background: var(--bar-bg);
  border-bottom: 1px solid var(--bar-line);
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.bar[data-theme="light"] {
  --bar-fg: var(--ink);
  --bar-nav: var(--ink-soft);
  --bar-bg: var(--paper);
  --bar-line: var(--line-light);
}
.bar[data-theme="light"] :focus-visible { outline-color: var(--ink); }

/* На самом верху hero меню прозрачное, как на референсе */
.bar.is-top:not(.is-open) { background: transparent; border-bottom-color: transparent; }

.logo {
  font-family: var(--f-flex);
  font-variation-settings: "wdth" 112;
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
  justify-self: start;
}

.bar-nav { display: none; }
.bar-aside { display: none; }

.bar-nav a[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 12px;
}

.menu-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.bar-nav.is-open {
  display: grid;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 8px max(var(--pad), env(safe-area-inset-right, 0px)) 24px max(var(--pad), env(safe-area-inset-left, 0px));
  background: var(--bar-bg);
  color: var(--bar-nav);
  border-bottom: 1px solid var(--bar-line);
}
.bar-nav.is-open a {
  padding-block: 14px;
  border-bottom: 1px solid var(--bar-line);
  font-size: 16px;
}

/* ---------- Счётчик ---------- */

.counter {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  font: 400 11px/1 var(--f-mono);
  color: var(--ash-dim);
  cursor: pointer;
}
.counter-cur { color: var(--bone); }
.counter .dash { opacity: 0.6; }
.counter--static { cursor: default; }

/* ---------- Hero и контакты (общая тёмная сцена) ---------- */

.hero, .contact {
  position: relative;
  overflow: hidden;
  background: var(--night);
  color: var(--bone);
  display: flex;
  flex-direction: column;
  padding-top: var(--bar-h);
  padding-bottom: 28px;
}

.hero { min-height: 100svh; }

.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 50%;
  opacity: 0;
  filter: saturate(0.7) brightness(0.72);
  transition: opacity 1.2s ease;
}
.hero-bg img.is-active { opacity: 1; }

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 12, 13, 0.7) 0%, rgba(12, 12, 13, 0.25) 35%, rgba(12, 12, 13, 0.55) 65%, rgba(12, 12, 13, 0.92) 100%);
}
.hero-shade--strong {
  background: linear-gradient(180deg, rgba(12, 12, 13, 0.7) 0%, rgba(12, 12, 13, 0.82) 40%, rgba(12, 12, 13, 0.94) 100%);
}

:where(.hero, .contact) > :where(:not(.hero-bg, .hero-shade)) {
  position: relative;
  z-index: 2;
}

.hero-side, .hero-titles, .hero-actions, .hero-meta, .contact-title, .callback, .contact-foot {
  margin-left: max(var(--pad), env(safe-area-inset-left, 0px));
  margin-right: max(var(--pad), env(safe-area-inset-right, 0px));
}

.hero-side { display: grid; gap: 20px; margin-top: 36px; margin-bottom: 40px; }
.hero-side .counter { justify-self: start; }

.hero-notes { display: grid; }
.hero-notes .hero-note { grid-area: 1 / 1; }
.hero-note {
  max-width: 34ch;
  font-size: 14px;
  line-height: 22px;
  color: var(--ash);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s;
}
.hero-note.is-active { opacity: 1; visibility: visible; }
.hero-note em { font-style: normal; color: var(--bone); }

.vline { display: none; }

.hero-titles { display: grid; order: -1; margin-top: 48px; }

.hero-titles .hero-title { grid-area: 1 / 1; }
.hero-title {
  font-family: var(--f-flex);
  font-variation-settings: "wdth" 25, "opsz" 144, "YTUC" 760;
  font-weight: 400;
  font-size: min(40vw, 30svh);
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--bone);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s;
}
.hero-title.is-active, .contact-title { opacity: 1; visibility: visible; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 32px;
  align-self: flex-start;
  margin-top: auto;
}
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--ash);
}
.hero-link b { font-weight: 400; color: var(--bone); margin-right: -10px; }
.hero-link:hover .arrow { transform: translateX(4px); }
.hero-link .arrow { transition: transform 0.3s ease; }

.hero-meta {
  display: grid;
  gap: 6px;
  justify-items: start;
  margin-top: 32px;
  font: 400 12px/1.2 var(--f-flex);
  color: var(--ash);
}
.hero-meta-city {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash-dim);
}
.hero-meta-city .dash { margin-left: 10px; }

/* ---------- Светлые экраны ---------- */

.light {
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
  padding-top: var(--bar-h);
  padding-bottom: 48px;
}

.light :focus-visible { outline-color: var(--ink); }

.light-head {
  display: grid;
  gap: 20px;
  padding: 16px max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px));
}

.light-title {
  font-family: var(--f-flex);
  font-variation-settings: "wdth" 60, "opsz" 144;
  font-weight: 200;
  font-size: clamp(44px, 13vw, 132px);
  line-height: 0.84;
  text-transform: uppercase;
  color: var(--ink);
}

.light-lead {
  max-width: 300px;
  font-size: 15px;
  line-height: 21px;
  color: var(--stone);
}

.light-list {
  display: grid;
  gap: 2px;
  padding: 6px 0 6px 14px;
  border-left: 1px solid var(--line-light);
  font-size: 12.5px;
  line-height: 21px;
  color: var(--ink-soft);
}
.light-list a:hover { text-decoration: underline; text-underline-offset: 4px; }

.cols {
  display: grid;
  margin-top: 36px;
  padding: 0 max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px));
}

.col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-block: 28px;
  border-top: 1px solid var(--line-light);
}
.col:first-child { border-top: 0; padding-top: 0; }

.col-fig { margin: 0 0 26px; overflow: hidden; }
.col-img {
  width: 100%;
  aspect-ratio: 432 / 390;
  object-fit: cover;
  filter: saturate(0.5) contrast(1.04);
}

.num {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 400 10px/1 var(--f-mono);
  color: var(--stone);
}
.num .dash { width: 30px; }

.col-title {
  margin-top: 20px;
  font-family: var(--f-flex);
  font-weight: 300;
  font-size: 21px;
  line-height: 1.16;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
}

.col-text {
  margin-top: 20px;
  max-width: 300px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--stone);
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  align-self: flex-start;
  margin-top: auto;
  padding-top: 32px;
  font-size: 11px;
  color: var(--ink-soft);
}
.more .arrow { transition: transform 0.3s ease; }
.more:hover .arrow { transform: translateX(4px); }

/* ---------- О компании: лестница ---------- */

.about { padding-bottom: 40px; }
.about-head { padding-top: 24px; }

.stairs {
  --rise: 6vw;
  margin-top: 40px;
  padding: 0 max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px));
}

.step {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-top: 28px;
  margin-left: calc(var(--i, 0) * var(--rise));
  padding: 22px 0 8px 18px;
  border-top: 1px solid rgba(22, 22, 22, 0.6);
  border-left: 1px solid var(--line-light);
}
.step:nth-child(2) { --i: 1; }
.step:nth-child(3) { --i: 2; }
.step:nth-child(4) { --i: 3; }

.step-img { margin: 22px 0 0; overflow: hidden; }
.step-img img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.45) contrast(1.05);
}

.step .col-title { margin-top: 22px; }
.step .col-text { margin-top: 16px; }

.step-stat {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 32px;
}
.step-stat b {
  font-family: var(--f-flex);
  font-variation-settings: "wdth" 60, "opsz" 144;
  font-weight: 200;
  font-size: clamp(64px, 20vw, 120px);
  line-height: 0.84;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.step-stat span { font-size: 13px; line-height: 1.3; color: var(--stone); }

.step .more { padding-top: 28px; }

@media (min-width: 640px) {
  .stairs { --rise: 5vw; }
  .step-img img { aspect-ratio: 16 / 9; }
}

/* ---------- Каталог ---------- */

.dark {
  background: var(--night-card);
  color: var(--bone);
}

.catalog { padding-top: var(--bar-h); padding-bottom: 40px; }

.catalog-head {
  display: grid;
  gap: 20px;
  padding: 24px max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px));
}

.catalog-head .counter { margin-bottom: 14px; }

.catalog-title {
  font-family: var(--f-flex);
  font-variation-settings: "wdth" 50, "opsz" 144;
  font-weight: 200;
  font-size: clamp(56px, 16vw, 152px);
  line-height: 0.82;
  text-transform: uppercase;
  color: var(--bone);
  white-space: nowrap;
}

.catalog-lead {
  max-width: 290px;
  font: 300 11.5px/19px var(--f-mono);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #b3aea6;
}

.catalog-all {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  justify-self: start;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ash-dim);
}
.catalog-all .arrow { transition: transform 0.3s ease; }
.catalog-all:hover { color: var(--bone); }
.catalog-all:hover .arrow { transform: translateX(4px); }

.cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 72vw;
  gap: 8px;
  margin-top: 32px;
  padding: 0 max(var(--pad), env(safe-area-inset-right, 0px)) 8px max(var(--pad), env(safe-area-inset-left, 0px));
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: max(var(--pad), env(safe-area-inset-left, 0px));
  scrollbar-width: thin;
  scrollbar-color: var(--line-dark) transparent;
}

.card {
  position: relative;
  aspect-ratio: 262 / 582;
  overflow: hidden;
  border: 1px solid rgba(233, 229, 221, 0.08);
  background: var(--night-card);
  scroll-snap-align: start;
  min-width: 0;
}

.card img {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: 78%;
  object-fit: cover;
  filter: saturate(0.6) brightness(0.85);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 11, 12, 0) 34%, rgba(11, 11, 12, 0.55) 54%, rgba(11, 11, 12, 0.96) 72%, var(--night-card) 80%);
}

.card-body {
  position: absolute;
  left: 19px;
  right: 16px;
  bottom: 28px;
  z-index: 1;
  display: grid;
  justify-items: start;
}

.card-num { font: 400 10px/1 var(--f-mono); color: #cfcac2; }
.card-cat {
  margin-top: 18px;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash-dim);
}
.card-name {
  margin-top: 14px;
  font-family: var(--f-flex);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #ece8e0;
}
.card-area { margin-top: 8px; font-size: 12px; color: var(--ash); }
.card-price {
  margin-top: 22px;
  font: 400 12.5px/1 var(--f-mono);
  color: #ddd8d0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.card-price span { font-size: 9.5px; color: var(--ash-dim); }
.card .more { margin-top: 0; padding-top: 30px; font-size: 10px; color: #cfcac2; }
.card .more::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.card:hover img { filter: saturate(0.75) brightness(0.95); }

@media (min-width: 600px) { .cards { grid-auto-columns: 40vw; } }

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

.contact { padding-bottom: 32px; }
.contact-title { order: -2; margin-top: 48px; font-size: min(40vw, 30svh); }
.contact-side { order: -1; }

.contact-list {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}
.contact-list dt {
  font: 400 10px/1.4 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ash-dim);
}
.contact-list dd { font-size: 14px; color: var(--bone); overflow-wrap: anywhere; }
.contact-list a { text-decoration: underline; text-decoration-color: var(--line-dark); text-underline-offset: 4px; }
.contact-list a:hover { text-decoration-color: currentColor; }

.callback {
  display: grid;
  gap: 22px;
  margin-top: 40px;
  max-width: 460px;
}

.field { display: grid; gap: 6px; }
.field label, .choice legend {
  font: 400 10px/1.4 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ash-dim);
}
.field input {
  width: 100%;
  height: 44px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  border-radius: 0;
  background: transparent;
  color: var(--bone);
  font: 400 16px/1.2 var(--f-flex);
}
.field input::placeholder { color: var(--ash-dim); opacity: 0.7; }
.field input:focus-visible { outline: none; border-bottom-color: var(--bone); }
.field input[aria-invalid="true"] { border-bottom-color: var(--error-dark); }

.field-error { font-size: 12.5px; color: var(--error-dark); }

.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 0;
  border: 0;
}
.choice legend { width: 100%; padding: 0; margin-bottom: 8px; }
.choice label, .consent {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  font-size: 13.5px;
  color: var(--bone);
  cursor: pointer;
}
.choice input, .consent input { width: 16px; height: 16px; margin: 0; accent-color: var(--bone); flex: none; }
.consent { align-items: flex-start; font-size: 12.5px; line-height: 1.5; color: var(--ash); }
.consent input { margin-top: 2px; }
.consent a { text-decoration: underline; text-underline-offset: 3px; }

.submit {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  justify-self: start;
  height: 52px;
  padding: 0 22px;
  border: 1px solid rgba(233, 229, 221, 0.5);
  background: transparent;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone);
  cursor: pointer;
}
.submit:hover { background: var(--bone); color: var(--night); }

.callback-status {
  padding: 12px 0 12px 16px;
  border-left: 1px solid var(--bone);
  font-size: 14px;
  line-height: 1.5;
  color: var(--bone);
}

.contact-foot {
  display: grid;
  gap: 20px;
  margin-top: 56px;
  font-size: 11.5px;
  color: var(--ash-dim);
}
.contact-foot .hero-meta { margin: 0; }
.contact-meta a { color: var(--ash); text-decoration: underline; text-underline-offset: 3px; }

/* ================= Десктоп: раскладка как на референсах ================= */

@media (min-width: 1024px) {
  :root { --bar-h: 84px; }

  .bar { padding: 0 4vw; }
  .menu-btn { margin-right: -10px; }

  .logo { font-size: clamp(16px, 1.2vw, 21px); }

  /* Hero 1672×941 */
  .hero {
    display: block;
    height: 100svh;
    min-height: 640px;
    max-height: 1180px;
    padding: 0;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(12, 12, 13, 0.96) 0%, rgba(12, 12, 13, 0.82) 30%, rgba(12, 12, 13, 0.35) 58%, rgba(12, 12, 13, 0.05) 78%),
      linear-gradient(0deg, rgba(12, 12, 13, 0.85) 0%, rgba(12, 12, 13, 0) 38%),
      linear-gradient(180deg, rgba(12, 12, 13, 0.75) 0%, rgba(12, 12, 13, 0) 30%);
  }
  .hero-shade--strong {
    background:
      linear-gradient(90deg, rgba(12, 12, 13, 0.94) 0%, rgba(12, 12, 13, 0.8) 40%, rgba(12, 12, 13, 0.55) 70%, rgba(12, 12, 13, 0.75) 100%),
      linear-gradient(0deg, rgba(12, 12, 13, 0.85) 0%, rgba(12, 12, 13, 0) 40%);
  }

  .hero-side {
    position: absolute;
    left: 4vw;
    top: 20.7%;
    bottom: 16.4%;
    width: max(176px, 10.6vw);
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .hero-side .counter { margin-bottom: 40px; }
  .hero-note { font-size: clamp(13px, 0.86vw, 15px); line-height: 1.58; }

  .vline {
    display: block;
    flex: 1;
    width: 1px;
    margin-top: 34px;
    background: var(--line-dark);
  }

  .hero-titles {
    position: absolute;
    left: 20vw;
    top: 13.3%;
    margin: 0;
  }
  .hero-title { font-size: min(20.3vw, 36.1svh); }

  .hero-actions {
    position: absolute;
    left: 4vw;
    bottom: 9.2%;
    margin: 0;
  }

  .hero-meta {
    position: absolute;
    right: 4vw;
    bottom: 7.2%;
    margin: 0;
  }

  /* Светлые экраны 1536×1024 */
  .light { padding-bottom: 3.6vw; }

  .light-head {
    grid-template-columns: 40.8vw 39.4vw minmax(0, 1fr);
    gap: 0;
    align-items: end;
    padding: 13px 1.9vw 0 4.2vw;
  }
  .light-title { font-size: 7.77vw; }
  .light-lead {
    max-width: 19.5vw;
    min-width: 260px;
    margin-bottom: 12px;
    font-size: clamp(14px, 0.98vw, 17px);
    line-height: 1.43;
  }
  .light-list {
    align-self: stretch;
    align-content: end;
    margin-top: 21px;
    padding: 0 0 34px 1vw;
    font-size: clamp(12px, 0.82vw, 14px);
    line-height: 1.68;
  }

  .cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 2.7vw;
    padding: 0 1.9vw 0 4.2vw;
  }
  .col,
  .col:first-child {
    padding: 0 2.9vw 15px 3.7vw;
    border-top: 0;
    border-left: 1px solid var(--line-light);
  }
  .col:first-child { padding-left: 0; border-left: 0; }
  .col:last-child { padding-right: 0; }

  .col-fig { margin-bottom: 1.75vw; }
  .col-img { height: 25.4vw; aspect-ratio: auto; }
  .col-title { margin-top: 1.95vw; font-size: clamp(18px, 1.46vw, 26px); }
  .col-text { margin-top: 1.6vw; font-size: clamp(13px, 0.88vw, 15px); max-width: 20vw; }
  .more { padding-top: 2.6vw; font-size: clamp(10.5px, 0.7vw, 12px); }


  /* О компании: лестница вниз, пустоты под ступенями заполняют цифры */
  .about { padding-bottom: 4vw; }
  .about-head {
    grid-template-columns: 1fr 24vw;
    padding: 2.4vw 1.9vw 0 4.2vw;
  }
  .about-head .light-title { font-size: 9.6vw; }
  .about-head .light-lead { margin-bottom: 1.4vw; max-width: 21vw; }

  .stairs {
    --rise: 8.5vw;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 5vw;
    padding: 0 1.9vw 0 4.2vw;
  }
  .stairs::after {
    content: "";
    grid-column: 1 / -1;
    height: 1px;
    background: rgba(22, 22, 22, 0.6);
  }
  .step {
    margin: calc(var(--i, 0) * var(--rise)) 0 0;
    padding: 1.9vw 2.2vw 2.2vw 2vw;
  }
  .step-img img { aspect-ratio: 5 / 4; }
  .step .col-title { margin-top: 1.7vw; }
  .step .col-text { margin-top: 1.2vw; max-width: 19vw; }
  .step-stat { padding-top: 4vw; gap: 0.6vw; }
  .step-stat b { font-size: 8.4vw; }
  .step-stat span { font-size: clamp(13px, 0.88vw, 15px); }
  .step .more { padding-top: 2.6vw; }

  /* Каталог 1672×941 */
  .catalog { padding-bottom: 5.5vh; }
  .catalog-head {
    grid-template-columns: 32.8vw minmax(0, 1fr) auto;
    gap: 0;
    align-items: end;
    padding: 36px 4vw 0 3.9vw;
  }
  .catalog-head .counter { margin-bottom: 1vw; }
  .catalog-title { font-size: 8.25vw; }
  .catalog-lead { max-width: 17vw; min-width: 250px; font-size: clamp(10.5px, 0.69vw, 13px); line-height: 1.66; }
  .catalog-all { align-self: center; justify-self: end; margin-top: 2.5vw; }

  .cards {
    grid-auto-flow: row;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-columns: auto;
    gap: 0.55vw;
    margin-top: 2.2vw;
    padding: 0 1.5vw;
    overflow: visible;
  }

  .card-body { left: 1.15vw; bottom: 1.8vw; }
  .card-num { font-size: clamp(9px, 0.62vw, 11px); }
  .card-cat { font-size: clamp(8px, 0.52vw, 10px); margin-top: 1.1vw; }
  .card-name { font-size: clamp(14px, 1.04vw, 20px); margin-top: 0.85vw; }
  .card-area { font-size: clamp(11px, 0.72vw, 13px); }
  .card-price { font-size: clamp(11px, 0.75vw, 14px); margin-top: 1.3vw; }
  .card .more { padding-top: 1.8vw; font-size: clamp(9px, 0.56vw, 11px); }

  /* Контакты — в сетке hero */
  .contact {
    display: block;
    height: 100svh;
    min-height: 760px;
    max-height: 1180px;
    padding: 0;
  }
  .contact-side {
    position: absolute;
    left: 4vw;
    top: 20.7%;
    bottom: auto;
    width: 13.5vw;
    min-width: 200px;
    margin: 0;
    display: block;
  }
  .contact-side .counter { margin-bottom: 40px; }
  .contact-list { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line-dark); }
  .contact-list dd { font-size: clamp(13px, 0.86vw, 15px); }

  .contact-title {
    position: absolute;
    left: 20vw;
    top: 13.3%;
    margin: 0;
    font-size: min(20.3vw, 36.1svh);
  }

  .callback {
    position: absolute;
    right: 4vw;
    top: 21%;
    width: 25vw;
    min-width: 330px;
    margin: 0;
  }

  .contact-foot {
    position: absolute;
    left: 4vw;
    right: 4vw;
    bottom: 6.5%;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }
  .contact-foot .hero-meta { position: static; justify-items: end; text-align: right; }
}

@media (min-width: 1024px) and (max-height: 760px) {
  .callback { gap: 16px; top: 17%; }
}

/* ================= Концепт «Верста»: новые блоки ================= */

.dark { padding-top: var(--bar-h); }

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid rgba(233, 229, 221, 0.5);
  background-color: transparent;
  background-image: linear-gradient(var(--bone), var(--bone));
  background-size: 100% 0;
  background-position: 0 100%;
  background-repeat: no-repeat;
  color: var(--bone);
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-size 0.55s var(--ease-out), color 0.55s ease, border-color 0.3s ease;
}
.btn:hover { background-size: 100% 100%; color: var(--night); border-color: var(--bone); }

.btn--solid {
  background-color: var(--bone);
  background-image: linear-gradient(var(--night), var(--night));
  color: var(--night);
  border-color: var(--bone);
}
.btn--solid:hover { color: var(--bone); }

.btn--ink {
  background-color: var(--ink);
  background-image: linear-gradient(var(--paper), var(--paper));
  color: var(--paper);
  border-color: var(--ink);
}
.btn--ink:hover { color: var(--ink); border-color: var(--ink); }
.light :focus-visible, .calc-result :focus-visible { outline-color: var(--ink); }

.bar-cta, .nav-cta {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: background-color 0.35s ease, color 0.35s ease;
}
.bar-cta { border-color: color-mix(in srgb, var(--bar-fg) 50%, transparent); }
.bar-cta:hover { background: var(--bar-fg); color: var(--bar-bg); }
.bar-phone { white-space: nowrap; }
.bar-nav.is-open .nav-cta { margin-top: 20px; min-height: 48px; width: 100%; font-size: 14px; }

.catalog-all { padding: 0; border: 0; background: none; cursor: pointer; font-family: inherit; }

/* ---------- Полоса CTA под каталогом ---------- */

.cta-band {
  display: grid;
  gap: 28px;
  margin: 48px max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px));
  padding-top: 32px;
  border-top: 1px solid var(--line-dark);
}
.cta-band-text {
  max-width: 34ch;
  font: 300 clamp(21px, 5.6vw, 34px) / 1.28 var(--f-flex);
  color: var(--bone);
}
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Цифры ---------- */

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 40px max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--line-dark);
}
.metrics > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 12px; padding: 22px 12px 22px 0; border-bottom: 1px solid var(--line-dark); }
.metrics dd {
  font-family: var(--f-flex);
  font-variation-settings: "wdth" 50, "opsz" 144;
  font-weight: 200;
  font-size: clamp(44px, 13vw, 96px);
  line-height: 0.9;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
}
.metrics dt { font-size: 13px; line-height: 1.35; color: var(--ash); }

/* ---------- Построено ---------- */

.built { padding-bottom: 56px; }

.works { display: grid; gap: 44px; margin-top: 48px; padding: 0 max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px)); }
.work { min-width: 0; }
.work-fig { margin: 0; overflow: hidden; }
.work-fig img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.7) brightness(0.9);
  transition: scale 1.4s var(--ease-out), filter 0.6s ease;
}
.work:hover .work-fig img { scale: 1.04; filter: saturate(0.9) brightness(1); }
.work-cap { display: grid; gap: 18px; margin-top: 18px; }
.work-name { font: 300 18px / 1.1 var(--f-flex); letter-spacing: 0.02em; text-transform: uppercase; color: #ece8e0; }
.work-place { margin-top: 6px; font-size: 13px; color: var(--ash); }
.work-meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 28px; }
.work-meta dt { font: 400 10px / 1.4 var(--f-mono); color: var(--ash-dim); }
.work-meta dd { margin-top: 4px; font: 400 13px / 1.2 var(--f-mono); color: var(--bone); }

/* ---------- Этапы ---------- */

.process { padding-bottom: 56px; }
.process-body { margin-top: 36px; padding: 0 max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px)); }
.process-frame { display: none; margin: 0; }
.process-total { display: grid; gap: 6px; margin-bottom: 28px; max-width: 220px; }
.process-total b {
  font-family: var(--f-flex);
  font-variation-settings: "wdth" 60, "opsz" 144;
  font-weight: 200;
  font-size: 72px;
  line-height: 0.85;
  color: var(--ink);
}
.process-total span { font-size: 13px; line-height: 1.35; color: var(--stone); }

.stages { position: relative; padding-left: 26px; }
.stages::before, .stages::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; }
.stages::before { background: var(--line-light); }
.stages::after { background: var(--ink); transform: scaleY(var(--prog, 0)); transform-origin: top; }
.stage { padding: 26px 0 34px; border-bottom: 1px solid var(--line-light); }
.stage:last-child { border-bottom: 0; }
.stage-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 20px; margin-top: 18px; }
.stage-title { font: 300 clamp(22px, 6vw, 30px) / 1.1 var(--f-flex); text-transform: uppercase; color: var(--ink); }
.stage-days { padding: 5px 10px; border: 1px solid var(--line-light); font: 400 11px / 1 var(--f-mono); color: var(--ink-soft); white-space: nowrap; }
.stage .col-text { margin-top: 16px; max-width: 46ch; }
.stage-get { margin-top: 18px; font-size: 13.5px; color: var(--ink); }
.stage-get span { margin-right: 14px; font: 400 10px / 1 var(--f-mono); color: var(--stone); }
.js .stage { opacity: 0.38; transition: opacity 0.6s ease; }
.js .stage.is-active { opacity: 1; }

/* ---------- Стоимость ---------- */

.calc { padding-bottom: 56px; }
.calc-form { margin-top: 36px; padding: 0 max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px)); }

.tiers { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.tiers legend, .seg legend, .range label { padding: 0; font: 400 10px / 1.4 var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ash-dim); }
.tiers legend { margin-bottom: 12px; }

.tier {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 22px 20px 24px;
  border: 1px solid var(--line-dark);
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.tier input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tier::after { content: ""; position: absolute; top: 22px; right: 20px; width: 14px; height: 14px; border: 1px solid var(--ash-dim); border-radius: 50%; transition: background-color 0.3s ease, border-color 0.3s ease; }
.tier:has(input:checked) { border-color: var(--bone); background: rgba(233, 229, 221, 0.05); }
.tier:has(input:checked)::after { background: var(--bone); border-color: var(--bone); }
.tier:has(input:focus-visible) { outline: 1px solid var(--bone); outline-offset: 4px; }
.tier-name { font: 300 22px / 1.1 var(--f-flex); letter-spacing: 0.02em; text-transform: uppercase; color: var(--bone); }
.tier-price { font: 400 13px / 1.2 var(--f-mono); color: var(--ash); }
.tier-list { display: grid; gap: 7px; margin-top: 10px; }
.tier-list i { font-style: normal; font-size: 13.5px; line-height: 1.35; color: var(--ash); }
.tier-list i::before { content: ""; display: inline-block; width: 10px; height: 1px; margin-right: 10px; vertical-align: middle; background: currentColor; opacity: 0.6; }

.calc-grid { display: grid; gap: 28px; margin-top: 28px; }
.calc-controls { display: grid; align-content: start; gap: 30px; }

.range { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 8px 12px; }
.range output { font: 200 30px / 1 var(--f-flex); font-variation-settings: "wdth" 60; color: var(--bone); }
.range input {
  grid-column: 1 / -1;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 30px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.range input::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(90deg, var(--bone) var(--fill, 50%), var(--line-dark) var(--fill, 50%)); }
.range input::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -10px; border: 0; border-radius: 50%; background: var(--bone); }
.range input::-moz-range-track { height: 1px; background: var(--line-dark); }
.range input::-moz-range-progress { height: 1px; background: var(--bone); }
.range input::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--bone); }
.range input:focus-visible { outline-offset: 6px; }

.seg { display: flex; flex-wrap: wrap; margin: 0; padding: 0; border: 0; }
.seg legend { width: 100%; margin-bottom: 12px; }
.seg label { position: relative; margin-right: -1px; cursor: pointer; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span { display: block; padding: 12px 20px; border: 1px solid var(--line-dark); font-size: 13.5px; color: var(--bone); transition: background-color 0.3s ease, color 0.3s ease; }
.seg input:checked + span { background: var(--bone); color: var(--night); border-color: var(--bone); }
.seg label:has(input:focus-visible) { outline: 1px solid var(--bone); outline-offset: 3px; }

.calc-result { display: grid; align-content: start; gap: 20px; padding: 28px 22px; background: var(--paper); color: var(--ink); }
.calc-label { font: 400 10px / 1.4 var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--stone); }
.calc-price { font: 200 clamp(32px, 9vw, 52px) / 1 var(--f-flex); font-variation-settings: "wdth" 60, "opsz" 144; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.calc-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 18px 0; border-block: 1px solid var(--line-light); }
.calc-facts dt { font: 400 10px / 1.4 var(--f-mono); color: var(--stone); }
.calc-facts dd { margin-top: 6px; font-size: 17px; line-height: 1.25; color: var(--ink); }
.calc-note { font-size: 12px; line-height: 1.5; color: var(--stone); }
.calc-result .btn { justify-self: start; }

/* ---------- Сейчас строим ---------- */

.live { padding-bottom: 56px; }
.sites { display: grid; gap: 44px; margin-top: 40px; padding: 0 max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px)); }
.site { min-width: 0; }
.site-fig { margin: 0; overflow: hidden; }
.site-fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: saturate(0.5) contrast(1.04); }
.site-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 20px; }
.site-name { font: 300 17px / 1.15 var(--f-flex); letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink); }
.site-pct { font: 200 40px / 1 var(--f-flex); font-variation-settings: "wdth" 60; color: var(--ink); font-variant-numeric: tabular-nums; }
.bar-track { height: 2px; margin-top: 14px; background: var(--line-light); }
.bar-track i { display: block; width: var(--w, 0%); height: 100%; background: var(--ink); transform-origin: left; }
.site-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-top: 20px; }
.site-meta dt { font: 400 10px / 1.4 var(--f-mono); color: var(--stone); }
.site-meta dd { margin-top: 4px; font-size: 14px; line-height: 1.3; color: var(--ink); }
.live-cta { padding: 40px max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px)); }

/* ---------- Отзывы ---------- */

.reviews { padding-bottom: 64px; }
.rv { display: grid; gap: 28px; margin-top: 36px; padding: 0 max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px)); }
.rv-photos { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.rv-photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: saturate(0.7) brightness(0.85); transform: scale(1.08); transition: opacity 1s ease, transform 1.6s ease-out; }
.rv-photos img.is-active { opacity: 1; transform: none; }
.rv-quotes { display: grid; }
.rv-item { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transition: opacity 0.7s ease, visibility 0.7s; }
.rv-item.is-active { opacity: 1; visibility: visible; transition-delay: 0.25s; }
.rv-item blockquote { margin: 0; max-width: 30ch; font: 300 clamp(22px, 5.8vw, 38px) / 1.3 var(--f-flex); color: var(--bone); }
.rv-item figcaption { display: flex; align-items: center; gap: 14px; margin-top: 28px; font-size: 13px; color: var(--ash); }
.rv-item figcaption img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; filter: grayscale(1); }
.rv-item figcaption b { display: block; margin-bottom: 3px; font-weight: 400; font-size: 15px; color: var(--bone); }
.rv-tabs { display: flex; gap: 10px; margin-top: 32px; }
.rv-tabs button { width: 48px; height: 48px; border: 1px solid var(--line-dark); background: none; font: 400 11px / 1 var(--f-mono); color: var(--ash); cursor: pointer; transition: background-color 0.3s ease, color 0.3s ease; }
.rv-tabs button[aria-selected="true"] { background: var(--bone); color: var(--night); border-color: var(--bone); }

/* ---------- Команда и гарантии ---------- */

.team { padding-bottom: 56px; }
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 12px; margin-top: 40px; padding: 0 max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px)); }
.person { min-width: 0; }
.person-fig { margin: 0 0 16px; overflow: hidden; }
.person-fig img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.person-name { font: 300 16px / 1.15 var(--f-flex); letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink); }
.person-role { margin-top: 6px; font-size: 13px; color: var(--stone); }
.person-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-light); font-size: 13px; line-height: 1.4; color: var(--ink-soft); }

.guar { margin: 56px max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px)); border-top: 1px solid rgba(22, 22, 22, 0.6); }
.guar-row { display: grid; gap: 10px; padding: 22px 0; border-bottom: 1px solid var(--line-light); }
.guar dt { display: flex; align-items: baseline; gap: 16px; font: 300 clamp(18px, 5vw, 24px) / 1.15 var(--f-flex); text-transform: uppercase; color: var(--ink); }
.guar dt .num { display: inline-block; }
.guar dd { padding-left: 34px; font-size: 14px; line-height: 1.5; color: var(--stone); max-width: 46ch; }

/* ---------- Вопросы: фон меняется вместе с вопросом ---------- */

.faq {
  position: relative;
  overflow: hidden;
  padding: calc(var(--bar-h) + 40px) 0 64px;
  background: var(--night);
  color: var(--bone);
}
.faq-inner { position: relative; z-index: 2; display: grid; gap: 40px; padding: 0 max(var(--pad), env(safe-area-inset-right, 0px)) 0 max(var(--pad), env(safe-area-inset-left, 0px)); }
.faq-head { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.faq-title {
  font-family: var(--f-flex);
  font-variation-settings: "wdth" 50, "opsz" 144;
  font-weight: 200;
  font-size: clamp(56px, 17vw, 140px);
  line-height: 0.84;
  text-transform: uppercase;
  color: var(--bone);
}
.faq-caption { display: flex; align-items: center; gap: 12px; font: 400 11px / 1.3 var(--f-mono); color: var(--ash); }
.faq-caption::before { content: ""; width: 24px; height: 1px; background: currentColor; opacity: 0.6; }
.faq-list { border-top: 1px solid var(--line-dark); }
.faq-item { border-bottom: 1px solid var(--line-dark); }
.faq-q {
  display: grid;
  grid-template-columns: 30px 1fr 18px;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 22px 0;
  border: 0;
  background: none;
  text-align: left;
  font: 300 clamp(17px, 4.6vw, 22px) / 1.3 var(--f-flex);
  color: var(--bone);
  cursor: pointer;
}
.faq-n { font: 400 10px / 1 var(--f-mono); color: var(--ash); }
.faq-q i { position: relative; width: 14px; height: 14px; align-self: center; transition: transform 0.5s var(--ease-out); }
.faq-q i::before, .faq-q i::after { content: ""; position: absolute; background: currentColor; }
.faq-q i::before { left: 0; right: 0; top: 6.5px; height: 1px; }
.faq-q i::after { top: 0; bottom: 0; left: 6.5px; width: 1px; }
.faq-item.is-open .faq-q i { transform: rotate(45deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease-out); }
.faq-a > div { overflow: hidden; }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a p { max-width: 52ch; padding: 0 0 26px 38px; font-size: 15px; line-height: 1.6; color: #d5d0c8; }

/* ---------- Окно заявки ---------- */

.modal {
  width: min(92vw, 460px);
  max-height: 92svh;
  padding: 0;
  border: 1px solid var(--line-dark);
  background: var(--night);
  color: var(--bone);
  overflow: auto;
}
html:has(dialog[open]) { overflow: hidden; }
.modal::backdrop { background: rgba(8, 8, 9, 0.74); }
.modal[open] { animation: modal-in 0.5s var(--ease-out); }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.modal-form { position: relative; display: grid; gap: 20px; padding: 40px 28px 32px; }
.modal-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; background: none; color: var(--bone); cursor: pointer; }
.modal-title { padding-right: 36px; font: 300 26px / 1.1 var(--f-flex); letter-spacing: 0.02em; text-transform: uppercase; }
.modal-note { font-size: 14px; line-height: 1.5; color: var(--ash); }
.modal-estimate { padding-left: 14px; border-left: 1px solid var(--bone); font: 400 12.5px / 1.5 var(--f-mono); color: var(--bone); }

/* ---------- Мессенджеры ---------- */

.fab { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 90; }
.fab-btn { display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 50%; background: var(--bone); color: var(--night); box-shadow: 0 0 0 1px rgba(22, 22, 22, 0.25), 0 10px 28px rgba(0, 0, 0, 0.28); cursor: pointer; }
.fab-list { position: absolute; right: 0; bottom: 64px; display: grid; gap: 8px; justify-items: end; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 0.35s ease, transform 0.45s var(--ease-out), visibility 0.35s; }
.fab.is-open .fab-list { opacity: 1; visibility: visible; transform: none; }
.fab-list a { display: block; padding: 12px 18px; border: 1px solid var(--line-dark); background: var(--night); color: var(--bone); font-size: 13px; white-space: nowrap; }
.fab-list a:hover { background: var(--bone); color: var(--night); }

/* ---------- Планшет и десктоп ---------- */

@media (min-width: 640px) {
  .metrics { grid-template-columns: repeat(4, 1fr); }
  .tiers { grid-template-columns: repeat(3, 1fr); }
  .people { grid-template-columns: repeat(4, 1fr); gap: 32px 14px; }
  .works { grid-template-columns: 1fr 1fr; }
  .sites { grid-template-columns: 1fr 1fr; gap: 40px 20px; }
  .cta-band { grid-template-columns: 1fr auto; align-items: end; }
}

@media (min-width: 1024px) {
  .cta-band { margin: 4vw 4vw 0; padding-top: 3vw; }
  .cta-band-text { max-width: 36ch; font-size: clamp(22px, 2.1vw, 36px); }

  .fab { right: 2vw; bottom: 2vw; }

  .metrics { margin: 4vw 4vw 0; }
  .metrics > div { padding: 2.2vw 1.5vw 2.4vw; border-bottom: 0; border-left: 1px solid var(--line-dark); }
  .metrics > div:first-child { padding-left: 0; border-left: 0; }
  .metrics dd { font-size: 7.4vw; }
  .metrics dt { font-size: clamp(13px, 0.9vw, 16px); }

  .built { padding-bottom: 6vw; }
  .works { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4.4vw 1.4vw; margin-top: 5vw; padding: 0 4vw; }
  .work:nth-child(1) { grid-column: 1 / 8; }
  .work:nth-child(2) { grid-column: 8 / 13; margin-top: 9vw; }
  .work:nth-child(3) { grid-column: 1 / 5; }
  .work:nth-child(4) { grid-column: 5 / 9; margin-top: 6vw; }
  .work:nth-child(5) { grid-column: 9 / 13; }
  .work:nth-child(6) { grid-column: 3 / 13; }
  .work-fig img { aspect-ratio: var(--ar, 4 / 3); }
  .work-cap { grid-template-columns: 1fr auto; align-items: start; margin-top: 1.2vw; }
  .work-name { font-size: clamp(15px, 1.15vw, 21px); }
  .work-place { font-size: clamp(12px, 0.85vw, 15px); }
  .work-meta dd { font-size: clamp(12px, 0.85vw, 15px); }

  .process { padding-bottom: 7vw; }
  .process-body { display: grid; grid-template-columns: 30vw minmax(0, 1fr); gap: 6vw; margin-top: 4.5vw; padding: 0 4.2vw; }
  .process-side { position: sticky; top: calc(var(--bar-h) * 0.82 + 2.4vw); align-self: start; }
  .process-frame { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; }
  .process-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.1); filter: saturate(0.5) contrast(1.04); transition: opacity 0.9s ease, transform 1.6s var(--ease-out); }
  .process-frame img.is-active { opacity: 1; transform: none; }
  .process-total { display: flex; align-items: baseline; gap: 1.4vw; max-width: none; margin: 1.6vw 0 0; }
  .process-total b { font-size: 6.4vw; }
  .process-total span { max-width: 14ch; font-size: clamp(12px, 0.88vw, 15px); }
  .stages { padding-left: 3.4vw; }
  .stage { padding: 3vw 0 3.6vw; }
  .stage-top { margin-top: 1.4vw; }
  .stage-title { font-size: clamp(24px, 2.3vw, 40px); }
  .stage-days { font-size: clamp(11px, 0.78vw, 13px); }
  .stage .col-text { font-size: clamp(14px, 1vw, 17px); max-width: 40ch; margin-top: 1.2vw; }
  .stage-get { font-size: clamp(13px, 0.9vw, 16px); }

  .calc { padding-bottom: 7vw; }
  .calc-form { margin-top: 4vw; padding: 0 4vw; }
  .tiers { gap: 0.9vw; }
  .tier { padding: 1.9vw 1.8vw 2.2vw; gap: 0.7vw; }
  .tier::after { top: 1.9vw; right: 1.8vw; }
  .tier-name { font-size: clamp(20px, 1.8vw, 32px); }
  .tier-price { font-size: clamp(12px, 0.9vw, 16px); }
  .tier-list { margin-top: 0.8vw; }
  .tier-list i { font-size: clamp(13px, 0.92vw, 16px); }
  .calc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5vw; margin-top: 3vw; align-items: stretch; }
  .calc-controls { gap: 2.4vw; padding-top: 1vw; }
  .range output { font-size: 3.2vw; }
  .calc-result { gap: 1.5vw; padding: 2.4vw 2.4vw 2.6vw; }
  .calc-price { font-size: clamp(34px, 3.7vw, 64px); }
  .calc-facts dd { font-size: clamp(17px, 1.3vw, 22px); }
  .calc-note { font-size: clamp(12px, 0.8vw, 14px); }

  .live { padding-bottom: 7vw; }
  .sites { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4vw; margin-top: 4vw; padding: 0 4.2vw; }
  .site-top { margin-top: 1.4vw; }
  .site-name { font-size: clamp(15px, 1.15vw, 21px); }
  .site-pct { font-size: 3.2vw; }
  .site-meta { margin-top: 1.4vw; }
  .site-meta dd { font-size: clamp(13px, 0.92vw, 16px); }
  .live-cta { padding: 3.4vw 4.2vw 0; }

  .reviews { padding-bottom: 8vw; }
  .rv { grid-template-columns: 34vw minmax(0, 1fr); gap: 7vw; align-items: center; margin-top: 4.5vw; padding: 0 4vw; }
  .rv-item blockquote { font-size: clamp(26px, 2.6vw, 46px); max-width: 24ch; }
  .rv-item figcaption { margin-top: 2.4vw; font-size: clamp(13px, 0.9vw, 16px); }
  .rv-item figcaption img { width: 3.8vw; height: 3.8vw; min-width: 48px; min-height: 48px; }
  .rv-item figcaption b { font-size: clamp(15px, 1.05vw, 19px); }
  .rv-tabs { margin-top: 3vw; }

  .team { padding-bottom: 7vw; }
  .people { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 1.6vw; margin-top: 4.5vw; padding: 0 4.2vw; }
  .person:nth-child(even) { margin-top: 4vw; }
  .person-fig { margin-bottom: 1.3vw; }
  .person-name { font-size: clamp(15px, 1.2vw, 22px); }
  .person-role { font-size: clamp(12px, 0.88vw, 15px); }
  .person-note { font-size: clamp(12px, 0.88vw, 15px); margin-top: 0.8vw; padding-top: 0.8vw; }
  .guar { margin: 7vw 4.2vw 0; }
  .guar-row { grid-template-columns: 38vw 1fr; gap: 3vw; align-items: baseline; padding: 1.9vw 0; }
  .guar dt { font-size: clamp(18px, 1.6vw, 28px); }
  .guar dd { padding-left: 0; font-size: clamp(14px, 1vw, 17px); }

  .faq { min-height: 100svh; padding: calc(var(--bar-h) + 3vw) 0 6vw; }
  .faq-inner { grid-template-columns: minmax(0, 1fr) 42vw; gap: 6vw; padding: 0 4vw; align-items: stretch; min-height: calc(100svh - var(--bar-h) - 9vw); }
  .faq-title { font-size: 9.2vw; }
  .faq-q { padding: 1.5vw 0; font-size: clamp(18px, 1.5vw, 26px); grid-template-columns: 2.6vw 1fr 20px; }
  .faq-a p { padding-left: 2.6vw; font-size: clamp(14px, 1vw, 17px); }
}

/* ================= Анимации =================
   Всё, что скрывает контент до появления, живёт под .js: класс ставится в <head>
   только без prefers-reduced-motion, поэтому там страница остаётся статичной. */

:root { --ease-out: cubic-bezier(0.19, 1, 0.22, 1); --ease-io: cubic-bezier(0.65, 0, 0.35, 1); }

/* Меню: сжимается при прокрутке, линия внизу показывает, сколько страницы пройдено */
.js .bar { transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, height 0.6s var(--ease-out); }
.bar:not(.is-top) { height: calc(var(--bar-h) * 0.82); }
.bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--bar-fg);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  pointer-events: none;
}

/* Заглавные строки выезжают из-под маски */
.js .ln { display: block; overflow: hidden; padding: 0.14em 0 0.06em; margin: -0.14em 0 -0.06em; }
.js .ln > span {
  display: block;
  transform: translateY(125%);
  transition: transform 1.3s var(--ease-out) calc(var(--l, 0) * 110ms);
}
.js [data-split].is-in .ln > span { transform: none; }

.js .hero-titles .hero-title { opacity: 1; visibility: visible; transition: none; }
.js .hero-titles .hero-title:not(.is-active):not(.is-leaving) .ln > span { transition: none; }
.js.is-ready .hero-titles .hero-title.is-active .ln > span {
  transform: none;
  transition: transform 1.4s var(--ease-out) calc(var(--l, 0) * 120ms + 350ms);
}
.js .hero-titles .hero-title.is-leaving .ln > span {
  transform: translateY(-125%);
  transition: transform 0.9s var(--ease-io) calc(var(--l, 0) * 70ms);
}

/* Hero: медленный отъезд камеры, параллакс фона, подписи подъезжают за заголовком */
.js .hero-bg { position: absolute; inset: -20% 0; will-change: transform; }
.js .hero-bg img { transform: scale(1.14); transition: opacity 1.4s ease, transform 1.8s ease-out; }
.js .hero-bg img.is-active { transform: scale(1); transition: opacity 1.4s ease, transform 10s cubic-bezier(0.2, 0.6, 0.3, 1); }

.js .hero-note { transform: translateY(10px); transition: opacity 0.9s ease, visibility 0.9s, transform 1.1s var(--ease-out); }
.js .hero-note.is-active { transform: none; transition-delay: 0.5s; }

/* Загрузка: меню и подписи hero входят после заголовка */
.js .bar > * { transition: opacity 1s ease, transform 1.1s var(--ease-out); }
.js .bar > :nth-child(2) { transition-delay: 0.1s; }
.js .bar > :nth-child(3) { transition-delay: 0.2s; }
.js .bar > :nth-child(4) { transition-delay: 0.3s; }
.js:not(.is-ready) .bar > * { opacity: 0; transform: translateY(-10px); }

.js .hero > :is(.hero-side, .hero-actions, .hero-meta) { transition: opacity 1s ease var(--d, 1s), transform 1.2s var(--ease-out) var(--d, 1s); }
.hero > .hero-side { --d: 1.05s; }
.hero > .hero-actions { --d: 1.2s; }
.hero > .hero-meta { --d: 1.3s; }
.js:not(.is-ready) .hero > :is(.hero-side, .hero-actions, .hero-meta) { opacity: 0; transform: translateY(14px); }

/* Изображения раскрываются сверху вниз и оседают из увеличения */
.js .col-img,
.js .step-img img,
.js .work-fig img,
.js .site-fig img,
.js .person-fig img {
  clip-path: inset(0 0 100% 0);
  scale: 1.16;
  transition: clip-path 1.3s var(--ease-io) calc(var(--k, 0) * 120ms + 150ms), scale 2s var(--ease-out) calc(var(--k, 0) * 120ms + 150ms);
}
.js .col.is-in .col-img,
.js .step.is-in .step-img img,
.js .work.is-in .work-fig img,
.js .site.is-in .site-fig img,
.js .person.is-in .person-fig img { clip-path: inset(0); scale: 1; }
.js .work.is-in:hover .work-fig img { scale: 1.04; transition-delay: 0s; transition-duration: 0.6s, 1.4s; }

/* Прогресс объектов заполняется, когда карточка доходит до экрана */
.js .bar-track i { scale: 0 1; transition: scale 1.8s var(--ease-out) 0.4s; }
.js .site.is-in .bar-track i { scale: 1 1; }

/* Ступени «чертятся»: сначала площадка, затем подступенок */
.js .step { position: relative; border: 0; }
.js .step::before,
.js .step::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 1.2s var(--ease-io);
}
.js .step::before { right: 0; height: 1px; background: rgba(22, 22, 22, 0.6); transform: scaleX(0); transform-origin: left; }
.js .step::after { bottom: 0; width: 1px; background: var(--line-light); transform: scaleY(0); transform-origin: top; transition-duration: 1.9s; transition-delay: 0.45s; }
.js .step.is-in::before,
.js .step.is-in::after { transform: none; }

/* Каталог: рамки стоят, фото раскрывается волной, подпись проявляется следом
   (clip-path на самой .card нельзя: IntersectionObserver считает её невидимой) */
.js .card img {
  clip-path: inset(0 0 100% 0);
  scale: 1.2;
  transition: clip-path 1.25s var(--ease-io) calc(var(--k, 0) * 90ms), scale 1.9s var(--ease-out) calc(var(--k, 0) * 90ms), filter 0.6s ease;
}
.js .card.is-in img { clip-path: inset(0); scale: 1; }
.js .card::after { opacity: 0; transition: opacity 1s ease calc(var(--k, 0) * 90ms + 0.2s); }
.js .card.is-in::after { opacity: 1; }
.js .card-body { clip-path: inset(100% -2000px -2000px); transition: clip-path 1s var(--ease-out) calc(var(--k, 0) * 90ms + 0.7s); }
.js .card.is-in .card-body { clip-path: inset(-2000px); }
.js .card.is-in:hover img { scale: 1.05; transition: clip-path 0s, scale 1.4s var(--ease-out), filter 0.6s ease; }

/* Кнопка заполняется снизу, линия поля прорисовывается при фокусе */
.submit {
  background: linear-gradient(var(--bone), var(--bone)) 0 100% / 100% 0 no-repeat;
  transition: background-size 0.55s var(--ease-out), color 0.55s ease;
}
.submit:hover { background: linear-gradient(var(--bone), var(--bone)) 0 100% / 100% 100% no-repeat; color: var(--night); }
.field input {
  background: linear-gradient(var(--bone), var(--bone)) 0 100% / 0 1px no-repeat;
  transition: background-size 0.6s var(--ease-out), border-color 0.3s ease;
}
.field input:focus { background-size: 100% 1px; }

@media (min-width: 1280px) {
  .bar { grid-template-columns: 13vw 1fr auto; }
  .menu-btn, .nav-phone, .nav-cta { display: none; }

  .bar-nav {
    display: flex;
    gap: clamp(12px, 1.5vw, 30px);
    font-size: 12.5px;
    color: var(--bar-nav);
  }
  .bar-nav.is-open { display: flex; position: static; padding: 0; background: none; border: 0; color: var(--bar-nav); }
  .bar-nav.is-open a { padding: 0; border: 0; font-size: inherit; }

  .bar-aside {
    display: inline-flex;
    align-items: center;
    gap: 22px;
    font-size: 12.5px;
    color: var(--bar-fg);
  }
  .bar-nav a { position: relative; padding-block: 8px; }
  .bar-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.55s var(--ease-out);
  }
  .bar-nav a:hover::after,
  .bar-nav a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
  .bar-nav a:hover { opacity: 1; }
  .bar-nav a[aria-current] { text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg img, .hero-title, .hero-note, .submit, .field input, .bar-nav a::after { transition: none; }
}
