/* ==========================================================================
   OSTOV — Авторское бюро частной жилой архитектуры
   styles.css
   --------------------------------------------------------------------------
   00  Токены
   01  Reset / база
   02  Типографика
   03  Раскладка: контейнер, секции
   04  Компоненты: кнопки, метки, медиа-плейсхолдер
   05  Шапка + мобильное меню
   06  Подвал
   07  Текстура-оверлей
   08  Моушн: reveal-состояния (слой 1+)
   09  Главная: hero (слой 1)
   10  Главная: манифест + полноэкранные проекты (слой 2)
   11  Главная: подход, маркиз, числа, CTA (слой 3)
   12  Проекты: список + курсор-превью (слой 4)
   13  Страница проекта (слой 5)
   14  Бюро (слой 6)
   15  Контакты + калькулятор (слой 7)
   16  Curtain-переход между страницами (слой 8)
   ========================================================================== */

/* == 00 — Токены ========================================================= */
:root {
  --paper: #ECE8E1;
  --plaster: #F4F1EB;
  --sand: #DED7CB;
  --concrete: #B7AEA1;
  --stone: #6C665C;
  --graphite: #26241F;
  --ink: #14130F;
  --rust: #A6543A;
  --line: rgba(38, 36, 31, 0.14);
  --line-strong: rgba(38, 36, 31, 0.30);
  --line-paper: rgba(244, 241, 235, 0.14);

  --content-max: 1440px;
  --pad-x: 56px;
  --section-pad: clamp(90px, 14vh, 180px);

  --ease-arch: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-slow: cubic-bezier(0.65, 0, 0.35, 1);
  --shadow-soft: 0 24px 70px rgba(38, 36, 31, 0.08);

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --header-h: 76px;
}
@media (max-width: 1023px) { :root { --pad-x: 32px; } }
@media (max-width: 767px)  { :root { --pad-x: 20px; --header-h: 64px; } }

/* == 01 — Reset / база =================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--graphite);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
address { font-style: normal; }
h1, h2, h3, h4 { hyphens: none; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
::selection { background: var(--rust); color: var(--paper); }
html.menu-open, html.menu-open body { overflow: hidden; }

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

/* == 02 — Типографика ==================================================== */
.giant {
  font-weight: 900;
  font-size: clamp(64px, 11vw, 190px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.h1 { font-weight: 800; font-size: clamp(40px, 6vw, 88px); line-height: 0.98; letter-spacing: -0.015em; }
.h2 { font-weight: 700; font-size: clamp(30px, 4vw, 56px); line-height: 1.02; }
.h3 { font-weight: 600; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.15; }
.manifest-line { font-weight: 500; font-size: clamp(22px, 2.6vw, 38px); line-height: 1.25; }
.lead { font-weight: 400; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--stone); max-width: 56ch; }
.body-text { font-size: 16px; line-height: 1.6; max-width: 60ch; }
.label {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--stone);
}
.label--rust { color: var(--rust); }
.tnum { font-variant-numeric: tabular-nums; }

/* == 03 — Раскладка ====================================================== */
.container { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--pad-x); }
.section { padding-block: var(--section-pad); }
.section--sand { background: var(--sand); }
.section--ink { background: var(--ink); color: var(--paper); }

/* Лёгкий hero для внутренних страниц (без фото) */
.hero-lite { padding-top: calc(var(--header-h) + clamp(70px, 12vh, 150px)); padding-bottom: clamp(60px, 9vh, 120px); }
.hero-lite .label { display: block; margin-bottom: 28px; }
.hero-lite .lead { margin-top: 28px; }

