/* ============================================================
   АНСЕ — интерьерная живопись
   Белый зал: ч/б, воздух, музейная типографика
   ============================================================ */

:root {
  --ink: #0d0d0d;
  --paper: #f7f6f3;
  --grey: #8a8a86;
  --hairline: rgba(13, 13, 13, .16);
  --hairline-light: rgba(247, 246, 243, .2);
  --serif: "Cormorant", serif;
  --sans: "Tenor Sans", sans-serif;
  --pad: clamp(15px, 5vw, 54px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* атрибут hidden всегда прячет, даже если у элемента задан display */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--paper); }

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }

/* ---------- логотип (инлайновый SVG) ---------- */

.logo-slot svg { width: 100%; height: auto; overflow: visible; }

.logo-slot svg path { fill-opacity: 0; }

.logo-slot.is-drawn svg path {
  animation: fillIn 1.6s ease forwards;
  animation-delay: calc(var(--i) * 220ms);
}

@keyframes fillIn { to { fill-opacity: 1; } }

/* ---------- зерно ---------- */

.grain {
  position: fixed; inset: -50%; z-index: 80; pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(8) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-2%, -2%); }
}

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

.header {
  position: fixed; inset: 0 0 auto 0; z-index: 70;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16.5px var(--pad);
  transition: background .5s, padding .5s;
}

.header.is-solid {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(7.5px);
  border-bottom: 1px solid var(--hairline);
  padding-block: 10.5px;
}

.header__brand { width: 69px; color: var(--ink); }

.header__nav { display: flex; gap: clamp(13.5px, 3vw, 33px); }

.header__nav a {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  position: relative; padding-block: 3px;
}

.header__nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}

.header__nav a:hover::after,
.header__nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.header__burger { display: none; }

/* ---------- служебные ---------- */

.label {
  font-size: 15px; letter-spacing: .42em; text-transform: uppercase;
  color: var(--grey);
}

.label--light { color: rgba(247, 246, 243, .45); }

.line-link {
  font-size: 15px; letter-spacing: .3em; text-transform: uppercase;
  border-bottom: 1px solid currentColor; padding-bottom: 3.8px;
  transition: opacity .3s;
}

.line-link:hover { opacity: .5; }

[data-reveal] {
  opacity: 0; transform: translateY(27px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}

[data-reveal].in { opacity: 1; transform: none; }

/* ---------- бегущая строка ---------- */

.ticker {
  border-block: 1px solid var(--hairline);
  overflow: hidden; white-space: nowrap;
  padding-block: 10.5px;
}

.ticker__track { display: inline-flex; animation: ticker 36s linear infinite; }

.ticker__track span {
  font-size: 15px; letter-spacing: .34em; text-transform: uppercase; color: var(--grey);
}

@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- галерея: горизонтальная развеска ---------- */

.gallery { position: relative; }

.gallery__sticky {
  position: sticky; top: 0; height: 100svh;
  display: flex; flex-direction: column;
  overflow: hidden;
}

.gallery__head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 63px var(--pad) 0;
}

.gallery__counter {
  font-family: var(--serif); font-size: 22.5px; font-weight: 300;
  font-variant-numeric: tabular-nums;
  color: var(--grey);
}

.gallery__counter b { font-weight: 400; color: var(--ink); }

.gallery__track {
  flex: 1;
  display: flex; align-items: center;
  gap: clamp(30px, 6vw, 75px);
  padding-inline: var(--pad) 40vw;
  will-change: transform;
}

.gallery__progress {
  margin: 0 var(--pad) 25.5px;
  height: 1px; background: var(--hairline);
}

.gallery__progress i {
  display: block; height: 1px; background: var(--ink);
  transform-origin: left; transform: scaleX(0);
}

/* брендовый блок — логотип над картинами */

.gallery__brand {
  display: flex; justify-content: center;
  padding-top: clamp(7.5px, 2vh, 18px);
}

.gallery__brand-inner { width: min(40vw, 345px); }

