/* ==========================================================================
   Полина Музычук — персональный стилист

   Дизайн-токены.

   Палитра чисто чёрно-белая: клиент прислала marinariys.ru как образец и
   попросила «полностью чб». Там ровно три значения — #262626, #ffffff и
   серый для второстепенного, — и ни одного цветного пятна. Прежние кремовый
   фон и тёплый тауп убраны целиком.

   Тёмное по-прежнему одно семейство, только теперь нейтральное: клиент не
   различает близкие тёмные оттенки и читает их как ошибку.

   Серый для мелкого текста взят темнее, чем у образца: их #b8b8b8 на белом
   даёт 2.1:1 и не проходит по контрасту, здесь #6b6b6b — 5.3:1.
   ========================================================================== */
@property --photo-scale {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

:root {
  /* Фон */
  --paper: #ffffff;
  --bone: #f4f4f4;
  --white: #ffffff;

  /* Одно тёмное семейство, три ступени */
  --ink: #262626;
  --ink-soft: #4a4a4a;
  --muted: #6b6b6b;

  /* Акцентного цвета нет. Переменные оставлены, чтобы не переписывать
     все правила: на светлом фоне это тот же серый, на чернильном — светлее. */
  --taupe: #6b6b6b;
  --taupe-on-ink: #b8b8b8;
  --muted-on-ink: #a8a8a8;

  /* Линии */
  --line: #e5e5e5;
  --line-strong: #cccccc;

  /* Instrument Serif — только латиница, кириллицы в гарнитуре нет.
     Поэтому вся типографика, включая крупные заголовки, идёт на Manrope,
     а сериф появляется лишь там, где текст английский. */
  --font-latin: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-display: "Manrope", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Manrope", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container: 1240px;
  --container-narrow: 860px;
  --gutter: clamp(20px, 5vw, 72px);
  --section-space: clamp(84px, 11vw, 168px);

  --radius: 0px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 260ms cubic-bezier(0.22, 1, 0.36, 1);

  --header-h: 72px;

  --z-header: 100;
  --z-menu: 90;
  --z-lightbox: 200;
}

@media (min-width: 1024px) {
  :root {
    --header-h: 88px;
  }
}

/* ==========================================================================
   База
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Якорь не должен уезжать под фиксированную шапку. */
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open,
body.lightbox-open {
  overflow: hidden;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 300;
  /* Клиент дважды отвергала рукописные и курсивные начертания: любой курсив
     в заголовке читается ею как «рукописный шрифт». Акцент — только цветом. */
  font-style: normal;
}

p,
blockquote {
  margin: 0;
}

/* У figure в браузере поля 1em 40px — без сброса каждая фотография
   оказывается на 80px уже своей колонки. */
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 300;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  transition: top 200ms var(--ease-out);
}

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

/* ==========================================================================
   Раскладка
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-space);
}

.section--bone {
  background: var(--bone);
}

.section--tight {
  padding-block: clamp(60px, 8vw, 112px);
}

/* Волосяная линия вместо теней и рамок с радиусом — единственный разделитель,
   который клиент принимает как «строгий». */
.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ==========================================================================
   Типографика
   ========================================================================== */

/* Мелкая подпись капсом: 700–800 и крупный трекинг. Это единственный
   декоративный приём, который клиент приняла без правок. */
.label {
  display: block;
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--taupe);
}

.label--ink {
  color: var(--ink-soft);
}

.label__index {
  /* Прежний --line-strong давал на листе 1.7:1: для линии это нормально,
     для текста — нет. */
  color: var(--muted);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.75rem, 3.4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
  max-width: 24ch;
}

.section-title--wide {
  max-width: 30ch;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.4vw, 28px);
  margin-bottom: clamp(40px, 5.5vw, 72px);
}

.section-intro {
  max-width: 54ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.6vw, 1.125rem);
}