/* == 04 — Компоненты ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 28px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-strong);
  transition: color 0.3s var(--ease-arch), border-color 0.3s var(--ease-arch), background-color 0.3s var(--ease-arch);
}
.btn:hover { color: var(--rust); border-color: var(--rust); }
.btn--solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--solid:hover { background: var(--rust); border-color: var(--rust); color: var(--paper); }

/* Медиа-плейсхолдер: реальный файл assets/img/<имя>.jpg подхватится сам;
   при отсутствии файла onerror вешает .is-missing и остаётся заливка + подпись */
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ar, 3 / 2);
  background: linear-gradient(135deg, var(--sand), var(--concrete));
  border: 1px solid var(--line);
}
.media__ph {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}
.media > img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media.is-missing img { display: none; }
/* вариант с параллакс-обёрткой внутри рамки */
.media-par { position: absolute; inset: -22px 0; z-index: 2; }
.media-par img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* == 05 — Шапка ========================================================== */
.skip-link {
  position: fixed;
  top: -100px;
  left: var(--pad-x);
  z-index: 300;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  font-size: 13px;
  transition: top 0.2s var(--ease-arch);
}
.skip-link:focus { top: 10px; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  transition: background-color 0.3s var(--ease-slow);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--line);
  opacity: 0;
  transition: opacity 0.3s var(--ease-slow);
}
.site-header.is-scrolled {
  background: rgba(236, 232, 225, 0.8);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.site-header.is-scrolled::after { opacity: 1; }

.header-inner { display: flex; align-items: center; gap: 40px; height: var(--header-h); }
.wordmark { font-weight: 800; font-size: 20px; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1; }

.site-nav { display: flex; gap: 36px; margin-left: auto; }
.nav-link { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 4px 0; }
.nav-ru { font-weight: 500; font-size: 15px; line-height: 1.2; transition: color 0.25s var(--ease-arch); }
.nav-en { font-weight: 600; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-arch);
}
.nav-link:hover .nav-ru { color: var(--rust); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.header-cta { flex-shrink: 0; min-height: 42px; padding: 10px 22px; }

/* Бургер: только мобила/планшет, прижат к правому полю контента */
.burger {
  display: none;
  position: relative;
  z-index: 210;
  width: 44px;
  height: 44px;
  margin-left: auto;
  margin-right: calc((44px - 26px) / -2); /* линии иконки вровень с правым полем */
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
}
.burger-line {
  display: block;
  width: 26px;
  height: 2px;
  background: currentColor;
  transition: transform 0.35s var(--ease-arch), opacity 0.3s;
}
.burger.is-open .burger-line:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.burger.is-open .burger-line:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* Полноэкранное мобильное меню */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(32px, 6vh, 56px);
  padding: calc(var(--header-h) + 16px) var(--pad-x) 40px;
  background: var(--ink);
  color: var(--paper);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.4s var(--ease-arch), transform 0.4s var(--ease-arch), visibility 0s linear 0.4s;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.4s var(--ease-arch), transform 0.4s var(--ease-arch);
}
.mobile-nav { display: flex; flex-direction: column; gap: clamp(18px, 3.4vh, 30px); }
.mobile-link {
  font-weight: 800;
  font-size: clamp(34px, 9vw, 64px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.mobile-link.is-active { color: var(--rust); }
.mobile-en {
  display: block;
  margin-top: 6px;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--concrete);
}
.mobile-menu-meta { display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--concrete); }

/* Шапка поверх открытого меню — светлая */
html.menu-open .site-header { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--paper); }
html.menu-open .site-header::after { opacity: 0; }

@media (max-width: 1023px) {
  .site-nav, .header-cta { display: none; }
  .burger { display: flex; }
}

/* == 06 — Подвал ========================================================= */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(70px, 10vh, 120px) 0 36px;
}
.footer-cta { display: block; }
.footer-cta-ru {
  display: block;
  font-weight: 800;
  font-size: clamp(36px, 7vw, 110px);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  transition: color 0.35s var(--ease-arch);
}
.footer-cta-en {
  display: block;
  margin-top: 14px;
  font-weight: 600;
  font-size: clamp(12px, 1.1vw, 15px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--concrete);
}
.footer-cta:hover .footer-cta-ru { color: var(--rust); }

.footer-cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  margin-top: clamp(50px, 8vh, 90px);
  padding-top: 44px;
  border-top: 1px solid var(--line-paper);
}
.footer-wordmark { font-weight: 800; font-size: 20px; letter-spacing: 0.02em; text-transform: uppercase; }
.footer-desc { margin-top: 14px; color: var(--concrete); max-width: 26ch; line-height: 1.5; }
.footer-col-label {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--concrete);
  margin-bottom: 18px;
}
.footer-address p { margin-bottom: 10px; line-height: 1.5; }
.footer-address a { transition: color 0.25s var(--ease-arch); }
.footer-address a:hover { color: var(--rust); }
.footer-nav a { display: block; padding: 4px 0; transition: color 0.25s var(--ease-arch); }
.footer-nav a:hover { color: var(--rust); }
.footer-nav span {
  margin-left: 10px;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--concrete);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  align-items: baseline;
  margin-top: clamp(40px, 7vh, 70px);
  padding-top: 24px;
  border-top: 1px solid var(--line-paper);
  font-size: 13px;
  color: var(--concrete);
}
.footer-est { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }

