/* ============================================================
   HITECH.DOM v3 — светлый премиум «архитектурный журнал»
   Палитра: тёплая бумага / графитовый текст / затемнённая латунь
   Типографика: Cormorant Garamond 300 (дисплей) + Manrope (текст)
   Анимации: 0.9–1.1s, cubic-bezier(0.16, 1, 0.3, 1) — как в v2
   Глубина на светлом: мягкие тени + волосяные рамки
   Подход: mobile-first
   ============================================================ */

:root {
  --bg: #f5f2ec;             /* тёплая бумага — ведущий тон */
  --bg-card: #fffdf9;        /* карточки и панели */
  --bg-tint: #ece7dd;        /* секция-передышка потемнее */
  --dark: #16181a;           /* подвал, текст на фото */
  --ink: #1b1c1e;            /* заголовки */
  --text: #3c3d3a;           /* основной текст, ~9:1 на бумаге */
  --text-dim: #6b6860;       /* подписи, ≥4.5:1 на бумаге */
  --brass: #8a6a39;          /* латунь, затемнена под светлый фон */
  --brass-deep: #75592e;     /* hover/мелкий текст латунью, ≥4.5:1 */
  --line: rgba(27, 28, 30, .14);        /* 1px волосяные линии */
  --line-strong: rgba(27, 28, 30, .34);
  --shadow-card: 0 28px 60px -34px rgba(27, 28, 30, .35);
  --shadow-soft: 0 16px 44px -28px rgba(27, 28, 30, .3);

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", "Helvetica Neue", Arial, sans-serif;

  --container: 1280px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 1s;
}

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

html {
  scroll-behavior: smooth;
  /* защита от фантомного горизонтального скролла на мобильных Safari
     (субпиксельное округление при DPR 3 / более широкий фолбэк-шрифт до
     загрузки Cormorant). Layout-ширина уже выверена, это страховка. */
  overflow-x: hidden;
}

/* отступ якорных целей под фиксированную шапку */
[id] { scroll-margin-top: 72px; }

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 300; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* видимый фокус для навигации с клавиатуры — все интерактивные элементы */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 22px;
}
.container--narrow { max-width: 880px; }

/* ============================================================
   Анимации появления — тайминги и кривые как в v2
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* раскрытие заголовка маской снизу вверх, строка за строкой */
.line {
  display: block;
  overflow: hidden;
  padding-bottom: .08em;
  margin-bottom: -.08em;
}
.line > i {
  display: block;
  font-style: normal;
  transform: translateY(112%);
  transition: transform 1.1s var(--ease);
}
.is-in .line:nth-child(2) > i { transition-delay: .1s; }
.is-in .line > i { transform: none; }

/* фото открывается из-за панели цвета светлого фона */
.img-reveal {
  position: relative;
  overflow: hidden;
}
.img-reveal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  transition: transform 1.1s var(--ease);
  z-index: 2;
}
.img-reveal img {
  transform: scale(1.08);
  transition: transform 1.4s var(--ease);
}
.img-reveal.is-shown::after { transform: translateY(-101%); }
.img-reveal.is-shown img { transform: scale(1); }
/* в hero фон тёмный — шторка тоже тёмная, без светлой вспышки */
.hero .img-reveal::after { background: var(--dark); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .line > i, .img-reveal::after, .img-reveal img {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .img-reveal::after { display: none; }
}

/* ============================================================
   Кнопки — тонкие, сдержанные
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 30px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  transition: background .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease);
}
.btn--lg { min-height: 58px; padding: 17px 38px; }

.btn--solid { background: var(--brass); color: #fff; }
.btn--solid:hover { background: var(--brass-deep); }

/* ghost живёт на фото и в тёмном подвале — светлый контур */
.btn--ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .6);
}
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); }

.btn--outline {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .6);
}

.btn--dark {
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn--dark:hover { border-color: var(--brass); color: var(--brass-deep); }

.btn--line {
  color: var(--text-dim);
  border-bottom: 1px solid var(--line-strong);
  padding: 12px 2px;
  min-height: 48px;
}
.btn--line:hover { color: var(--brass-deep); border-color: var(--brass); }

/* ============================================================
   Шапка: прозрачная над фото → светлая при скролле
   ============================================================ */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background .6s var(--ease), box-shadow .6s var(--ease);
}
.header.is-scrolled {
  background: rgba(245, 242, 236, .92);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
/* при открытом меню снимаем backdrop-filter: он делает шапку
   containing block для fixed-оверлея, и меню обрезается по шапке */
.header.is-menu-open {
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}
.header.is-menu-open .header__logo {
  color: var(--ink);
  position: relative;
  z-index: 2;
}
.header__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.header__logo {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .3em;
  color: #fff;
  transition: color .6s var(--ease);
}
.header__logo span { color: var(--brass); }
.is-scrolled .header__logo { color: var(--ink); }

.header__nav { display: none; }
.header__phone { display: none; }
.header__cta { display: none; }

.header__burger {
  position: relative;
  margin-left: auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
}
.header__burger span {
  display: block;
  width: 26px;
  height: 1px;
  background: #fff;
  margin: 4.5px 0;
  transition: transform .5s var(--ease), background .6s var(--ease);
}
.is-scrolled .header__burger span { background: var(--ink); }
.header__burger[aria-expanded="true"] span {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  background: var(--ink);
}
.header__burger[aria-expanded="true"] span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.header__burger[aria-expanded="true"] span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }

.header__nav.is-open {
  display: flex;
  position: fixed;
  inset: 0;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 36px;
  background: var(--bg);
}
.header__nav.is-open > a {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 300;
  color: var(--ink);
  padding: 9px 0;
  letter-spacing: .03em;
  border-bottom: 1px solid var(--line);
}
.header__nav.is-open > a:hover { color: var(--brass-deep); }
.header__nav-extra {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.header__nav-phone {
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .06em;
}

/* ============================================================
   Hero — фото с тёмным градиентом, светлый текст
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: var(--dark);
}
.hero__media {
  position: absolute;
  inset: 0;            /* строго = hero: не выходит за viewport (фикс Safari) */
  overflow: hidden;    /* надёжно клипует изображение внутри wrapper */
  contain: paint;      /* изолирует слой — Safari не включает его в scrollable overflow */
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 74% 60%;
}
/* Параллакс работает только на устройствах с мышью (pointer:fine — десктоп).
   Там даём оверскан wrapper'у, чтобы сдвиг media не открывал края и
   включаем will-change. На сенсорных (iPhone, pointer:coarse) параллакса нет:
   wrapper остаётся inset:0 и физически не выходит за viewport. */
