/* ============================================
   Портфолио Алёны Цебоевой — style.css
   Типографика по замечаниям:
   заголовки 32px чёрные жирные,
   подзаголовки 14px тёмно-серые,
   основной текст 11px тёмно-серый,
   легенды 9px, подписи планов 12px
   ============================================ */

/* --- Дизайн-токены --- */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #eeeeee;
  --color-text: #1c1c1c;
  --color-body: #3f3f3f;
  --color-muted: #6f6a64;
  --color-line: #dcdcdc;
  --color-frame: #1c1c1c;

  --font-main: 'Montserrat', 'Segoe UI', Arial, sans-serif;

  --fs-h: 32px;    /* заголовки */
  --fs-sub: 14px;  /* подзаголовки */
  --fs-body: 11px; /* основной текст */
  --fs-legend: 9px;
  --fs-plan-caption: 12px;

  --container: 1200px;
  --gap: 24px;

  --tracking-title: 0.14em;
}

/* --- Сброс --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--color-body);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

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

/* Тонкая чёрная рамка для контентных изображений */
.frame { border: 1px solid var(--color-frame); }

/* Выравнивание текста по ширине */
.justify { text-align: justify; }

/* --- Шапка --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header__logo {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
}

.nav { display: flex; gap: 32px; }

.nav__link {
  font-size: 12px;
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 0.2s;
}

.nav__link:hover { color: var(--color-text); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.25s, opacity 0.25s;
}

.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   Слайд 1: Hero — помещается в один экран
   ============================================ */
.hero {
  background: var(--color-bg-alt);
  padding: 20px 0;
}

/* Десктопная сетка hero — 2 колонки × 3 ряда (по референсу):
   ряд 1: фото | «Образование» + «Навыки»
   ряд 2: имя и роль | заголовок «Опыт работы»
   ряд 3: контакты (прижаты к низу) | списки опыта */
@media (min-width: 901px) {
  .hero { min-height: calc(100vh - 64px); display: flex; align-items: center; }
  .hero__inner {
    display: grid;
    grid-template-columns: minmax(270px, 315px) 1fr;
    grid-template-rows: auto auto auto;
    gap: 13px 44px;
    width: 100%;
  }
  /* .hero — чтобы перебить базовый display: flex у .hero__right */
  .hero .hero__left,
  .hero .hero__right { display: contents; }

  /* Вертикальный разделитель на всю высоту между колонками */
  .hero__inner::before {
    content: '';
    grid-area: 1 / 2 / 4 / 3;
    justify-self: start;
    width: 0;
    border-left: 1px solid #b5b5b5;
  }
  .hero__row,
  .hero__exp-cols { padding-left: 64px; }
  /* У заголовка «Опыт работы» — margin вместо padding: линия border-bottom
     начинается у левого края текста и не заходит на вертикальный разделитель */
  .hero__exp-title { margin-left: 64px; }

  /* Фото занимает ~82% ширины левой колонки (= 22.5% ширины контента,
     как в референсе), только первый ряд. margin-top опускает фото так,
     чтобы его верхний край стоял на уровне верхней разделительной линии
     (высота заголовка 28 + отступ 13 + линия 1 = 42px). Размер не меняется.
     .hero в селекторе — чтобы перебить базовое width: 100% */
  .hero .hero__photo { grid-area: 1 / 1 / 2 / 2; width: 82%; margin: 42px 0 0; }
  .hero__row { grid-area: 1 / 2 / 2 / 3; }
  /* Имя/роль/контакты тянутся через ряды 2–3: имя — на уровне линии
     под «Опыт работы», контакты прижаты к низу (margin-top: auto) */
  .hero__about { grid-area: 2 / 1 / 4 / 2; width: 82%; margin-top: 14px; }
  .hero__exp-title { grid-area: 2 / 2 / 3 / 3; align-self: start; }
  /* .hero — чтобы перебить базовый margin-top: 22px у контактов */
  .hero .hero__contacts { margin-top: auto; padding-top: 24px; }
  .hero__exp-cols { grid-area: 3 / 2 / 4 / 3; margin-top: 7px; }
}

/* Невысокие экраны (ноутбуки 768px): hero и «Состав проектов» масштабируются
   одинаково — так hero помещается без обрезки контактов, а вертикальные
   разделители обеих страниц остаются на одной оси (без zoom второй страницы
   линия hero смещалась бы вправо из-за масштабирования центрированного
   контейнера) */
@media (min-width: 901px) and (max-height: 840px) {
  .hero, #projects { zoom: 0.87; }
}