@media (max-width: 767px) {
  .footer-cols { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* == 07 — Текстура-оверлей: чертёжная сетка 40px, ~4% ==================== */
.texture {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.3; /* 0.3 × alpha 0.14 ≈ 4% */
}

/* == 08 — Моушн: reveal-состояния ========================================
   Техники назначаются через data-reveal="r2|r3|r4|r5" + класс .is-in
   от IntersectionObserver. Стаггер — через inline --d (transition-delay).
   При prefers-reduced-motion переходы схлопываются в мгновенные (см. 01). */

/* R2 — wipe слева-направо (названия проектов, обложки) */
[data-reveal="r2"] {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1s var(--ease-arch);
  transition-delay: var(--d, 0s);
}
[data-reveal="r2"].is-in { clip-path: inset(0 0 0 0); }

/* R3 — tracking-in: слова оборачиваются в .w скриптом.
   letter-spacing даёт reflow, поэтому техника только на коротких блоках. */
[data-reveal="r3"] .w {
  display: inline-block;
  letter-spacing: 0.4em;
  opacity: 0;
  transition: letter-spacing 1s var(--ease-arch), opacity 0.8s linear;
  transition-delay: var(--d, 0s);
}
[data-reveal="r3"].is-in .w { letter-spacing: 0.01em; opacity: 1; }

/* R4 — line-mask: строка в обёртке overflow:hidden, выезд снизу, стаггер 90мс */
.line-mask { display: block; overflow: hidden; }
.line-mask .line-inner {
  display: block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease-arch);
  transition-delay: var(--d, 0s);
}
[data-reveal="r4"].is-in .line-inner { transform: translateY(0); }

/* R5 — scale-in (карточки, блоки калькулятора) */
[data-reveal="r5"] {
  transform: scale(0.955);
  opacity: 0;
  transition: transform 0.9s var(--ease-arch), opacity 0.7s linear;
  transition-delay: var(--d, 0s);
}
[data-reveal="r5"].is-in { transform: none; opacity: 1; }

/* == 09 — Главная: hero (слой 1) ========================================= */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--ink);
}
/* R1 curtain: фото раскрывается из горизонтальной щели после загрузки */
.hero-media {
  position: absolute;
  inset: -28px 0; /* запас под параллакс ±20px */
  clip-path: inset(48.5% 0 48.5% 0);
  will-change: transform;
}
.hero.is-revealed .hero-media {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.2s var(--ease-slow);
}
.hero-media .media { position: absolute; inset: 0; aspect-ratio: auto; border: 0; }
/* ken-burns: медленный наезд 1.08 → 1.0 */
.hero.is-revealed .hero-media img { animation: heroKenBurns 2s var(--ease-slow) both; }
@keyframes heroKenBurns {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}
.hero-scrim {
  position: absolute;
  inset: -28px 0;
  z-index: 1;
  background:
    linear-gradient(to top, rgba(20, 19, 15, 0.6), rgba(20, 19, 15, 0) 60%),
    linear-gradient(to bottom, rgba(20, 19, 15, 0.35), rgba(20, 19, 15, 0) 32%);
}
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding-bottom: clamp(84px, 13vh, 140px);
}
/* Текст сквозь фото: буквы заливаются тем же кадром (чуть ярче), вокруг — scrim */
.hero-word {
  display: block;
  background-image: url("../img/hero.jpg"), linear-gradient(135deg, var(--sand), var(--concrete));
  background-size: cover, cover;
  background-position: center 74%, center;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* brightness чуть ниже + двойной drop-shadow: тонкий край и мягкий ореол —
     буквы читаются даже там, где пересекают светлый фасад дома */
  filter: brightness(1.28) drop-shadow(0 1px 2px rgba(20, 19, 15, 0.6)) drop-shadow(0 3px 16px rgba(20, 19, 15, 0.42));
  opacity: 0;
  transform: translateY(0.22em);
  transition: opacity 0.9s linear, transform 1s var(--ease-arch);
}
.hero.is-revealed .hero-word {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.85s;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-word { background: none; color: var(--paper); filter: none; }
}
/* R3 tracking-in на билингва-строке */
.hero-sub { display: block; margin-top: clamp(18px, 3vh, 30px); }
.hero-sub-ru {
  display: block;
  font-weight: 600;
  font-size: clamp(13px, 1.2vw, 16px);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: 0;
  transition: letter-spacing 1.2s var(--ease-arch), opacity 0.9s linear;
}
.hero-sub-en {
  display: block;
  margin-top: 10px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--concrete);
  opacity: 0;
  transition: letter-spacing 1.2s var(--ease-arch), opacity 0.9s linear;
}
.hero.is-revealed .hero-sub-ru { letter-spacing: 0.18em; opacity: 1; transition-delay: 1.1s; }
.hero.is-revealed .hero-sub-en { letter-spacing: 0.18em; opacity: 1; transition-delay: 1.25s; }
/* Метка-скролл */
.hero-scroll {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--concrete);
  opacity: 0;
  transition: opacity 0.8s linear 1.6s;
}
.hero.is-revealed .hero-scroll { opacity: 1; }
.hero-scroll-line {
  display: block;
  width: 56px;
  height: 1px;
  background: var(--concrete);
  transform-origin: left;
  animation: scrollPulse 2.6s var(--ease-slow) infinite;
}
.hero-scroll-label {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
@keyframes scrollPulse {
  0%   { transform: scaleX(0.3); opacity: 0.5; }
  50%  { transform: scaleX(1);   opacity: 1; }
  100% { transform: scaleX(0.3); opacity: 0.5; }
}

/* Шапка поверх фото-hero: светлый текст, пока не проскроллено */
body[data-hero="photo"] .site-header:not(.is-scrolled) { color: var(--paper); }
body[data-hero="photo"] .site-header:not(.is-scrolled) .nav-en { color: rgba(244, 241, 235, 0.6); }
body[data-hero="photo"] .site-header:not(.is-scrolled) .header-cta { border-color: rgba(244, 241, 235, 0.45); }
body[data-hero="photo"] .site-header:not(.is-scrolled) .nav-link:hover .nav-ru,
body[data-hero="photo"] .site-header:not(.is-scrolled) .header-cta:hover { color: var(--paper); }
body[data-hero="photo"] .site-header:not(.is-scrolled) .header-cta:hover { border-color: var(--paper); }

/* == 10 — Главная: манифест + полноэкранные проекты (слой 2) ============= */
.manifesto { position: relative; overflow: hidden; background: var(--paper); }
.manifesto-ghost {
  position: absolute;
  top: 6%;
  right: -3%;
  z-index: 0;
  font-weight: 900;
  font-size: clamp(110px, 21vw, 320px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--concrete);
  opacity: 0.14;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.manifesto .label { display: block; margin-bottom: clamp(40px, 7vh, 72px); }
.manifesto-text { position: relative; z-index: 1; max-width: 34ch; }
.manifesto-main { color: var(--graphite); }
.manifesto-quiet { margin-top: clamp(22px, 4vh, 36px); color: var(--stone); }
/* draw-in подчёркивание охрой после появления слова */
.nb { white-space: nowrap; }
.draw { position: relative; display: inline-block; }
.draw::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.04em;
  height: 0.075em;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease-arch) 1.15s;
}
[data-reveal].is-in .draw::after { transform: scaleX(1); }

