/*
 * Level Light — стили сайта. Один файл, без сборщика.
 * Значения сняты с макета заказчика (design/source/*.dc.html).
 * Порядок: шрифты → токены → база → раскладка → компоненты → движение.
 * Mobile-first: базовые правила для телефона, дальше min-width 768 / 1024 / 1100 / 1440.
 */

/* ------------------------------------------------------------------ Шрифты */

@font-face { font-family: Geologica; src: url("../fonts/Geologica-ExtraLight.d29b84f47cfd.woff2") format("woff2"); font-weight: 200; font-display: swap; }
@font-face { font-family: Geologica; src: url("../fonts/Geologica-Light.90758a59ae72.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: Geologica; src: url("../fonts/Geologica-Regular.2bb111366ac1.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Geologica; src: url("../fonts/Geologica-Medium.94130a2f8543.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Geologica; src: url("../fonts/Geologica-SemiBold.a0a0485d8999.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* ------------------------------------------------------------------ Токены */

:root {
  /* цвета */
  --black: #000;
  --ink: #111;               /* основной текст */
  --dark: #0a0a0a;           /* темные секции */
  --gold: #ba8f51;
  --gold-light: #c9a36b;     /* наведение на золотую кнопку */
  --white: #fff;
  --gray-900: #1e1e1e;       /* линия в футере */
  --gray-800: #3a3a3a;       /* линии на темном */
  --gray-700: #4a4a4a;       /* текст карточек */
  --gray-600: #555;
  --gray-500: #8a8a8a;       /* подписи, текст футера */
  --gray-400: #9a9a9a;
  --gray-300: #b9b9b9;
  --line: #e3e3e3;
  --line-strong: #d2d2d2;
  --line-warm: #c9c4bc;
  --surface: #f4f4f4;        /* карточка проекта */
  --surface-media: #edebe6;  /* подложка фото */
  --beige: #f3f1ee;          /* бежевые секции и плашки */
  --white-16: rgba(255, 255, 255, 0.16);
  --white-35: rgba(255, 255, 255, 0.35);

  /* шрифт */
  --font: Geologica, "Helvetica Neue", Arial, sans-serif;
  --text: 16px;
  --text-lead: 19px;
  --h1: clamp(40px, 5.6vw, 84px);
  --h2: clamp(30px, 3.4vw, 50px);
  --h3: clamp(20px, 1.8vw, 24px);

  /* раскладка */
  --container: 1400px;
  --gutter: 20px;
  --section-space: 64px;
  --header-height: 64px;

  /* скругления */
  --radius-pill: 999px;
  --radius-card: 18px;
  --radius-small: 14px;

  /* движение — кривая из макета */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fast: 250ms;
  --slow: 700ms;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --section-space: 88px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 56px; --section-space: 110px; }
}

@media (min-width: 1100px) {
  :root { --header-height: 96px; }
}

/* ------------------------------------------------------------------ База */

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

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

/* блокировка прокрутки под мобильным меню — только там, где меню вообще бывает */
@media (max-width: 1099.98px) {
  html.menu-open { overflow: hidden; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, p { margin: 0; }

h1, h2, h3 {
  font-weight: 600;
  text-transform: uppercase;
  text-wrap: balance;
}

h1 { font-size: var(--h1); line-height: 0.98; letter-spacing: -0.015em; }
h2 { font-size: var(--h2); line-height: 1.06; }
h3 { font-size: var(--h3); line-height: 1.15; }

address { font-style: normal; }

button, input, textarea, select { font: inherit; color: inherit; }

[x-cloak] { display: none !important; }

/* hidden должен скрывать и элементы, которым CSS задает display (например, поля формы заявки) */
[hidden] { display: none !important; }

:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--dark);
  font-weight: 600;
}

.skip-link:focus { top: 16px; }

/* ------------------------------------------------------------------ Раскладка */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-space); }
.section--light { background: var(--white); }
.section--beige { background: var(--beige); }
.section--dark { background: var(--dark); color: var(--white); }

/* подпись + заголовок + вводный абзац — типовое начало секции в макете */
.section-head { margin-bottom: 40px; }
.section-head > h2, .section-head > h1 { max-width: 22ch; }
.section-head > * + * { margin-top: 24px; }
.section-head > .section-label + * { margin-top: 0; }

@media (min-width: 1024px) {
  .section-head { margin-bottom: 56px; }
}

.lead {
  max-width: 760px;
  font-size: var(--text-lead);
  line-height: 1.6;
  text-wrap: pretty;
}

.section--dark .lead { color: var(--gray-300); }

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch; /* карточки в ряду одной высоты (правка П1) */
}

@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}

@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ------------------------------------------------------------------ Подпись секции */

.section-label {
  margin-bottom: 22px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-label--line {
  display: flex;
  align-items: center;
  gap: 18px;
}

.section-label--line::before {
  content: "";
  flex: 0 0 44px;
  height: 1px;
  background: currentColor;
}

/* ------------------------------------------------------------------ Кнопка-пилюля */

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color var(--fast) var(--ease),
    border-color var(--fast) var(--ease),
    color var(--fast) var(--ease);
}

.button:active { transform: translateY(1px); }

.button--lg { padding: 20px 32px; font-size: 13px; letter-spacing: 0.12em; }
.button--md { padding: 16px 28px; font-size: 12px; letter-spacing: 0.1em; }
.button--sm { padding: 12px 20px; font-size: 12px; letter-spacing: 0.1em; }

@media (min-width: 768px) {
  .button--lg { padding: 24px 52px; }
  .button--md { padding: 18px 36px; }
  .button--sm { padding: 13px 22px; }
}

.button--gold { background: var(--gold); color: var(--dark); }
.button--gold:hover, .button--gold:focus-visible { background: var(--gold-light); }

.button--light { background: var(--white); color: var(--black); }
.button--light:hover, .button--light:focus-visible { background: var(--gold); color: var(--dark); }

.button--dark { background: var(--ink); color: var(--white); }
.button--dark:hover, .button--dark:focus-visible { background: var(--gold); color: var(--dark); }

.button--outline-light { border-color: var(--white-35); color: var(--white); }
.button--outline-light:hover, .button--outline-light:focus-visible { border-color: var(--white); background: var(--white); color: var(--black); }

.button--outline-dark { border-color: var(--line-strong); color: var(--ink); }
.button--outline-dark:hover, .button--outline-dark:focus-visible { border-color: var(--ink); background: var(--ink); color: var(--white); }

/* блик света по главной кнопке — только у главных CTA */
.button--glint { overflow: hidden; isolation: isolate; }

.button--glint::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform var(--slow) var(--ease);
  pointer-events: none;
}

.button--glint:hover::after, .button--glint:focus-visible::after { transform: translateX(120%); }

/* Кнопка в шапке — главная цель на каждой странице: блик проходит по ней и сам, раз в 9 секунд
   (первый раз — через 2,5 секунды после загрузки). Проход — 0,7 секунды, как при наведении,
   остальное время — пауза. При наведении и фокусе вместо автоблика — обычный. Только если
   в системе не включено «уменьшить движение»; остальные кнопки блестят только при наведении. */
@keyframes ll-glint {
  0% { transform: translateX(-120%); animation-timing-function: var(--ease); }
  7.8%, 100% { transform: translateX(120%); }
}