.lead {
  font-size: clamp(1.06rem, 1.9vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.text-flow > * + * {
  margin-top: 1.1em;
}

/* ==========================================================================
   Кнопки
   ========================================================================== */
.button {
  --button-bg: transparent;
  --button-fg: var(--ink);
  --button-border: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 30px;
  border: 1px solid var(--button-border);
  background: var(--button-bg);
  color: var(--button-fg);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  transition:
    background-color var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.button--primary {
  --button-bg: var(--ink);
  --button-fg: var(--paper);
}

.button--primary:hover,
.button--primary:focus-visible {
  --button-bg: transparent;
  --button-fg: var(--ink);
}

.button--ghost:hover,
.button--ghost:focus-visible {
  --button-bg: var(--ink);
  --button-fg: var(--paper);
}

.button--light {
  --button-border: var(--line-strong);
}

.button--light:hover,
.button--light:focus-visible {
  --button-bg: var(--ink);
  --button-fg: var(--paper);
  --button-border: var(--ink);
}

.button__arrow {
  transition: transform var(--transition);
}

.button:hover .button__arrow,
.button:focus-visible .button__arrow {
  transform: translateX(4px);
}

/* Текстовая ссылка с подчёркиванием, которое растёт от левого края. */
.link {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  font-weight: 500;
}

.link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(1);
  transform-origin: left;
  transition: transform var(--transition);
}

.link:hover::after,
.link:focus-visible::after {
  transform: scaleX(0);
  transform-origin: right;
}

/* ==========================================================================
   Фотографии
   ========================================================================== */

/* Волосяная рамка вместо размытой тени — ровно то, что клиент называет
   «строго». Оверфлоу скрыт ради clip-path-проявления и hover-зума. */
.frame {
  position: relative;
  /* В галерее рамка — это <span> внутри кнопки, а aspect-ratio не действует
     на строчный элемент: без display: block кадр схлопывается в линию. */
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bone);
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--photo-scale));
}

.frame--portrait {
  aspect-ratio: 4 / 5;
}

.figure-caption {
  margin-top: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ==========================================================================
   Шапка
   ========================================================================== */
.header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: var(--z-header);
  background: transparent;
  transition:
    background-color var(--transition),
    border-color var(--transition);
  border-bottom: 1px solid transparent;
}

/* Шапка становится непрозрачной только после того, как страница уехала вниз:
   над героем она мешает крупному имени. */
.header.is-stuck {
  background: var(--paper);
  border-bottom-color: var(--line);
}

.header__progress {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 1px;
  background: transparent;
  pointer-events: none;
}

.header__progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.header__logo {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  letter-spacing: 0.01em;
  white-space: nowrap;
  z-index: calc(var(--z-menu) + 1);
  transition: color var(--transition);
}

.header__menu-button {
  position: relative;
  z-index: calc(var(--z-menu) + 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0 10px;
  transition: color var(--transition);
}

.header__menu-line {
  display: block;
  width: 24px;
  height: 1.5px;
  background: currentColor;
  transition:
    transform 320ms var(--ease-out),
    opacity 200ms var(--ease-out);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 38px);
}

.header__nav a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color var(--transition);
}

.header__nav a:hover,
.header__nav a:focus-visible {
  color: var(--ink);
}

.header__nav-cta {
  padding: 11px 22px;
  border: 1px solid var(--ink);
  color: var(--ink) !important;
  transition:
    background-color var(--transition),
    color var(--transition);
}

.header__nav-cta:hover,
.header__nav-cta:focus-visible {
  background: var(--ink);
  color: var(--paper) !important;
}

@media (max-width: 1023px) {
  .header__nav {
    position: fixed;
    inset: 0;
    z-index: var(--z-menu);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    padding: var(--header-h) var(--gutter) 48px;
    background: var(--ink);
    /* Меню всегда в DOM ради анимации, поэтому убирается видимостью,
       а не display: none — иначе переход не проигрывается. */
    visibility: hidden;
    opacity: 0;
    transition:
      opacity 320ms var(--ease-out),
      visibility 0s linear 320ms;
    overflow-y: auto;
  }

  .header__nav.is-open {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
  }

  .header__nav a {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 8vw, 2.6rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--paper);
    padding-block: 6px;
  }

  .header__nav a:hover,
  .header__nav a:focus-visible {
    color: var(--paper);
  }

  .header__nav-cta {
    margin-top: 28px;
    padding: 16px 30px;
    border-color: var(--paper);
    color: var(--paper) !important;
    font-family: var(--font-body) !important;
    font-size: 0.78rem !important;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .header__nav-cta:hover,
  .header__nav-cta:focus-visible {
    background: var(--paper);
    color: var(--ink) !important;
  }

  /* Пока меню открыто, лого и бургер лежат на чернильном фоне. */
  body.menu-open .header__logo,
  body.menu-open .header__menu-button {
    color: var(--paper);
  }

  body.menu-open .header {
    background: transparent;
    border-bottom-color: transparent;
  }

  body.menu-open .header__menu-line:nth-child(1) {
    transform: translateY(3.75px) rotate(45deg);
  }

  body.menu-open .header__menu-line:nth-child(2) {
    transform: translateY(-3.75px) rotate(-45deg);
  }
}