.gallery__logo { width: 100%; color: var(--ink); }

.gallery__tagline {
  margin-top: clamp(3px, .8vh, 7.5px);
  font-size: clamp(13.5px, 2vw, 19.5px);
  letter-spacing: .58em; text-transform: lowercase;
  text-align: right;
  margin-right: -.58em; /* компенсация трекинга после последней буквы */
}

/* вводная и финальная панели */

.panel { flex: 0 0 auto; max-width: 285px; }

.panel h2 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(30px, 5.4vw, 57px);
  line-height: 1.02; letter-spacing: -.01em;
}

.panel p { margin-top: 19.5px; color: var(--grey); max-width: 270px; }

.panel__hint {
  display: inline-block; margin-top: 25.5px;
  font-size: 15px; letter-spacing: .4em; text-transform: uppercase; color: var(--grey);
}

.panel--outro .line-link { display: inline-block; margin-top: 27px; }

/* работа */

.work { flex: 0 0 auto; }

.work__frame {
  /* высота от экрана: всё, что остаётся между шапкой зала и прогресс-баром */
  --availH: calc(100svh - 270px);
  --h: clamp(225px, var(--availH), 450px);
  height: calc(var(--h) * .94);
  width: auto; aspect-ratio: 4 / 3;
  border: 1px solid var(--ink);
  padding: clamp(7.5px, 1.2vw, 12px);           /* паспарту */
  background: #fff;
  box-shadow: 0 22.5px 45px -22.5px rgba(13, 13, 13, .25);
  transition: transform .8s var(--ease), box-shadow .8s var(--ease);
}

.work--tall .work__frame { aspect-ratio: 3 / 4.4; height: var(--h); }
.work--wide .work__frame { aspect-ratio: 16 / 8.4; height: calc(var(--h) * .8); }

.work:hover .work__frame {
  transform: translateY(-7.5px);
  box-shadow: 0 34.5px 60px -25.5px rgba(13, 13, 13, .35);
}

.work__canvas {
  width: 100%; height: 100%;
  background-color: #efede8;
  position: relative; overflow: hidden;
}

.work__img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cat-item__img { width: 100%; height: auto; object-fit: cover; display: block; }

/* фактура холста */
.work__canvas::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background:
    repeating-linear-gradient(0deg, rgba(13,13,13,.03) 0 1px, transparent 1px 2.2px),
    repeating-linear-gradient(90deg, rgba(13,13,13,.03) 0 1px, transparent 1px 2.2px);
}