@media (prefers-reduced-motion: no-preference) {
  .site-header__cta.button--glint::after { animation: ll-glint 9s 2.5s infinite backwards; }
  .site-header__cta.button--glint:hover::after,
  .site-header__cta.button--glint:focus-visible::after { animation: none; }
}

/* ------------------------------------------------------------------ Цифра с подписью */

.stat { display: flex; flex-direction: column; gap: 8px; }

.stat__value {
  font-size: clamp(32px, 3vw, 44px);
  font-weight: 600;
  line-height: 1;
}

.stat__label { color: var(--gray-500); font-size: 13px; line-height: 1.4; }

/* ------------------------------------------------------------------ Карточка проекта */

.project-card { height: 100%; }

.project-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--surface);
  transition: box-shadow var(--fast) var(--ease);
}

.project-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-media);
}

.project-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow) var(--ease);
}

.project-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 26px 24px 28px;
}

@media (min-width: 768px) {
  .project-card__body { padding: 32px 34px 34px; }
}

.project-card__type {
  margin-bottom: 14px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-card__title { margin-bottom: 14px; }

.project-card__text {
  margin-bottom: 28px;
  color: var(--gray-700);
  line-height: 1.5;
  text-wrap: pretty;
}

.project-card__action { margin-top: auto; align-self: flex-start; }

.project-card__link:hover, .project-card__link:focus-visible { box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16); }
.project-card__link:hover .project-card__image, .project-card__link:focus-visible .project-card__image { transform: scale(1.04); }
.project-card__link:hover .project-card__action, .project-card__link:focus-visible .project-card__action { border-color: var(--ink); background: var(--ink); color: var(--white); }

/* ------------------------------------------------------------------ Плитка проекта (вариант B) */

/* Рендер на всю площадь, подпись поверх. На устройствах с наведением плитка приглушена
   до черно-белой, при наведении «включается свет»: фото становится цветным, подпись уходит.
   На сенсорных экранах наведения нет — там плитка цветная сразу, подпись внизу. */

.tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 768px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .tile-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}

.project-tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}

.project-tile picture, .project-tile__image {
  width: 100%;
  height: 100%;
}

.project-tile__image {
  object-fit: cover;
  transition: filter var(--slow) var(--ease), transform var(--slow) var(--ease);
}

.project-tile__caption {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 72px 24px 24px;
  background: linear-gradient(to top, rgba(5, 5, 5, 0.85), rgba(5, 5, 5, 0));
  transition: opacity var(--fast) var(--ease);
}

.project-tile__type {
  color: var(--gray-300);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-tile__title {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  text-wrap: balance;
}

@media (hover: hover) {
  .project-tile__image { filter: grayscale(1) brightness(0.55); }

  .project-tile__caption {
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: none;
    text-align: center;
  }

  .project-tile:hover .project-tile__image,
  .project-tile:focus-visible .project-tile__image {
    filter: none;
    transform: scale(1.03);
  }

  /* Мышью подпись уходит — «включили свет». С клавиатуры подпись остается: иначе при переходе
     по Tab на плитке не видно, какой это проект. Затемнение — чтобы текст читался на цвете. */
  .project-tile:hover:not(:focus-visible) .project-tile__caption { opacity: 0; }
  .project-tile:focus-visible .project-tile__caption { background: rgba(5, 5, 5, 0.55); }
}

/* ------------------------------------------------------------------ Портфолио */

/* Первый экран: фото на всю ширину под затемнением, текст по центру, внизу ряд фактов */
.portfolio-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(820px, 100svh);
  overflow: hidden;
  background: #050505;
  color: var(--white);
}

.portfolio-hero picture, .portfolio-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portfolio-hero__image { object-fit: cover; }

.portfolio-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.72) 0%, rgba(5, 5, 5, 0.32) 38%, rgba(5, 5, 5, 0.9) 100%);
}

.portfolio-hero__inner { position: relative; z-index: 1; }

.portfolio-hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 120px 0 48px;
  text-align: center;
}

.portfolio-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-pill);
  color: #ededed;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.portfolio-hero__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--gold);
}

.portfolio-hero__title { max-width: 20ch; margin-bottom: 28px; font-size: clamp(38px, 6vw, 88px); }

.portfolio-hero__lead {
  max-width: 720px;
  margin-bottom: 40px;
  color: #c9c9c9;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
  text-wrap: pretty;
}

.portfolio-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

.portfolio-hero__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--white-16);
}

.portfolio-hero__facts > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* значения на одной линии, даже если подпись в две строки */
  padding: 22px 0 26px 16px;
}
.portfolio-hero__facts > div:first-child { padding-left: 0; }
.portfolio-hero__facts > div + div { border-left: 1px solid var(--white-16); }

