/* ПНКБ — общие стили. Сделаны по образцу сайта Carton group: те же поля, шапка, карточки и формы,
   акцент — красный со старого сайта ПНКБ. Токены, затем секции сверху вниз. */

:root {
  --bg: #ffffff;
  --surface: #f2f1ee;
  --surface-2: #e8e7e3;
  --ink: #1b1b19;
  --muted: #6a6964;
  --line: #d6d5d0;
  --accent: #b24b3b;
  --accent-hover: #963b2d;
  --accent-ink: #ffffff;
  --dark: #1c1d1b;
  --dark-ink: #f2f1ee;
  --dark-muted: #9c9b95;

  --font: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  /* название проекта на фото и названия разделов на страницах проектов */
  --font-title: "Source Serif 4", Georgia, serif;

  --step-small: 0.9375rem;                                  /* 15 */
  --step-body: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);   /* 17–19 */
  --step-lead: clamp(1.3125rem, 1.15rem + 0.6vw, 1.75rem);  /* 21–28 */
  --step-head: clamp(2.125rem, 1.4rem + 2.6vw, 3.75rem);    /* 34–60 */

  /* поля по бокам — как на сайте Carton group: на телефоне ~5% ширины, на ноутбуке 1440 — около 140 px */
  --margin: clamp(16px, max(5.5vw, 14vw - 62px), 240px);
  --gap: clamp(16px, 2vw, 32px);
  --section: clamp(96px, 11vw, 176px);
  --header-h: 64px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* подвал всегда внизу окна: на коротких страницах («Контакты» на большом экране) содержимое растягивается,
     а не оставляет белую полосу под подвалом */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
body > main { flex: 1 0 auto; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }

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

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

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  /* тонкая кирпичная рамка и кирпичная надпись; при наведении кнопка заливается */
  border: 1px solid var(--accent);
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-size: var(--step-small);
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { background: var(--accent); color: var(--accent-ink); }
.btn:active { transform: scale(0.98); }
.btn .arrow { display: inline-flex; transition: transform 0.25s var(--ease); }
/* стрелка ↗ нарисована, а не набрана символом: на iPhone символ превращается в цветной смайлик */
.arrow svg { display: block; width: 0.82em; height: 0.82em; fill: none; stroke: currentColor; stroke-width: 1.4; }
.btn:hover .arrow { transform: translate(3px, -3px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--step-small);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 0.2s var(--ease);
}
.link-arrow:hover { color: var(--accent-hover); }

/* ---------- шапка ---------- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  color: #fff;
  transition: color 0.35s var(--ease);
}
/* белая полоса въезжает сверху при прокрутке */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  transform: translateY(-101%);
  transition: transform 0.45s var(--ease);
}
.header__row {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding-inline: var(--margin);
  transform: translateY(14px);
  transition: transform 0.45s var(--ease);
}
.header.is-scrolled { color: var(--ink); }
.header.is-scrolled::before { transform: translateY(0); }
.header.is-scrolled .header__row { transform: translateY(0); }

/* знак ПНКБ с подписью «Архитектура и культурная политика»; на телефоне — только буквы */
.header__logo { display: block; flex: none; color: inherit; transition: opacity 0.2s var(--ease); }
.header__logo:hover { opacity: 0.7; }
.header__logo svg { display: block; height: 26px; width: auto; }
.header__logo .logo-short { display: none; }

.nav { display: flex; gap: clamp(20px, 2.4vw, 40px); margin-left: clamp(32px, 5vw, 80px); }
.nav a {
  position: relative;
  font-size: var(--step-small);
  text-decoration: none;
  padding-block: 6px;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px; /* taste-skill-ignore: подчёркивание ссылки при наведении, не разделитель */
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }
.nav .nav__phone { display: none; }

.header__contacts { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.header__phone { font-size: var(--step-small); text-decoration: none; white-space: nowrap; }
.header__phone:hover { text-decoration: underline; text-underline-offset: 5px; }
.icon-link {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: inherit;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.icon-link:hover { opacity: 0.65; }
.icon-link:active { transform: scale(0.92); }
.icon-link svg { width: 20px; height: 20px; }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.burger span {
  position: absolute;
  left: 11px; right: 11px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}
.burger span:first-child { top: 18px; }
.burger span:last-child { top: 25px; }
.header.menu-open .burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
.header.menu-open .burger span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- первый экран: только фото, без подписей и кнопок ---------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--dark);
}
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
/* затемнение сверху — чтобы белая шапка читалась на фото */
.hero::after { content: ""; position: absolute; inset: 0 0 auto; height: 200px; background: linear-gradient(rgba(18, 18, 16, 0.45), rgba(18, 18, 16, 0)); pointer-events: none; }