@media (min-width: 1024px) {
  .header__menu-button {
    display: none;
  }
}

/* ==========================================================================
   Герой
   ========================================================================== */
.hero {
  padding-top: calc(var(--header-h) + clamp(36px, 7vw, 84px));
  padding-bottom: clamp(64px, 9vw, 128px);
}

.hero__inner {
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  align-items: end;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1.05fr 0.82fr;
    gap: clamp(40px, 5vw, 88px);
  }
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(18px, 2.4vw, 26px);
}

.hero__name {
  /* Единственное место, где работает сериф: текст латинский, а кириллицы
     в Instrument Serif нет вовсе. */
  font-family: var(--font-latin);
  font-weight: 400;
  font-size: clamp(2.6rem, 8.4vw, 5.6rem);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.hero__role {
  margin-top: 10px;
  font-family: var(--font-latin);
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  letter-spacing: 0.02em;
  color: var(--muted);
}



.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(6px, 1.4vw, 14px);
}


.hero__media {
  position: relative;
}

/* ==========================================================================
   Обо мне
   ========================================================================== */
.about__grid {
  display: grid;
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}

@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: 0.78fr 1fr;
  }
}

/* Фотографию из этого блока клиент попросила убрать. Сетку обязательно
   надо схлопнуть в одну колонку: иначе единственный оставшийся блок
   попадает в первую колонку из двух и текст ужимается вдвое.
   Правило стоит ПОСЛЕ медиазапроса — специфичность одинаковая, решает
   порядок. */
.about__grid--text {
  grid-template-columns: 1fr;
  max-width: 68ch;
}

.about__body {
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 3vw, 34px);
}

.about__text {
  max-width: 58ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.55vw, 1.09rem);
}

/* Вынос — не курсив и не кавычки-ёлочки крупным кеглем, а просто крупный
   шрифт заголовков и волосяная линия слева. */
.about__pullquote {
  margin: 0;
  padding-left: clamp(20px, 3vw, 34px);
  border-left: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.95rem);
  line-height: 1.28;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 28ch;
}

.about__signature {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.about__signature-line {
  display: block;
  width: clamp(48px, 8vw, 96px);
  height: 1px;
  background: var(--line-strong);
}

/* ==========================================================================
   Услуги
   ========================================================================== */
.services__grid {
  display: grid;
  gap: clamp(16px, 2vw, 22px);
}

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

  /* Нечётная карточка — последняя — растягивается на всю ширину, иначе в
     сетке остаётся дыра, которая на такой строгой странице читается как ошибка. */
  .services__grid > .service:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.service {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(26px, 3.4vw, 40px);
  border: 1px solid var(--line);
  background: var(--paper);
  transition:
    border-color var(--transition),
    background-color var(--transition);
}

.section--bone .service {
  background: var(--white);
}

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

.service__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 20px;
}

.service__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.1vw, 1.55rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.service__price {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.15rem, 1.9vw, 1.4rem);
  white-space: nowrap;
}

.service__format {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--taupe);
}

.service__description {
  color: var(--ink-soft);
  max-width: 46ch;
}

.service__includes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.service__includes li {
  position: relative;
  padding-left: 24px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Маркер — короткая линия, а не точка или галочка: меньше декора. */
.service__includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 12px;
  height: 1px;
  background: var(--line-strong);
}

.service__price-note {
  font-size: 0.86rem;
  color: var(--muted);
}

.service__foot {
  display: flex;
  margin-top: auto;
  padding-top: 6px;
}