/* Полноэкранные избранные проекты */
.works-head { padding: clamp(50px, 8vh, 90px) 0 clamp(28px, 4vh, 44px); }
.work {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--ink);
}
.work-media { position: absolute; inset: -28px 0; }
.work-media .media { position: absolute; inset: 0; aspect-ratio: auto; border: 0; }
/* Усилен под яркие кадры (напр. proj-05 — белый интерьер): плотный низ под
   мета/ссылкой, средний под названием, чистый верх фото выше 56% */
.work-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top,
    rgba(20, 19, 15, 0.75) 0%,
    rgba(20, 19, 15, 0.48) 26%,
    rgba(20, 19, 15, 0.1) 46%,
    rgba(20, 19, 15, 0) 62%);
}
.work-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  height: 100%;
  padding-bottom: clamp(56px, 9vh, 96px);
  color: var(--paper);
  /* тонкий край + мягкий ореол — страховка на самых светлых участках кадра */
  text-shadow: 0 1px 2px rgba(20, 19, 15, 0.35), 0 2px 26px rgba(20, 19, 15, 0.5);
}
.work-index {
  position: absolute;
  top: clamp(80px, 13vh, 130px);
  right: var(--pad-x);
  font-weight: 900;
  font-size: clamp(90px, 14vw, 220px);
  line-height: 1;
  color: var(--paper);
  opacity: 0.2;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  user-select: none;
}
.work-title {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-weight: 800;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.015em;
}
.work-title-en {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 241, 235, 0.85);
}
.work-meta {
  margin-top: 18px;
  font-weight: 500;
  font-size: clamp(14px, 1.2vw, 17px);
  color: rgba(244, 241, 235, 0.88);
}
.work-link {
  margin-top: 26px;
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  min-height: 44px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  transition: color 0.3s var(--ease-arch);
}
.work-link span {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(244, 241, 235, 0.6);
}
.work-link:hover { color: var(--rust); }
.works-all { padding: clamp(50px, 8vh, 90px) 0; }
.works-all-link {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-weight: 800;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1;
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease-arch);
}
.works-all-link span {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}
.works-all-link:hover { color: var(--rust); }