/* временные ч/б композиции — заменятся фотографиями работ */
.work__canvas--01 { background-image: linear-gradient(90deg, transparent 0 46%, #1a1a1a 46% 54%, transparent 54%); }
.work__canvas--02 { background-image: radial-gradient(circle at 50% 38%, #1a1a1a 0 18%, transparent 18.5%), linear-gradient(0deg, #1a1a1a 0 8%, transparent 8%); }
.work__canvas--03 { background-image: conic-gradient(from 180deg at 50% 120%, transparent 0 40%, #1a1a1a 40% 60%, transparent 60%); }
.work__canvas--04 { background-image: linear-gradient(0deg, transparent 0 44%, #1a1a1a 44% 46%, transparent 46%), linear-gradient(0deg, transparent 0 54%, #8a8a86 54% 55%, transparent 55%); }
.work__canvas--05 { background-image: linear-gradient(146deg, #1a1a1a 0 32%, transparent 32%); }
.work__canvas--06 { background-image: radial-gradient(circle at 78% 26%, #1a1a1a 0 12%, transparent 12.5%), radial-gradient(circle at 40% 64%, transparent 0 20%, #1a1a1a 20% 21%, transparent 21.5%); }

/* музейная этикетка */

.work__plate {
  display: grid; grid-template-columns: auto 1fr; gap: 3px 13.5px;
  margin-top: 16.5px; align-items: baseline;
}

.work__num {
  grid-row: 1 / 3;
  font-family: var(--serif); font-weight: 300; font-size: 36px; line-height: 1;
}

.work__title { font-family: var(--serif); font-style: italic; font-size: 21px; }

.work__spec { font-size: 13.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--grey); }

/* ---------- запасник: каталог всех работ ---------- */

.catalog {
  padding: clamp(105px, 20vh, 165px) var(--pad) clamp(82.5px, 16vh, 142.5px);
}

.catalog__intro {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 6vw, 72px);
  align-items: end;
  margin-top: 33px;
}

.catalog__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(36px, 7vw, 78px); line-height: 1.0;
}

.catalog__aside { justify-self: end; max-width: 315px; }

.catalog__aside p { margin-top: 10.5px; color: var(--grey); }

.catalog__count {
  font-family: var(--serif); font-weight: 300; font-size: 22.5px;
  color: var(--grey);
}

.catalog__count b { font-weight: 400; color: var(--ink); }

.catalog__grid {
  margin-top: clamp(36px, 8vh, 67.5px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: clamp(27px, 4vw, 48px) clamp(21px, 3vw, 36px);
  align-items: end;
}

.cat-item { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }

.cat-item.in { opacity: 1; transform: none; }

.cat-item__frame {
  border: 1px solid var(--ink);
  padding: 5.2px;                                /* паспарту */
  background: #fff;
  box-shadow: 0 13.5px 27px -15px rgba(13, 13, 13, .22);
  transition: transform .7s var(--ease), box-shadow .7s var(--ease);
}

.cat-item:hover .cat-item__frame {
  transform: translateY(-4.5px);
  box-shadow: 0 21px 36px -16.5px rgba(13, 13, 13, .32);
}

.cat-item__canvas { width: 100%; height: auto; }

.cat-item__meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 9px;
  font-size: 11.2px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--grey);
}

.cat-item__meta b {
  font-family: var(--serif); font-weight: 400; font-size: 16.5px;
  letter-spacing: 0; color: var(--ink);
}

/* ---------- страница проекта ---------- */

.ppage__back {
  display: block; width: fit-content;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--grey); margin-bottom: 26px;
  transition: color .3s;
}

.ppage__back:hover { color: var(--ink); }

/* подпись проекта — компактно под фото */
.ppage__head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px;
  margin-top: clamp(18px, 2.4vw, 28px);
}

.ppage__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(24px, 3vw, 40px); line-height: 1.05;
  margin-top: 8px;
}

.ppage__meta {
  font-family: var(--serif); font-weight: 300; font-size: 18px;
  color: var(--grey); white-space: nowrap; flex: none;
}

/* большой горизонтальный герой */
.ppage__hero { margin-top: clamp(24px, 4vh, 44px); }

.ppage__hero img {
  width: 100%; height: clamp(320px, 66vh, 720px);
  object-fit: cover; display: block; cursor: zoom-in;
}

/* лента с горизонтальным скроллом (как Dock) */
.ppage__strip {
  margin-top: clamp(14px, 2vw, 22px);
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 14px;
}

.ppage__strip-inner {
  display: flex; gap: clamp(12px, 1.4vw, 20px);
  width: max-content;
}

.ppage__strip .ppf {
  flex: 0 0 auto;
  height: clamp(230px, 42vh, 440px);
  scroll-snap-align: start;
  overflow: hidden;
}

.ppage__strip .ppf img {
  height: 100%; width: auto; display: block;
  object-fit: cover; cursor: zoom-in;
}

/* тонкая полоса прокрутки в стиле сайта */
.ppage__strip::-webkit-scrollbar { height: 3px; }
.ppage__strip::-webkit-scrollbar-thumb { background: var(--hairline); }
.ppage__strip::-webkit-scrollbar-track { background: transparent; }

.ppage__text {
  margin-top: clamp(40px, 7vh, 80px);
  max-width: 640px;
}

.ppage__text p { color: var(--grey); font-size: 15px; line-height: 1.7; white-space: pre-line; }

.ppage__nav {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: clamp(45px, 8vh, 75px);
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
}

.ppage__nav a {
  font-family: var(--serif); font-style: italic; font-size: 20px;
  transition: opacity .3s;
}

.ppage__nav a:hover { opacity: .55; }

.ppage__nav .label { align-self: center; }

/* фильтр по разделам: «Все проекты · Кухня · Детская…» */
.rfilter {
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  margin-top: clamp(40px, 7vh, 72px);
  border-bottom: 1px solid var(--hairline);
}

.rfilter[hidden] { display: none; }

.rfilter button {
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--grey); padding: 0 0 12px; margin-bottom: -1px;
  border-bottom: 1px solid transparent;
  transition: color .3s, border-color .3s;
}

.rfilter button:hover { color: var(--ink); }
.rfilter button.on { color: var(--ink); border-bottom-color: var(--ink); }

/* на главной — ссылки на подборки, тот же вид */
.rfilter a {
  font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--grey); padding: 0 0 12px; margin-bottom: -1px;
  border-bottom: 1px solid transparent;
  transition: color .3s, border-color .3s;
}

.rfilter a:hover { color: var(--ink); border-bottom-color: var(--ink); }

.rfilter--home { margin-top: clamp(36px, 6vh, 60px); margin-bottom: clamp(28px, 4vh, 44px); }
.rfilter sup { font-size: 9px; letter-spacing: 0; margin-left: 4px; color: var(--grey); }

.rfilter--pp { margin-top: clamp(20px, 3vh, 30px); }

/* галерея раздела: фото из всех проектов, «кирпичная» раскладка */
.rgal { columns: 3; column-gap: clamp(14px, 2vw, 24px); margin-top: clamp(28px, 5vh, 48px); }
.rgal[hidden] { display: none; }

.rgal__item {
  break-inside: avoid; margin: 0 0 clamp(14px, 2vw, 24px);
  cursor: zoom-in;
  animation: rgalIn .6s var(--ease) both;
}

.rgal__item img { width: 100%; height: auto; display: block; background: #e8e6e1; transition: opacity .3s; }
.rgal__item:hover img { opacity: .88; }

.rgal__item figcaption {
  margin-top: 8px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--grey);
}

@keyframes rgalIn { from { opacity: 0; transform: translateY(12px); } }

/* подпись в полноэкранном просмотре */
.zoom__cap {
  position: absolute; left: 0; right: 0; bottom: 16px;
  display: flex; justify-content: center; gap: 18px;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(247, 246, 243, .75);
  pointer-events: none;
}

.zoom__cap a { color: var(--paper); border-bottom: 1px solid rgba(247, 246, 243, .5); pointer-events: auto; padding-bottom: 2px; }
.zoom__n { color: rgba(247, 246, 243, .5); }

/* зум фото */
.zoom {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(13, 13, 13, .88);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
  opacity: 0; transition: opacity .35s var(--ease);
}

.zoom.on { opacity: 1; }

.zoom img { max-width: 94%; max-height: 94%; object-fit: contain; transition: opacity .22s var(--ease); }

a.project { display: block; color: inherit; }

@media (max-width: 760px) {
  .ppage__photos { columns: 1; }
}

/* ---------- карточка картины (лайтбокс) ---------- */

.lb {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(12px, 3vw, 40px);
  background: rgba(13, 13, 13, .55);
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease);
}

.lb.on { opacity: 1; pointer-events: auto; }

.lb__card {
  background: var(--paper);
  width: min(1080px, 100%);
  height: min(92vh, 860px); /* точная высота: вертикальные фото вписываются, а не обрезаются */
  display: grid; grid-template-columns: 1.7fr 1fr;
  overflow: hidden;
  transform: translateY(18px);
  transition: transform .4s var(--ease);
}

.lb.on .lb__card { transform: none; }

.lb__media {
  background: #e8e6e1;
  display: flex; flex-direction: column;
  min-height: 0;
}

.lb__img {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(10px, 1.6vw, 20px);
}

.lb__img img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 15px 38px -15px rgba(13,13,13,.4); transition: opacity .28s var(--ease); }

.lb__thumbs {
  display: flex; gap: 6px; padding: 0 clamp(14px, 2.5vw, 30px) 14px;
  overflow-x: auto;
}

.lb__thumbs img {
  width: 42px; height: 42px; object-fit: cover;
  cursor: pointer; opacity: .55; border: 1px solid transparent;
  transition: opacity .3s;
}

.lb__thumbs img.on { opacity: 1; border-color: var(--ink); }
.lb__thumbs img:hover { opacity: 1; }

.lb__info {
  padding: clamp(20px, 3vw, 36px);
  display: flex; flex-direction: column;
  overflow-y: auto;
}

.lb__num { font-family: var(--serif); font-weight: 300; font-size: 27px; color: var(--grey); line-height: 1; }

.lb__title { font-family: var(--serif); font-style: italic; font-size: 27px; margin-top: 8px; }

.lb__desc { color: var(--grey); font-size: 13px; margin-top: 14px; }

.lb__variants { margin-top: 20px; border-top: 1px solid var(--hairline); }

.lb__variant {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--hairline);
  font-size: 13px;
}