.portfolio-hero__facts dt {
  margin-bottom: 8px;
  color: var(--gray-500);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.portfolio-hero__facts dd { margin: 0; font-size: clamp(16px, 1.8vw, 24px); font-weight: 600; }

@media (min-width: 768px) {
  .portfolio-hero__text { padding: 200px 0 72px; }
  .portfolio-hero__badge { margin-bottom: 44px; padding: 14px 30px; font-size: 12px; }
  .portfolio-hero__title { margin-bottom: 34px; }
  .portfolio-hero__lead { margin-bottom: 52px; }
  .portfolio-hero__facts > div { padding: 30px 0 34px 36px; }
  .portfolio-hero__facts dt { font-size: 12px; }
}

/* заголовок секции по центру, как у «Галереи проектов» в макете */
.section-head--center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.section-head--center > .lead { max-width: 900px; }

/* Вкладки по типам объектов — обычные ссылки (правка П2). На телефоне листаются внутри полосы. */
.type-tabs {
  display: flex;
  gap: 10px;
  margin: 0 calc(-1 * var(--gutter)) 36px;
  padding: 2px var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}

.type-tabs a {
  flex: none;
  padding: 13px 24px;
  border: 1px solid var(--gray-800);
  border-radius: var(--radius-pill);
  color: var(--gray-300);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}

.type-tabs a:hover, .type-tabs a:focus-visible { border-color: var(--white); color: var(--white); }
.type-tabs a.is-active { border-color: var(--gold); background: var(--gold); color: var(--dark); }

@media (min-width: 768px) {
  .type-tabs { flex-wrap: wrap; justify-content: center; margin: 0 0 52px; padding: 0; overflow: visible; }
  .type-tabs a { padding: 15px 30px; font-size: 13px; }
}

/* ------------------------------------------------------------------ Общее для страницы проекта */

.rich-text > * + * { margin-top: 1em; }
.rich-text h3 { margin-top: 1.6em; font-size: 20px; }
.rich-text ol, .rich-text ul { margin-bottom: 0; padding-left: 1.3em; }
.rich-text li + li { margin-top: 0.6em; }
.rich-text a { text-decoration: underline; text-underline-offset: 3px; }
.section--dark .rich-text { color: var(--gray-300); }
.section--dark .rich-text h3, .section--dark .rich-text b { color: var(--white); }

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pills li {
  padding: 12px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section--dark .pills li { border-color: var(--gray-800); color: var(--white); }

.photos-note { margin-top: 24px; color: var(--gray-500); font-size: 14px; }

/* ------------------------------------------------------------------ Страница проекта: варианты A и B */

/* По умолчанию на сайте вариант A (portfolio/includes/project_detail.html), B — только на
   витрине сравнения (вопрос 27). Стили B удаляются, когда заказчик подтвердит выбор. */

.variant-switcher { padding-block: 20px; border-bottom: 1px solid var(--line); background: var(--beige); }
.variant-switcher__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.variant-switcher__label { font-size: 13px; font-weight: 600; }
.variant-switcher__link { margin-left: auto; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

.variant-switcher__projects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 14px;
  color: var(--gray-600);
  font-size: 13px;
}

.variant-switcher__projects .is-active { color: var(--ink); font-weight: 600; }

/* A: текст слева, главное фото справа */

.project-a__intro { display: grid; gap: 40px; }

@media (min-width: 1024px) {
  .project-a__intro { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 64px; }
}

.project-a__text { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.project-a__text .section-label { margin-bottom: 0; }
.project-a__title { font-size: clamp(34px, 3.6vw, 54px); line-height: 1.04; }
.project-a__subtitle { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.4; }

.project-a__meta { display: grid; gap: 6px; margin: 0; font-size: 14px; }
.project-a__meta > div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.project-a__meta dt { color: var(--gray-500); }
.project-a__meta dd { margin: 0; color: var(--white); }

/* на телефоне и планшете фото — первым, иначе до первой картинки несколько экранов текста */
.project-a__cover { order: -1; overflow: hidden; border-radius: var(--radius-card); }
.project-a__cover-image { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

@media (min-width: 1024px) {
  .project-a__cover { position: sticky; top: calc(var(--header-height) + 24px); order: 0; }
  .project-a__cover-image { max-height: calc(100vh - var(--header-height) - 48px); }
}

.project-a__analysis { margin-top: 72px; }

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  border: 1px solid var(--gray-800);
  border-radius: var(--radius-card);
  overflow: hidden;
}

@media (min-width: 768px) {
  .analysis-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .analysis-grid { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
}

.analysis-grid > div { padding: 28px 30px 32px; border: 0 solid var(--gray-800); border-width: 0 1px 1px 0; }
.analysis-grid dt { margin-bottom: 14px; color: var(--gray-500); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.analysis-grid dd { margin: 0; font-size: 16px; line-height: 1.5; }

.photo-grid { display: grid; grid-template-columns: 1fr; gap: 28px 24px; }

@media (min-width: 768px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

.photo-grid figure, .project-b__gallery figure { margin: 0; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-small); }
.photo-grid figcaption, .project-b__gallery figcaption { margin-top: 10px; color: var(--gray-500); font-size: 13px; line-height: 1.4; }

/* B: галерея слева, закрепленная таблица фактов справа */

.project-b__back { display: inline-block; margin-bottom: 24px; color: var(--gold); font-size: 13px; }
.project-b__back:hover { text-decoration: underline; text-underline-offset: 3px; }
.project-b__title { margin-bottom: 40px; font-size: clamp(28px, 2.6vw, 40px); }

.project-b__layout { display: grid; gap: 40px; }

@media (min-width: 1024px) {
  .project-b__layout { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; }
}

.project-b__gallery { display: grid; grid-template-columns: 1fr; gap: 12px; }
.project-b__gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

@media (min-width: 768px) {
  .project-b__gallery { grid-template-columns: repeat(2, 1fr); }
  .project-b__gallery figure:nth-child(3n + 1) { grid-column: 1 / -1; } /* ритм: крупное, два рядом, крупное… */
  .project-b__gallery figure:nth-child(3n + 1) img { aspect-ratio: 16 / 10; }
  .project-b__gallery figure:not(:nth-child(3n + 1)) img { aspect-ratio: 4 / 5; }
}

/* на телефоне и планшете факты — перед галереей, иначе они под всеми фото */
.project-b__facts { display: flex; flex-direction: column; gap: 28px; order: -1; }

@media (min-width: 1024px) {
  /* Закрепленный блок не должен быть выше окна: иначе его низ с кнопкой виден только в конце
     страницы. Длинный разбор вынесен ниже галереи, а если блок все равно не помещается
     (низкий экран, длинная «Задача»), у него своя прокрутка. */
  .project-b__facts {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    order: 0;
    max-height: calc(100vh - var(--header-height) - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
}

.project-b__analysis { padding-top: 0; }

.facts { margin: 0; border-top: 1px solid var(--gray-800); }
.facts > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--gray-800); }
.facts dt { color: var(--white); font-size: 13px; font-weight: 600; }
.facts dd { margin: 0; color: var(--gray-300); font-size: 14px; line-height: 1.5; }

.project-b__about { max-width: 820px; }

/* ------------------------------------------------------------------ Лендинги: общее */

/* секция продолжает предыдущую того же тона — без верхнего отступа, как в макете. Если перед ней
   темная секция (например, пустая «Галерея проектов» скрыта), отступ возвращается. */
.section--flush { padding-top: 0; }
.section--dark + .section--flush { padding-top: var(--section-space); }


/* Галерея проектов: на телефоне лента со свайпом (раздел 3.4 плана), дальше — сетка */
@media (max-width: 767.98px) {
  .tile-grid--rail {
    grid-auto-flow: column;
    grid-auto-columns: 82%;
    grid-template-columns: none;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }

  .tile-grid--rail > * { scroll-snap-align: start; }
}

/* Заказчик выбирает до 6 проектов. Если их 2–4, на десктопе — один ряд без пустых ячеек */
@media (min-width: 768px) {
  .tile-grid--rail:has(> :last-child:nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .tile-grid--rail:has(> :last-child:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile-grid--rail:has(> :last-child:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.gallery__more { margin-top: 40px; }

@media (min-width: 1024px) {
  .gallery__more { margin-top: 56px; }
}

/* строки «подпись — значение»: параметры сцен, условия программ */
.param-list { margin: 0; border-top: 1px solid var(--line); }
.param-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.program .param-list > div:last-child { border-bottom: 0; }
.param-list dt { color: var(--gray-500); }
.param-list dd { margin: 0; text-align: right; }
.section--dark .param-list, .section--dark .param-list > div,
.program--dark .param-list, .program--dark .param-list > div { border-color: var(--white-16); }

/* ------------------------------------------------------------------ Главная: первый экран */

.landing-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(780px, 100svh);
  overflow: hidden;
  background: #050505;
  color: var(--white);
}

.landing-hero picture, .landing-hero__image { position: absolute; inset: 0; width: 100%; height: 100%; }
.landing-hero__image { object-fit: cover; }

.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.78) 0%, rgba(5, 5, 5, 0.35) 40%, rgba(5, 5, 5, 0.92) 100%);
}

.landing-hero__inner { position: relative; z-index: 1; padding-block: 120px 48px; }
.landing-hero .section-label { margin-bottom: 28px; font-size: 13px; letter-spacing: 0.16em; }
/* на телефоне — от ширины экрана: длинное слово («подстраивается») должно помещаться в строку */
.landing-hero__title { max-width: 17ch; margin-bottom: 28px; font-size: min(40px, 9vw); }

@media (min-width: 768px) {
  .landing-hero__title { font-size: clamp(40px, 5.6vw, 84px); }
}

.landing-hero__lead {
  max-width: 720px;
  margin-bottom: 36px;
  color: #c9c9c9;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
  text-wrap: pretty;
}

.landing-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.landing-hero__note { color: var(--gray-400); font-size: 14px; }

.landing-hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 0;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.landing-hero__stats .stat:nth-child(even) { padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, 0.18); }
.landing-hero__stats .stat__label { color: var(--gray-400); font-size: 14px; letter-spacing: 0.04em; }

@media (min-width: 768px) {
  .landing-hero__inner { padding-block: 190px 84px; }
  .landing-hero__lead { margin-bottom: 44px; }
  .landing-hero__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 84px; padding-top: 32px; }
  .landing-hero__stats .stat + .stat { padding-left: 36px; border-left: 1px solid rgba(255, 255, 255, 0.18); }
}

/* ------------------------------------------------------------------ Главная: ошибки по свету (правка Д4) */

/* Слева — заголовок и шторка «визуализация ↔ расчет DIALux» (закрепляется при прокрутке),
   справа — ошибки с линейными иконками (cotton/line_icon.html) */
.proof { background: var(--beige); }
.proof__grid { display: grid; gap: 48px; align-items: start; }
.proof__intro .lead { color: #555; }
.proof__intro .section-head, .proof__intro h2 { max-width: 18ch; }
.proof__intro > * + * { margin-top: 24px; }
.proof__intro > .section-label + h2 { margin-top: 0; }

.compare { margin: 36px 0 0; }
.compare__frame { position: relative; overflow: hidden; border-radius: var(--radius-card); background: var(--ink); aspect-ratio: 637 / 461; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18); }
.compare__frame picture, .compare__image { width: 100%; height: 100%; }
.compare__image { object-fit: cover; }
.compare__overlay { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--white); box-shadow: 0 0 12px rgba(0, 0, 0, 0.5); pointer-events: none; }
.compare__handle::after {
  content: "‹ ›";
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--dark);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.1em;
  transform: translate(-50%, -50%);
}
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare__range:focus-visible + * { outline: none; }
.compare__frame:has(.compare__range:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }
.compare__tag { position: absolute; top: 14px; z-index: 1; padding: 6px 12px; border-radius: var(--radius-pill); background: rgba(10, 10, 10, 0.7); color: var(--white); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; pointer-events: none; }
.compare__tag--left { left: 14px; }
.compare__tag--right { right: 14px; }
.compare figcaption { margin-top: 14px; color: var(--gray-600); font-size: 13px; line-height: 1.5; }

.proof-errors { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.proof-errors li { display: flex; gap: 22px; padding: 30px 0; border-top: 1px solid var(--line-warm); }
.proof-errors li:last-child { border-bottom: 1px solid var(--line-warm); }
.proof-errors__icon { width: 40px; height: 40px; margin-top: 2px; }
.proof-errors h3 { margin-bottom: 10px; font-size: clamp(19px, 1.5vw, 22px); text-transform: none; }
.proof-errors p { color: #555; font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.proof-errors__cost { display: flex; align-items: center; gap: 12px; margin-top: 14px; color: var(--ink) !important; font-size: 14px !important; font-weight: 600; }
.proof-errors__cost::before { content: ""; flex: none; width: 22px; height: 1px; background: var(--gold); }

@media (min-width: 1024px) {
  .proof__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 80px; }
  .proof__intro { position: sticky; top: calc(var(--header-height) + 32px); }
  .proof-errors li { padding: 36px 0; }
}

/* ------------------------------------------------------------------ Главная: выгода для студии */

.benefits h3 { text-transform: none; }

.benefits__top { display: grid; gap: 40px; margin-bottom: 56px; }

.metrics { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.metric { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.metric > div { flex: 1 1 260px; min-width: 0; padding-top: 6px; }
.metric h3 { margin-bottom: 8px; font-size: 19px; }
.metric p:not(.metric__value) { color: #666; font-size: 16px; line-height: 1.6; text-wrap: pretty; }

.metric__value {
  flex: 0 0 auto;
  min-width: 132px;
  font-size: clamp(44px, 4.6vw, 64px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.metric__value span { color: var(--gray-500); font-size: 16px; font-weight: 500; letter-spacing: 0; }

.photo-card { position: relative; min-height: 380px; margin: 0; overflow: hidden; border-radius: var(--radius-card); background: var(--ink); }
.photo-card picture, .photo-card__image { position: absolute; inset: 0; width: 100%; height: 100%; }
.photo-card__image { object-fit: cover; }
.photo-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 5, 5, 0) 30%, rgba(5, 5, 5, 0.92) 100%); }

.photo-card figcaption {
  position: absolute;
  inset: auto 24px 24px;
  z-index: 1;
  color: var(--white);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.45;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6); /* подпись читается и на светлых участках фото */
  text-wrap: pretty;
}

.photo-card__label { display: block; margin-bottom: 12px; color: var(--gold); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }

.numbered-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px 44px;
  margin: 0 0 64px;
  padding: 44px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  counter-reset: benefit;
}

.numbered-list li { position: relative; padding-left: 36px; counter-increment: benefit; }
.numbered-list li::before { content: counter(benefit, decimal-leading-zero); position: absolute; top: 4px; left: 0; color: var(--gold); font-size: 13px; font-weight: 600; }
.numbered-list h3 { margin-bottom: 10px; font-size: 19px; }
.numbered-list p { color: #666; font-size: 16px; line-height: 1.6; text-wrap: pretty; }

.benefits__panels { display: grid; gap: 24px; }

.panel { padding: 36px 24px; border-radius: var(--radius-card); }
.panel h3 { max-width: 18ch; margin-bottom: 34px; font-size: 26px; }
.panel--beige { background: var(--beige); }
.panel--dark { background: var(--dark); color: var(--white); }
.panel__note { margin-top: 26px; color: #777; font-size: 15px; line-height: 1.6; }

.time-bars { display: flex; flex-direction: column; gap: 26px; margin: 0; padding: 0; list-style: none; }
.time-bars li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; color: #5a5a5a; font-size: 15px; }
.time-bars b { color: var(--ink); font-weight: 600; }
.time-bars__track { flex: 1 0 100%; height: 14px; margin-top: 4px; overflow: hidden; border-radius: var(--radius-pill); background: #e2ddd4; }
.time-bars__track > span { display: block; height: 100%; border-radius: inherit; background: var(--ink); }
.time-bars__track--gold > span { background: var(--gold); }

.split-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 34px; }
.split-lists__title { margin-bottom: 18px; color: var(--gray-500); font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.split-lists__title--gold { color: var(--gold); }
.split-lists ul { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; color: #ededed; font-size: 16px; list-style: none; }

@media (min-width: 768px) {
  .numbered-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric__value { flex-basis: 200px; } /* описания метрик начинаются с одной линии */
}

@media (min-width: 1024px) {
  .numbered-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .benefits__top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px; margin-bottom: 72px; }
  .photo-card { min-height: 460px; }
  .photo-card figcaption { inset: auto 34px 32px; }
  .numbered-list { margin-bottom: 100px; }
  .benefits__panels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
  .panel { padding: 48px 44px; }
}

/* ------------------------------------------------------------------ Главная: зоны (правка Д1) */

.zones-section { background: #080808; }

.zones__tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }

.zones__tab {
  padding: 14px 24px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-pill);
  background: transparent;
  color: #dedede;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.zones__tab:hover, .zones__tab:focus-visible { border-color: var(--white); color: var(--white); }
.zones__tab.is-active { border-color: var(--gold); background: var(--gold); color: var(--dark); }

.zones__layout { display: grid; gap: 32px; align-items: start; }

.zones__frame { position: relative; overflow: hidden; border-radius: var(--radius-card); background: var(--ink); aspect-ratio: 16 / 10; }

.zones__image {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 260ms var(--ease);
}

.zones__image.is-active { opacity: 1; }
.zones__image picture, .zones__image img { width: 100%; height: 100%; }
.zones__image img { object-fit: cover; }

.zones__panel h3 { margin-bottom: 18px; font-size: 28px; text-transform: none; }
.zones__panel > p { margin-bottom: 32px; color: var(--gray-300); font-size: 18px; line-height: 1.65; text-wrap: pretty; }

@media (min-width: 768px) {
  .zones__tab { padding: 17px 34px; font-size: 13px; }
}

@media (min-width: 1024px) {
  .zones__layout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
  .zones__panels { padding-top: 8px; }
}

/* ------------------------------------------------------------------ Направления работы: главная (правка Д3) и B2C */

.direction-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 24px; }

.direction { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-card); background: var(--beige); }
.direction__media { overflow: hidden; background: var(--ink); aspect-ratio: 16 / 10; }
.direction__media picture, .direction__media img { width: 100%; height: 100%; }
.direction__media img { object-fit: cover; transition: transform var(--slow) var(--ease); }
.direction:hover .direction__media img { transform: scale(1.03); }

.direction__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 20px; padding: 32px 24px 36px; }
.direction__body h3 { font-size: 26px; text-transform: none; }
.direction__body > p:not(.direction__tag) { flex: 1; color: #555; font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.direction__tag { color: var(--gold); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.direction .button--outline-dark { border-color: var(--line-warm); }

@media (min-width: 768px) and (max-width: 1399px) {
  .directions .direction__tag { min-height: 2lh; }
}

@media (min-width: 1024px) {
  .direction-grid { gap: 30px; }
  .direction__body { padding: 36px 36px 40px; }
}

/* ------------------------------------------------------------------ Главная: аудит */

.audit__top { display: grid; gap: 40px; align-items: start; margin-bottom: 56px; }
.audit__intro h2 { margin-bottom: 26px; }
.audit__intro .lead { max-width: 520px; margin-bottom: 34px; color: #555; }

.audit__badge { display: flex; align-items: center; gap: 22px; margin-bottom: 36px; }
.audit__badge p { max-width: 280px; color: #555; font-size: 16px; line-height: 1.55; text-wrap: pretty; }

.ring {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 118px;
  height: 118px;
  border-radius: var(--radius-pill);
  background: conic-gradient(var(--gold) 0turn 0.72turn, #ede9e2 0.72turn 1turn);
}

.ring::before { content: ""; position: absolute; inset: 15px; border-radius: inherit; background: var(--white); }
.ring b, .ring small { position: relative; }
.ring b { font-size: 30px; font-weight: 600; line-height: 1; }
.ring small { margin-top: 4px; color: var(--gray-500); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }

.audit__list { margin: 0; padding: 14px 24px 22px; border: 1px solid var(--line); border-radius: var(--radius-card); list-style: none; counter-reset: audit; }

.audit__list li { display: flex; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid #ededed; font-size: 18px; counter-increment: audit; }
.audit__list li:last-child { border-bottom: 0; }

.audit__list li::before {
  content: counter(audit, decimal-leading-zero);
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--beige);
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
}

.audit__findings { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--line); }
.audit__findings > div { padding: 36px 24px; background: var(--white); }
.audit__findings > .audit__findings--dark { background: var(--dark); color: #ededed; }
.audit__findings-title { margin-bottom: 26px; color: var(--gray-500); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.audit__findings--dark .audit__findings-title { color: var(--gold); }
.audit__findings ul { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; color: #444; font-size: 17px; line-height: 1.5; list-style: none; }
.audit__findings--dark ul { color: #ededed; }

@media (min-width: 1024px) {
  .audit__top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; margin-bottom: 80px; }
  .audit__list { padding-inline: 30px; }
  .audit__findings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit__findings > div { padding: 48px 44px; }
}

/* ------------------------------------------------------------------ Главная: как работаем (правка Д2) */

.steps-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 44px; }
.steps-legend__item { flex: 1 1 280px; min-width: 0; padding-top: 18px; border-top: 4px solid var(--gray-800); color: var(--gray-500); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.steps-legend__item--project { border-top-color: var(--gold); color: var(--gold); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 34px 40px; margin: 0; padding: 0; list-style: none; }

.step { display: flex; gap: 22px; }
.step > div { flex: 1; min-width: 0; padding-bottom: 8px; }
.step h3 { margin-bottom: 12px; font-size: 21px; text-transform: none; }
.step p { color: #a6a6a6; font-size: 16px; line-height: 1.62; text-wrap: pretty; }

.step__dot {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--white-35);
  border-radius: var(--radius-pill);
  color: #ededed;
  font-size: 14px;
  font-weight: 600;
}

.step--project .step__dot { border-color: var(--gold); background: var(--gold); color: var(--dark); }

/* ------------------------------------------------------------------ Главная: коммерческие условия */

.programs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 24px; margin-bottom: 40px; }

.program { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding: 36px 24px; border: 1px solid var(--line); border-radius: var(--radius-card); }
.program > div, .program .param-list { align-self: stretch; }
.program--dark { border-color: var(--dark); background: var(--dark); color: var(--white); }
.program__tag { margin-bottom: 16px; color: var(--gold); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.program h3 { margin-bottom: 14px; font-size: 28px; text-transform: none; }
.program > div > p:not(.program__tag) { color: #555; font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.program--dark > div > p:not(.program__tag) { color: var(--gray-300); }

.perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.perks li { padding: 34px 30px 38px; border-radius: 16px; background: var(--beige); }
.perks h3 { margin-bottom: 12px; font-size: 19px; text-transform: none; }
.perks p { color: #5a5a5a; font-size: 16px; line-height: 1.6; text-wrap: pretty; }

@media (min-width: 1024px) {
  .perks { grid-template-columns: repeat(3, minmax(0, 1fr)); } /* 6 преимуществ — 3 + 3, а не 4 + 2 */
  .programs { gap: 30px; margin-bottom: 56px; }
  .program { padding: 48px 44px; }
  .perks { gap: 30px; }
}

/* ------------------------------------------------------------------ Главная: о нас */

.about h2 { max-width: 24ch; font-size: clamp(30px, 3.1vw, 46px); overflow-wrap: anywhere; }

.about__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 32px 40px;
  margin-bottom: 52px;
  padding-top: 44px;
  border-top: 1px solid var(--white-16);
}

.about__stats .stat__value { font-size: clamp(40px, 3.6vw, 52px); }
.about__stats .stat__label { color: var(--gray-400); font-size: 16px; }

/* ------------------------------------------------------------------ Главная: вопросы и ответы */

.faq { max-width: 1000px; margin-inline: auto; }
.faq h2 { font-size: clamp(30px, 3.1vw, 46px); overflow-wrap: anywhere; }
.faq .section-head { margin-bottom: 48px; }

.faq__item { border-bottom: 1px solid var(--line); }
.faq__item:first-of-type { border-top: 1px solid var(--line); }

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 500;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.faq__item summary::-webkit-details-marker { display: none; }

/* плюс, который превращается в минус */
.faq__item summary::after {
  content: "+";
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: #666;
  font-size: 18px;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.faq__item[open] summary::after { content: "−"; }
.faq__item summary:hover::after, .faq__item summary:focus-visible::after { border-color: var(--gold); color: var(--gold); }
.faq__item p { max-width: 760px; padding-bottom: 28px; color: #5a5a5a; font-size: 17px; line-height: 1.65; text-wrap: pretty; }

@media (min-width: 768px) {
  .faq__item summary { padding: 28px 0; }
}

/* ------------------------------------------------------------------ Главная: отзывы */

.reviews h2 { font-size: clamp(30px, 3.1vw, 46px); }

.review-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin: 0; padding: 0; list-style: none; }
.review { display: flex; flex-direction: column; gap: 18px; padding: 32px 28px; border: 1px solid var(--line); border-radius: 16px; }
.review__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.review__head b { font-size: 18px; font-weight: 600; }
.review__head span { color: var(--gray-500); font-size: 14px; }
.review blockquote { margin: 0; color: #5a5a5a; font-size: 16px; line-height: 1.65; text-wrap: pretty; }

@media (min-width: 768px) {
  .review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* 4 отзыва — 2 × 2, а не 3 + 1 */
}

@media (min-width: 1024px) {
  .review-grid { gap: 30px; }
  .review { padding: 36px 32px; }
}

/* ------------------------------------------------------------------ Главная: форма аудита */

.form-card { display: grid; gap: 40px; align-items: start; padding: 48px 24px; border-radius: var(--radius-card); background: var(--dark); color: var(--white); }
.form-card .section-label { margin-bottom: 26px; font-size: 13px; letter-spacing: 0.16em; }
.form-card h2 { max-width: 18ch; margin-bottom: 28px; font-size: clamp(32px, 3.6vw, 54px); line-height: 1.04; }
.form-card .lead { max-width: 520px; margin-bottom: 34px; color: #c6c6c6; }
.form-card__contacts { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.form-card__phone { font-size: 24px; font-weight: 600; }
.form-card__phone:hover, .form-card__phone:focus-visible { color: var(--gold); }

@media (min-width: 1024px) {
  .form-card { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; padding: 88px 60px; }
}

/* Форма заявки (<c-lead-form>) */
.lead-form { position: relative; padding: 32px 24px; border: 1px solid #2a2a2a; border-radius: var(--radius-small); background: #141414; }
.lead-form__fields { display: flex; flex-direction: column; gap: 22px; }
.lead-form__field { display: flex; flex-direction: column; gap: 10px; }
.lead-form__field span { color: var(--gray-500); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }

.lead-form__field input {
  width: 100%;
  padding: 18px;
  border: 1px solid #2e2e2e;
  border-radius: 10px;
  background: var(--dark);
  color: var(--white);
  font-size: 17px;
  transition: border-color var(--fast) var(--ease);
}

.lead-form__field input:focus { border-color: var(--gold); outline: none; }
.lead-form__field input::placeholder { color: #6a6a6a; }
.lead-form__field input[aria-invalid="true"] { border-color: #d9826f; }
.lead-form .button { border: 0; }
.lead-form .button:disabled { cursor: progress; opacity: 0.7; }

.lead-form__consent { display: flex; align-items: flex-start; gap: 12px; color: var(--gray-300); font-size: 14px; line-height: 1.5; cursor: pointer; }
.lead-form__consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--gold); }

.lead-form__error { color: #e59a88; font-size: 13px; line-height: 1.45; }
p.lead-form__error { font-size: 14px; }

.lead-form__done { padding: 12px 0; outline: none; }
.lead-form__done-title { margin-bottom: 14px; color: var(--white); font-size: 26px; font-weight: 600; }
.lead-form__done p:not(.lead-form__done-title) { color: var(--gray-300); font-size: 17px; line-height: 1.6; }

/* ловушка для ботов: вне экрана, но не display:none — такие поля некоторые боты пропускают */
.lead-form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-card__project { margin-bottom: 34px; color: var(--gold); font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }

@media (min-width: 1024px) {
  .lead-form { padding: 44px 40px; }
}

/* Окно с формой (lead-modal.js): по кнопкам «Обсудить проект» форма открывается поверх
   страницы. На телефоне — панель снизу во всю ширину, на экранах шире — окно по центру. */
.lead-modal {
  width: 100%;
  max-width: none;
  max-height: 92dvh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: 22px 22px 0 0;
  background: var(--dark);
  color: var(--white);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a transparent;
}
.lead-modal::backdrop { background: rgb(0 0 0 / 0.72); backdrop-filter: blur(6px); }
html:has(.lead-modal[open]) { overflow: hidden; }
.lead-modal__panel { position: relative; padding: 44px 20px calc(28px + env(safe-area-inset-bottom)); }
.lead-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #2a2a2a;
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.lead-modal__close:hover, .lead-modal__close:focus-visible { border-color: var(--gold); color: var(--gold); }
.lead-modal .section-label { margin-bottom: 18px; padding-right: 48px; font-size: 12px; letter-spacing: 0.16em; }
.lead-modal__title { max-width: 18ch; margin-bottom: 14px; font-size: clamp(26px, 3vw, 36px); line-height: 1.06; }
.lead-modal__text { max-width: 46ch; margin-bottom: 26px; color: #c6c6c6; font-size: 15px; line-height: 1.55; }
.lead-modal .form-card__project { margin-bottom: 22px; }
.lead-modal .lead-form { padding: 0; border: 0; background: none; }
.lead-modal .lead-form__fields { gap: 18px; }
.lead-modal__contacts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; margin-top: 26px; padding-top: 20px; border-top: 1px solid #2a2a2a; }
.lead-modal__phone { font-size: 18px; font-weight: 600; }
.lead-modal__phone:hover, .lead-modal__phone:focus-visible { color: var(--gold); }

@media (min-width: 640px) {
  .lead-modal { width: min(600px, calc(100% - 48px)); max-height: calc(100dvh - 48px); margin: auto; border: 1px solid #2a2a2a; border-radius: var(--radius-card); }
  .lead-modal__panel { padding: 52px 48px 40px; }
  .lead-modal__close { top: 18px; right: 18px; }
}
/* на широком экране — две колонки, как карточка формы внизу страницы: помещается без прокрутки */
@media (min-width: 1024px) {
  .lead-modal { width: min(1040px, calc(100% - 64px)); }
  .lead-modal__panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-rows: 1fr auto; column-gap: 56px; padding: 60px 56px 52px; }
  .lead-modal__intro { grid-column: 1; grid-row: 1; }
  .lead-modal .lead-form { grid-column: 2; grid-row: 1 / 3; }
  .lead-modal__contacts { grid-column: 1; grid-row: 2; margin-top: 32px; }
  .lead-modal__title { font-size: clamp(32px, 3.2vw, 44px); }
  .lead-modal__text { font-size: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  .lead-modal[open] { animation: lead-modal-in 0.32s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .lead-modal[open]::backdrop { animation: lead-modal-fade 0.32s ease; }
}
@keyframes lead-modal-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes lead-modal-fade { from { opacity: 0; } }

/* ------------------------------------------------------------------ Главная: другие направления */

.crosslinks__title { margin-bottom: 40px; font-size: clamp(26px, 2.8vw, 42px); line-height: 1.1; }
.crosslinks__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 24px; }

.crosslink { display: block; padding: 36px 28px; border-radius: var(--radius-card); background: var(--beige); transition: background-color var(--fast) var(--ease); }
.crosslink h3 { margin-bottom: 14px; font-size: 24px; text-transform: none; }
.crosslink p { color: #5a5a5a; font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.crosslink:hover, .crosslink:focus-visible { background: #ebe7e1; }
.crosslink h3::after { content: " →"; color: var(--gold); }

@media (min-width: 1024px) {
  .crosslinks__grid { gap: 30px; }
  .crosslink { padding: 44px 40px; }
}

/* ------------------------------------------------------------------ Лендинги: риски, услуги, этапы (B2C, B2B) */

/* ячейки, разделенные линией 1px: фон сетки просвечивает в зазорах */
.risk-grid, .stage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.risk-grid { border-block: 1px solid var(--line); background: var(--line); }
.risk-grid li { padding: 32px 24px 36px; background: var(--white); }
.risk-grid h3, .stage-grid h3 { margin-bottom: 14px; font-size: 20px; text-transform: none; }
.risk-grid p { color: #666; font-size: 16px; line-height: 1.62; text-wrap: pretty; }

.stage-grid { margin-bottom: 40px; background: rgba(255, 255, 255, 0.14); counter-reset: stage; }
.stage-grid li { padding: 36px 28px 40px; background: var(--dark); counter-increment: stage; }
.stage-grid li::before { content: counter(stage, decimal-leading-zero); display: block; margin-bottom: 18px; color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: 0.14em; }
.stage-grid h3 { font-size: 21px; }
.stage-grid p { color: #a6a6a6; font-size: 16px; line-height: 1.62; text-wrap: pretty; }

@media (min-width: 768px) {
  .risk-grid, .stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .risk-grid, .stage-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .risk-grid li { padding: 40px 34px 44px; }
  .stage-grid { margin-bottom: 56px; }
  .stage-grid li { padding: 40px 36px 44px; }
}

/* направления B2B: 4 темные карточки 2 × 2 — в один ряд длинные тексты слишком узкие */
.segment-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin: 0; padding: 0; list-style: none; }
.segment-grid li { padding: 36px 28px; border-radius: var(--radius-card); background: var(--dark); color: var(--white); }
.segment-grid h3 { margin-bottom: 16px; font-size: 24px; text-transform: none; }
.segment-grid p { color: var(--gray-300); font-size: 17px; line-height: 1.6; text-wrap: pretty; }

@media (min-width: 768px) {
  .segment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .segment-grid { gap: 30px; }
  .segment-grid li { padding: 44px 38px; }
}

/* ------------------------------------------------------------------ Лендинги: аудит-плашка и поставщики */

.audit-card { display: grid; gap: 32px; align-items: start; padding: 44px 24px; border-radius: var(--radius-card); background: var(--beige); }
.audit-card h2 { max-width: 20ch; margin-bottom: 20px; font-size: clamp(28px, 3.1vw, 46px); line-height: 1.08; }
.audit-card__sub { color: var(--gray-800); font-size: 18px; line-height: 1.5; }
.audit-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
.audit-card__body p { color: #5a5a5a; font-size: 18px; line-height: 1.65; text-wrap: pretty; }

@media (min-width: 1024px) {
  .audit-card { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 60px; padding: 80px 60px; }
}

/* правка Б4: блок на всю ширину — заголовок слева, текст и цифры справа */
.supplier { display: grid; gap: 28px; align-items: start; }
.supplier h2 { max-width: 18ch; font-size: clamp(28px, 3.1vw, 46px); line-height: 1.08; }
.supplier__body > p { max-width: 640px; margin-bottom: 40px; color: #555; font-size: 18px; line-height: 1.65; text-wrap: pretty; }

.supplier__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 24px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.supplier__stats .stat__value { font-size: clamp(30px, 2.6vw, 38px); white-space: nowrap; }
.supplier__stats .stat__label { color: #777; font-size: 15px; }

@media (max-width: 379.98px) {
  .supplier__stats { grid-template-columns: minmax(0, 1fr); }
}

/* цифры 2 × 2 и на десктопе: в четыре колонки «3 линейки» и «150 000+» не помещаются */
@media (min-width: 1024px) {
  .supplier { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
  .supplier__stats { gap: 36px 40px; }
}

.about__stats--four { margin-bottom: 0; }

/* ------------------------------------------------------------------ Юридические документы (PR-13) */

.legal-hero { padding-block: 56px 48px; }
.legal-hero__title { max-width: 24ch; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.1; }
.legal-hero__note { margin-top: 18px; color: var(--gray-400); font-size: 14px; }

/* длинный текст: узкая колонка, крупнее интерлиньяж, заметные разделы */
.legal { max-width: 820px; color: #333; font-size: 17px; line-height: 1.7; }
.legal h2 { margin-top: 2em; font-size: clamp(20px, 1.8vw, 24px); line-height: 1.25; text-transform: none; }
.legal h3 { text-transform: none; }
.legal > h2:first-child, .legal > p:first-child + h2 { margin-top: 1.4em; }
.legal ul, .legal ol { padding-left: 1.4em; }
.legal li + li { margin-top: 0.4em; }
.legal a { color: #8a6533; }

@media (min-width: 1024px) {
  .legal-hero { padding-block: 72px 64px; }
}

/* ссылки в подписи галочки согласия */
.lead-form__consent a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.lead-form__consent a:hover, .lead-form__consent a:focus-visible { color: var(--gold-light); }

.site-footer__legal { display: flex; flex-wrap: wrap; gap: 6px 24px; }

/* Уведомление о cookie: компактная плашка внизу, не закрывает контент надолго */
.cookie-notice {
  position: fixed;
  inset: auto 12px max(12px, env(safe-area-inset-bottom)) 12px;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  max-width: 720px;
  margin-inline: auto;
  padding: 14px 18px;
  border: 1px solid var(--gray-800);
  border-radius: var(--radius-small);
  background: rgba(10, 10, 10, 0.96);
  color: var(--gray-300);
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.cookie-notice__text { flex: 1 1 auto; min-width: 0; }
.cookie-notice a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.cookie-notice .button { flex: none; }

/* на телефоне — в одну строку: текст и кнопка рядом, плашка низкая */
@media (max-width: 767.98px) {
  .cookie-notice { flex-wrap: nowrap; gap: 12px; padding: 10px 12px; font-size: 12px; line-height: 1.4; }
  .cookie-notice .button { padding: 10px 14px; }
}

@media (min-width: 768px) {
  .cookie-notice { inset-inline: 24px; bottom: max(24px, env(safe-area-inset-bottom)); }
}

/* пока плашка видна, внизу страницы есть место под нее: кнопку формы можно прокрутить выше */
body { padding-bottom: var(--cookie-notice-space, 0px); }

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

.breadcrumbs { margin-bottom: 32px; font-size: 13px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li { color: var(--gray-500); }
.breadcrumbs li + li::before { content: "/"; margin-right: 10px; color: var(--gray-700); }
.breadcrumbs a { color: var(--gold); }
.breadcrumbs a:hover, .breadcrumbs a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* фото галереи открываются в лайтбоксе */
.photo-grid a { display: block; overflow: hidden; border-radius: var(--radius-small); cursor: zoom-in; }
.photo-grid a img { transition: transform var(--slow) var(--ease); }
.photo-grid a:hover img, .photo-grid a:focus-visible img { transform: scale(1.03); }

.other-projects__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 32px;
}

.text-link { color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.text-link:hover, .text-link:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

/* лайтбокс PhotoSwipe: подпись снизу по центру, шрифт сайта */
.pswp { --pswp-bg: #050505; font-family: var(--font); }

.pswp__caption {
  position: absolute;
  inset: auto 0 0;
  padding: 16px var(--gutter) max(20px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(5, 5, 5, 0.85), rgba(5, 5, 5, 0));
  color: var(--gray-300);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}

.pswp__counter { font-size: 13px; }

/* ------------------------------------------------------------------ Хедер */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--black);
  color: var(--white);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-height);
  padding-inline: var(--gutter);
}

@media (min-width: 1100px) {
  .site-header__bar { gap: 24px; padding-inline: 40px; }
}

.site-header__logo {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
}

.site-header__mark { width: 26px; height: auto; }
.site-header__brand { display: flex; flex-direction: column; gap: 6px; }
.site-header__wordmark { width: auto; height: 15px; }

.site-header__tagline {
  color: var(--gold);
  font-size: 7px;
  letter-spacing: 0.3em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (min-width: 1100px) {
  .site-header__logo { gap: 18px; }
  .site-header__mark { width: 30px; }
  .site-header__brand { gap: 7px; }
  .site-header__wordmark { height: 18px; }
  .site-header__tagline { font-size: 8px; }
}

.site-nav, .site-header__cta { display: none; }

@media (min-width: 1100px) {
  .site-nav {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    gap: clamp(16px, 2.2vw, 42px);
  }

  .site-header__cta { display: inline-flex; flex: 0 0 auto; }
}

@media (min-width: 1100px) and (max-width: 1279.98px) {
  .site-header__bar { gap: 16px; padding-inline: 24px; }
  .site-nav { gap: 12px; }
}

.site-nav__link {
  position: relative;
  padding-block: 8px;
  font-size: clamp(11px, 0.95vw, 14px);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--fast) var(--ease);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--fast) var(--ease);
}

.site-nav__link:hover::after, .site-nav__link:focus-visible::after { transform: scaleX(1); }
.site-nav__link.is-active { color: var(--gold); }

.site-header__burger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--white);
  cursor: pointer;
}

.site-header__burger-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (min-width: 1100px) {
  .site-header__burger { display: none; }
}

.mobile-menu {
  position: fixed;
  top: var(--header-height);
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow-y: auto;
  padding: 32px var(--gutter) 48px;
  background: var(--black);
}

@media (min-width: 1100px) {
  .mobile-menu { display: none !important; } /* на десктопе панель не нужна, даже если осталась открытой */
}

.mobile-menu__nav { display: flex; flex-direction: column; gap: 4px; }

.mobile-menu__link {
  padding-block: 12px;
  border-bottom: 1px solid var(--gray-900);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mobile-menu__link.is-active { color: var(--gold); }

.mobile-menu .button { align-self: stretch; }

.mobile-menu__phone { font-size: 22px; font-weight: 600; }

/* ------------------------------------------------------------------ Футер */

.site-footer { background: var(--black); color: var(--gray-500); }

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px 48px;
  padding-block: 56px;
}

@media (min-width: 1024px) {
  .site-footer__grid { padding-block: 72px; }
}

.site-footer__about img:first-child { width: 34px; height: auto; margin-bottom: 16px; }
.site-footer__wordmark { width: auto; height: 19px; margin-bottom: 11px; }

.site-footer__tagline {
  margin-bottom: 28px;
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.3em;
  line-height: 1;
  text-transform: uppercase;
}

.site-footer__slogan { max-width: 280px; font-size: 15px; line-height: 1.6; }

.site-footer__nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-footer__nav a { color: var(--white); }

.site-footer__contacts { display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
.site-footer__phone { color: var(--white); font-size: 22px; font-weight: 600; }
.site-footer__social { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 10px; font-size: 14px; }

.site-footer a { transition: color var(--fast) var(--ease); }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--gold); }

.site-footer__bottom { border-top: 1px solid var(--gray-900); }

.site-footer__bottom-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 26px;
  font-size: 13px;
}

/* ------------------------------------------------------------------ Движение */

@keyframes ll-rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

/* Появление секций при прокрутке, как в макете. Без поддержки animation-timeline контент
   просто виден — важно для SEO и старых браузеров. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    main > .section + .section > .container > * {
      animation: ll-rise 1ms linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 22%;
    }
  }
}

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

/* ------------------------------------------------------------------ Страницы ошибок: 404, 500 */

/* Темный экран с теплым пятном света — как от светильника в темной комнате. 404 — под шапкой
   сайта (templates/404.html), 500 — самостоятельная страница без шапки (templates/500.html) */
.error-page {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--header-height));
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 72% 18%, rgba(201, 163, 107, 0.22) 0%, rgba(201, 163, 107, 0) 70%),
    radial-gradient(40% 40% at 20% 90%, rgba(186, 143, 81, 0.08) 0%, rgba(186, 143, 81, 0) 70%),
    #050505;
  color: var(--white);
}
.error-page--standalone { min-height: 100svh; }
.error-page__inner { position: relative; padding-block: 72px; }
.error-page__logo { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 56px; }
.error-page__code {
  margin-bottom: 8px;
  background: linear-gradient(180deg, var(--gold-light) 0%, rgba(186, 143, 81, 0.35) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(110px, 20vw, 260px);
  font-weight: 200;
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.error-page__title { max-width: 16ch; margin-bottom: 20px; font-size: clamp(30px, 3.6vw, 52px); line-height: 1.05; }
.error-page__lead { max-width: 560px; margin-bottom: 34px; color: #cfcfcf; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.65; text-wrap: pretty; }
.error-page__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.error-page__phone { margin-top: 28px; font-size: 22px; font-weight: 600; }
.error-page__phone a:hover, .error-page__phone a:focus-visible { color: var(--gold); }

@media (prefers-reduced-motion: no-preference) {
  .error-page__code { animation: error-glow 6s var(--ease) infinite alternate; }
}
@keyframes error-glow {
  from { opacity: 0.85; }
  to { opacity: 1; }
}
/* Отдельная страница контактов. Длинный адрес почты переносится на узких экранах. */
.contact-page { min-height: 60vh; }
.contact-page h1 { margin-bottom: 48px; }
.contact-page__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.contact-page__card { display: grid; gap: 16px; padding: 36px; border-radius: 20px; background: var(--beige); text-decoration: none; color: inherit; }
.contact-page__card .icon { color: var(--gold); }
.contact-page__label { color: var(--gray-600); }
.contact-page__value { font-size: clamp(20px, 2.5vw, 30px); font-weight: 600; overflow-wrap: anywhere; }
.contact-page__subheading { margin-top: 48px; margin-bottom: 24px; font-size: 24px; }
.contact-page__messengers { display: flex; flex-wrap: wrap; gap: 16px; }
.contact-page__messenger { display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--gold); border-radius: 999px; padding: 16px 24px; color: inherit; text-decoration: none; }
.contact-page__messenger .icon { color: var(--gold); }
.contact-page__card:hover, .contact-page__messenger:hover { box-shadow: 0 0 0 2px var(--gold); }
@media (max-width: 767.98px) {
  .contact-page__grid { grid-template-columns: minmax(0, 1fr); }
  .contact-page__card { padding: 24px; }
  .contact-page h1 { margin-bottom: 32px; }
}