.services__footnote {
  margin-top: clamp(26px, 3.4vw, 40px);
  padding-top: clamp(20px, 2.6vw, 28px);
  border-top: 1px solid var(--line);
  max-width: 64ch;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ==========================================================================
   Метод
   ========================================================================== */
.process__grid {
  display: grid;
  gap: clamp(34px, 4.6vw, 72px);
  align-items: start;
}

@media (min-width: 1040px) {
  .process__grid {
    grid-template-columns: 1fr 0.52fr;
  }
}

.process__media {
  display: none;
}

/* Фотография держится в поле зрения, пока читаются пять шагов, — иначе к
   концу списка правая колонка остаётся пустой на два экрана. */
@media (min-width: 1040px) {
  .process__media {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 40px);
  }
}

.process__steps {
  border-top: 1px solid var(--ink);
}

/* Шаги — строки, а не карточки: их пять, а текст у каждого разной длины.
   В сетке из пяти колонок это дало бы рваные низы, что на строгой
   странице читается как ошибка вёрстки. */
.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 6px clamp(16px, 2.4vw, 28px);
  padding-block: clamp(22px, 2.8vw, 30px);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 720px) {
  .step {
    grid-template-columns: 72px 0.62fr 1.38fr;
    align-items: baseline;
  }
}

.step__n {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--taupe);
  font-variant-numeric: tabular-nums;
}

.step__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.2;
}

.step__text {
  grid-column: 2 / -1;
  font-size: 0.96rem;
  color: var(--ink-soft);
  max-width: 54ch;
}

@media (min-width: 720px) {
  .step__text {
    grid-column: 3;
    margin-top: 0;
  }
}

/* ==========================================================================
   Работа с брендами
   ========================================================================== */
.brands__grid {
  display: grid;
  gap: clamp(32px, 4.4vw, 64px);
  align-items: center;
}

@media (min-width: 900px) {
  .brands__grid {
    grid-template-columns: 1fr 0.8fr;
  }
}

.brands__body {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.6vw, 30px);
  align-items: flex-start;
}

.brands__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 46ch;
}

.brands__list li {
  padding-block: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.brands__list li:last-child {
  border-bottom: 1px solid var(--line);
}

/* ==========================================================================
   Галерея
   ========================================================================== */
.gallery__grid {
  display: grid;
  gap: clamp(10px, 1.4vw, 18px);
  grid-template-columns: repeat(2, 1fr);
}

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

.gallery__note {
  margin-top: clamp(20px, 2.6vw, 28px);
  font-size: 0.88rem;
  color: var(--muted);
}

.gallery__item {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  cursor: zoom-in;
}

.gallery__item .frame {
  transition: border-color var(--transition);
}

.gallery__item:hover .frame,
.gallery__item:focus-visible .frame {
  border-color: var(--ink);
}

/* ==========================================================================
   Отзывы
   ========================================================================== */
.reviews__grid {
  display: grid;
  gap: clamp(16px, 2vw, 22px);
}

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

.review {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  background: var(--white);
}

.review__text p {
  margin: 0;
}

.review__text {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.42;
  color: var(--ink);
}

.review__author {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Карточка-заглушка: видно, что это место под отзыв, но блок не выглядит
   сломанным, пока клиент не пришлёт настоящие тексты. */
.review--placeholder {
  background: transparent;
  border-style: dashed;
  border-color: var(--line-strong);
}

.review--placeholder .review__text {
  color: var(--muted);
}

.reviews__note {
  margin-top: clamp(22px, 3vw, 32px);
  font-size: 0.88rem;
  color: var(--muted);
}

/* ==========================================================================
   Вопросы
   ========================================================================== */
.faq__grid {
  display: grid;
  gap: clamp(34px, 4.6vw, 72px);
  align-items: start;
}

@media (min-width: 1040px) {
  .faq__grid {
    grid-template-columns: 0.52fr 1fr;
  }
}

.faq__media {
  display: none;
}

@media (min-width: 1040px) {
  .faq__media {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 40px);
  }
}

.faq__list {
  border-top: 1px solid var(--line);
}

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

.faq__item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-block: clamp(20px, 2.6vw, 28px);
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.3;
  transition: color var(--transition);
}

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

.faq__item summary:hover {
  color: var(--taupe);
}