/* == 11 — Главная: подход, маркиз, числа, CTA (слой 3) =================== */
.approach { background: var(--plaster); overflow: hidden; }
.approach .label { display: block; margin-bottom: 28px; }
.approach-title { max-width: 16ch; }
.approach-text { margin-top: clamp(24px, 4vh, 40px); }

/* Маркиз материалов: встречные строки, бесшовный цикл (дубль ×2, -50%) */
.marquee { margin-top: clamp(50px, 8vh, 90px); border-block: 1px solid var(--line); }
.marquee-row { overflow: hidden; padding-block: clamp(14px, 2.4vh, 24px); }
.marquee-row + .marquee-row { border-top: 1px solid var(--line); }
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeMove 46s linear infinite;
}
.marquee-row--rev .marquee-track { animation-direction: reverse; animation-duration: 52s; }
.marquee-row:hover .marquee-track { animation-play-state: paused; }
.marquee-seq {
  display: block;
  white-space: nowrap;
  font-weight: 800;
  font-size: clamp(34px, 5vw, 80px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--graphite);
}
.marquee-row--rev .marquee-seq { color: var(--concrete); }
.marquee-seq i {
  font-style: normal;
  font-weight: 600;
  font-size: 0.22em;
  letter-spacing: 0.18em;
  color: var(--stone);
}
@keyframes marqueeMove { to { transform: translateX(-50%); } }
@media (max-width: 767px) {
  .marquee-track { animation-duration: 70s; }
  .marquee-row--rev .marquee-track { animation-duration: 80s; }
}

/* Числа */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
}
.stat-num {
  font-weight: 800;
  font-size: clamp(44px, 5.5vw, 92px);
  line-height: 1;
  letter-spacing: -0.015em;
}
.stat-ru { font-size: 15px; }
.stat-en {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}
@media (max-width: 767px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 30px 20px; }
}

/* CTA */
.cta-title { max-width: 14ch; }
.cta-en {
  margin-top: 16px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--concrete);
}
.cta-btn { margin-top: clamp(30px, 5vh, 48px); }

/* == 12 — Проекты: список + курсор-превью (слой 4) ======================= */
.plist-section { padding-bottom: clamp(70px, 10vh, 130px); }
.plist { list-style: none; border-top: 1px solid var(--line); }
.plist-item { border-bottom: 1px solid var(--line); }
.plist-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 8px 40px;
  padding-block: clamp(22px, 3.6vh, 34px);
  transition: transform 0.45s var(--ease-arch);
}
.plist-row:hover, .plist-row:focus-visible { transform: translateX(14px); }
.plist-name {
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease-arch);
}
.plist-row:hover .plist-name, .plist-row:focus-visible .plist-name { color: var(--rust); }
.plist-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.plist-meta-ru { font-weight: 500; font-size: clamp(13px, 1.1vw, 16px); }
.plist-meta-en {
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}
.plist-thumb { display: none; }