@media (pointer: fine) {
  .hero__media { inset: -3%; will-change: transform; }
}
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  /* мобильный градиент темнее в зоне текста (середина-низ):
     подзаголовок ложится на светлый бетон фото */
  background:
    linear-gradient(180deg, rgba(22,24,26,.55) 0%, rgba(22,24,26,.34) 30%, rgba(22,24,26,.64) 58%, rgba(22,24,26,.95) 100%);
}
@media (min-width: 768px) {
  .hero__veil {
    background:
      linear-gradient(180deg, rgba(22,24,26,.6) 0%, rgba(22,24,26,.28) 36%, rgba(22,24,26,.52) 68%, rgba(22,24,26,.92) 100%);
  }
}
.hero__content {
  position: relative;
  z-index: 4;
  padding: 0 22px 44px;
  max-width: var(--container);
  margin-inline: auto;
  width: 100%;
}
.hero__kicker {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: #cfa96d;
  margin-bottom: 22px;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(52px, 13.5vw, 108px);
  line-height: 1.04;
  font-weight: 300;
  color: #f7f4ee;
  letter-spacing: .01em;
  margin-bottom: 24px;
}
.hero__sub {
  max-width: 520px;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(242, 238, 231, .94);
  margin-bottom: 36px;
}
.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}
.hero__trust {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: var(--container);
  margin-inline: auto;
  width: 100%;
  padding: 0 22px 30px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(238, 234, 226, .6);
}
.hero__trust i {
  width: 44px;
  height: 1px;
  background: rgba(238, 234, 226, .35);
}
.hero__trust a:hover { color: #cfa96d; }

/* ---- Короткие экраны / открытые панели браузера (height-based) ----
   Когда контент hero выше вьюпорта (низкий экран ИЛИ показан browser chrome),
   при justify-content:flex-end он переполняется ВВЕРХ под фиксированную шапку.
   Здесь раскладываем hero сверху вниз с безопасным отступом под шапку; hero
   естественно растёт по контенту и прокручивается вертикально, trust уходит
   ниже сгиба — это допустимо.

   ВАЖНО: тут меняется ТОЛЬКО раскладка. Никаких font-size / line-height —
   типографика остаётся width-based и одинакова на любой высоте (чтобы при
   появлении/скрытии панелей браузера на одном устройстве текст не «прыгал»). */
@media (max-width: 767px) and (max-height: 779px) {
  .hero { justify-content: flex-start; }
  .hero__content {
    padding-top: calc(100px + env(safe-area-inset-top, 0px));
  }
  .hero__trust {
    padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  }
}

/* ============================================================
   Общие секции
   ============================================================ */
.section { padding: 96px 0; }
.section--light { background: var(--bg-card); }
.section--light-b { background: var(--bg-tint); }

.section__head { margin-bottom: 56px; max-width: 720px; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin-bottom: 20px;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 7.5vw, 64px);
  line-height: 1.1;
  font-weight: 300;
  color: var(--ink);
  letter-spacing: .015em;
}
.section__lead {
  margin-top: 22px;
  font-size: 15.5px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-dim);
  max-width: 560px;
}
.section__head--center .section__lead { margin-inline: auto; }

/* ============================================================
   Подход (3 УТП)
   ============================================================ */
.approach {
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}
.approach__grid { display: grid; gap: 48px; }
.approach__item svg {
  width: 40px;
  height: 40px;
  color: var(--brass);
  margin-bottom: 22px;
}
.approach__item h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 12px;
  color: var(--ink);
}
.approach__item p {
  font-size: 14.5px;
  font-weight: 300;
  color: var(--text-dim);
  max-width: 400px;
}

/* ============================================================
   Проекты
   ============================================================ */