.lb__variant b { font-family: var(--serif); font-weight: 400; font-size: 16.5px; }

.lb__cta { margin-top: auto; padding-top: 24px; }

.lb__close {
  position: absolute; top: clamp(14px, 3vw, 28px); right: clamp(14px, 3vw, 28px);
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); border: 1px solid var(--hairline);
  color: var(--ink); -webkit-appearance: none; appearance: none;
  font-family: var(--sans); font-size: 15px; line-height: 1; cursor: pointer;
  transition: background .3s, color .3s;
}

.lb__close:hover { background: var(--ink); color: var(--paper); }

.work--link, .cat-item { cursor: pointer; }

/* статичные заглушки скрыты, пока JS не решит: заменить данными или показать */
.is-placeholder { display: none; }

@media (max-width: 760px) {
  .lb { padding: 0; }
  .lb__card { grid-template-columns: 1fr; width: 100%; max-height: 100svh; height: 100svh; overflow-y: auto; }
  .lb__media { flex: 1; min-height: 0; }
  .lb__img { flex: 1; min-height: 62vh; padding: 14px; }
  .lb__img img { max-height: 100%; }
  .lb__close { top: 12px; right: 12px; }
}

/* ---------- интерьеры ---------- */

.interiors { padding: clamp(72px, 12vh, 112.5px) var(--pad) clamp(82.5px, 16vh, 142.5px); }