/* Курсор-превью: fixed, движется на transform в едином rAF (lerp) */
.cursor-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 120;
  width: min(360px, 30vw);
  aspect-ratio: 4 / 3;
  pointer-events: none;
  opacity: 0;
  clip-path: inset(14% 0 14% 0);
  transition: opacity 0.3s var(--ease-arch), clip-path 0.5s var(--ease-arch);
  box-shadow: var(--shadow-soft);
  will-change: transform;
}
.cursor-preview.is-active { opacity: 1; clip-path: inset(0 0 0 0); }

@media (max-width: 1023px) {
  .plist-row { grid-template-columns: 1fr; align-items: start; }
  .plist-row:hover, .plist-row:focus-visible { transform: none; }
  .plist-meta { align-items: flex-start; text-align: left; }
  .plist-thumb { display: block; margin-top: 16px; max-width: 440px; }
  .cursor-preview { display: none; }
}

/* == 13 — Страница проекта (слой 5) ====================================== */
/* Hero проекта: те же R1 curtain + R7, поверх — индекс и название */
.hero--project .hero-content { padding-bottom: clamp(70px, 11vh, 120px); }
.phero-index {
  position: absolute;
  top: calc(var(--header-h) + clamp(16px, 4vh, 40px));
  right: var(--pad-x);
  z-index: 2;
  font-weight: 900;
  font-size: clamp(90px, 14vw, 220px);
  line-height: 1;
  color: var(--paper);
  opacity: 0.22;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  user-select: none;
}
.phero-title {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-weight: 800;
  font-size: clamp(40px, 6.5vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--paper);
  text-shadow: 0 1px 24px rgba(20, 19, 15, 0.45);
}
.phero-title-en {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 241, 235, 0.72);
}

/* Мета-панель: лента фактов */
.pmeta { border-bottom: 1px solid var(--line); background: var(--plaster); }
.pmeta-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.pmeta-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(20px, 3vh, 30px) 20px clamp(20px, 3vh, 30px) 0;
}
.pmeta-cell + .pmeta-cell { border-left: 1px solid var(--line); padding-left: 20px; }
.pmeta-label {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}
.pmeta-value { font-weight: 500; font-size: clamp(15px, 1.3vw, 19px); }
@media (max-width: 767px) {
  .pmeta-grid { grid-template-columns: 1fr 1fr; }
  .pmeta-cell { border-top: 1px solid var(--line); }
  .pmeta-cell + .pmeta-cell { border-left: 0; padding-left: 0; }
  .pmeta-cell:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
  .pmeta-cell:nth-child(-n+2) { border-top: 0; }
}

/* Концепция */
.pconcept .label { display: block; margin-bottom: 28px; }
.pconcept-text {
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.35;
  max-width: 44ch;
}

/* Галерея: 4:5 (R2) + 3:2 (R7), редакционная асимметрия */
.pgallery { padding-top: 0; }
.pgallery-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.pgallery-item { margin: 0; }
.pgallery-b { margin-top: clamp(48px, 10vh, 140px); }
.pcaption {
  margin-top: 14px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}
@media (max-width: 767px) {
  .pgallery-grid { grid-template-columns: 1fr; }
  .pgallery-b { margin-top: 8px; }
}

/* Материалы */
.pmaterials {
  padding-block: clamp(28px, 5vh, 44px);
  border-top: 1px solid var(--line);
  font-weight: 500;
  font-size: clamp(16px, 1.5vw, 20px);
}
.pmaterials-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}

/* Навигация проекта */
.pnav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding-block: clamp(28px, 5vh, 44px);
  border-top: 1px solid var(--line);
}
.pnav a { display: inline-flex; align-items: baseline; gap: 10px; min-height: 44px; transition: color 0.3s var(--ease-arch); }
.pnav a:hover { color: var(--rust); }
.pnav a span {
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}
.pnav-back { font-weight: 600; font-size: 14px; }
.pnav-next { font-weight: 800; font-size: clamp(18px, 2vw, 26px); letter-spacing: -0.01em; text-align: right; }

/* == 14 — Бюро (слой 6) ================================================== */
.about-manifesto-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.about-manifesto-text .line-mask + .line-mask { margin-top: 0.5em; }
.about-quiet { color: var(--stone); }
.about-photo { margin: 0; }
@media (max-width: 767px) {
  .about-manifesto-grid { grid-template-columns: 1fr; }
}