.projects { border-bottom: 1px solid var(--line); }
.projects__grid { display: grid; gap: 64px; }
.project__media {
  position: relative;
  background: var(--bg-tint);
  box-shadow: var(--shadow-soft);
}
.project__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.project__media.is-shown img { transition: transform .8s var(--ease); }
.project:hover .project__media.is-shown img { transform: scale(1.05); }
.project__badge {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 3;
  padding: 8px 18px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  background: rgba(255, 253, 249, .9);
  backdrop-filter: blur(6px);
  color: var(--brass-deep);
  border: 1px solid rgba(138, 106, 57, .35);
}
.project__body { padding-top: 26px; }
.project__name {
  position: relative;
  display: inline-block;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 300;
  color: var(--ink);
  margin-bottom: 16px;
}
.project__name::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .8s var(--ease);
}
.project:hover .project__name::after { transform: scaleX(1); }
.project__desc {
  font-size: 14.5px;
  font-weight: 300;
  color: var(--text-dim);
  margin-bottom: 20px;
  max-width: 520px;
}
.project__specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 22px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  margin-bottom: 24px;
}
.project__specs li { display: flex; flex-direction: column; gap: 2px; }
.project__specs b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  color: var(--ink);
}
.project__specs span {
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.project__actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* ============================================================
   Квиз — белая карточка с мягкой тенью
   ============================================================ */
.quiz { border-bottom: 1px solid var(--line); }
.quiz__card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 40px 26px 30px;
}
.quiz__progress {
  height: 1px;
  background: var(--line);
  margin-bottom: 16px;
  overflow: hidden;
}
.quiz__progress span {
  display: block;
  height: 100%;
  width: 20%;
  background: var(--brass);
  transition: width .9s var(--ease);
}
.quiz__counter {
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.quiz__step { display: none; }
.quiz__step.is-active { display: block; animation: quizIn .9s var(--ease); }
@keyframes quizIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.quiz__q {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  color: var(--ink);
  margin-bottom: 26px;
}
.quiz__options { display: grid; gap: 12px; }
.quiz__opt {
  min-height: 56px;
  padding: 14px 20px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color .5s var(--ease), color .5s var(--ease), background .5s var(--ease);
}
.quiz__opt:hover { border-color: var(--brass); }
.quiz__opt.is-checked {
  border-color: var(--brass);
  background: rgba(138, 106, 57, .08);
  color: var(--ink);
}
.quiz__form { display: grid; gap: 14px; }
.quiz__form input,
.cta__form input {
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  font: inherit;
  font-size: 15px;
  outline: none;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  transition: border-color .5s var(--ease);
}
.quiz__form input::placeholder,
.cta__form input::placeholder { color: var(--text-dim); }
.quiz__form input:focus,
.cta__form input:focus { border-color: var(--brass); }
.quiz__form input.is-error,
.cta__form input.is-error { border-color: #b0492f; }
.quiz__msgr, .cta__msgr {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.quiz__msgr .quiz__opt, .cta__msgr .quiz__opt {
  min-height: 48px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 10px 8px;
}
.quiz__submit { margin-top: 8px; }
.quiz__legal {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.6;
}
/* ---------- чекбокс согласия на обработку ПД (152-ФЗ) ---------- */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  text-align: left;
}
/* селектор .consent .consent__box (0,2,0) перебивает .cta__form input (0,1,1):
   иначе width:100% от формы растягивает скрытый чекбокс на всю ширину и даёт
   горизонтальный скролл на мобильном */
.consent .consent__box {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.consent__mark {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  position: relative;
  background: #fff;
  border: 1px solid var(--line-strong);
  transition: border-color .5s var(--ease), background .5s var(--ease);
}
.consent__mark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border-right: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(45deg) scale(0);
  transition: transform .4s var(--ease);
}
.consent__box:checked ~ .consent__mark {
  background: var(--brass);
  border-color: var(--brass);
}
.consent__box:checked ~ .consent__mark::after { transform: rotate(45deg) scale(1); }
.consent__box:focus-visible ~ .consent__mark {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
.consent__text {
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--text-dim);
}
.consent__text a {
  color: var(--brass-deep);
  border-bottom: 1px solid currentColor;
  transition: color .5s var(--ease);
}
.consent__text a:hover { color: var(--ink); }
/* заблокированная кнопка до согласия */
.btn:disabled {
  opacity: .45;
  pointer-events: none;
}

.quiz__back {
  margin-top: 24px;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color .5s var(--ease);
}
.quiz__back:hover { color: var(--brass-deep); }
.quiz__done { text-align: center; padding: 26px 0 14px; }
.quiz__done svg {
  width: 54px;
  height: 54px;
  color: var(--brass);
  margin: 0 auto 22px;
}
.quiz__done p { color: var(--text-dim); max-width: 380px; margin-inline: auto; }

/* ============================================================
   Этапы — белая секция, цифры-призраки как в v2
   ============================================================ */
.steps__list { display: grid; gap: 26px; }
.steps__item {
  position: relative;
  padding: 64px 26px 36px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.steps__ghost {
  position: absolute;
  top: -10px;
  right: 6px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 220px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(27, 28, 30, .16);
  pointer-events: none;
  user-select: none;
}
.steps__label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin-bottom: 14px;
}
.steps__item h3 {
  position: relative;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 12px;
}
.steps__item > p:last-child {
  position: relative;
  font-size: 14.5px;
  font-weight: 300;
  color: var(--text-dim);
  max-width: 380px;
}
.steps__note {
  margin-top: 64px;
  padding: 30px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 18px;
}
.steps__note-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
}
.steps__note ul { display: grid; gap: 10px; }
.steps__note li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  font-weight: 300;
  color: var(--text-dim);
}
.steps__note li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .68em;
  width: 12px;
  height: 1px;
  background: var(--brass);
}

/* ============================================================
   Почему мы — тонированная секция-передышка
   ============================================================ */
.why__layout { display: grid; gap: 52px; }
.why__lead {
  font-size: 17.5px;
  line-height: 1.75;
  color: var(--text);
  margin: 24px 0 16px;
}
.why__text > p:last-child {
  font-size: 14.5px;
  font-weight: 300;
  color: var(--text-dim);
}
.why__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
}
.why__stats li {
  padding: 30px 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.why__stats b {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 44px;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 8px;
}
.why__stats b .count { font: inherit; }
.why__stats li > span {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.55;
}
/* узкие телефоны: 2 колонки статистики с числом 44px и паддингом 22px дают
   min-content ~185px на ячейку → 370px на две колонки, что распирает контейнер
   и даёт горизонтальный скролл на iPhone (особенно 375px). Сжимаем под телефон. */
@media (max-width: 480px) {
  .why__stats li { padding: 26px 16px; }
  .why__stats b { font-size: 34px; }
  .why__stats li > span { font-size: 12px; }
}
/* На очень узких экранах (≤360px) две колонки статистики имеют min-content
   шире контейнера и физически распирают секцию «О нас» за viewport. Делаем
   одну колонку — каждая карточка во всю ширину, переполнения нет. */
@media (max-width: 360px) {
  .why__stats { grid-template-columns: 1fr; }
}

/* ============================================================
   Наши работы
   ============================================================ */
.works { border-bottom: 1px solid var(--line); }
.works__grid { display: grid; gap: 20px; }
.works__item {
  position: relative;
  margin: 0;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-tint);
  box-shadow: var(--shadow-soft);
}
.works__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.works__item:hover img { transform: scale(1.05); }
.works__item figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 52px 20px 18px;
  background: linear-gradient(180deg, transparent, rgba(22,24,26,.85));
  color: #f5f2ec;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.works__item figcaption b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
}
.works__item figcaption span {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, .75);
}

/* ============================================================
   Instagram / образ жизни — белая секция
   ============================================================ */
.insta { background: var(--bg-card); border-bottom: 1px solid var(--line); }
.insta__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.insta__item {
  overflow: hidden;
  background: var(--bg-tint);
  box-shadow: var(--shadow-soft);
}
.insta__item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform .8s var(--ease), opacity .8s var(--ease);
}
.insta__item:hover img { transform: scale(1.05); opacity: .88; }
.insta__action { margin-top: 44px; text-align: center; }
.insta__action .btn--ghost {
  color: var(--ink);
  border-color: var(--line-strong);
}
.insta__action .btn--ghost:hover {
  border-color: var(--brass);
  color: var(--brass-deep);
  background: transparent;
}
.insta__note {
  margin-top: 20px;
  font-size: 11px;
  color: var(--text-dim);
}

/* ============================================================
   Полный цикл
   ============================================================ */
.cycle { border-bottom: 1px solid var(--line); }
.cycle__grid { display: grid; gap: 44px; }
.cycle__item { padding-top: 26px; border-top: 1px solid var(--line); }
.cycle__num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .38em;
  color: var(--brass-deep);
  display: block;
  margin-bottom: 14px;
}
.cycle__item h3 {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 12px;
}
.cycle__item p {
  font-size: 14.5px;
  font-weight: 300;
  color: var(--text-dim);
  max-width: 420px;
}