.interiors .gallery__brand {
  padding-top: 0;
  margin-bottom: clamp(36px, 9vh, 75px);
}

.interiors__head {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 6vw, 72px);
  align-items: end;
  margin-top: 33px;
}

.interiors__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(30px, 6vw, 66px); line-height: 1.02;
}

.interiors__lead { color: var(--grey); max-width: 345px; justify-self: end; }

.interiors__grid {
  margin-top: clamp(48px, 10vh, 82.5px);
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: clamp(21px, 4vw, 48px);
}

.project--a { grid-column: 1 / 8; }
.project--b { grid-column: 8 / 13; margin-top: clamp(60px, 14vh, 120px); }
.project--c { grid-column: 1 / 6; margin-top: clamp(-60px, -6vh, -30px); }
.project--d { grid-column: 6 / 13; margin-top: clamp(45px, 10vh, 90px); }

.project__img {
  position: relative; overflow: hidden;
  background: #e8e6e1;
  display: flex; align-items: center; justify-content: center;
}

.project--a .project__img { aspect-ratio: 4 / 3; }
.project--b .project__img { aspect-ratio: 3 / 4; }
.project--c .project__img { aspect-ratio: 1 / 1; }
.project--d .project__img { aspect-ratio: 16 / 10; }

.project__img span {
  font-size: 12px; letter-spacing: .4em; text-transform: uppercase;
  color: var(--grey);
}