/* ---------- о бюро на главной ---------- */

.about { padding-block: var(--section) 0; }
.about__photo { grid-column: 1 / 7; }
.about__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.about__text { grid-column: 8 / 13; align-self: center; }
.about__text p { max-width: 34em; }
.about__text p + p { margin-top: 1em; }
.about__text .lead { font-size: clamp(1.1875rem, 1.05rem + 0.45vw, 1.5rem); line-height: 1.4; letter-spacing: -0.015em; }

/* ---------- проекты ---------- */

.projects { padding-top: var(--section); }
/* «Проекты» на главной — вдвое меньше крупных заголовков, как «Интерьеры» и «Виллы» на сайте Carton group */
.projects__title {
  margin-bottom: clamp(18px, 2vw, 28px);
  font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.projects__more { margin-top: clamp(40px, 4vw, 64px); }

/* карточки проектов — по две в ряд, кадр горизонтальный 3:2 */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(48px, 5vw, 80px) var(--gap); }
.card { display: block; text-decoration: none; }
.card__img { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: var(--surface); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
a.card:hover .card__img img { transform: scale(1.04); }
/* название и подпись (площадь · год) под карточкой — в 1,5 раза мельче прежнего (владелец, 2026-10-28) */
.card h3 { margin-top: 16px; font-size: calc(var(--step-lead) / 1.5); font-weight: 400; line-height: 1.25; letter-spacing: -0.01em; }
.card p { margin-top: 4px; font-size: calc(var(--step-small) / 1.5); color: var(--muted); }

/* переход на сайт Carton group (по образцу перехода на ПНКБ с сайта Carton group):
   фото на всю ширину, невысокое (3:1), текст на нижней части кадра */
.xsite {
  position: relative;
  margin-top: clamp(80px, 9vw, 144px);
  aspect-ratio: 3 / 1;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
  background: var(--dark);
}
.xsite__bg { position: absolute; inset: 0; }
.xsite__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.xsite__scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(14, 14, 12, 0.1) 0%, rgba(14, 14, 12, 0.3) 45%, rgba(14, 14, 12, 0.66) 100%); }
.xsite__body { position: relative; width: 100%; padding-block: clamp(28px, 3vw, 48px); row-gap: 40px; align-items: end; }
.xsite__text { grid-column: 1 / 9; }
.xsite__text h2 {
  font-size: clamp(1.75rem, 0.9rem + 2.1vw, 2.75rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.xsite__text p { margin-top: 18px; max-width: 44em; color: rgba(255, 255, 255, 0.9); }
/* кнопка перехода на Carton group — зелёная, как кнопки на сайте Carton group */
.xsite__text .btn { margin-top: 24px; border-color: #6e7b52; background: #6e7b52; color: #fff; }
.xsite__text .btn:hover { border-color: #5d6944; background: #5d6944; }
.xsite__list { grid-column: 9 / 13; font-size: var(--step-small); }
.xsite__list p { color: rgba(255, 255, 255, 0.7); margin-bottom: 8px; }
.xsite__list li { padding-block: 3px; }

/* ---------- обратная связь ---------- */

.contact { padding-block: var(--section); }
/* плашка «Обсудить проект»: слева заголовок и контакты, справа поля столбиком (невысокие) */
.contact__plate { padding: clamp(28px, 3.6vw, 56px) clamp(20px, 3.6vw, 56px); background: var(--surface); row-gap: 28px; }
.contact__intro { grid-column: 1 / 6; grid-row: 1; display: flex; flex-direction: column; }
.contact__intro h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.2vw, 2.5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.contact__ways { margin-top: auto; padding-top: 24px; display: grid; gap: 4px; }
.contact__ways a { text-decoration: none; letter-spacing: -0.01em; width: fit-content; }
.contact__ways a:hover { color: var(--accent-hover); }
.contact__ways span { margin-top: 4px; font-size: var(--step-small); color: var(--muted); }
.contact__ways span a { font-size: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.contact__ways .contact__address { margin-top: 4px; font-size: var(--step-small); color: var(--muted); }
.contact__plate .form { grid-column: 7 / 13; grid-row: 1; gap: 8px; }
.contact__plate .field { min-height: 40px; padding: 8px 14px; line-height: 1.3; }
.contact__plate textarea.field { min-height: 64px; }
.contact__plate .btn { min-height: 44px; }
.contact__plate .form__actions { align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 8px; }
.contact__plate .consent { flex: 1 1 260px; }

.form { display: grid; gap: 22px; }
.field {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  background: var(--bg);
  outline: 2px solid transparent;
  outline-offset: -2px;
  transition: outline-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.field:hover { background: #fbfbfa; }
.field::placeholder { color: var(--muted); opacity: 1; }
.field:focus { outline-color: var(--ink); }
textarea.field { min-height: 104px; resize: vertical; }

.form__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.consent { display: flex; align-items: flex-start; gap: 12px; font-size: var(--step-small); color: var(--muted); cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); }

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

.footer {
  background: var(--dark);
  color: var(--dark-ink);
  padding-top: clamp(48px, 4.5vw, 72px);
  font-size: var(--step-small);
  line-height: 1.45;
}
.footer__top { row-gap: 32px; }
.footer__logo {
  grid-column: 1 / 5;
  display: block;
  width: fit-content;
  height: fit-content;
  color: var(--dark-ink);
  transition: opacity 0.2s var(--ease);
}
.footer__logo:hover { opacity: 0.7; }
.footer__logo svg { display: block; height: 28px; width: auto; }
.footer__nav { grid-column: 6 / 8; display: grid; gap: 6px; align-content: start; }
.footer__nav a, .footer__col a { text-decoration: none; width: fit-content; transition: color 0.2s var(--ease); }
.footer__nav a:hover, .footer__col a:hover { color: #e5a596; }
.footer__col { display: grid; gap: 6px; align-content: start; }
.footer__col--contacts { grid-column: 10 / 13; }
.footer__col p { color: var(--dark-muted); margin-bottom: 4px; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  margin-top: clamp(40px, 4vw, 64px);
  padding-block: 20px 24px;
  color: var(--dark-muted);
}

/* ---------- внутренние страницы: шапка белая сразу, содержимое начинается под ней ---------- */

.bureau, .projects-page, .contacts-page { padding-top: calc(var(--header-h) + clamp(40px, 5vw, 88px)); }
.projects-page { padding-bottom: var(--section); }
.contacts-page .contact { padding-top: 0; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px clamp(20px, 2.4vw, 36px); margin-bottom: clamp(48px, 5.5vw, 88px); }
.tabs__link {
  position: relative;
  padding-block: 6px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.tabs__link:hover, .tabs__link.is-active { color: var(--ink); }
.tabs__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.tabs__link.is-active::after { transform: scaleX(1); }

.panel + .panel { margin-top: var(--section); }
.js .panel { display: none; }
.js .panel.is-active { display: block; animation: panel-in 0.5s var(--ease); }
.js .panel + .panel { margin-top: 0; }
@keyframes panel-in { from { opacity: 0; transform: translateY(12px); } }
/* под карточками частной архитектуры — переход на Carton group до самого подвала */
.projects-page .xsite { margin-bottom: calc(var(--section) * -1); }

/* ---------- страница «Бюро» ---------- */

.lead { font-size: var(--step-lead); line-height: 1.38; letter-spacing: -0.015em; }
/* текст слева не выходит за верх и низ фото справа: фото задаёт высоту ряда,
   а если текст всё же выше (узкий ноутбук), фото дотягивается до его высоты с обрезкой краёв */
.about-panel, .history { align-items: stretch; row-gap: 40px; }
.about-panel__photo img, .history__photo img { width: 100%; height: 100%; object-fit: cover; }
.about-panel__lead { grid-column: 1 / 6; display: flex; flex-direction: column; justify-content: space-between; }
.about-panel__lead .lead { font-size: clamp(1.1875rem, 1.05rem + 0.45vw, 1.5rem); line-height: 1.4; }
.about-panel__photo { grid-column: 7 / 13; }
.about-panel__photo img { aspect-ratio: 3 / 2; }
.schools { display: grid; gap: 10px; margin-top: 28px; font-size: var(--step-small); }
.schools li { color: var(--muted); line-height: 1.4; }
.schools span { display: block; color: var(--ink); font-weight: 500; }

.history { margin-top: clamp(80px, 9vw, 144px); }
.history__text { grid-column: 1 / 6; }
.history__text h2 { margin-bottom: 16px; font-size: var(--step-lead); font-weight: 400; line-height: 1.2; letter-spacing: -0.02em; }
/* как текст «Истоки нашего бюро» на главной — обычный размер; последнее предложение второго абзаца убрано (владелец, 2026-10-29) */
.history__text p { font-size: var(--step-body); }
.history__text p + p { margin-top: 0.9em; }
.history__photo { grid-column: 7 / 13; }
.history__photo img { aspect-ratio: 1122 / 820; }

/* ---------- страница проекта ---------- */
/* фото на первый экран под прозрачной шапкой, ниже описание и данные, затем разделы с фото */

.project { padding-bottom: 0; }
.project__hero { position: relative; height: 100svh; min-height: 560px; background: var(--dark); }
.project__hero img { width: 100%; height: 100%; object-fit: cover; }
/* затемнение сверху и снизу, чтобы белые шапка и название читались на светлом фото */
.project__hero::before,
.project__hero::after { content: ""; position: absolute; inset: 0 0 auto; height: 200px; background: linear-gradient(rgba(18, 18, 16, 0.5), rgba(18, 18, 16, 0)); pointer-events: none; }
.project__hero::before { inset: auto 0 0; height: 40%; background: linear-gradient(rgba(18, 18, 16, 0), rgba(18, 18, 16, 0.55)); }
/* название проекта — белым на фото, внизу слева по краю поля */
.project__title {
  position: absolute;
  left: var(--margin);
  right: var(--margin);
  bottom: clamp(32px, 4vw, 64px);
  color: #fff;
  font-family: var(--font-title);
  font-size: clamp(1.9rem, 0.7rem + 2.55vw, 3.3rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
/* названия на обложке и в «Следующем проекте» — в одну строку на любой ширине: если не влезает, main.js уменьшает шрифт;
   на телефоне у Фестивального центра Ясной Поляны и парка в Череповце — в две, по <br class="br-m"> (владелец, 2026-10-28) */
.js .project__title, .js .project__next a { white-space: nowrap; }
.br-m { display: none; }
.project__head { padding-top: clamp(40px, 4.5vw, 72px); }
.project__back { margin-bottom: clamp(24px, 3vw, 40px); }
.project__intro { row-gap: 40px; align-items: start; }
.project__lead { grid-column: 1 / 7; }
.project__lead p { max-width: 34em; }
.project__lead p + p { margin-top: 1em; }
.project__facts { grid-column: 8 / 13; margin-top: -9px; }
.project__facts div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; padding-block: 9px; }
.project__facts dt { color: var(--muted); }
/* не переносить, например «музея-усадьбы» по дефису */
.nobr { white-space: nowrap; }

.room { margin-top: clamp(80px, 9vw, 144px); }
.room__title {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line); /* taste-skill-ignore: линия под названием раздела, как на сайте Carton group */
  font-family: var(--font-title);
  font-size: clamp(1.45rem, 1.27rem + 0.66vw, 1.925rem);
  font-weight: 350; /* между Light и Regular — шрифт подключён диапазоном 300..400 */
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.room__photos { display: grid; gap: 16px; margin-top: clamp(24px, 2.5vw, 40px); }
/* ряд кадров одной высоты: ширина каждого пропорциональна его соотношению сторон (--r) */
.room__row { display: flex; gap: 16px; }
.room__row figure { flex: var(--r) 1 0; min-width: 0; }
.room__row img { width: 100%; height: auto; }
.room__row--solo { width: calc(50% - 8px); }
/* одиночный горизонтальный кадр на всю ширину — не выше экрана */
.room__row--wide img { max-height: calc(100svh - var(--header-h) - 32px); object-fit: cover; }
.room__row--plan img { object-fit: contain; object-position: left center; }

.project__next {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: var(--section);
}
.project__next > span { color: var(--muted); }
/* название следующего проекта — того же размера, что подпись «Следующий проект» слева (владелец, 2026-10-29) */
.project__next a { font-size: inherit; font-weight: 300; line-height: 1.1; letter-spacing: -0.03em; text-decoration: none; transition: color 0.2s var(--ease); }
.project__next a:hover { color: var(--accent-hover); }
.project__next .arrow { display: inline-block; transition: transform 0.25s var(--ease); }
.project__next a:hover .arrow { transform: translateX(6px); }
.project .contact { padding-top: clamp(64px, 7vw, 112px); }

/* ---------- узкий ноутбук: переход на Carton group — фото сверху, текст под ним на тёмном фоне ---------- */

@media (max-width: 1260px) {
  .xsite { display: block; aspect-ratio: auto; }
  .xsite__bg { position: relative; aspect-ratio: 2 / 1; }
  .xsite__bg::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(to bottom, rgba(28, 29, 27, 0), var(--dark)); }
  .xsite__scrim { display: none; }
  .xsite__body { padding-top: 8px; }
  .xsite__text { grid-column: 1 / 11; }
  .xsite__list { grid-column: 1 / 13; }
}

/* ---------- планшет ---------- */

@media (max-width: 1100px) {
  .header__logo svg { height: 22px; }
  .about__photo { grid-column: 1 / 11; }
  .about__text { grid-column: 1 / 13; margin-top: 48px; }
  .contact__intro, .contact__plate .form { grid-column: 1 / 13; grid-row: auto; }
  /* плашка в один столбец: заголовок, затем поля формы, затем телефон, почта и адрес (владелец, 2026-10-28) */
  .contact__intro { display: contents; }
  .contact__intro h2, .contact__ways { grid-column: 1 / 13; }
  .contact__ways { order: 1; margin-top: 12px; padding-top: 0; }
  .about-panel__lead, .about-panel__photo, .history__text, .history__photo { grid-column: 1 / 13; }
  .about-panel__photo, .history__photo { order: -1; }
  .project__lead, .project__facts { grid-column: 1 / 13; }
  .footer__logo { grid-column: 1 / 13; }
  .footer__nav { grid-column: 1 / 5; }
  .footer__col--contacts { grid-column: 5 / 10; }
}

@media (max-width: 900px) {
  .header__phone { display: none; }
  .burger { display: block; }
  .header__contacts { gap: 4px; }
  .header.menu-open { color: var(--ink); }
  .header.menu-open::before { transform: translateY(0); }
  .header.menu-open .header__row { transform: translateY(0); }
  /* меню разделов выпадает шторкой сверху вниз, пункты появляются по очереди — как на сайте Carton group */
  .nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    z-index: -1;
    top: -16px;
    left: 0; right: 0;
    margin: 0;
    padding: calc(var(--header-h) + 24px) var(--margin) 28px;
    background: var(--bg);
    color: var(--ink);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.35s;
  }
  .header.menu-open .nav { clip-path: inset(0); visibility: visible; transition: clip-path 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s; }
  .nav a { font-size: var(--step-lead); padding-block: 12px; opacity: 0; transform: translateY(12px); transition: opacity 0.2s ease-out, transform 0.2s ease-out; }
  .nav a::after { display: none; }
  .nav .nav__phone { display: block; margin-top: 12px; font-size: var(--step-body); }
  .header.menu-open .nav a { opacity: 1; transform: none; transition: opacity 0.32s ease-out, transform 0.32s ease-out; }
  .header.menu-open .nav a:nth-child(1) { transition-delay: 0.08s; }
  .header.menu-open .nav a:nth-child(2) { transition-delay: 0.135s; }
  .header.menu-open .nav a:nth-child(3) { transition-delay: 0.19s; }
  .header.menu-open .nav a:nth-child(4) { transition-delay: 0.245s; }
}

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

@media (max-width: 640px) {
  :root { --header-h: 56px; }
  .header__row { transform: translateY(6px); }
  .header__logo .logo-full { display: none; }
  .header__logo .logo-short { display: block; height: 24px; }
  /* вкладки разделов — в одну строку; на самом узком телефоне (320 px) строка прокручивается, а не раздвигает страницу */
  .tabs { flex-wrap: nowrap; column-gap: clamp(12px, 3.6vw, 16px); overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs__link { flex: none; font-size: clamp(0.75rem, 3.3vw, 1rem); white-space: nowrap; }
  .hero img { object-position: 44% 62%; }
  .about__photo { grid-column: 1 / 13; }
  /* карточки проектов на телефоне — друг под другом */
  .cards { grid-template-columns: 1fr; row-gap: 40px; }
  .xsite__text { grid-column: 1 / 13; }
  .xsite__bg { aspect-ratio: 3 / 2; }
  .form__actions .btn { flex: 1 1 100%; }
  .footer__nav { grid-column: 1 / 7; }
  .footer__col--contacts { grid-column: 7 / 13; }
  .project__hero { height: 72svh; min-height: 420px; }
  .br-m { display: inline; }
  /* названия разделов проекта («Фасады», «Интерьеры»…) на телефоне в 1,2 раза мельче (владелец, 2026-10-29) */
  .room__title { font-size: calc(clamp(1.45rem, 1.27rem + 0.66vw, 1.925rem) / 1.2); }
  .room__photos { gap: 12px; }
  .room__row { flex-direction: column; gap: 12px; }
  .room__row figure { flex: none; }
  .room__row--solo { width: 100%; }
}

/* ---------- без анимации ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