/* Знак «плюс», собранный из двух линий: вертикальная исчезает при раскрытии. */
.faq__marker {
  position: relative;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 0.42em;
}

.faq__marker::before,
.faq__marker::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}

.faq__marker::before {
  width: 14px;
  height: 1px;
}

.faq__marker::after {
  width: 1px;
  height: 14px;
}

.faq__item[open] .faq__marker::after {
  transform: scaleY(0);
  opacity: 0;
}

.faq__answer {
  padding-bottom: clamp(20px, 2.6vw, 28px);
  max-width: 62ch;
  color: var(--ink-soft);
}

/* ==========================================================================
   Контакты и футер
   ========================================================================== */
.contacts,
.footer {
  /* Переопределяем токены на месте: всё, что внутри чернильной секции,
     подхватывает осветлённые значения само, без отдельных правил. */
  --taupe: var(--taupe-on-ink);
  --muted: var(--muted-on-ink);
}

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

.contacts .label {
  color: var(--taupe);
}

.contacts__grid {
  display: grid;
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}

@media (min-width: 900px) {
  .contacts__grid {
    grid-template-columns: 1fr 0.9fr;
  }
}

.contacts__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
  max-width: 22ch;
}

.contacts__text {
  margin-top: clamp(18px, 2.4vw, 26px);
  max-width: 44ch;
  color: #cdc8bf;
}

.contacts__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(26px, 3.4vw, 38px);
}

.contacts .button {
  --button-fg: var(--paper);
  --button-border: #4a463f;
}

.contacts .button--primary {
  --button-bg: var(--paper);
  --button-fg: var(--ink);
  --button-border: var(--paper);
}

.contacts .button--primary:hover,
.contacts .button--primary:focus-visible {
  --button-bg: transparent;
  --button-fg: var(--paper);
}

.contacts .button--ghost:hover,
.contacts .button--ghost:focus-visible {
  --button-bg: var(--paper);
  --button-fg: var(--ink);
  --button-border: var(--paper);
}

.contacts .button:focus-visible {
  outline-color: var(--paper);
}

.contacts__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #35322c;
}

.contacts__list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  padding-block: clamp(14px, 1.8vw, 18px);
  border-bottom: 1px solid #35322c;
}

.contacts__key {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.contacts__value {
  font-size: 1.02rem;
}

.footer {
  background: var(--ink);
  color: #a49e94;
  padding-bottom: clamp(32px, 4vw, 48px);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 40px;
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid #35322c;
  font-size: 0.84rem;
}

.footer__requisites {
  max-width: 46ch;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__links a:hover,
.footer__links a:focus-visible {
  color: var(--paper);
}

/* ==========================================================================
   Лайтбокс
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  /* Браузер скрывает незакрытый dialog правилом display: none, и любое
     собственное display его перебивает — окно тогда висит поверх страницы
     с самой загрузки. Раскладка включается только вместе с [open]. */
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(17, 17, 16, 0.94);
  border: 0;
}

.lightbox[open] {
  display: flex;
}

.lightbox::backdrop {
  background: rgba(17, 17, 16, 0.94);
}

.lightbox img {
  max-width: min(100%, 820px);
  max-height: 86vh;
  width: auto;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: clamp(12px, 3vw, 24px);
  right: clamp(12px, 3vw, 24px);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  font-size: 1.4rem;
  line-height: 1;
}

.lightbox__close:focus-visible {
  outline-color: var(--paper);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  font-size: 1.5rem;
  transition: opacity var(--transition);
  opacity: 0.75;
}

.lightbox__nav:hover {
  opacity: 1;
}

.lightbox__nav:focus-visible {
  outline-color: var(--paper);
}

.lightbox__nav--prev {
  left: clamp(4px, 2vw, 20px);
}

.lightbox__nav--next {
  right: clamp(4px, 2vw, 20px);
}

.lightbox__counter {
  position: absolute;
  bottom: clamp(14px, 3vw, 26px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
}

/* ==========================================================================
   Появление при скролле

   Стартовое скрытое состояние прибито к .motion-enabled, который ставит
   только JavaScript. Иначе посетитель с заблокированными скриптами получил
   бы герой и дальше пустую страницу.
   ========================================================================== */
html.motion-enabled .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out);
}