.project__img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.project:hover .project__img img { transform: scale(1.04); }

.project__meta {
  display: grid; grid-template-columns: auto 1fr; gap: 1.5px 15px;
  margin-top: 15px; align-items: baseline;
}

.project__num {
  grid-row: 1 / 3;
  font-family: var(--serif); font-weight: 300; font-size: 25.5px; line-height: 1;
  color: var(--grey);
}

.project__title { font-family: var(--serif); font-style: italic; font-size: 21px; }

.project__spec { font-size: 13.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--grey); }

.interiors__links {
  display: flex; gap: clamp(24px, 5vw, 48px);
  margin-top: clamp(45px, 10vh, 75px);
}

/* страница всех проектов: плашки по два в ряд */

.projects__grid {
  margin-top: clamp(36px, 8vh, 67.5px);
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 7vh, 67.5px) clamp(24px, 4vw, 48px);
}

.projects__grid .project__img { aspect-ratio: 4 / 3; }

/* ---------- философия: чёрный зал ---------- */

.philosophy {
  background: var(--ink); color: var(--paper);
  padding: clamp(82.5px, 16vh, 142.5px) var(--pad);
}

.philosophy blockquote {
  margin-top: 40.5px;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(25.5px, 5.6vw, 63px);
  line-height: 1.12; letter-spacing: -.01em;
  max-width: 15em;
}

.philosophy em { font-weight: 400; }

.philosophy__cols {
  margin-top: clamp(48px, 10vh, 90px);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 72px);
  max-width: 660px; margin-left: auto;
}

.philosophy__cols p { color: rgba(247, 246, 243, .62); font-size: 15px; }

/* ---------- ателье ---------- */

.atelier { padding: clamp(82.5px, 16vh, 142.5px) var(--pad); }

.atelier__title {
  margin-top: 33px;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(30px, 6vw, 66px); line-height: 1.02;
}

.atelier__steps {
  list-style: none;
  margin-top: clamp(48px, 10vh, 82.5px);
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(21px, 4vw, 48px);
}

.atelier__steps li {
  border-top: 1px solid var(--ink);
  padding-top: 19.5px;
}

.atelier__steps li:nth-child(2) { transition-delay: .12s; }
.atelier__steps li:nth-child(3) { transition-delay: .24s; }

.atelier__num {
  font-family: var(--serif); font-weight: 300; font-size: 18px; color: var(--grey);
}

.atelier__steps h3 {
  margin-top: 10.5px;
  font-family: var(--serif); font-weight: 400; font-size: 28.5px;
}

.atelier__steps p { margin-top: 10.5px; color: var(--grey); font-size: 14.2px; }

/* ---------- футер ---------- */

.footer {
  background: var(--ink); color: var(--paper);
  padding: clamp(75px, 15vh, 127.5px) var(--pad) 30px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}

.footer__logo { width: min(64vw, 480px); margin-top: 36px; color: var(--paper); }

.footer__mail {
  margin-top: clamp(36px, 8vh, 67.5px);
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(18px, 3.4vw, 33px);
  border-bottom: 1px solid var(--hairline-light);
  padding-bottom: 6px;
  transition: border-color .4s, opacity .4s;
}

.footer__mail:hover { border-color: var(--paper); opacity: .8; }

.footer__row {
  margin-top: clamp(52.5px, 12vh, 97.5px);
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--hairline-light);
  padding-top: 19.5px;
  font-size: 13.5px; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(247, 246, 243, .45);
}

/* ---------- адаптив ---------- */