.hero__left { text-align: center; }

.hero__about {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__photo { width: 100%; }

.hero__photo img { width: 100%; }

.hero__name {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 13px;
  white-space: nowrap;
}

.hero__role { font-size: 11px; line-height: 1.6; color: #555555; }

.hero__contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
  align-self: flex-start; /* по левому краю фото */
  text-align: left;
  font-size: 12px;
  color: #3a3a3a;
}

.hero__contacts li { display: flex; align-items: center; gap: 14px; }

.hero__contacts svg { width: 16px; height: 16px; flex: 0 0 auto; color: #333333; }

/* Правая колонка с вертикальным разделителем во всю высоту */
.hero__right {
  border-left: 1px solid var(--color-line);
  padding-left: 44px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Заголовок «Опыт работы» — отдельная строка сетки. Отступ снизу убран:
   его даёт row-gap сетки, а линия border-bottom оказывается точно
   на нижней границе строки (и фото). Двойной класс — чтобы перебить
   margin-bottom общего .hero__subtitle */
.hero__subtitle.hero__exp-title { margin-bottom: 0; }

.hero__row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

/* Заголовки разделов — тонкие, с разрядкой, как в референсе */
.hero__subtitle {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #454545;
  margin-bottom: 24px;
  padding-bottom: 13px;
  border-bottom: 1px solid #b5b5b5;
}

/* Образование — вертикальный таймлайн с точками */
.edu { position: relative; padding-left: 22px; }

.edu::before {
  content: '';
  position: absolute;
  left: 3px; top: 5px; bottom: 5px;
  width: 1px;
  background: #8a8a8a;
}

.edu__item { position: relative; margin-bottom: 28px; }
.edu__item:last-child { margin-bottom: 0; }

.edu__item::before {
  content: '';
  position: absolute;
  left: -22px; top: 0.55em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #3a3a3a;
}

.edu__name { font-size: 16px; font-weight: 700; line-height: 1.3; color: #2b2b2b; margin-bottom: 7px; }
.edu__place { font-size: 12px; line-height: 1.55; color: #666666; }
.edu__date { font-size: 12px; line-height: 1.55; color: #666666; }

/* Навыки: текст + 5 кружков уровня, без рамок */
.skills { display: flex; flex-direction: column; gap: 12px; }

/* Название программы у левого края, кружки уровня — справа */
.skills__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.skills__name {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #666666;
}

/* Кружки: активные тёмные, пустые залиты светло-серым (как в референсе) */
.skills__dots { display: flex; gap: 13px; margin-right: 40px; }

.skills__dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c4c4c4;
}

.skills__dots i.on { background: #2b2b2b; }

/* Разделительная черта + услуги под навыками */
.skills__services {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #b5b5b5;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a7a7a;
  line-height: 2.1;
  /* выровнен по левому краю */
  text-align: left;
}

/* Опыт работы: 2 столбца в пропорциях колонок сверху, маркеры-точки */
.hero__exp-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.job { margin-bottom: 30px; }
.job:last-child { margin-bottom: 0; }

.job__title {
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #3a3a3a;
}

.job__date { font-size: 11px; color: #4a4a4a; margin: 3px 0 14px; }

.job__list li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 3px;
  line-height: 1.45;
}

/* Маркер — векторный кружок через border-radius: рисуется браузером
   в финальном размере каждый раз, поэтому все точки одинаково круглые
   (SVG-фон при масштабе 0.87 даунскейлился в ~4.3px и расстреливался
   по-разному в зависимости от субпиксельной позиции строки) */
.job__list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.66em;
  width: 5px; height: 5px;
  background: #555555;
  border-radius: 50%;
}

/* Невысокие экраны (zoom 0.87): растровая согласованность маркеров.
   Точка 4.6px × 0.87 = 4.0 физ. px (целое); межстрочный шаг
   11px × 1.4629 × 0.87 = 14px и шаг пунктов (16.09 + 3.4483) × 0.87 = 17px —
   целые, поэтому все строки списка попадают на одну субпиксельную фазу
   и все точки растрируются одинаково. Блок расположен ПОСЛЕ базовых
   правил .job__list — иначе при равной специфичности они бы его перебили */
@media (min-width: 901px) and (max-height: 840px) {
  .job__list li { line-height: 1.4629; margin-bottom: 3.4483px; }
  .job__list li::before { width: 4.6px; height: 4.6px; }
}

/* ============================================
   Слайд 2: Состав проектов
   ============================================ */
.section { padding: 80px 0; }
.section--alt { background: var(--color-bg-alt); }
.section--contacts { background: var(--color-bg-alt); }

.section__title {
  font-size: var(--fs-h);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 48px;
}

/* Заголовок слева (по вертикальной середине), список справа
   за вертикальным разделителем — как в референсе */
.toc-wrap {
  display: grid;
  /* 303px + gap 56 → вертикальный разделитель на той же оси (x=423),
     что и разделитель первого слайда */
  grid-template-columns: minmax(260px, 303px) 1fr;
  gap: 56px;
  align-items: center;
  /* #projects — flex-контейнер: без явной ширины сетка сжималась бы
     по контенту и центрировалась, смещая разделитель с оси hero */
  width: 100%;
}

.toc-wrap .section__title { margin-bottom: 0; }

/* Заголовок по центру между левым краем контейнера (= левый край
   «Портфолио») и вертикальной разделительной линией; в две строки,
   чуть выше середины — как в референсе */
@media (min-width: 901px) {
  #projects {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
  }
  .toc-wrap .section__title {
    text-align: center;
    margin-right: -56px;
    margin-top: -26px;
    font-size: 28px;
    line-height: 1.35;
  }
}

.toc {
  border-left: 1px solid #a6a6a6;
  padding-left: 74px;
  display: flex;
  flex-direction: column;
}

/* Строки без горизонтальных разделителей, шаг ~104px */
.toc__link {
  display: flex;
  align-items: baseline;
  gap: 44px;
  padding: 28px 0;
  transition: padding-left 0.25s;
}

.toc__link:hover { padding-left: 12px; }

.toc__num {
  font-size: 15px;
  font-weight: 700;
  color: #757575;
  min-width: 28px;
}

.toc__text { display: flex; flex-direction: column; gap: 2px; }

.toc__name {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.25;
  text-transform: uppercase;
  color: #3a3a3a;
}

.toc__type { font-size: 10px; color: #616161; }

/* ============================================
   Обложки проектов
   ============================================ */
.project { padding: 88px 0; border-top: 1px solid var(--color-line); }

.cover {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  margin-bottom: 72px;
}

.cover__text {
  display: flex;
  flex-direction: column;
}

.cover__title {
  font-size: var(--fs-h);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.cover__meta {
  font-size: var(--fs-sub);
  color: var(--color-muted);
  margin-bottom: 28px;
}

.cover__desc p { margin-bottom: 12px; }
.cover__desc .dash-list { margin-bottom: 12px; }

/* Авторство — по вертикальной середине между описанием и программами */
.cover__credits {
  margin: auto 0;
  padding: 24px 0;
  color: var(--color-muted);
}

.cover__credits p { margin-bottom: 4px; }

.cover__tools {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text);
}

.cover__media {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
}

.cover__imgwrap img { width: 100%; }

/* Обложки, где изображение растягивается на всю высоту текстовой колонки:
   верх картинки на линии заголовка, низ — «Смотреть полный проект» на линии программ */
@media (min-width: 901px) {
  .cover--stretch .cover__media { grid-template-rows: 1fr auto; height: 100%; }
  .cover--stretch .cover__imgwrap { height: 100%; min-height: 0; }
  .cover--stretch .cover__imgwrap img { width: 100%; height: 100%; object-fit: cover; }
}

/* Обложка Зиларт 163 — по референсу: узкая текстовая колонка (284px),
   широкое фото, блоки текста распределены по высоте фото (space-between):
   заголовок и мета — сверху, описание, авторство, программы — внизу */
@media (min-width: 901px) {
  .cover--wide {
    grid-template-columns: minmax(240px, 284px) 1fr;
    gap: 18px;
  }
  .cover--wide .cover__text { justify-content: space-between; }
  .cover--wide .cover__title {
    font-size: 24px;
    letter-spacing: 0.02em;
    margin-bottom: 10px;
  }
  .cover--wide .cover__meta {
    /* тот же размер, что у меты «Квартира 53,6 кв.м.» (14px) */
    font-size: var(--fs-sub);
    line-height: 1.7;
    color: #5a5a5a;
    margin-bottom: 0;
  }
  /* Описание выровнено по ширине заголовка «ЖК "ЗИЛАРТ" 163» (~228px) */
  .cover--wide .cover__desc { font-size: 9.5px; color: #5a5a5a; width: 228px; max-width: 100%; }
  .cover--wide .cover__desc p { margin-bottom: 20px; line-height: 1.6; }
  .cover--wide .cover__desc p:last-child { margin-bottom: 0; }
  /* межстрочный интервал списка роли — такой же, как у абзаца выше */
  .cover--wide .cover__desc .dash-list li { line-height: 1.6; }
  .cover--wide .cover__credits {
    margin: 0;
    padding: 0;
    font-size: 9.5px;
    line-height: 1.55;
    color: #5f5f5f;
  }
  .cover--wide .cover__credits p { margin-bottom: 0; }
  .cover--wide .cover__tools {
    font-size: 11px;
    letter-spacing: 0.12em;
    color: #3a3a3a;
  }
  .cover--wide .cover__link { margin-top: 11px; }
  .cover--wide .cover__link a { font-size: 10px; }
}

/* Обложка Зиларт 77 — по референсу: текстовая колонка 250px,
   два фото (2.36 : 1) на всю высоту текстовой колонки */
@media (min-width: 901px) {
  .cover--p2 { grid-template-columns: minmax(220px, 250px) 1fr; }
  /* описание выровнено по ширине заголовка «ЖК "ЗИЛАРТ" 77» (~220px) */
  .cover--p2 .cover__desc { width: 220px; max-width: 100%; }
  .cover--p2 .cover__media { grid-template-rows: 1fr auto; height: 100%; }
  .cover--p2 .cover__pair { height: 100%; min-height: 0; }
  .cover--p2 .cover__pair-item { height: 100%; }
  .cover--p2 .cover__pair-item img { height: 100%; object-fit: cover; }
}

/* Обложка Серебряный фонтан — по референсу: узкая текстовая колонка (350px,
   заголовок в две строки), широкое изображение; описание — по ширине
   первой строки заголовка «ЖК «Серебряный» (346px) */
@media (min-width: 901px) {
  .cover--p3 { grid-template-columns: minmax(240px, 350px) 1fr; }
  /* уменьшенный межстрочный интервал заголовка «ЖК «Серебряный фонтан»» */
  .cover--p3 .cover__title { line-height: 1.15; }
  .cover--p3 .cover__desc { width: 346px; max-width: 100%; }
  /* тот же межстрочный интервал, что у программ — базовые линии
     «Archicad | Photoshop | AI» и «Смотреть полный проект» на одной оси */
  .cover--p3 .cover__link { line-height: 1.75; }
}

/* Обложка Симфония 34 — по референсу: узкая текстовая колонка (400px,
   заголовок в одну строку), изображение крупнее; описание — по ширине
   заголовка «ЖК «Симфония 34»» (386px) */
@media (min-width: 901px) {
  .cover--p4 { grid-template-columns: minmax(240px, 400px) 1fr; }
  .cover--p4 .cover__desc { width: 386px; max-width: 100%; }
  /* тот же межстрочный интервал, что у программ — базовые линии
     «Archicad | SketchUp» и «Смотреть полный проект» на одной оси */
  .cover--p4 .cover__link { line-height: 1.75; }
}

/* Обложка Icon Building — по референсу: узкая текстовая колонка (290px),
   изображение крупнее; описание — по ширине заголовка «Icon Building» (278px) */
@media (min-width: 901px) {
  .cover--p5 { grid-template-columns: minmax(240px, 290px) 1fr; }
  .cover--p5 .cover__desc { width: 278px; max-width: 100%; }
  /* тот же межстрочный интервал, что у программ — базовые линии
     «Photoshop | AI» и «Смотреть полный проект» на одной оси */
  .cover--p5 .cover__link { line-height: 1.75; }
}

/* Пара фото обложки Зиларт 77: равная высота, шкаф шире, кровать уже.
   flex-grow пропорционален соотношению сторон — высоты выравниваются сами */.cover__pair {
  display: flex;
  gap: 16px;
  width: 100%;
}

.cover__pair-item { min-width: 0; }

.cover__pair-item img { width: 100%; height: auto; }

.cover__link {
  margin-top: 12px;
  text-align: right;
}

.cover__link a {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-line);
  transition: color 0.2s, border-color 0.2s;
}

.cover__link a:hover { color: var(--color-text); border-color: var(--color-text); }

/* ============================================
   Блоки внутри проекта
   ============================================ */
.block__title {
  font-size: var(--fs-sub);
  font-weight: 600;
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
  color: var(--color-muted);
  /* увеличенный отступ сверху опускает подпись ближе к изображению */
  margin: 72px 0 24px;
}

.block__lead {
  color: var(--color-muted);
  margin: -12px 0 24px;
  max-width: 640px;
}

/* Подпись-лид в одну строку (Симфония 34) */
@media (min-width: 901px) {
  .block__lead--line { white-space: nowrap; max-width: none; }
}

.text-block { margin-top: 20px; }
.text-block p { margin-bottom: 10px; }

/* Текст в 2 столбца */
.text-cols {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.dash-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 5px;
}

.dash-list li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--color-muted);
}

/* --- Планы --- */
.plan-block { margin-bottom: 48px; }

.plan-block__caption {
  font-size: var(--fs-plan-caption);
  font-weight: 600;
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 12px;
  text-align: left;
}

.plan-block__row {
  display: grid;
  grid-template-columns: 0.85fr 2fr 0.55fr;
  gap: 32px;
  align-items: start;
}

/* Основной текст планировочных блоков — 11px, как везде на сайте */
.plan-block__text { font-size: var(--fs-body); }

.plan-block__text p { margin-bottom: 10px; }

.plan-block__img img { width: 100%; cursor: zoom-in; }

.plan-block__legend {
  font-size: var(--fs-legend);
  line-height: 1.7;
  color: var(--color-muted);
}

.plan-block__legend li { margin-bottom: 3px; }
.plan-block__legend li::before { content: counter(list-item) '. '; }

/* Десктоп: текст слева и список комнат справа начинаются на уровне
   верхнего края чертежа (подпись 12px*1.75 + отступ 12px = 33px) */
@media (min-width: 901px) {
  .plan-block__text,
  .plan-block__legend { margin-top: 33px; }
  /* тот же размер, что у текста «Ключевой задачей проекта…» (9.5px) */
  .plan-block__text { font-size: 9.5px; }
}

/* --- Галереи --- */
.gallery { display: grid; gap: var(--gap); }
.gallery--2 { grid-template-columns: 1fr 1fr; }

/* Визуализации одна под другой, на всю ширину колонки — вертикальные края
   обоих изображений совпадают, без белых полос по бокам */
.gallery--stack { grid-template-columns: 1fr; }

.gallery--stack img {
  width: 100%;
}

.gallery img {
  width: 100%;
  cursor: zoom-in;
  transition: opacity 0.25s;
}

.gallery--2 img { height: 100%; object-fit: cover; }

.gallery img:hover { opacity: 0.92; }

/* Фото на всю ширину */
.wide img { width: 100%; cursor: zoom-in; }

/* --- Текст + фото --- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 48px;
}

.split--center { align-items: center; }

/* Заголовок «Визуализация прихожей» опущен ближе к изображению (по референсу);
   отступы схлопываются — итоговый зазор 30px вместо 48px */
.block__title + .split { margin-top: 30px; }

.split__text p { margin-bottom: 12px; }
.split__text p:last-child { margin-bottom: 0; }

.split__media img { width: 100%; cursor: zoom-in; }

/* Аксонометрии: две рядом, равной высоты, без фона и рамок.
   flex-grow пропорционален соотношению сторон — высоты совпадают сами.
   Зазор маленький — модели на одной оси, как в референсе */
.axon-pair {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.axon-pair img {
  min-width: 0;
  width: 100%;
  cursor: zoom-in;
}

/* Заголовок «Материалы» — отступы по референсу страницы аксонометрии;
   левый край — на оси первого образца (сетка 6×163px + 5×30px = 1128px центрирована) */
.block__title--mat {
  margin-top: 54px;
  margin-bottom: 16px;
  margin-left: max(0px, calc((100% - 1128px) / 2));
}

/* --- Материалы: компактные образцы в ряд (по референсу: 6 шт,
   пропорции ~1.47:1, зазор ~18% ширины образца, ряд уже аксонометрий) --- */
.materials {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 163px));
  justify-content: center;
  gap: 30px;
}

.materials li { text-align: left; }

.materials img {
  width: 100%;
  aspect-ratio: 1.474;
  object-fit: cover;
  border: 1px solid var(--color-frame);
  margin-bottom: 10px;
}

.materials span { font-size: var(--fs-body); color: var(--color-body); }

/* --- Пример рабочей документации: горизонтальная лента «вагонами» --- */
.doc-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
}

.doc-strip img {
  height: min(70vh, 640px);
  width: auto;
  flex: 0 0 auto;
  border: 1px solid var(--color-line);
  cursor: zoom-in;
  background: #fff;
}

/* Фото реализации — в той же ленте, но с тёмной рамкой, как все фото */
.doc-strip--photo img { border-color: var(--color-frame); }

/* --- Пары фото с текстом --- */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.duo__item img { width: 100%; cursor: zoom-in; }

/* Пары одинакового размера, помещаются на экран вместе с текстом */
.duo--fit img {
  height: clamp(280px, 46vh, 460px);
  width: 100%;
  object-fit: cover;
}

.duo--fit-sm img { height: clamp(240px, 38vh, 380px); }

/* Пары без обрезки: flex-grow пропорционален соотношению сторон —
   оба изображения равной высоты, внешние края на осях контейнера */
.duo-axis {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.duo-axis__item { min-width: 0; }

.duo-axis__item img { width: 100%; cursor: zoom-in; }

.duo__text { margin-top: 14px; }

.duo__caption {
  font-size: var(--fs-body);
  color: var(--color-muted);
  margin-bottom: 10px;
  text-align: left;
}

.duo__sub {
  margin-top: 10px;
  color: var(--color-muted);
  text-align: left;
}

.duo__sub--center { text-align: center; }

/* Пары одинаковой высоты без обрезки (аксонометрии острова):
   белый фон картинок сливается со страницей, подписи на одной оси */
.duo--ax img {
  height: clamp(240px, 34vh, 340px);
  width: 100%;
  object-fit: contain;
}

/* Строка изображений одинаковой высоты (визуализация + аксонометрия, чертежи) */
.hrow {
  display: flex;
  gap: 32px;
  align-items: flex-end;
}

.hrow__item img {
  height: clamp(260px, 42vh, 430px);
  width: auto;
  cursor: zoom-in;
}

/* Рабочая зона: аксонометрия с подписью прижата к визуализации,
   ряд выровнен по левому краю контента */
.hrow--spread { justify-content: flex-start; flex-wrap: wrap; }

/* Кухонный гарнитур: визуализация и аксонометрия с подписями сдвинуты влево
   и выровнены по левому краю контента; естественные размеры (одинаковая
   высота строки) */
.hrow--kitchen { justify-content: flex-start; flex-wrap: wrap; }

/* Больше воздуха между визуализацией кухни-гостиной и подписью
   «Чертежи для заказных позиций»; подписи «Чертежи…» и «План» на одной оси */
.hrow--draw { margin-top: 40px; align-items: flex-start; }

/* Строка чертежей кухни — на всю ширину контента. flex-grow пропорционален
   ширинам: чертёж ar 1.8585; высота плана = расстояние между верхней гранью
   верхней серой полосы и нижней гранью нижней серой полосы чертежа
   (12.03%–87.15% его высоты, т.е. 0.7512) → доля ширины плана 0.7536×0.7512 */
.hrow--draw .hrow__item { min-width: 0; }
.hrow--draw .hrow__item--draw { flex: 1.8585 1 0; }
.hrow--draw .hrow__item--plan { flex: 0.5661 1 0; }
.hrow--draw .hrow__item img { width: 100%; height: auto; }

/* Верх плана — на оси верхней грани верхней серой полосы (12.03% высоты
   чертежа). margin-top плана схлопывается с margin-bottom подписи (10px),
   поэтому отступ = 12.03% высоты чертежа + 10px = 25.08% ширины колонки */
.hrow--draw .hrow__item--plan img { margin-top: 25.08%; }

/* --- Разделительные подписи --- */
.divider-label {
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-line);
  padding-bottom: 8px;
  margin: 40px 0 24px;
}

/* Подпись без горизонтальной линии («Чертежи для заказных позиций», рабочая зона) */
.divider-label--noline { border-bottom: none; padding-bottom: 0; }

/* --- Аксонометрия шкафа: две колонки, заголовки на одной оси --- */
.wardrobe {
  display: grid;
  /* 312px — минимум с зазором 25px между заголовком «Аксонометрия шкафа.
     Спальня» (327px, nowrap) и соседней колонкой; видимый размер аксонометрий
     не меняется: он задан max-height 30vh. Освободившаяся ширина — чертежу */
  grid-template-columns: 312px minmax(0, 1fr);
  gap: 40px;
  align-items: stretch;
}

.wardrobe__col { display: flex; flex-direction: column; }

.wardrobe__axons {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wardrobe__axons img {
  width: 100%;
  max-height: 30vh;
  object-fit: contain;
  /* видимая часть прижата влево — на одной оси с заголовком колонки */
  object-position: left center;
  cursor: zoom-in;
}

/* Чертёж увеличен — во всю ширину правой колонки;
   текст прижат к низу: нижняя строка на оси нижней точки нижней аксонометрии */
.wardrobe__drawcol .text-block {
  margin-top: auto;
  padding-top: 24px;
}

.drawing img { cursor: zoom-in; background: #fff; width: 100%; }

/* Симфония 34: больше воздуха между аксонометриями острова и чертежом */
#project-4 .drawing { margin-top: 48px; }

.drawing__caption {
  font-size: var(--fs-body);
  color: var(--color-muted);
  margin-bottom: 10px;
  text-align: left;
}

/* --- Аксонометрия тумбы и зеркала: аксонометрия слева, чертёж справа.
   Ширины колонок (1 : 1.9325) подобраны из соотношений сторон изображений,
   чтобы высоты аксонометрии и чертежа совпадали — верх и низ на одних осях --- */
.tumba {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9325fr);
  gap: 40px;
  align-items: start;
}

.tumba__col { display: flex; flex-direction: column; }

/* заголовки не переносятся — остаются на одной оси */
@media (min-width: 1001px) {
  .tumba .block__title,
  .wardrobe .block__title { white-space: nowrap; }
}

.tumba__col > img,
.tumba__col .drawing img { width: 100%; cursor: zoom-in; }

/* Аксонометрия — по осям референса: верх на уровне верхней грани чертежа
   (серая планка, 6.73% высоты чертежа), низ — на уровне нижней грани фасада
   (цоколь, 65.26% высоты чертежа). Отступ и ширина в % от ширины колонки —
   пропорции сохраняются при любом размере экрана */
.tumba__col > img { width: 60.9%; }

@media (min-width: 1001px) {
  .tumba__col > img { width: 58.5%; margin-top: 14.6%; }
}

/* Текст под аксонометрией, ширина — по заголовку «Аксонометрия тумбы
   и зеркала» (333px при размере шрифта заголовка) */
.tumba__text { margin-top: 24px; }

@media (min-width: 1001px) {
  .tumba__text { max-width: 333px; }
}

/* Заголовок «Чертеж тумбы и зеркала» — по левой стороне чертежа:
   левая размерная линия элевации начинается в 7.5% ширины изображения
   (как в PDF: заголовок над размерной линией «2767») */
.tumba__draw-title { margin-left: 7.5%; }

.tumba__text p { margin-bottom: 12px; }
.tumba__text p:last-child { margin-bottom: 0; }

/* --- Концепция (Серебряный фонтан) ---
   Колонки 1.4397:1 — низ композиции на одной оси с низом финальных коллажей */
.concept {
  display: grid;
  grid-template-columns: 1.4397fr 1fr;
  gap: 48px;
  align-items: start;
}

.concept .block__title { margin-top: 0; }

.concept__scene img { width: 100%; cursor: zoom-in; }

.concept__final {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 8px + flex-gap 16px = 24px — как отступ под заголовком в левой колонке,
   чтобы верх коллажей был на одной оси с верхом композиции */
.concept__final .block__title { margin-bottom: 8px; }

/* коллажи на всю ширину колонки, без белых полей по бокам */
.concept__final img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

/* --- Icon Building: текст + два коллажа в ряд --- */
.icon-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 48px;
}

.icon-row:last-child { margin-bottom: 0; }

.icon-row__text {
  flex: 0 0 220px;
  color: var(--color-body);
}

/* Коллажи заполняют ряд до правого края контента; базовый flex (∝ соотношению
   сторон) — для узких экранов ≤900px, где ряд переносится */
.icon-row img {
  width: 100%;
  height: auto;
  min-width: 0;
  cursor: zoom-in;
}

.icon-row img:nth-of-type(1) { flex: 2.2742 1 0; }
.icon-row img:nth-of-type(2) { flex: 1.5054 1 0; }
.icon-row--low img:nth-of-type(1) { flex: 1.9170 1 0; }
.icon-row--low img:nth-of-type(2) { flex: 1.4419 1 0; }

/* Колонки по референсу: текст 10.8%, левый коллаж 51.7%, правый 30.1%
   ширины ряда; свободное место поровну в оба зазора (space-between) —
   оси колонок обоих рядов совпадают, верх коллажей в ряду на одной оси */
@media (min-width: 901px) {
  .icon-row { justify-content: space-between; }
  .icon-row__text { flex: 0 0 auto; width: 10.8%; }
  .icon-row img:nth-of-type(1) { flex: 0 0 auto; width: 51.7%; }
  .icon-row img:nth-of-type(2) { flex: 0 0 auto; width: 30.1%; }
  /* Ряд «Подбор новых мебельных позиций…»: коллаж кухни — одной высоты
     с коллажем гостиной (46.69% и 35.12% ширины ряда при ar 1.917 и 1.4419
     дают равную высоту); зазоры те же — левая ось гостиной и правая ось
     кухни совпадают с осями ряда выше */
  .icon-row--low img:nth-of-type(1) { width: 46.69%; }
  .icon-row--low img:nth-of-type(2) { width: 35.12%; }
}

/* Чертежи рабочей зоны — одним изображением во всю ширину контента,
   без дробления и изменения пропорций; чертежи внутри выровнены
   по верхней и нижней осям */
.office-drawings img {
  cursor: zoom-in;
  background: #fff;
  width: 100%;
  height: auto;
  display: block;
}

/* --- Контакты --- */
.contacts__lead { color: var(--color-muted); margin-bottom: 32px; }

.contacts__list { display: flex; flex-direction: column; gap: 16px; }

.contacts__list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: baseline;
  font-size: var(--fs-sub);
}

.contacts__label {
  font-size: var(--fs-body);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
  color: var(--color-muted);
}

.contacts__list a { border-bottom: 1px solid var(--color-line); transition: border-color 0.2s; }
.contacts__list a:hover { border-color: var(--color-text); }

/* --- Подвал --- */
.footer { padding: 32px 0; border-top: 1px solid var(--color-line); }

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--color-muted);
}