/* Таймлайн процесса: вертикальная линия --line, заполняется --rust по скроллу */
.about-process .label { display: block; margin-bottom: clamp(36px, 6vh, 60px); }
.timeline { position: relative; max-width: 720px; }
.timeline-track,
.timeline-progress {
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
}
.timeline-track { background: var(--line); }
.timeline-progress {
  background: var(--rust);
  transform: scaleY(var(--p, 0));
  transform-origin: top;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .timeline-progress { transform: none; }
}
.timeline-list { list-style: none; }
.tl-step { position: relative; padding-left: clamp(36px, 5vw, 64px); }
.tl-step + .tl-step { margin-top: clamp(40px, 7vh, 72px); }
.tl-num {
  display: block;
  font-weight: 800;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1;
  color: var(--concrete);
}
.tl-title { margin-top: 10px; }
.tl-desc { margin-top: 8px; color: var(--stone); max-width: 48ch; }

/* Числа: альтернативная раскладка строками */
.stats--rows .stats-rows { display: flex; flex-direction: column; }
.stat-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  align-items: baseline;
  gap: 24px;
  padding-block: clamp(18px, 3vh, 28px);
  border-top: 1px solid var(--line-strong);
}
.stat-row:last-child { border-bottom: 1px solid var(--line-strong); }
.stat-row .stat-num { font-size: clamp(40px, 4.6vw, 76px); }
.stat-row-labels { display: flex; align-items: baseline; gap: 16px; }
@media (max-width: 767px) {
  .stat-row { grid-template-columns: 1fr; gap: 6px; }
  .stat-row-labels { gap: 12px; }
}

/* == 15 — Контакты + калькулятор (слой 7) ================================ */
.calc-section .label { display: block; margin-bottom: clamp(32px, 5vh, 52px); }
.calc {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.calc-controls { display: flex; flex-direction: column; gap: clamp(32px, 5vh, 52px); }
.calc-field { border: 0; }
.calc-legend {
  margin-bottom: 18px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}
.calc-legend span { color: var(--concrete); margin-left: 8px; }

/* Сегмент-кнопки */
.seg { display: flex; flex-wrap: wrap; gap: 10px; }
.seg--col { flex-direction: column; align-items: flex-start; }
.seg-btn { position: relative; display: inline-flex; }
.seg-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.seg-btn span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--line-strong);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.25s var(--ease-arch), border-color 0.25s var(--ease-arch);
}
.seg-btn:hover span { border-color: var(--rust); }
.seg-btn input:checked + span { color: var(--rust); border-color: var(--rust); font-weight: 600; }
.seg-btn input:focus-visible + span { outline: 2px solid var(--rust); outline-offset: 3px; }

/* Площадь: значение + ползунок-размерная линия */
.calc-area-value {
  display: block;
  margin-bottom: 14px;
  font-weight: 800;
  font-size: clamp(34px, 3.6vw, 56px);
  line-height: 1;
  letter-spacing: -0.015em;
}
.dimline { position: relative; padding-top: 8px; }
.dimline input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.dimline input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--line-strong);
}
.dimline input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 30px;
  margin-top: -14px;
  background: linear-gradient(var(--rust), var(--rust)) center / 3px 100% no-repeat;
  border: 0;
}
.dimline input[type="range"]::-moz-range-track {
  height: 2px;
  background: var(--line-strong);
}
.dimline input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 30px;
  background: linear-gradient(var(--rust), var(--rust)) center / 3px 100% no-repeat;
  border: 0;
  border-radius: 0;
}
/* засечки каждые 100 м² (14 делений) */
.dimline-scale {
  height: 10px;
  margin-top: 2px;
  background: repeating-linear-gradient(
    to right,
    var(--line-strong) 0,
    var(--line-strong) 1px,
    transparent 1px,
    transparent calc((100% - 1px) / 14)
  );
  background-position: left top;
}
.dimline-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--stone);
}

/* Результат */
.calc-result {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: clamp(24px, 4vh, 40px);
  background: var(--plaster);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.calc-result-label {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}
.calc-result-label span { color: var(--concrete); margin-left: 8px; }
.calc-result-num {
  margin-top: 18px;
  font-weight: 800;
  font-size: clamp(26px, 2.6vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--rust);
}
.calc-term { margin-top: 14px; font-weight: 500; font-size: 15px; }
.calc-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
  color: var(--stone);
}
@media (max-width: 1023px) {
  .calc { grid-template-columns: 1fr; }
  .calc-result { position: static; }
}