@media (max-width: 760px) {
  .header__nav {
    position: fixed; inset: 0; z-index: 60;
    height: 100svh;
    background: var(--paper);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 28px;
    opacity: 0; pointer-events: none;
    transition: opacity .4s var(--ease);
  }

  .header.is-open .header__nav { opacity: 1; pointer-events: auto; }

  .header__nav a { font-size: 15px; text-indent: .22em; }

  .header__brand { position: relative; z-index: 62; }

  .header__burger {
    display: flex; flex-direction: column; gap: 5.2px;
    position: relative; z-index: 62;
    background: none; border: none; padding: 4.5px;
  }

  .header__burger span {
    width: 19.5px; height: 1px; background: var(--ink);
    transition: transform .45s var(--ease);
  }

  .header.is-open .header__burger span:first-child { transform: translateY(3px) rotate(45deg); }
  .header.is-open .header__burger span:last-child { transform: translateY(-3px) rotate(-45deg); }

  .hero__side { display: none; }

  .gallery__head { padding-top: 63px; }

  /* галерея картин: нативный горизонтальный свайп вместо scroll-jacking */
  .gallery { height: auto !important; }
  .gallery__sticky { position: static; height: auto; }
  .gallery__track {
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    transform: none !important;
    padding: 28px var(--pad) 8px;
    gap: 20px;
  }
  .gallery__track::-webkit-scrollbar { display: none; }
  .gallery__track { scrollbar-width: none; }
  .work { scroll-snap-align: center; }
  .work__frame { --availH: 62vh; }
  .gallery__progress { margin-top: 8px; }

  /* финальная плашка — отдельным блоком под лентой */
  .panel--outro-mobile {
    max-width: none; text-align: center;
    padding: clamp(40px, 8vh, 64px) var(--pad) clamp(20px, 4vh, 32px);
  }
  .panel--outro-mobile h2 { font-size: clamp(34px, 10vw, 52px); }

  /* CTA-кнопка на мобильном: заметное основное действие */
  .interiors__links { flex-direction: column; align-items: stretch; gap: 14px; }
  .interiors__links .line-link:not(.line-link--cta) { align-self: center; }

  .panel--outro-mobile .line-link { display: block; margin: 22px auto 0; width: fit-content; }

  .line-link--cta {
    border: 1px solid var(--ink); border-bottom-width: 1px;
    padding: 15px 20px; text-align: center;
    width: 100%; box-sizing: border-box;
    transition: background .3s, color .3s;
  }
  .line-link--cta:hover { background: var(--ink); color: var(--paper); opacity: 1; }
  .panel--outro-mobile .line-link--cta { width: 100%; max-width: 320px; margin-top: 26px; }

  .philosophy__cols { grid-template-columns: 1fr; }

  .interiors__head { grid-template-columns: 1fr; align-items: start; }

  .interiors__lead { justify-self: start; }

  /* главная: 4 проекта по 2 в ряд, единый формат */
  /* minmax(0,1fr): длинные названия не распирают колонку шире экрана */
  .interiors__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

  .projects__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }

  .project__meta { min-width: 0; }
  .project__title { overflow-wrap: anywhere; }

  /* фильтр — одной строкой со свайпом, галерея раздела — в две колонки */
  .rfilter { flex-wrap: nowrap; overflow-x: auto; gap: 22px; scrollbar-width: none; }
  .rfilter::-webkit-scrollbar { display: none; }
  .rfilter button, .rfilter a { flex: none; font-size: 11px; }
  .rgal { columns: 2; }
  .zoom__cap { bottom: 22px; padding: 0 16px; flex-wrap: wrap; text-align: center; }

  .project--a, .project--b, .project--c, .project--d {
    grid-column: auto; margin-top: 0;
  }

  .project--a .project__img,
  .project--b .project__img,
  .project--c .project__img,
  .project--d .project__img { aspect-ratio: 3 / 4; }

  .project__num { font-size: 22px; }
  .project__title { font-size: 19px; }
  .project__spec { font-size: 12px; }

  .atelier__steps { grid-template-columns: 1fr; }

  .footer__row { flex-direction: column; gap: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    transition-duration: .001s !important;
  }
}