.footer__up { letter-spacing: 0.1em; text-transform: uppercase; }

/* --- Лайтбокс --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 18, 16, 0.92);
}

.lightbox.is-open { display: flex; }

.lightbox__img {
  max-width: 90vw;
  max-height: 84vh;
  object-fit: contain;
}

.lightbox__caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  max-width: 80vw;
  text-align: center;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 40px;
  line-height: 1;
  padding: 12px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover { opacity: 1; }

.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ============================================
   Адаптив
   ============================================ */
@media (max-width: 1000px) {
  .wardrobe { grid-template-columns: 1fr; }
  .wardrobe__axons { flex-direction: row; }
  .wardrobe__axons img { width: 50%; max-height: none; }
  .tumba { grid-template-columns: 1fr; }
  .hrow { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .hero__inner { display: block; }
  .hero__left { max-width: 360px; margin: 0 auto 40px; }
  .hero__photo { margin-bottom: 18px; }
  .hero__right { border-left: none; padding-left: 0; }
  .toc-wrap { grid-template-columns: 1fr; gap: 24px; }
  .toc { border-left: none; padding-left: 0; }
  .toc-wrap .section__title { margin-bottom: 8px; margin-right: 0; text-align: left; }
  .cover { grid-template-columns: 1fr; gap: 40px; }
  .cover__credits { margin: 24px 0; }
  .cover__pair { gap: 10px; }
  .plan-block__row { grid-template-columns: 1fr; }
  .axon-pair { flex-direction: column; gap: 16px; }
  .axon-pair img { width: 100%; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split--center { align-items: start; }
  .text-cols { grid-template-columns: 1fr; gap: 12px; }
  .materials { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .concept { grid-template-columns: 1fr; }
  .concept__final img { max-height: none; }
  .icon-row { flex-wrap: wrap; }
  .icon-row__text { flex: 1 1 100%; }
  .icon-row img { height: auto; width: calc(50% - 12px); flex: 1 1 auto; }
}

@media (max-width: 640px) {
  .nav {
    position: fixed;
    top: 64px; right: 0; left: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-line);
    display: none;
  }

  .nav.is-open { display: flex; }

  .nav__link {
    padding: 16px 24px;
    border-top: 1px solid var(--color-line);
  }

  .burger { display: flex; }

  .hero { padding: 40px 0 48px; }
  .hero__row { grid-template-columns: 1fr; }
  .hero__exp-cols { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .project { padding: 64px 0; }

  .gallery--2 { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; }
  .duo-axis { flex-direction: column; }
  .duo--fit img, .duo--fit-sm img { height: auto; }
  .materials { grid-template-columns: repeat(2, 1fr); }
  .wardrobe__axons { flex-direction: column; }
  .wardrobe__axons img { width: 100%; }
  .hrow__item img, .hrow--draw img { height: auto; width: 100%; }
  .hrow--draw .hrow__item--draw, .hrow--draw .hrow__item--plan { flex: 1 1 100%; }
  .hrow--draw .hrow__item--plan img { height: auto; width: 100%; margin: 0; }
  .doc-strip img { height: 52vh; }
  .block__lead--line { white-space: normal; }

  .cover__title, .section__title { font-size: 26px; }
  .contacts__list li { grid-template-columns: 1fr; gap: 4px; }
}