/* ============================================================
   Финальный CTA
   ============================================================ */
.cta__layout { display: grid; gap: 48px; }
.cta__text > p {
  margin-top: 20px;
  font-size: 15.5px;
  font-weight: 300;
  color: var(--text-dim);
  max-width: 440px;
  line-height: 1.8;
}
.cta__phone {
  display: inline-block;
  margin-top: 32px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(30px, 7vw, 44px);
  color: var(--ink);
  letter-spacing: .04em;
  border-bottom: 1px solid var(--brass);
  padding-bottom: 4px;
  transition: color .5s var(--ease);
}
.cta__phone:hover { color: var(--brass-deep); }
.cta__hint {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-dim);
}
.cta__form {
  display: grid;
  gap: 14px;
  background: var(--bg-card);
  padding: 30px 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.cta__form.is-done { text-align: center; padding: 52px 24px; }
.cta__done-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  color: var(--ink);
  margin-bottom: 10px;
}
.cta__form.is-done p { color: var(--text-dim); }

/* ============================================================
   Подвал — тёмный якорь страницы
   ============================================================ */
.footer {
  background: var(--dark);
  color: #d9d4cb;
  padding: 68px 0 116px;
}
.footer__grid { display: grid; gap: 38px; }
.footer__logo {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: .3em;
  color: #fff;
}
.footer__logo span { color: #c5a36e; }
.footer__tag {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 300;
  color: #8f8c85;
}
.footer__geo {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #c5a36e;
}
.footer__head {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: #8f8c85;
  margin-bottom: 18px;
}
.footer__col { display: flex; flex-direction: column; gap: 11px; }
.footer__col a { font-size: 15.5px; transition: color .5s var(--ease); }
.footer__col a:hover { color: #c5a36e; }
.footer__col a small {
  font-size: 11.5px;
  color: #8f8c85;
  margin-left: 6px;
}
.footer__col p { font-size: 13.5px; font-weight: 300; color: #8f8c85; }
.footer__social { display: flex; gap: 20px; }
.footer__social a {
  font-size: 13.5px;
  letter-spacing: .08em;
  border-bottom: 1px solid rgba(217, 212, 203, .25);
  padding-bottom: 2px;
}
.footer__insta { font-size: 13.5px; color: #c5a36e; }
/* служебная ссылка — тише основного контента подвала */
.footer__col a.footer__privacy {
  font-size: 12px;
  color: #76736c;
  margin-top: 6px;
  text-decoration: none;
  border-bottom: 0;
}
.footer__col a.footer__privacy:hover { color: #a8a49b; }
.footer__legal {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid rgba(217, 212, 203, .16);
  font-size: 11px;
  color: #8f8c85;
}

/* ============================================================
   Cookie-баннер — отдельное согласие, стиль сайта
   ============================================================ */
.cookiebar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 74px; /* над sticky-CTA на мобильном */
  z-index: 70;
  background: #fffdf9;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  pointer-events: none;
}
.cookiebar.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.cookiebar__text {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 14px;
}
.cookiebar__text a { color: var(--brass-deep); }
.cookiebar__actions { display: flex; gap: 10px; }
/* кнопки симметричны: одинаковый размер/шрифт, различается только тон */
.cookiebar__btn {
  flex: 1;
  min-height: 48px;
  padding: 12px 18px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: background .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease);
}
.cookiebar__btn--accept {
  background: var(--brass);
  color: #fff;
  border: 1px solid var(--brass);
}
.cookiebar__btn--accept:hover { background: var(--brass-deep); border-color: var(--brass-deep); }
.cookiebar__btn--decline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.cookiebar__btn--decline:hover { border-color: var(--brass); color: var(--brass-deep); }
@media (min-width: 768px) {
  .cookiebar {
    left: auto;
    right: 28px;
    bottom: 28px;
    max-width: 440px;
    padding: 22px 24px;
  }
}
/* Мобильный cookie-баннер: компактнее и ниже (sticky-CTA при первой загрузке
   скрыт). Правила width-based и касаются ТОЛЬКО баннера — он fixed-overlay и
   не влияет на геометрию hero. Размещены ПОСЛЕ базовых .cookiebar-правил, иначе
   перебивались бы ими по порядку каскада. */
@media (max-width: 767px) {
  .cookiebar {
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    padding: 13px 15px;
  }
  .cookiebar__text { font-size: 12.5px; line-height: 1.45; margin-bottom: 10px; }
  .cookiebar__btn { min-height: 44px; font-size: 11px; }
}

/* ============================================================
   Sticky CTA (mobile) — светлая панель с тенью вверх
   ============================================================ */
.sticky-cta {
  position: fixed;
  inset: auto 0 0;
  z-index: 40;
  display: flex;
  background: rgba(255, 253, 249, .95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -16px 40px -24px rgba(27, 28, 30, .35);
  transform: translateY(100%);
  transition: transform .8s var(--ease);
}
.sticky-cta.is-visible { transform: none; }
.sticky-cta__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink);
}
.sticky-cta__call {
  width: 76px;
  display: grid;
  place-items: center;
  background: var(--brass);
  color: #fff;
}
.sticky-cta__call svg { width: 21px; height: 21px; }

/* ============================================================
   Лайтбокс — тёмный просмотрщик, как в v2
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(9, 10, 11, .96);
  padding: 20px;
}
.lightbox.is-open { display: flex; }
.lightbox__stage {
  margin: 0;
  max-width: min(1140px, 92vw);
  text-align: center;
}
.lightbox__stage img {
  max-width: 100%;
  max-height: 78vh;
  margin-inline: auto;
  object-fit: contain;
}
.lightbox__stage figcaption {
  margin-top: 18px;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(217, 212, 203, .55);
}
.lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 52px;
  height: 52px;
  font-size: 32px;
  font-weight: 200;
  color: #f0ece4;
  z-index: 2;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 24px;
  color: #f0ece4;
  z-index: 2;
  transition: color .5s var(--ease);
}
.lightbox__nav:hover { color: #c5a36e; }
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }

/* ============================================================
   Планшет: 768px+
   ============================================================ */
@media (min-width: 768px) {
  .section { padding: 136px 0; }

  .hero__content { padding-bottom: 64px; }
  .hero__actions { flex-direction: row; gap: 18px; }
  .hero__sub { font-size: 16.5px; }
  .hero__trust { padding-bottom: 40px; }
  .hero__media img { object-position: center 65%; }

  .approach { padding: 104px 0; }
  .approach__grid { grid-template-columns: repeat(3, 1fr); gap: 44px; }
  /* на широком экране блок не должен проваливаться после крупного hero:
     заголовки крупнее, текст темнее бледно-серого */
  .approach__item h3 { font-size: 27px; }
  .approach__item p {
    font-size: 15.5px;
    line-height: 1.75;
    color: #56544e;
  }

  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 88px 44px;
  }
  .project--flag { grid-column: 1 / -1; }
  .project--flag .project__media img { aspect-ratio: 16 / 8.5; }
  .project--flag .project__specs { grid-template-columns: repeat(4, 1fr); }

  .quiz__card { padding: 52px 60px 40px; }
  .quiz__options { grid-template-columns: repeat(2, 1fr); }
  .quiz__msgr, .cta__msgr { grid-template-columns: repeat(4, 1fr); }

  .steps__list { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .steps__item {
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
    padding: 72px 30px 44px;
  }
  .steps__item:last-child { border-right: 0; }
  .steps__ghost { font-size: 240px; top: -16px; right: 10px; }
  .steps__note { grid-template-columns: auto 1fr; align-items: start; gap: 48px; padding-top: 36px; }
  .steps__note ul { grid-template-columns: repeat(3, 1fr); gap: 18px; }

  .works__grid { grid-template-columns: repeat(2, 1fr); }

  .insta__grid { grid-template-columns: repeat(4, 1fr); }

  .cycle__grid { grid-template-columns: repeat(3, 1fr); }

  .cta__layout { grid-template-columns: 1fr 1fr; align-items: start; gap: 64px; }
  .cta__form { padding: 38px 34px; }

  .footer { padding: 88px 0 60px; }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; }

  .sticky-cta { display: none; }
}

/* ============================================================
   Десктоп: 1024px+
   ============================================================ */
@media (min-width: 1024px) {
  .header__inner { padding: 22px; }
  .header__nav {
    display: flex;
    align-items: center;
    gap: 34px;
    margin-left: 64px;
  }
  .header__nav > a {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .8);
    transition: color .5s var(--ease);
    padding: 6px 0;
  }
  .header__nav > a:hover { color: #fff; }
  .is-scrolled .header__nav > a { color: var(--text); }
  .is-scrolled .header__nav > a:hover { color: var(--ink); }
  .header__nav-extra { display: none; }
  .header__phone {
    display: block;
    margin-left: auto;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .08em;
    color: #fff;
    transition: color .6s var(--ease);
  }
  .is-scrolled .header__phone { color: var(--ink); }
  .header__cta {
    display: inline-flex;
    min-height: 44px;
    padding: 10px 24px;
  }
  .is-scrolled .header__cta {
    color: var(--ink);
    border-color: var(--line-strong);
  }
  .is-scrolled .header__cta:hover {
    color: var(--brass-deep);
    border-color: var(--brass);
  }
  .header__burger { display: none; }

  .works__grid { grid-template-columns: repeat(3, 1fr); }

  .project__body { padding-top: 30px; }

  .project--flag {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    background: var(--bg-card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
  }
  .project--flag .project__media { height: 100%; box-shadow: none; }
  .project--flag .project__media img { aspect-ratio: auto; height: 100%; }
  .project--flag .project__body {
    padding: 52px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .project--flag .project__name { font-size: 36px; }
}

/* ============================================================
   HITECH.DOM V4 — архитектурный журнал с живым руководителем
   ============================================================ */

body {
  background:
    linear-gradient(90deg, rgba(117, 89, 46, .025) 1px, transparent 1px) 0 0 / 25% 100%,
    var(--bg);
}

.section__title {
  max-width: 900px;
  letter-spacing: -.005em;
}

.section__lead {
  max-width: 650px;
  color: #625f58;
}

/* Hero */
.hero__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__media picture img {
  width: 100%;
  height: 100%;
}

.hero__title {
  max-width: 1120px;
  font-size: clamp(49px, 11.2vw, 102px);
  line-height: .98;
  letter-spacing: -.012em;
}

.hero__sub {
  max-width: 650px;
}

.hero__actions .btn {
  letter-spacing: .18em;
}

/* Проекты: меньше карточности, больше журнальной композиции */
.projects {
  background: rgba(245, 242, 236, .88);
}

.projects .section__head {
  max-width: 820px;
  margin-bottom: 72px;
}

.project__media,
.project--flag {
  box-shadow: none;
}

.project__media {
  border: 1px solid rgba(27, 28, 30, .08);
}

.project__body {
  padding-top: 24px;
}

.project__specs {
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.project__actions .btn--line {
  color: var(--brass-deep);
}

/* Руководитель */
.founder {
  position: relative;
  overflow: hidden;
  background: #17191a;
  color: #eee9df;
}

.founder::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 32%, rgba(207, 169, 109, .1), transparent 34%),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 25% 100%;
}

.founder .container {
  position: relative;
  z-index: 1;
}

.founder__layout {
  display: grid;
  gap: 50px;
}

.founder__portrait {
  min-height: 480px;
  background: #242729;
}

.founder__portrait img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
  object-position: center 35%;
  filter: saturate(.78) contrast(1.04);
}

.founder__portrait::after {
  background: #17191a;
}

.founder__caption {
  position: absolute;
  z-index: 3;
  inset: auto 0 0;
  padding: 70px 24px 24px;
  background: linear-gradient(180deg, transparent, rgba(10, 11, 12, .88));
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(238, 233, 223, .68);
}

.founder__caption span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 31px;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: none;
  color: #f5f1e8;
}