/* Контакты + форма */
.contact-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.contact-col .label, .contact-form-col .label { display: block; margin-bottom: clamp(28px, 4vh, 44px); }
.contact-list { display: flex; flex-direction: column; gap: clamp(22px, 3.6vh, 34px); }
.contact-item-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}
.contact-item-value { font-weight: 500; font-size: clamp(17px, 1.6vw, 22px); line-height: 1.4; }
.contact-item-value a:not(.btn) { transition: color 0.25s var(--ease-arch); }
.contact-item-value a:not(.btn):hover { color: var(--rust); }
.contact-tg { margin-top: 4px; }
.contact-geo { margin-top: clamp(28px, 4.6vh, 44px); font-weight: 500; color: var(--stone); }

/* Форма-пустышка */
.cform { display: flex; flex-direction: column; gap: 26px; }
.cform-row--half { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.cform-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}
.cform-opt { color: var(--concrete); text-transform: none; letter-spacing: 0.02em; }
.cform-input {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 2px;
  font: inherit;
  color: var(--graphite);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  transition: border-color 0.25s var(--ease-arch);
}
.cform-input:hover { border-bottom-color: var(--stone); }
.cform-input:focus { outline: none; border-bottom-color: var(--rust); }
.cform-input.is-invalid { border-bottom-color: var(--rust); }
.cform-input.is-invalid::placeholder { color: var(--rust); }
.cform-select { cursor: pointer; }
.cform-textarea { resize: vertical; min-height: 96px; }
.cform-submit { margin-top: 8px; align-self: flex-start; padding: 14px 40px; }
.cform.is-done { opacity: 0; transition: opacity 0.35s var(--ease-slow); }
.form-success { opacity: 0; transform: translateY(10px); transition: opacity 0.6s var(--ease-arch), transform 0.6s var(--ease-arch); }
.form-success.is-in { opacity: 1; transform: none; }
.form-success-sub { margin-top: 10px; color: var(--stone); }
.form-note { margin-top: 26px; font-size: 12px; color: var(--stone); }
@media (max-width: 1023px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cform-row--half { grid-template-columns: 1fr; }
}

/* == 16 — Curtain-переход (слой 8) =======================================
   Панель --ink: на клик по внутренней ссылке выезжает снизу (is-enter),
   на новой странице уходит вверх (is-leave). Элемент создаёт JS;
   при reduced-motion или ошибке — обычные переходы. */
.page-curtain {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--ink);
  transform: translateY(100%);
  visibility: hidden;
  pointer-events: none;
}
.page-curtain.is-enter {
  visibility: visible;
  transition: transform 0.5s var(--ease-slow);
}
.page-curtain.is-enter.is-active { transform: translateY(0); }
.page-curtain.is-leave {
  visibility: visible;
  transform: translateY(0);
  transition: transform 0.5s var(--ease-slow) 0.06s;
}
.page-curtain.is-leave.is-active { transform: translateY(-100%); }

/* ── Атрибуция студии Coreform ─────────────────────────────── */
.madeby{
  display:flex; align-items:center; justify-content:center; flex-wrap:wrap;
  gap:8px 16px;
  margin-top:22px;
  font-size:12.5px; color:var(--concrete);
}
.madeby a{ text-decoration:none; }
.madeby .madeby-brand{
  display:inline-flex; align-items:center; gap:10px;
  color:inherit;
  transition:color .3s var(--ease-arch);
}
.madeby .madeby-logo{
  width:30px; height:30px;
  border-radius:50%;
  object-fit:cover;
  border:1px solid var(--line-paper);
  transition:transform .4s var(--ease-arch), border-color .3s var(--ease-arch);
}
.madeby .madeby-brand:hover{ color:var(--rust); }
.madeby .madeby-brand:hover .madeby-logo{
  border-color:var(--rust);
  transform:scale(1.06);
}
.madeby .madeby-url{
  color:inherit;
  transition:color .3s var(--ease-arch);
}
.madeby .madeby-url:hover{
  color:var(--rust);
  text-decoration:underline;
  text-underline-offset:3px;
}