html.motion-enabled .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  /* Герой проигрывается сам, CSS-анимацией, без ожидания JS-таймера:
     во встроенных браузерах Instagram и Telegram requestAnimationFrame
     для ещё не показанной вкладки может не вызваться вовсе, и содержимое
     застряло бы невидимым. */
  html.motion-enabled .hero__content > * {
    animation: hero-item-in 760ms var(--ease-out) both;
  }

  html.motion-enabled .hero__content > :nth-child(2) { animation-delay: 70ms; }
  html.motion-enabled .hero__content > :nth-child(3) { animation-delay: 130ms; }
  html.motion-enabled .hero__content > :nth-child(4) { animation-delay: 190ms; }
  html.motion-enabled .hero__content > :nth-child(5) { animation-delay: 250ms; }
  html.motion-enabled .hero__content > :nth-child(6) { animation-delay: 310ms; }

  html.motion-enabled .hero__media {
    animation: hero-media-in 1000ms var(--ease-out) 140ms both;
  }

  /* Кадр открывается вверх из-под собственной рамки, а не проявляется:
     рамка при этом стоит на месте, и движение читается как печатный оттиск. */
  html.motion-enabled [data-photo] .frame {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 900ms var(--ease-out);
    transition-delay: calc(var(--reveal-order, 0) * 90ms);
  }

  html.motion-enabled [data-photo] img {
    --photo-scale: 1.07;
    transition: --photo-scale 900ms var(--ease-out);
    transition-delay: calc(var(--reveal-order, 0) * 90ms);
  }

  html.motion-enabled [data-photo].is-photo-visible .frame {
    clip-path: inset(0);
  }

  html.motion-enabled [data-photo].is-photo-visible img {
    --photo-scale: 1;
  }

  /* Приближение по наведению включается только после того, как кадр
     доехал: иначе курсор поверх ещё не проявленного фото ломает выезд. */
  html.motion-enabled .gallery__item [data-photo].is-photo-visible:hover img,
  html.motion-enabled .gallery__item:focus-visible [data-photo].is-photo-visible img {
    --photo-scale: 1.045;
    transition-delay: 0ms;
  }

  /* Строки въезжают одна за другой. */
  html.motion-enabled .service,
  html.motion-enabled .step,
  html.motion-enabled .review,
  html.motion-enabled .faq__item,
  html.motion-enabled .brands__list li,
  html.motion-enabled .contacts__list li {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity 620ms var(--ease-out),
      transform 620ms var(--ease-out);
    transition-delay: calc(var(--reveal-order, 0) * 60ms);
  }

  html.motion-enabled .service.is-row-visible,
  html.motion-enabled .step.is-row-visible,
  html.motion-enabled .review.is-row-visible,
  html.motion-enabled .faq__item.is-row-visible,
  html.motion-enabled .brands__list li.is-row-visible,
  html.motion-enabled .contacts__list li.is-row-visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Карточка услуги получает обратно свой hover только когда приехала. */
  html.motion-enabled .service.is-row-visible {
    transition:
      border-color var(--transition),
      background-color var(--transition),
      opacity 620ms var(--ease-out);
    transition-delay: 0ms;
  }

  /* Заголовки секций выезжают из-под собственной линии. */
  html.motion-enabled .section-title,
  html.motion-enabled .contacts__title,
  html.motion-enabled .about__pullquote {
    clip-path: inset(0 0 110% 0);
    transform: translateY(12px);
    transition:
      clip-path 900ms var(--ease-out) 60ms,
      transform 900ms var(--ease-out) 60ms;
  }

  html.motion-enabled .is-visible .section-title,
  html.motion-enabled .is-visible .contacts__title,
  html.motion-enabled .is-visible .about__pullquote,
  html.motion-enabled .reveal.is-visible.section-title {
    /* Нижняя граница уходит в минус: у Playfair есть выносные элементы,
       и inset(0) срезал бы хвосты у «р» и «у». */
    clip-path: inset(0 0 -25% 0);
    transform: translateY(0);
  }

  html.motion-enabled .about__signature-line {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 700ms var(--ease-out) 240ms;
  }

  html.motion-enabled .is-visible .about__signature-line {
    transform: scaleX(1);
  }

  /* Ссылки в полноэкранном меню появляются по очереди. */
  @media (max-width: 1023px) {
    html.motion-enabled .header__nav a {
      transform: translateY(14px);
      opacity: 0;
      transition:
        opacity 360ms var(--ease-out),
        transform 360ms var(--ease-out);
    }

    html.motion-enabled .header__nav.is-open a {
      transform: translateY(0);
      opacity: 1;
    }

    html.motion-enabled .header__nav.is-open a:nth-child(1) { transition-delay: 90ms; }
    html.motion-enabled .header__nav.is-open a:nth-child(2) { transition-delay: 135ms; }
    html.motion-enabled .header__nav.is-open a:nth-child(3) { transition-delay: 180ms; }
    html.motion-enabled .header__nav.is-open a:nth-child(4) { transition-delay: 225ms; }
    html.motion-enabled .header__nav.is-open a:nth-child(5) { transition-delay: 270ms; }
    html.motion-enabled .header__nav.is-open a:nth-child(6) { transition-delay: 315ms; }
  }
}