.founder .section__kicker {
  color: #cfa96d;
}

.founder .section__title {
  color: #f5f1e8;
}

.founder__lead {
  margin-top: 28px;
  max-width: 700px;
  font-size: 18px;
  line-height: 1.75;
  font-weight: 300;
  color: rgba(245, 241, 232, .9);
}

.founder__body {
  margin-top: 18px;
  max-width: 680px;
  font-size: 14.5px;
  line-height: 1.85;
  font-weight: 300;
  color: rgba(238, 233, 223, .58);
}

.founder__quote {
  margin: 34px 0 0;
  padding: 20px 0 0 26px;
  max-width: 620px;
  border-top: 1px solid rgba(207, 169, 109, .42);
  font-family: var(--font-display);
  font-size: clamp(26px, 6vw, 38px);
  font-weight: 300;
  line-height: 1.25;
  color: #d8b77f;
}

.founder__facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 68px;
  border-top: 1px solid rgba(238, 233, 223, .14);
  border-left: 1px solid rgba(238, 233, 223, .14);
}

.founder__facts li {
  min-height: 132px;
  padding: 24px 18px;
  border-right: 1px solid rgba(238, 233, 223, .14);
  border-bottom: 1px solid rgba(238, 233, 223, .14);
}

.founder__facts b {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.05;
  font-weight: 300;
  color: #f5f1e8;
}

.founder__facts span {
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(238, 233, 223, .5);
}

/* Процесс */
.process {
  background: #ece7dd;
  border-bottom: 1px solid var(--line);
}

.process__intro {
  display: grid;
  gap: 10px;
}

.process__intro .section__head {
  margin-bottom: 22px;
}

.process__lead {
  max-width: 660px;
  font-family: var(--font-display);
  font-size: clamp(24px, 6vw, 34px);
  line-height: 1.35;
  color: var(--ink);
}

.process__list {
  margin-top: 64px;
  border-top: 1px solid var(--line-strong);
}

.process__item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.process__num {
  padding-top: 5px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .3em;
  color: var(--brass-deep);
}

.process__item h3 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}

.process__item p {
  max-width: 620px;
  font-size: 14.5px;
  line-height: 1.8;
  font-weight: 300;
  color: var(--text-dim);
}

/* Кейсы */
.cases {
  overflow: hidden;
  background: #f7f4ee;
}

.cases__head {
  max-width: 840px;
  margin-bottom: 88px;
}

.case {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 0 92px;
  margin-bottom: 92px;
  border-bottom: 1px solid var(--line);
}

.case:last-child {
  margin-bottom: 0;
}

.case__main,
.case__content {
  grid-column: 1 / -1;
}

.case__main {
  min-height: 330px;
  background: var(--bg-tint);
}

.case__main img,
.case__detail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case__main img {
  min-height: 330px;
}

.case__content {
  padding: 30px 0 22px;
}

.case__index {
  margin-bottom: 18px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

.case__content h3 {
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-size: clamp(42px, 11vw, 64px);
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
}

.case__summary {
  max-width: 650px;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--text);
}

.case__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case__metrics b {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
  font-weight: 400;
  color: var(--ink);
}