.header__nav a.is-current {
  color: var(--ink);
}

@media (min-width: 1024px) {
  .header__nav a.is-current:not(.header__nav-cta) {
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-thickness: 1px;
  }
}

@keyframes hero-item-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-media-in {
  from {
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    clip-path: inset(0);
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Уважение к системной настройке движения

   Полное выключение: без анимаций, без плавного скролла, без зума по
   наведению. Страница обязана быть полностью читаемой в этом режиме.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .service,
  .step,
  .review,
  .faq__item {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}

/* ==========================================================================
   Печать
   ========================================================================== */
@media print {
  .header,
  .lightbox,
  .gallery {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .reveal,
  .service,
  .step,
  .review {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================================================
   Юридические страницы

   Отдельная узкая колонка: политика и оферта читаются подряд, а не
   просматриваются, поэтому здесь важнее длина строки, чем воздух.
   ========================================================================== */
.legal {
  padding-top: calc(var(--header-h) + clamp(40px, 6vw, 76px));
  padding-bottom: clamp(72px, 9vw, 128px);
}

.legal__inner {
  max-width: 760px;
}

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(28px, 4vw, 44px);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
}

.legal__back:hover,
.legal__back:focus-visible {
  color: var(--ink);
}

.legal__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.legal__meta {
  margin-top: clamp(16px, 2.2vw, 22px);
  padding-bottom: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}

.prose {
  margin-top: clamp(28px, 4vw, 44px);
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
}

.prose h2 {
  margin-top: clamp(36px, 4.6vw, 56px);
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  line-height: 1.2;
  color: var(--ink);
}

.prose h3 {
  margin-top: clamp(26px, 3.2vw, 36px);
  margin-bottom: 10px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--taupe);
}

.prose p + p,
.prose ul + p,
.prose p + ul,
.prose ol + p,
.prose p + ol {
  margin-top: 1em;
}

.prose ul,
.prose ol {
  margin-top: 1em;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prose li {
  position: relative;
  padding-left: 24px;
}

.prose ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 12px;
  height: 1px;
  background: var(--line-strong);
}

.prose ol {
  counter-reset: prose-ol;
}

.prose ol > li {
  counter-increment: prose-ol;
}

.prose ol > li::before {
  content: counter(prose-ol) ".";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--taupe);
  font-size: 0.9em;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color var(--transition);
}

.prose a:hover {
  text-decoration-color: var(--ink);
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

/* Незаполненные юридические реквизиты. Помечены явно, чтобы их нельзя было
   случайно опубликовать: пустая строка в оферте — это не мелочь. */
.todo {
  display: inline;
  padding: 1px 6px;
  background: #fff3cd;
  border-bottom: 1px solid #d9b441;
  color: #6b520c;
  font-size: 0.92em;
  font-weight: 600;
}

/* Свайп в лайтбоксе.
   touch-action: none обязателен — иначе браузер отнимает вертикальный жест
   на полпути и превращает закрытие в скролл страницы под окном. */
.lightbox__figure {
  position: relative;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.lightbox {
  overscroll-behavior: contain;
}

.lightbox img {
  transform: translate3d(var(--swipe-x, 0px), var(--swipe-y, 0px), 0) scale(var(--swipe-scale, 1));
  opacity: var(--swipe-opacity, 1);
}

/* Переход включается классом, а не висит постоянно: пока палец на экране,
   кадр обязан идти за ним один к одному, без доводки. */
.lightbox img.is-settling {
  transition:
    transform 300ms var(--ease-out),
    opacity 300ms var(--ease-out);
}

/* Таблицы в юридических текстах. Волосяные линии, никаких заливок строк —
   тот же строгий язык, что и на главной. */
.table-scroll {
  /* Таблица целей обработки на телефоне не помещается никогда: пусть
     прокручивается сама, а не растягивает страницу по горизонтали. */
  margin-top: 1.4em;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.prose table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.prose th,
.prose td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.prose th {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--bone);
  white-space: nowrap;
}

.prose tbody tr:last-child td {
  border-bottom: 0;
}

/* На юридических страницах в шапке только одна кнопка — гамбургер там нечего
   открывать. */
.header__nav--legal {
  position: static !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex-direction: row !important;
  padding: 0 !important;
  background: none !important;
  width: auto;
  height: auto;
}

.header__nav--legal .header__nav-cta {
  margin-top: 0 !important;
  padding: 11px 22px !important;
  border-color: var(--ink) !important;
  font-family: var(--font-body) !important;
  font-size: 0.72rem !important;
  color: var(--ink) !important;
}

.header__nav--legal .header__nav-cta:hover,
.header__nav--legal .header__nav-cta:focus-visible {
  background: var(--ink) !important;
  color: var(--paper) !important;
}

/* Обёртка кадра в галерее: data-photo должен быть НАД .frame, иначе
   правило проявления [data-photo] .frame не находит рамку. */
.gallery__figure {
  display: block;
}

/* Правило UA для [hidden] проигрывает любому классу, который задаёт display,
   и element.hidden = true молча перестаёт работать. Держим явно. */
[hidden] {
  display: none !important;
}

/* ==========================================================================
   Телефон
   ========================================================================== */
@media (max-width: 599px) {
  /* Кнопки разной ширины, поставленные друг под друга, читаются как
     недоделанная вёрстка. В колонке они тянутся на всю ширину. */
  .hero__actions,
  .contacts__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero__actions .button,
  .contacts__actions .button,
  .service__foot .button,
  .brands__body > .button {
    width: 100%;
  }

  .service__foot {
    width: 100%;
  }

  /* Длинные названия услуг и цена на одной строке не помещаются. */
  .service__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .gallery__grid {
    gap: 8px;
  }

  .faq__item summary {
    gap: 16px;
  }
}

.prose hr.rule {
  margin-block: clamp(28px, 3.6vw, 44px);
}

/* Подзаголовок внутри карточки услуги: её страницы называют этот блок
   «Как проходит?» и «Что входит», и название нужно показать. */
.service__sub-label {
  margin-top: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.service__sub-label + .service__includes {
  padding-top: 14px;
}

/* Список внутри строки «Кому подходит?»: раньше в этой колонке был абзац. */
.step__list {
  grid-column: 2 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 60ch;
}

@media (min-width: 720px) {
  .step__list {
    grid-column: 3;
  }
}

.step__list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.step__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 12px;
  height: 1px;
  background: var(--line-strong);
}

/* ==========================================================================
   Прайс внутри карточки услуги

   Клиент: «людям лень думать, им хочется сразу видеть и понимать что как
   чего». До этого цены шли строкой через точку с запятой, и на прошлом её
   сайте люди путались, за что какая сумма — онлайн или Рязань. Теперь это
   список: город слева, сумма справа, условие отдельной строкой под ними.
   ========================================================================== */
.service__prices {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.service__prices li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 16px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}

.service__prices-city {
  font-size: 0.95rem;
  color: var(--ink);
}

.service__prices-sum {
  font-size: 1.05rem;
  color: var(--ink);
  white-space: nowrap;
  text-align: right;
}

/* Условие занимает обе колонки, чтобы длинная фраза не ломала выравнивание
   суммы по правому краю. */
.service__prices-note {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

.service__sub-label + .service__prices {
  border-top: 0;
}