.case__metrics span {
  display: block;
  margin-top: 6px;
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.case__solution {
  max-width: 650px;
  margin-bottom: 30px;
  font-size: 14px;
  line-height: 1.8;
  font-weight: 300;
  color: var(--text-dim);
}

.case__solution span {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

.case__detail {
  min-height: 180px;
  background: var(--bg-tint);
}

.case__detail img {
  min-height: 180px;
}

.case--dark {
  position: relative;
  margin-inline: -22px;
  padding: 64px 22px 76px;
  background: #17191a;
  border-bottom: 0;
  color: #eee9df;
}

.case--dark .img-reveal::after {
  background: #17191a;
}

.case--dark .case__index,
.case--dark .case__solution span {
  color: #d1aa6f;
}

.case--dark .case__content h3,
.case--dark .case__metrics b {
  color: #f5f1e8;
}

.case--dark .case__summary {
  color: rgba(245, 241, 232, .84);
}

.case--dark .case__solution,
.case--dark .case__metrics span {
  color: rgba(238, 233, 223, .55);
}

.case--dark .case__metrics {
  border-color: rgba(238, 233, 223, .16);
}

/* Квиз: тот же смысл, спокойнее визуально */
.quiz {
  background: var(--bg);
}

.quiz__card {
  box-shadow: none;
  border-color: var(--line-strong);
}

/* Реальные работы: нерегулярная редакционная сетка */
.works {
  background: #fffdf9;
}

.works__item {
  box-shadow: none;
}

.works__item figcaption {
  padding-bottom: 20px;
}

/* Instagram остаётся сильным, но получает другой ритм заголовка */
.insta {
  background: #ece7dd;
}

.insta__item {
  box-shadow: none;
}

.insta__grid {
  gap: 8px;
}

/* Финальная форма */
.cta {
  background: #f5f2ec;
}

.cta__form {
  box-shadow: none;
  border-color: var(--line-strong);
}

@media (max-width: 767px) {
  .header__nav.is-open {
    justify-content: flex-start;
    padding: calc(96px + env(safe-area-inset-top, 0px)) 36px 36px;
    overflow-y: auto;
  }

  .hero__media img {
    object-position: center center;
  }

  .hero__veil {
    background:
      linear-gradient(180deg, rgba(15, 17, 18, .28) 0%, rgba(15, 17, 18, .18) 24%, rgba(15, 17, 18, .62) 58%, rgba(15, 17, 18, .96) 100%);
  }

  .hero__title {
    font-size: clamp(46px, 12.5vw, 56px);
    line-height: .99;
    margin-bottom: 22px;
  }

  .hero__kicker {
    max-width: 330px;
    font-size: 9.5px;
    line-height: 1.7;
    letter-spacing: .24em;
  }

  .hero__sub {
    font-size: 15.5px;
    line-height: 1.72;
    margin-bottom: 30px;
  }

  .hero__actions {
    gap: 12px;
    margin-bottom: 34px;
  }

  .hero__actions .btn {
    min-height: 56px;
    padding-inline: 16px;
    font-size: 10.5px;
    letter-spacing: .15em;
  }

  .hero__trust {
    gap: 12px;
    font-size: 9.5px;
    letter-spacing: .19em;
  }

  .hero__trust i {
    width: 30px;
  }

  .projects__grid {
    gap: 76px;
  }

  .project__name {
    font-size: 33px;
  }

  .founder {
    padding-top: 72px;
  }

  .founder__portrait {
    min-height: 520px;
  }

  .founder__portrait img {
    min-height: 520px;
  }

  .founder__content {
    padding-top: 6px;
  }

  .process__lead {
    font-size: 26px;
  }

  .case__metrics {
    gap: 8px;
  }

  .case__metrics b {
    font-size: 19px;
  }

  .case__content .btn {
    width: 100%;
  }

  .insta .section__head--center {
    margin-inline: 0;
    text-align: left;
  }

  .cookiebar {
    left: 10px;
    right: 10px;
    padding: 10px 12px;
  }

  .cookiebar__text {
    margin-bottom: 7px;
    font-size: 11.5px;
    line-height: 1.4;
  }

  .cookiebar__actions {
    gap: 8px;
  }

  .cookiebar__btn {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 10px;
  }
}

@media (max-width: 374px) {
  .hero__title {
    font-size: 44px;
  }

  .hero__kicker {
    max-width: 290px;
    font-size: 9px;
    letter-spacing: .19em;
  }

  .hero__sub {
    font-size: 14.5px;
  }

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

  .case__metrics li {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  .case__metrics li:last-child {
    border-bottom: 0;
  }

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

@media (min-width: 768px) {
  .hero__title {
    max-width: 1080px;
  }

  .founder__layout {
    grid-template-columns: minmax(300px, .88fr) minmax(0, 1.12fr);
    align-items: center;
    gap: 70px;
  }

  .founder__portrait,
  .founder__portrait img {
    min-height: 650px;
  }

  .founder__facts {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 82px;
  }

  .founder__facts li {
    min-height: 146px;
    padding: 30px 24px;
  }

  .founder__facts b {
    font-size: 42px;
  }

  .process__intro {
    grid-template-columns: 1.05fr .95fr;
    align-items: end;
    gap: 70px;
  }

  .process__intro .section__head {
    margin-bottom: 0;
  }

  .process__lead {
    padding-bottom: 6px;
  }

  .process__list {
    margin-top: 90px;
  }

  .process__item {
    grid-template-columns: 90px minmax(0, 1fr);
    padding: 38px 0;
  }

  .process__item h3 {
    font-size: 31px;
  }

  .case {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
    padding-bottom: 126px;
    margin-bottom: 126px;
  }

  .case__main {
    grid-column: 1 / span 7;
    min-height: 590px;
  }

  .case__main img {
    min-height: 590px;
  }

  .case__content {
    grid-column: 8 / -1;
    padding: 36px 12px 22px 38px;
    align-self: center;
  }

  .case__detail {
    min-height: 330px;
  }

  .case__detail img {
    min-height: 330px;
  }

  .case__detail--wide {
    grid-column: span 7;
  }

  .case__detail:not(.case__detail--wide) {
    grid-column: span 5;
  }

  .case--dark {
    margin-inline: -42px;
    padding: 86px 42px 112px;
  }

  .case--blackwave .case__main {
    grid-column: 6 / -1;
  }

  .case--blackwave .case__content {
    grid-column: 1 / span 5;
    grid-row: 1;
    padding: 36px 38px 22px 4px;
  }

  .works__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
  }

  .works__item {
    grid-column: span 6;
  }

  .works__item:nth-child(3),
  .works__item:nth-child(4),
  .works__item:nth-child(5) {
    grid-column: span 4;
  }

  .works__item:nth-child(6) {
    grid-column: 3 / span 8;
  }

  .insta .section__head--center {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
    align-items: end;
    column-gap: 70px;
    max-width: none;
    margin-inline: 0;
    text-align: left;
  }

  .insta .section__kicker {
    grid-column: 1 / -1;
  }

  .insta .section__lead {
    margin: 0 0 8px;
  }
}

@media (min-width: 1024px) {
  .projects__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 124px 36px;
  }

  .project {
    grid-column: span 6;
  }

  .project--flag {
    grid-column: 1 / -1;
  }

  .project:nth-child(2) {
    grid-column: 1 / span 7;
  }

  .project:nth-child(3) {
    grid-column: 8 / span 5;
    margin-top: 150px;
  }

  .project:nth-child(4) {
    grid-column: 1 / span 5;
  }

  .project:nth-child(5) {
    grid-column: 6 / span 7;
    margin-top: 110px;
  }

  .project:nth-child(6) {
    grid-column: 3 / span 8;
  }

  .project--flag {
    grid-template-columns: 1.62fr .88fr;
    border-color: var(--line);
    box-shadow: none;
  }

  .project--flag .project__body {
    padding: 56px 50px;
  }

  .founder__layout {
    grid-template-columns: minmax(400px, .9fr) minmax(0, 1.1fr);
    gap: 110px;
  }

  .founder__portrait,
  .founder__portrait img {
    min-height: 720px;
  }

  .process__item {
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: start;
  }

  .process__item h3 {
    margin-bottom: 0;
  }

  .process__item > div {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }

  .case--dark {
    margin-inline: -64px;
    padding-inline: 64px;
  }
}

/* ============================================================
   V4.1 — единое редакционное портфолио
   ============================================================ */
.portfolio {
  overflow: hidden;
  background: #f7f4ee;
  border-bottom: 1px solid var(--line);
}

.portfolio__head {
  max-width: 840px;
  margin-bottom: 82px;
}

.portfolio__list,
.portfolio__more {
  display: grid;
  gap: 92px;
}

.portfolio-case {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 92px;
  border-bottom: 1px solid var(--line);
}

.portfolio-case__main,
.portfolio-case__content {
  grid-column: 1 / -1;
}

.portfolio-case__main,
.portfolio-case__detail,
.portfolio-card__image {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: var(--bg-tint);
  text-align: left;
}

.portfolio-case__main {
  min-height: 340px;
}

.portfolio-case__main img,
.portfolio-case__detail img,
.portfolio-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-case__main img {
  min-height: 340px;
}

.portfolio__badge {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 18px;
  padding: 9px 14px;
  border: 1px solid rgba(117, 89, 46, .28);
  background: rgba(247, 244, 238, .9);
  backdrop-filter: blur(8px);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

.portfolio-case__content {
  padding: 30px 0 22px;
}

.portfolio__index {
  margin-bottom: 17px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

.portfolio-case__content h3,
.portfolio-card__body h3 {
  font-family: var(--font-display);
  font-weight: 300;
  color: var(--ink);
}

.portfolio-case__content h3 {
  margin-bottom: 20px;
  font-size: clamp(44px, 12vw, 66px);
  line-height: .96;
}

.portfolio__summary {
  max-width: 650px;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--text);
}

.portfolio__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.portfolio__metrics b,
.portfolio-card__facts b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
}

.portfolio__metrics b {
  font-size: 21px;
  line-height: 1.1;
}

.portfolio__metrics span,
.portfolio-card__facts span {
  display: block;
  margin-top: 6px;
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.portfolio__solution {
  max-width: 650px;
  margin-bottom: 30px;
  font-size: 14px;
  line-height: 1.8;
  font-weight: 300;
  color: var(--text-dim);
}

.portfolio__solution span {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

.portfolio__actions {
  display: flex;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
}

.portfolio__calc-link,
.portfolio-card__link {
  position: relative;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

.portfolio__calc-link::after,
.portfolio-card__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: currentColor;
  transform: scaleX(.28);
  transform-origin: left;
  transition: transform .6s var(--ease);
}

.portfolio__calc-link:hover::after,
.portfolio-card__link:hover::after {
  transform: scaleX(1);
}

.portfolio-case__detail {
  min-height: 190px;
}

.portfolio-case__detail img {
  min-height: 190px;
}

.portfolio__duo {
  display: grid;
  gap: 76px;
}

.portfolio-card__media {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, .8fr);
  gap: 8px;
  min-height: 310px;
}

.portfolio-card__image {
  min-height: 310px;
}

.portfolio-card__body {
  padding-top: 28px;
}

.portfolio-card__body h3 {
  margin-bottom: 16px;
  font-size: 39px;
  line-height: 1;
}

.portfolio-card__body > p:not(.portfolio__index) {
  max-width: 560px;
  font-size: 14.5px;
  line-height: 1.8;
  font-weight: 300;
  color: var(--text-dim);
}

.portfolio-card__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 26px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.portfolio-card__facts b {
  font-size: 21px;
  line-height: 1.1;
}

.portfolio-card__link {
  padding: 0 0 5px;
}

.portfolio-case--dark {
  margin-inline: -22px;
  padding: 64px 22px 76px;
  border-bottom: 0;
  background: #17191a;
  color: #eee9df;
}

.portfolio-case--dark .img-reveal::after {
  background: #17191a;
}

.portfolio-case--dark .portfolio__index,
.portfolio-case--dark .portfolio__solution span,
.portfolio-case--dark .portfolio__calc-link {
  color: #d1aa6f;
}

.portfolio-case--dark .portfolio-case__content h3,
.portfolio-case--dark .portfolio__metrics b {
  color: #f5f1e8;
}

.portfolio-case--dark .portfolio__summary {
  color: rgba(245, 241, 232, .84);
}

.portfolio-case--dark .portfolio__solution,
.portfolio-case--dark .portfolio__metrics span {
  color: rgba(238, 233, 223, .58);
}

.portfolio-case--dark .portfolio__metrics {
  border-color: rgba(238, 233, 223, .16);
}

.portfolio__more {
  display: none;
}

.portfolio__more.is-open {
  display: grid;
}

.portfolio__more-toggle {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  margin-top: 44px;
  border: 1px solid var(--line-strong);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
}

.portfolio__calculation {
  display: grid;
  gap: 30px;
  margin-top: 88px;
  padding: 42px 28px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(120deg, rgba(138, 106, 57, .09), transparent 46%),
    #ece7dd;
}

.portfolio__calculation h3 {
  max-width: 700px;
  margin: 10px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(35px, 9vw, 52px);
  font-weight: 300;
  line-height: 1.05;
  color: var(--ink);
}

.portfolio__calculation p:not(.section__kicker) {
  max-width: 680px;
  font-size: 14.5px;
  line-height: 1.8;
  font-weight: 300;
  color: var(--text-dim);
}

.portfolio__calculation .btn {
  width: 100%;
}

/* Более плотный портрет руководителя без изменения исходного файла. */
.founder__portrait.is-shown img {
  transform: scale(1.1);
}

.founder__portrait img {
  object-position: center 28%;
}

/* Полная фиксация документа под галереей, включая iOS Safari. */
html.is-modal-open,
body.is-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overscroll-behavior: none;
  touch-action: none;
}

.lightbox__stage {
  max-height: calc(100dvh - 40px);
}

.lightbox__stage img {
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 374px) {
  .portfolio__metrics {
    grid-template-columns: 1fr;
  }

  .portfolio__metrics li {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  .portfolio__metrics li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .portfolio-card__media {
    min-height: 260px;
  }

  .portfolio-card__image {
    min-height: 260px;
  }
}

@media (min-width: 768px) {
  .portfolio__head {
    margin-bottom: 110px;
  }

  .portfolio__list,
  .portfolio__more {
    gap: 126px;
  }

  .portfolio-case {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
    padding-bottom: 126px;
  }

  .portfolio-case__main {
    grid-column: 1 / span 7;
    min-height: 590px;
  }

  .portfolio-case__main img {
    min-height: 590px;
  }

  .portfolio-case__content {
    grid-column: 8 / -1;
    padding: 36px 12px 22px 38px;
    align-self: center;
  }

  .portfolio-case__detail {
    min-height: 330px;
  }

  .portfolio-case__detail img {
    min-height: 330px;
  }

  .portfolio-case__detail--wide {
    grid-column: span 7;
  }

  .portfolio-case__detail:not(.portfolio-case__detail--wide) {
    grid-column: span 5;
  }

  .portfolio__duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 54px;
  }

  .portfolio-card--offset {
    margin-top: 138px;
  }

  .portfolio-card__media {
    min-height: 400px;
  }

  .portfolio-card__image {
    min-height: 400px;
  }

  .portfolio-card--landscape {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    gap: 54px;
    align-items: center;
  }

  .portfolio-card--landscape .portfolio-card__body {
    padding-top: 0;
  }

  .portfolio-case--dark {
    margin-inline: -42px;
    padding: 86px 42px 112px;
  }

  .portfolio-case--blackwave .portfolio-case__main {
    grid-column: 6 / -1;
  }

  .portfolio-case--blackwave .portfolio-case__content {
    grid-column: 1 / span 5;
    grid-row: 1;
    padding: 36px 38px 22px 4px;
  }

  .portfolio__more {
    display: grid;
  }

  .portfolio__more-toggle {
    display: none;
  }

  .portfolio__calculation {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 70px;
    margin-top: 126px;
    padding: 58px 62px;
  }

  .portfolio__calculation .btn {
    width: auto;
    white-space: nowrap;
  }
}

@media (min-width: 1024px) {
  .portfolio-case--dark {
    margin-inline: -64px;
    padding-inline: 64px;
  }

  .portfolio__duo {
    gap: 86px;
  }

  .portfolio-card__body h3 {
    font-size: 47px;
  }
}
