/* ============================================================
   СТРИЖКА И ТОЧКА — визуальная система
   Тёмная тема основная: салон работает до 22:00, и вечерний
   экран телефона — реальная сцена использования.
   Светлая включается переключателем в шапке.
   ============================================================ */

:root {
  color-scheme: dark;

  --bg:            #0e110e;
  --bg-2:          #181d17;
  --bg-3:          #1c211b;

  --fg:            #edefe8;
  --fg-2:          #b4bcb0;
  --fg-3:          #8d958a;

  --line:          #333a32;
  --line-2:        #454e43;
  --field-line:    #5a6457;

  --contrast-bg:   #070907;
  --contrast-fg:   #edefe8;
  --contrast-line: #232823;

  --moss:          #8aa17c;
  --moss-field:    #141a12;
  --moss-tint:     rgba(138, 161, 124, .10);
  --moss-tint-2:   rgba(138, 161, 124, .15);

  --lamp:          #e2b45c;
  --lamp-on:       #14170f;
  --lamp-ink:      #e2b45c;   /* акцент буквами: на тёмном фоне 9.9:1 */
  --glow:          rgba(226, 180, 92, .38);

  --btn-bg:        var(--lamp);
  --btn-fg:        var(--lamp-on);
  --btn-bg-h:      var(--fg);
  --btn-fg-h:      var(--bg);

  --danger:        #e8a0a0;
  --danger-line:   #c96f6f;

  --plate-bg:      var(--bg-2);
  --plate-hatch:   rgba(138, 161, 124, .16);
  --plate-wash-1:  rgba(138, 161, 124, .30);
  --plate-wash-2:  rgba(7, 9, 7, .55);
  --plate-wash-3:  rgba(226, 180, 92, .16);
  --plate-edge:    rgba(237, 239, 232, .13);
  --plate-dark-bg: #2b3427;

  --head-bg:       rgba(14, 17, 14, .9);
  --nav-hover:     rgba(237, 239, 232, .06);
  --row-hover:     var(--moss-tint);
  --leaf-op:       .13;

  /* шрифты */
  --display: "Prata", "Times New Roman", serif;
  --text:    "Golos Text", "Segoe UI", sans-serif;
  --meas:    "JetBrains Mono", ui-monospace, monospace;

  /* ритм: 8px база */
  --s1: 8px;   --s2: 16px;  --s3: 24px;  --s4: 32px;
  --s5: 48px;  --s6: 64px;  --s7: 96px;  --s8: 128px;  --s9: 168px;

  /* Диаметр кружков в верхней плашке. Соцсети и переключатель темы
     стоят в одном ряду, и размер у них обязан быть общий: раньше
     кружки были 34px, а переключатель 44px - ряд читался как неровный. */
  --ctl: 34px;
  --ctl-ico: 18px;

  --head-h: 98px;
  --rail: 68px;
  --edge: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.2, .7, .2, 1);   /* появления: мягче и весомее */
  --seam: clamp(96px, 12vw, 208px);          /* глубина растворения между блоками */
}

[data-theme="light"] {
  color-scheme: light;

  --bg:            #f1f0ea;
  --bg-2:          #e6e4da;
  --bg-3:          #dcdace;

  --fg:            #14171a;
  --fg-2:          #454c4a;
  /* был #666e6a - 4.19:1 на светлом фоне, ниже порога 4.5 для мелкого
     текста, а этим цветом набраны как раз подписи в 10-12px.
     Промежуточный #5d645f давал 4.51 - запас в сотую, ломается от любой
     правки фона, поэтому уводим ещё на ступень. */
  --fg-3:          #575e59;

  --line:          #c9cec6;
  --line-2:        #b2b8ae;
  --field-line:    #8b938a;

  --contrast-bg:   #14171a;
  --contrast-fg:   #edefe8;
  --contrast-line: rgba(237, 239, 232, .16);

  --moss:          #46583f;
  --moss-field:    #2b3727;
  --moss-tint:     rgba(70, 88, 63, .07);
  --moss-tint-2:   rgba(70, 88, 63, .10);

  --lamp:          #b9862f;
  --lamp-on:       #ffffff;
  /* Акцент буквами. --lamp годится под заливку кнопки, но как ТЕКСТ на
     светлом фоне даёт 2.57:1 - нечитаемо. Тот же янтарь, уведённый в
     бронзу: 5.4:1 и по-прежнему явно тёплый рядом с мхом. */
  --lamp-ink:      #7d5210;
  --glow:          rgba(185, 134, 47, .5);

  --btn-bg:        var(--fg);
  --btn-fg:        var(--bg);
  --btn-bg-h:      #d9a441;
  --btn-fg-h:      #14171a;

  --danger:        #a33c3c;
  --danger-line:   #c96f6f;

  --plate-hatch:   rgba(70, 88, 63, .17);
  --plate-wash-1:  rgba(70, 88, 63, .26);
  --plate-wash-2:  rgba(20, 23, 26, .14);
  --plate-wash-3:  rgba(217, 164, 65, .20);
  --plate-edge:    rgba(20, 23, 26, .16);
  --plate-dark-bg: #171e15;

  --head-bg:       rgba(241, 240, 234, .93);
  --nav-hover:     rgba(255, 255, 255, .55);
  --leaf-op:       .10;
}

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

html {
  scroll-padding-top: calc(var(--head-h) + 12px);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--line-2) var(--bg-2);
  scrollbar-width: thin;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .7s var(--ease-soft), color .7s var(--ease-soft);
}

/* --- поверхности браузера тоже принадлежат системе --- */
::selection { background: var(--lamp); color: var(--lamp-on); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 3px solid var(--bg-2); }
::-webkit-scrollbar-thumb:hover { background: var(--fg-3); }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }

h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
img { display: block; max-width: 100%; }

.wrap { position: relative; z-index: 1; max-width: 1520px; margin: 0 auto; padding-inline: var(--edge); }

.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 200;
  background: var(--fg); color: var(--bg); padding: 12px 20px;
  font: 500 14px/1 var(--text);
}
.skip:focus { left: 20px; }

/* ============================================================
   ЛИСТВА
   Ветви нарисованы кривыми, красятся токеном темы и лежат
   под содержимым. Ни одного растрового файла.
   ============================================================ */
.leaf-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.leaf {
  position: absolute;
  color: var(--moss);
  opacity: var(--leaf-op);
  pointer-events: none;
  z-index: 0;
}

.leaf--hero-l  { left: -120px;  bottom: -60px;  width: 460px; height: 760px; transform: rotate(-8deg); }
.leaf--hero-r  { right: -90px;  top: -40px;     width: 300px; height: 500px; transform: scaleX(-1) rotate(6deg); }
.leaf--about   { right: -110px; top: -70px;     width: 340px; height: 560px; transform: rotate(12deg); }
.leaf--kv      { left: -80px;   bottom: -90px;  width: 380px; height: 630px; transform: rotate(-14deg); }
.leaf--crew    { left: -130px;  top: 40px;      width: 300px; height: 500px; transform: scaleX(-1); }
.leaf--lead    { right: -100px; bottom: -80px;  width: 420px; height: 700px; transform: rotate(9deg); }
.leaf--foot    { right: 4%;     top: -60px;     width: 240px; height: 400px; opacity: calc(var(--leaf-op) * .8); }
.leaf--pr      { right: -110px; top: 20px;      width: 320px; height: 530px; transform: scaleX(-1) rotate(-6deg); }

/* ============================================================
   СТЫКИ БЛОКОВ
   Цветное поле не обрывается линией, а растворяется в полотне.
   Накладка не ловит курсор и не трогает поток.
   ============================================================ */
.seam-top::before,
.seam-bottom::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: var(--seam);
  pointer-events: none;
  z-index: 3;
}
/* Прозрачность гасится по кривой, а не линейно: на переходе светлого в тёмное
   линейная середина даёт серую дымку. */
.seam-top::before {
  top: 0;
  background: linear-gradient(
    to bottom,
    var(--seam-a, var(--bg)) 0%,
    color-mix(in srgb, var(--seam-a, var(--bg)) 84%, transparent) 24%,
    color-mix(in srgb, var(--seam-a, var(--bg)) 52%, transparent) 50%,
    color-mix(in srgb, var(--seam-a, var(--bg)) 20%, transparent) 74%,
    transparent 100%
  );
}
.seam-bottom::after {
  bottom: 0;
  background: linear-gradient(
    to top,
    var(--seam-b, var(--bg)) 0%,
    color-mix(in srgb, var(--seam-b, var(--bg)) 84%, transparent) 24%,
    color-mix(in srgb, var(--seam-b, var(--bg)) 52%, transparent) 50%,
    color-mix(in srgb, var(--seam-b, var(--bg)) 20%, transparent) 74%,
    transparent 100%
  );
}

/* волосяная линия, растворяющаяся к полям, вместо сплошной через весь экран */
.rule-soft { border-bottom: 0 !important; }
.rule-soft > .rule-soft__line,
.hero::after,
.pr-top::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line) 14%, var(--line) 86%, transparent);
  pointer-events: none;
}

/* ============================================================
   ИЗМЕРЕНИЯ — моношрифт только там, где стоит число или факт
   ============================================================ */
.meas {
  font-family: var(--meas);
  font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--fg-3);
}
.foot .meas, .sec--dark .meas, .sec--moss .meas { color: #b4bcb0; }

/* непрерывный рельс по левому полю, а не плавающие бейджи */
.rail {
  position: absolute;
  left: 0; top: var(--head-h); bottom: 0;
  width: var(--rail);
  display: flex; flex-direction: column; align-items: center;
  gap: var(--s4);
  padding-block: var(--s4);
  overflow: hidden;
  border-right: 1px solid var(--line);
  z-index: 1;
}
.rail::before {
  content: ""; width: 1px; height: 56px; flex: none;
  background: linear-gradient(var(--line-2), transparent);
}
.rail__item {
  writing-mode: vertical-rl;
  font-family: var(--meas);
  font-size: 11px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--fg-3);
  white-space: nowrap;
}

/* ============================================================
   ПЛИТА — зарезервированное место под фотографию.
   Пропорция точная: реальный снимок встаёт без правки вёрстки.
   ============================================================ */
.plate {
  position: relative;
  overflow: hidden;
  background-color: var(--plate-bg);
  background-image:
    repeating-linear-gradient(115deg, var(--plate-hatch) 0 2px, transparent 2px 11px),
    linear-gradient(168deg, var(--plate-wash-1), var(--plate-wash-2) 58%, var(--plate-wash-3));
}
.plate::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px var(--plate-edge);
  pointer-events: none;
}
.plate__tag {
  position: absolute;
  left: 14px; bottom: 12px;
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--meas);
  font-size: 10px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--fg-2);
}
.plate__tag b { font-weight: 500; color: var(--fg); }

.plate--dark {
  --plate-bg: var(--plate-dark-bg);
  --plate-hatch: rgba(237, 239, 232, .11);
  --plate-wash-1: rgba(138, 161, 124, .26);
  --plate-wash-2: rgba(7, 9, 7, .28);
  --plate-wash-3: rgba(226, 180, 92, .18);
  --plate-edge: rgba(237, 239, 232, .24);
}
.plate--dark .plate__tag { color: #b4bcb0; }
.plate--dark .plate__tag b { color: #edefe8; }

/* когда приедут снимки: <img> внутри .plate перекроет заглушку */
.plate > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.plate > img ~ .plate__tag { display: none; }

/* ============================================================
   ШАПКА
   ============================================================ */
.head {
  position: fixed; inset: 0 0 auto; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
.head.is-stuck {
  background: var(--head-bg);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.head__in {
  max-width: 1520px; margin: 0 auto;
  padding: var(--s3) var(--edge);
  display: flex; align-items: center; gap: var(--s3);
  min-height: 50px;
}

.mark {
  font-family: var(--display);
  font-size: 21px; letter-spacing: .01em;
  line-height: 1; white-space: nowrap;
  text-decoration: none;
}
.mark span { color: var(--lamp); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 10px 13px;
  /* без этого при нехватке места «О НАС» ломается на две строки
     и весь ряд меню разъезжается по высоте */
  white-space: nowrap;
  font-family: var(--meas);
  font-size: 11px; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--fg-2);
  text-decoration: none;
  border: 1px solid transparent;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.nav a:hover { color: var(--fg); border-color: var(--line); background: var(--nav-hover); }

.tel {
  font-family: var(--meas);
  font-size: 13px; font-weight: 500;
  letter-spacing: .04em; font-variant-numeric: tabular-nums;
  text-decoration: none; white-space: nowrap;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line-2);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.tel:hover { border-bottom-color: var(--lamp); color: var(--lamp); }

.burger {
  display: none;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid var(--line); cursor: pointer;
}
.burger span { display: block; width: 18px; height: 1px; margin: 4px auto; background: var(--fg); transition: transform .3s var(--ease), opacity .3s var(--ease); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* --- переключатель темы --- */
.theme {
  flex: none;
  width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-2);
  cursor: pointer;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.theme:hover { color: var(--lamp); border-color: var(--lamp); background: var(--nav-hover); }
.theme svg { width: 18px; height: 18px; }
/* .theme svg выиграла бы по специфичности, поэтому прячем иконки тем же весом */
.theme .theme__moon { display: block; }
.theme .theme__sun  { display: none; }
[data-theme="light"] .theme .theme__moon { display: none; }
[data-theme="light"] .theme .theme__sun  { display: block; }

/* ============================================================
   КНОПКИ
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  font-family: var(--meas);
  font-size: 12px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  border: 1px solid var(--btn-bg);
  background: var(--btn-bg); color: var(--btn-fg);
  border-radius: 999px;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.btn:hover {
  background: var(--btn-bg-h); border-color: var(--btn-bg-h); color: var(--btn-fg-h);
  box-shadow: 0 8px 22px -8px var(--glow);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }

.btn--ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); box-shadow: none; }
.btn--onDark { background: var(--lamp); border-color: var(--lamp); color: var(--lamp-on); }
.btn--onDark:hover { background: #edefe8; border-color: #edefe8; color: #14171a; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ============================================================
   ПЕРВЫЙ ЭКРАН
   ============================================================ */
.hero { position: relative; overflow: hidden; padding-left: var(--rail); padding-top: var(--head-h); }

.hero__grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  align-items: stretch;
  min-height: calc(100svh - var(--head-h));
}

.hero__text {
  padding: var(--s6) var(--s6) var(--s6) var(--edge);
  display: flex; flex-direction: column; justify-content: center; gap: var(--s4);
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(38px, 5.1vw, 88px);
  line-height: 1.03;
  letter-spacing: -.022em;
  max-width: 15ch;
}
.hero h1 i { font-style: normal; color: var(--moss); }

.hero__lede {
  max-width: 46ch;
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.62;
  color: var(--fg-2);
}
.hero__act { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: var(--s1); }

.hero__plate {
  aspect-ratio: 3 / 4;
  height: min(calc(100svh - var(--head-h)), calc((100vw - var(--rail)) * 0.48 * 4 / 3));
}

.strip {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-left: var(--rail);
  /* Фона нет намеренно. Сплошной var(--bg) обрубал ветвь .leaf--hero-l
     ровно по левой кромке полосы, и она читалась как наклеенный сверху
     прямоугольник. Под полосой и так фон страницы, так что заливка
     ничего не давала - только срезала листву. */
}
/* Отступ слева был нулевым: число упиралось прямо в разделительную
   линию соседней ячейки, и вертикальная палочка «1» сливалась с ней. */
.strip__cell { padding: var(--s4) var(--s3); border-right: 1px solid var(--line); }
.strip__cell:first-child { padding-left: var(--edge); }
.strip__cell:last-child { border-right: 0; }
.strip__n {
  font-family: var(--display);
  font-size: clamp(26px, 2.5vw, 40px);
  line-height: 1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  display: block; margin-bottom: 6px;
}
.strip__l { font-family: var(--meas); font-size: 10.5px; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: var(--fg-3); }

/* ============================================================
   ОБЩИЕ СЕКЦИИ
   ============================================================ */
.sec { position: relative; overflow: hidden; padding-block: var(--s8); }
.sec--tight { padding-block: var(--s7); }
.sec--dark, .sec--moss { position: relative; overflow: hidden; }
.sec--dark { background: var(--contrast-bg); color: var(--contrast-fg); }
.sec--moss { background: var(--moss-field); color: var(--contrast-fg); }

.sec__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s3); margin-bottom: var(--s6); }
.sec h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 54px);
  line-height: 1.08; letter-spacing: -.02em;
  max-width: 20ch;
}
.sec--dark h2, .sec--moss h2 { color: var(--contrast-fg); }
.sec__note { margin-left: auto; max-width: 40ch; color: var(--fg-2); font-size: 15.5px; }

/* ============================================================
   О НАС
   ============================================================ */
.about { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: var(--s6); align-items: center; }
.about__plate { aspect-ratio: 3 / 2; }
.about__body { display: flex; flex-direction: column; gap: var(--s3); max-width: 54ch; }
.about__body p { color: var(--fg-2); }
.about__body p strong { color: var(--fg); font-weight: 500; }

.facts { border-top: 1px solid var(--line); margin-top: var(--s2); }
.facts div { display: flex; gap: var(--s3); padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts dt { flex: none; width: 152px; font-family: var(--meas); font-size: 10.5px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; color: var(--fg-3); padding-top: 4px; }
.facts dd { margin: 0; color: var(--fg); }

/* ============================================================
   KV-1 — отдельное поле цвета, а не строка в списке
   ============================================================ */
.kv { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.kv__plate { aspect-ratio: 4 / 5; }
.kv__body { padding: var(--s7) var(--s6); display: flex; flex-direction: column; gap: var(--s3); justify-content: center; }
.kv__body h2 {
  max-width: 16ch;
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 54px);
  line-height: 1.08; letter-spacing: -.02em;
  color: var(--contrast-fg);
}
.kv__body p { color: #b4bcb0; max-width: 48ch; }
.kv__list { display: flex; flex-direction: column; margin-top: var(--s2); border-top: 1px solid var(--contrast-line); }
.kv__list div { display: flex; justify-content: space-between; gap: var(--s3); padding: 12px 0; border-bottom: 1px solid var(--contrast-line); font-size: 15px; }
.kv__list b { font-weight: 400; }
.kv__list span { font-family: var(--meas); font-size: 13px; font-variant-numeric: tabular-nums; color: #e2b45c; white-space: nowrap; }

/* ============================================================
   МАСТЕРА
   ============================================================ */
.crew { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s2); }
.crew__c { display: flex; flex-direction: column; }
.crew__plate { aspect-ratio: 4 / 5; margin-bottom: var(--s2); }
.crew__n { font-family: var(--display); font-size: 21px; line-height: 1.2; }
.crew__r { font-family: var(--meas); font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--moss); margin-top: 5px; }
/* Топ-стилист выделен цветом: к этой строке привязана верхняя граница
   вилки в прайсе, и её нужно отличать от остальных ролей с одного взгляда. */
.crew__r--top { color: var(--lamp-ink); }

/* ============================================================
   ГАЛЕРЕЯ
   ============================================================ */
.gal { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s2); }
.gal > * { min-width: 0; }
.g-a { grid-column: span 3; aspect-ratio: 3 / 2; }
.g-b { grid-column: span 3; aspect-ratio: 3 / 2; }
.g-c { grid-column: span 2; aspect-ratio: 4 / 5; }
.g-d { grid-column: span 2; aspect-ratio: 4 / 5; }
.g-e { grid-column: span 2; aspect-ratio: 4 / 5; }
.g-f { grid-column: span 4; aspect-ratio: 16 / 9; }
/* Квадрат делит ряд с кадром 16:9, а тот при четырёх колонках выше - под
   квадратом оставалась дыра. Тянем по высоте ряда, кроп берёт на себя
   object-fit: cover у картинки.
   Обе стороны заданы явно нарочно. С одной только height: 100% пропорция
   начинает выводить ширину ИЗ высоты ряда, и квадрат вылезал за сетку
   на 63px. Когда определены и ширина, и высота, aspect-ratio не участвует;
   а если плита однажды останется в ряду одна, высота строки станет
   неопределённой, 100% свернётся в auto - и пропорция снова подхватит,
   не дав плите схлопнуться в ноль (картинка внутри абсолютная). */
.g-g { grid-column: span 2; aspect-ratio: 1 / 1; width: 100%; height: 100%; }

/* Второй экран галереи: четыре вертикальных 4:5 и один широкий 16:9.
   Ряды набирают ровно шесть колонок - 2+2+2 и 2+4.
   Обе стороны у широкого кадра заданы явно по той же причине, что у
   квадрата выше: при span 4 он выходит на 45px ниже соседнего
   вертикального, и под ним остаётся дыра. Проверено на макете при
   1440, 1200, 1024, 768, 390 и 320px. Кроп берёт object-fit: cover. */
.g-h, .g-i, .g-j, .g-k { grid-column: span 2; aspect-ratio: 4 / 5; }
.g-l { grid-column: span 4; aspect-ratio: 16 / 9; width: 100%; height: 100%; }

/* ============================================================
   ЧАСТЫЕ ВОПРОСЫ
   Список без сворачивания: ответ виден и человеку, и роботу сразу.
   Спрятанный за аккордеоном текст модели читают, но человек - нет,
   а блок нужен обоим. Ширина ответа ограничена: длинная строка
   читается хуже, а цитировать её всё равно будут целиком.
   ============================================================ */
/* Вопросы свёрнуты и раскрываются нажатием. Сделано на details/summary,
   поэтому работает без скриптов - на странице прайса app.js нет. */
.faq { margin: 0; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  display: flex; align-items: flex-start; gap: var(--s3);
  padding: 15px 0;
  cursor: pointer;
  font-size: clamp(16.5px, 1.15vw, 19px);
  font-weight: 500;
  color: var(--fg);
  line-height: 1.35;
  hyphens: auto;
  /* Браузерный треугольник убираем в обоих движках: в Firefox он рисуется
     как маркер списка, в Safari и Chrome - отдельным псевдоэлементом. */
  list-style: none;
  transition: color .2s var(--ease-soft);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--lamp-ink); }
.faq__q:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }
/* своя стрелка: вниз в свёрнутом виде, вверх в раскрытом */
.faq__q::after {
  content: "";
  flex: none;
  margin-left: auto;
  margin-top: .3em;
  width: 9px; height: 9px;
  border-right: 1.7px solid var(--fg-3);
  border-bottom: 1.7px solid var(--fg-3);
  transform: rotate(45deg);
  transition: transform .28s var(--ease-soft);
}
.faq__item[open] .faq__q::after { transform: rotate(-135deg); }
.faq__a { margin: 0 0 17px; color: var(--fg-2); line-height: 1.7; max-width: 84ch; }

/* Плавное появление ответа. Высоту details анимировать нельзя, поэтому
   двигаем только сам ответ - на глаз этого достаточно. */
@media (prefers-reduced-motion: no-preference) {
  .faq__item[open] .faq__a { animation: faq-in .3s var(--ease-soft); }
  @keyframes faq-in { from { opacity: 0; transform: translateY(-7px); } }
}

/* ============================================================
   МЕСТОПОЛОЖЕНИЕ
   ============================================================ */
.geo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--s6); align-items: start; }
.geo__plate { aspect-ratio: 16 / 10; }
.geo__addr { font-family: var(--display); font-size: clamp(23px, 2.2vw, 34px); line-height: 1.25; letter-spacing: -.015em; margin-bottom: var(--s3); }
.geo__list { border-top: 1px solid var(--line); }
.geo__list div { display: flex; gap: var(--s3); padding: 12px 0; border-bottom: 1px solid var(--line); }
.geo__list dt { flex: none; width: 122px; font-family: var(--meas); font-size: 10.5px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; color: var(--fg-3); padding-top: 3px; }
.geo__list dd { margin: 0; font-size: 15.5px; }

/* ============================================================
   ФОРМА
   ============================================================ */
.lead { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: var(--s6); align-items: start; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.f-full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-family: var(--meas); font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: #b4bcb0; }
.field input, .field select, .field textarea {
  font-family: var(--text); font-size: 16px; color: #edefe8;
  background: transparent;
  border: 0; border-bottom: 1px solid #5a6457;
  padding: 11px 2px; width: 100%;
  transition: border-color .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 82px; line-height: 1.55; }
.field select {
  appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #b4bcb0 50%), linear-gradient(135deg, #b4bcb0 50%, transparent 50%);
  background-position: right 11px center, right 6px center;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field select option { background: #14171a; color: #edefe8; }
.field input::placeholder, .field textarea::placeholder { color: #8d958a; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-bottom-color: #e2b45c; }
.field[data-bad] input, .field[data-bad] select { border-bottom-color: var(--danger-line); }
.field__err { font-size: 12.5px; color: #e8a0a0; }

.consent { display: flex; gap: 12px; align-items: flex-start; grid-column: 1 / -1; margin-top: var(--s1); }
.consent input {
  appearance: none; flex: none; width: 19px; height: 19px; margin: 2px 0 0;
  border: 1px solid #5a6457; background: transparent; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.consent input:checked { background: #e2b45c; border-color: #e2b45c; }
.consent input:checked::after { content: ""; display: block; width: 5px; height: 10px; margin: 1px auto 0; border: solid #14170f; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.consent label { font-size: 13px; line-height: 1.5; color: #b4bcb0; }
.consent a { color: #edefe8; }
.consent.is-bad input { border-color: var(--danger-line); }

.form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-top: var(--s2); }
.form__state { font-size: 14px; color: #b4bcb0; }
.form__state[data-tone="ok"] { color: #e2b45c; }
.form__state[data-tone="bad"] { color: #e8a0a0; }

/* тёмная секция всегда светлая по тексту, независимо от темы страницы */
.sec--dark .sec__note, .sec--moss .sec__note { color: #b4bcb0; }

/* ============================================================
   ПОДВАЛ
   ============================================================ */
.foot { position: relative; overflow: hidden; background: var(--contrast-bg); color: #b4bcb0; padding-block: var(--s6) var(--s4); }
/* линия сверху не сплошная, а тающая к краям — стык не читается как обрез */
.foot::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; z-index: 2;
  background: linear-gradient(to right, transparent, var(--contrast-line) 18%, var(--contrast-line) 82%, transparent);
}
.foot__top { display: flex; flex-wrap: wrap; gap: var(--s5); justify-content: space-between; align-items: flex-start; }
.foot__col { display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; }
/* Зона нажатия по WCAG 2.5.8 - не меньше 24px. Ссылки подвала были
   23px, телефон 22px. Логотип исключён: внутри него span, и flex сбил бы
   набор слова. .foot__row ниже переобъявляет display и align-items, так
   что строки с иконками остаются как были. */
.foot__col a:not(.mark) { display: flex; align-items: center; min-height: 24px; }
.foot__col a { text-decoration: none; transition: color .4s var(--ease-soft); }
.foot__col a:hover, .foot__col a:focus-visible { color: var(--lamp); }
.foot .mark { color: #edefe8; text-decoration: none; }

/* ============================================================
   ДВИЖЕНИЕ
   Один авторский момент — вход первого экрана.
   Дальше секции входят по-разному, а не одной анимацией.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .hero__plate { clip-path: inset(100% 0 0 0); animation: plate-open 1.6s var(--ease-soft) .15s forwards; }
  /* -70px, а не 0: inset(0) обрезал бы тень плиты ровно по краю */
  @keyframes plate-open { to { clip-path: inset(-70px); } }

  .lift { opacity: 0; transform: translateY(22px); filter: blur(7px); animation: lift 1.25s var(--ease-soft) forwards; }
  @keyframes lift { to { opacity: 1; transform: none; filter: blur(0); } }

  .hero h1 .ln { display: block; opacity: 0; transform: translateY(28px); animation: lift 1.2s var(--ease-soft) forwards; }
  .hero h1 .ln:nth-child(1) { animation-delay: .20s; }
  .hero h1 .ln:nth-child(2) { animation-delay: .33s; }
  .hero h1 .ln:nth-child(3) { animation-delay: .46s; }
  .hero h1 .ln:nth-child(4) { animation-delay: .59s; }
  .hero__lede { animation-delay: .78s; }
  .hero__act  { animation-delay: .93s; }

  .rail__item { opacity: 0; animation: lift .8s var(--ease) forwards; }
  .rail__item:nth-child(2) { animation-delay: 1.02s; }
  .rail__item:nth-child(3) { animation-delay: 1.13s; }
  .rail__item:nth-child(4) { animation-delay: 1.24s; }

  .strip__cell { opacity: 0; animation: lift .8s var(--ease) forwards; }
  .strip__cell:nth-child(1) { animation-delay: 1.10s; }
  .strip__cell:nth-child(2) { animation-delay: 1.22s; }
  .strip__cell:nth-child(3) { animation-delay: 1.34s; }
  .strip__cell:nth-child(4) { animation-delay: 1.46s; }

  /* листва проявляется медленнее содержимого */
  .leaf { opacity: 0; animation: leaf-in 2.2s var(--ease-soft) .7s forwards; }
  @keyframes leaf-in { to { opacity: var(--leaf-op); } }

  [data-rv] {
    transition:
      opacity 1.15s var(--ease-soft),
      transform 1.15s var(--ease-soft),
      clip-path 1.35s var(--ease-soft),
      filter 1.15s var(--ease-soft);
    will-change: opacity, transform;
  }
  [data-rv="up"]   { opacity: 0; transform: translateY(30px); filter: blur(4px); }
  [data-rv="wipe"] { clip-path: inset(0 0 100% 0); }
  [data-rv="row"]  { opacity: 0; transform: translateX(-18px); filter: blur(3px); }
  [data-rv="fade"] { opacity: 0; filter: blur(7px); }
  /* inset(-70px) вместо inset(0): нулевой обрезал бы тени плит */
  [data-rv].is-in  { opacity: 1; transform: none; clip-path: inset(-70px); filter: blur(0); }
  [data-rv-d="1"] { transition-delay: .07s; }
  [data-rv-d="2"] { transition-delay: .14s; }
  [data-rv-d="3"] { transition-delay: .21s; }
  [data-rv-d="4"] { transition-delay: .28s; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .hero__plate { clip-path: none; }
  .leaf { opacity: var(--leaf-op); }
}

/* ============================================================
   СТРАНИЦА ПРАЙСА
   Дисциплина табло: колонки закреплены, меняется только строка.
   ============================================================ */
.pr-top { position: relative; overflow: hidden; padding: calc(var(--head-h) + 8px) 0 var(--s6); }
.pr-top h1 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 96px);
  line-height: .98; letter-spacing: -.025em;
  margin-bottom: var(--s3);
}
.pr-lede { max-width: 62ch; color: var(--fg-2); font-size: clamp(15.5px, 1.1vw, 18px); line-height: 1.62; }

.pr-meta { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: var(--s6); border-top: 1px solid var(--line); }
.pr-meta > div { padding: var(--s3) var(--s3) 0 0; border-right: 1px solid var(--line); }
.pr-meta > div:last-child { border-right: 0; }
.pr-meta__n {
  display: block; margin-bottom: 6px;
  font-family: var(--display);
  font-size: clamp(24px, 2.3vw, 38px); line-height: 1;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}

.pr-body { padding-block: var(--s6) var(--s8); }
.pr-tools { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; justify-content: space-between; margin-bottom: var(--s3); }
.pr-toggle-all {
  font-family: var(--meas); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  background: transparent; color: var(--fg);
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 12px 20px; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.pr-toggle-all:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }

.acc { border-top: 1px solid var(--fg); }
.acc__sec { border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--head-h) + 12px); }

.acc__btn {
  width: 100%; display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto 44px;
  gap: var(--s3); align-items: center;
  padding: var(--s4) 0;
  background: transparent; border: 0; cursor: pointer;
  text-align: left; font: inherit; color: inherit;
  transition: background .3s var(--ease);
}
.acc__btn > * { transition: transform .45s var(--ease-soft); }
.acc__btn:hover { background: var(--moss-tint); }
.acc__btn[aria-expanded="true"] { background: var(--moss-tint-2); }
.acc__btn:hover .acc__num,
.acc__btn:hover .acc__head,
.acc__btn[aria-expanded="true"] .acc__num,
.acc__btn[aria-expanded="true"] .acc__head { transform: translateX(14px); }

.acc__num { font-family: var(--meas); font-size: 12px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.acc__head { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.acc__name { font-family: var(--display); font-size: clamp(20px, 2.1vw, 31px); line-height: 1.15; letter-spacing: -.015em; }
.acc__hint { font-size: 14px; color: var(--fg-3); }

.acc__stat { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.acc__count { font-family: var(--meas); font-size: 10.5px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.acc__range { font-family: var(--meas); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--fg); }

.acc__sign { position: relative; width: 22px; height: 22px; justify-self: end; }
.acc__sign::before, .acc__sign::after {
  content: ""; position: absolute; inset: 50% 0 auto;
  height: 1px; background: var(--fg);
  transition: transform .4s var(--ease), opacity .3s var(--ease);
}
.acc__sign::after { transform: rotate(90deg); }
.acc__btn[aria-expanded="true"] .acc__sign::after { transform: rotate(0deg); opacity: 0; }

.acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .6s var(--ease-soft);
}
.acc__panel.is-open { grid-template-rows: 1fr; }
/* display:grid выше перебивает браузерное [hidden], поэтому повторяем явно */
.acc__panel[hidden] { display: none; }
.acc__inner { overflow: hidden; min-height: 0; padding: 0 0 var(--s4); }

.srv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 170px;
  gap: var(--s3); align-items: baseline;
  padding: 12px 0 12px 54px;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
}
.srv:hover { background: var(--moss-tint); }
.srv__n { line-height: 1.4; }
.srv__d { font-family: var(--meas); font-size: 11.5px; letter-spacing: .06em; color: var(--fg-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.srv__p { font-family: var(--meas); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

.pr-fail { padding: var(--s5) 0; color: var(--fg-2); }

.pr-cta h2 { font-family: var(--display); font-size: clamp(26px, 3vw, 46px); line-height: 1.1; letter-spacing: -.02em; max-width: 20ch; color: var(--contrast-fg); }
.pr-cta p { max-width: 56ch; margin-top: var(--s3); color: #b4bcb0; }
.pr-cta .hero__act { margin-top: var(--s4); }

/* ============================================================
   МОБИЛЬНАЯ ПАНЕЛЬ ДЕЙСТВИЙ
   ============================================================ */
.dock { display: none; }

/* ============================================================
   АДАПТАЦИЯ
   ============================================================ */
/* Ноутбучные ширины: меню, телефон и кнопка записи перестают помещаться
   в одну строку, поэтому ужимаем их, а не переносим. */
/* 1460, а не 1320: с этой ширины в плашке появляется ряд соцсетей,
   и уплотнять шапку надо там же, иначе кнопка «Записаться» уезжает
   за правый край на промежутке 1320-1460. */
@media (max-width: 1460px) {
  .head__in { gap: var(--s2); }
  .nav { gap: 0; }
  .nav a { padding: 9px 10px; font-size: 10.5px; letter-spacing: .1em; }
  .btn { padding: 14px 20px; letter-spacing: .12em; }
  .tel { font-size: 12px; }
}

@media (max-width: 1180px) {
  .crew { grid-template-columns: repeat(3, 1fr); }
  .nav a { padding: 8px 7px; font-size: 10px; letter-spacing: .08em; }
  .head__in { gap: 12px; }
}

/* Ниже этого меню в строку не собрать честно — уходит под бургер. */
@media (max-width: 1080px) {
  .nav { display: none; }
  .burger { display: block; margin-left: auto; }
}

@media (max-width: 980px) {
  :root { --rail: 0px; --head-h: 70px; }
  .rail { display: none; }
  .hero { padding-left: 0; }
  .hero__grid { grid-template-columns: 1fr; min-height: 0; }
  .hero__text { padding: var(--s5) var(--edge); }
  /* 3:4, как у самого кадра (1776x2368). Было 4:3 — горизонтальная
     коробка от заглушки, которая срезала вертикальный снимок. */
  /* align-self: start обязателен, иначе на движке Safari плита
     схлопывается в НОЛЬ и снимок с роликом не видно ни на одном iPhone.
     Причина: у родительской сетки стоит align-items: stretch. На десктопе
     колонки две, и плита растягивается по соседней текстовой. Здесь колонка
     одна, растягиваться не по чему, а собственного содержимого у плиты нет -
     и <img>, и <video> позиционированы абсолютно. В этом случае WebKit
     игнорирует aspect-ratio и даёт высоту 0; Chromium пропорцию соблюдает,
     поэтому в обычной проверке поломка не видна. С align-self: start плита
     не растягивается, и высота честно считается из aspect-ratio.
     Проверяется в check-video.mjs на движке WebKit. */
  .hero__plate { min-height: 0; height: auto; aspect-ratio: 3 / 4; max-height: 76svh; align-self: start; width: 100%; }
  .strip { margin-left: 0; grid-template-columns: 1fr 1fr; }
  .strip__cell { padding-inline: var(--edge) var(--s2); }
  .strip__cell:nth-child(2n) { border-right: 0; }
  .strip__cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .about, .geo, .lead, .kv { grid-template-columns: 1fr; gap: var(--s4); }
  .kv__body { padding: var(--s6) var(--edge); }
  /* 4:5, как у самого ролика (1080x1344): при 3:2 object-fit: cover
     срезал у вертикального видео верх и низ — оставалась полоса. */
  .kv__plate { aspect-ratio: 4 / 5; max-height: 78svh; align-self: start; width: 100%; }
  /* Ролик должен таять в полотне со всех четырёх сторон, а не обрываться
     кромкой.

     Как было и почему не работало. Низ гасила накладка с градиентом,
     а сверху был расчёт на стык секции. Но накладка кладётся ПОВЕРХ
     ролика и красит его цветом фона - значит, работает только пока фон
     ровный, и не убирает главного: у плиты есть своя волосяная рамка
     (inset box-shadow у .plate::after). На телефоне плита во всю ширину
     экрана, и эта рамка читалась тонкими светлыми линиями по бокам.

     Теперь края гасит маска самой плиты. Она убирает не «поверх», а
     насквозь - вместе с рамкой, фоном плиты и тенью, - поэтому ролик
     растворяется во что угодно под собой и сразу со всех сторон.
     Проценты, а не пиксели: глубина подстраивается под размер плиты.

     Градиента два - вертикальный и горизонтальный, - и они РАЗНЕСЕНЫ
     ПО ДВУМ ЭЛЕМЕНТАМ намеренно. Положить оба на один элемент значило бы
     складывать слои маски через mask-composite, а он появился в Safari
     только с 15.4; на iOS постарше края остались бы обрезанными, и
     заметить это на своей технике нельзя. Маска предка перемножается
     с маской потомка сама, без composite, и работает в любом Safari.

     mask-repeat обязателен: по умолчанию маска замостилась бы плиткой
     и за пределами плиты дала бы вторую полосу растворения.

     Фон плиты убираем: ролик закрывает её целиком, а по бокам, где
     маска съедает картинку, из-под неё проступала бы светлая подложка
     вертикальными полосами. */
  .kv__plate {
    background: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 13%, #000 87%, transparent 100%);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-image: linear-gradient(to bottom, transparent 0, #000 13%, #000 87%, transparent 100%);
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
  }
  .kv__plate .plate__vid {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 10%, #000 90%, transparent 100%);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-image: linear-gradient(to right, transparent 0, #000 10%, #000 90%, transparent 100%);
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
  }
  /* рамку и прежнюю нижнюю накладку делает уже маска */
  .kv__plate::after, .kv__plate::before { display: none; }
  .about__plate, .geo__plate { order: -1; }
  .nav { display: none; }
  .burger { display: block; }
  .sec { padding-block: var(--s7); }
  .gal { grid-template-columns: repeat(2, 1fr); }
  .g-a, .g-b, .g-f { grid-column: span 2; }
  .g-c, .g-d, .g-e, .g-g { grid-column: span 1; }
  /* Вертикальных кадров обязано быть чётное число: на двух колонках они
     встают парами, и любой лишний остаётся один рядом с пустой ячейкой.
     Сейчас их восемь - c, d, e, g и четыре новых, то есть четыре пары. */
  .g-h, .g-i, .g-j, .g-k { grid-column: span 1; }
  .g-l { grid-column: span 2; }
  /* На двух колонках кадр 16:9 занимает ряд целиком, и в порядке вёрстки
     он разрывал тройку вертикальных: один вертикальный и квадрат
     оставались в ряду по одному, рядом с пустой ячейкой. Отправляем
     широкий кадр в конец - семь снимков дают ровно десять ячеек,
     то есть пять полных рядов без единой дыры. */
  /* Квадрат встаёт в пару к вертикальному 4:5 и тянется до его высоты
     базовым правилом - отдельной пропорции здесь не нужно. */
  .g-f { order: 1; }
  .pr-meta { grid-template-columns: 1fr 1fr; }
  .pr-meta > div:nth-child(2n) { border-right: 0; }
  .pr-meta > div:nth-child(-n+2) { padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }

  /* крупная листва на планшете становится шумом */
  .leaf--crew, .leaf--hero-r { display: none; }
}

@media (max-width: 720px) {
  :root { --seam: 72px; }
  body { font-size: 16px; padding-bottom: 58px; }
  .head__in { padding-block: 14px; gap: var(--s2); }
  .mark { font-size: 18px; }
  .crew { grid-template-columns: repeat(2, 1fr); }
  .form { grid-template-columns: 1fr; }
  .facts div, .geo__list div { flex-direction: column; gap: 3px; }
  .facts dt, .geo__list dt { width: auto; }
  .sec__note { margin-left: 0; }
  .foot__top { gap: var(--s4); }
  .pr-top { padding-top: calc(var(--s8) + 8px); }

  .acc__btn { grid-template-columns: 34px minmax(0, 1fr) 30px; row-gap: var(--s1); padding: var(--s3) 0; }
  .acc__stat { grid-column: 2 / 3; align-items: flex-start; flex-direction: row; gap: var(--s2); }
  .acc__sign { grid-row: 1; grid-column: 3; align-self: start; margin-top: 6px; }
  .acc__hint { display: none; }
  .srv { grid-template-columns: minmax(0, 1fr) auto; padding-left: 34px; row-gap: 2px; }
  .srv__d { grid-row: 2; grid-column: 1; }
  .srv__p { grid-row: 1 / 3; grid-column: 2; align-self: center; }

  .head__in > .tel,
  .head__in > .btn { display: none; }
  .burger { margin-left: auto; }

  .dock {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
    background: var(--head-bg);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .dock__a {
    min-height: 58px;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    font-family: var(--meas); font-size: 12px; font-weight: 500;
    letter-spacing: .14em; text-transform: uppercase;
    text-decoration: none; color: var(--fg);
    border-right: 1px solid var(--line);
  }
  .dock__a--go { background: var(--btn-bg); color: var(--btn-fg); border-right: 0; }

  /* на телефоне остаются только две ветви, иначе фон становится шумом */
  .leaf { display: none; }
  .leaf--hero-l { display: block; left: -180px; bottom: -40px; width: 340px; height: 560px; }
  .leaf--lead   { display: block; right: -170px; bottom: -60px; width: 320px; height: 530px; }
}

/* Видео в плите ведёт себя ровно как <img>: тот же object-fit, та же
   геометрия. Поэтому пропорции 4:5 сохраняются и вёрстка не меняется —
   ролик 1440x1792 это те же 4:5. */
.plate > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.plate > video ~ .plate__tag { display: none; }

/* линия над полосой замеров тает к краям, а не обрывается */
.strip::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; z-index: 1;
  background: linear-gradient(to right, transparent, var(--line) 12%, var(--line) 88%, transparent);
}

/* ============================================================
   ПОДВАЛ
   Слово лежит ФОНОМ под нижней строкой, а не отдельной полосой
   под ней — иначе подвал читается как два разных блока.
   ============================================================ */
.foot__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
  gap: var(--s5) var(--s4);
}
.foot__col--brand { max-width: 34ch; }
.foot__about {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.65;
  color: #98a094;
  max-width: 32ch;
}
.foot__h {
  font-family: var(--meas);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  /* фиксированный цвет, не var(--fg-3): подвал тёмный в обеих темах,
     а этот токен в светлой становится тёмным и контраст падает до 3.4:1 */
  color: #8d958a;
  margin-bottom: 16px;
  font-weight: 400;
}
.foot__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.55;
  transition: color .4s var(--ease-soft);
}
.foot__row svg { flex: none; margin-top: 2px; color: var(--moss); }
a.foot__row:hover { color: var(--lamp); }
a.foot__row:hover svg { color: var(--lamp); }

/* точка-пульс у онлайн-записи — единственный «живой» элемент подвала */
.foot__dot {
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--lamp);
  vertical-align: middle;
  animation: foot-pulse 2.6s var(--ease-soft) infinite;
}
@keyframes foot-pulse {
  0%, 100% { opacity: .35; }
  50%      { opacity: 1; }
}

/* ---------- нижняя полоса: слово + строка поверх ---------- */
.foot__base {
  position: relative;
  margin-top: var(--s5);
  padding-top: var(--s4);
}
.foot__base::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(to right, transparent, var(--contrast-line) 14%, var(--contrast-line) 86%, transparent);
}
/* Слово стоит ПОД строкой, а не за ней: иконки и копирайт, лежащие
   на буквах, читались как грязь. Отступ маленький и разделителя между
   ними нет — полоса остаётся одним блоком, а не вторым подвалом. */
.foot__word {
  margin-top: clamp(10px, 1.8vw, 22px);
  pointer-events: none;
  opacity: .9;
}
.hw { display: block; width: 100%; height: auto; overflow: visible; }
.hw__t {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 400;
  fill: transparent;
  stroke-width: .32;
  paint-order: stroke;
}
.hw__base {
  stroke: #8d958a;   /* тоже фиксированный: см. .foot__h */
  opacity: 0;
  transition: opacity .8s var(--ease-soft);
}
.hw__draw {
  stroke: color-mix(in srgb, var(--moss) 52%, transparent);
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
}
.foot__word.is-in .hw__draw { animation: hw-draw 3.4s var(--ease-soft) forwards; }
@keyframes hw-draw { to { stroke-dashoffset: 0; } }

.hw__glow {
  stroke: url(#hw-grad);
  opacity: 0;
  transition: opacity .7s var(--ease-soft);
}
/* ведём курсором по полосе — слово наливается цветом под ним */
.foot__base:hover .hw__base { opacity: .5; }
.foot__base:hover .hw__glow { opacity: 1; }

.foot__bot {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}
.foot__cr {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
  margin: 0;
}

.soc { display: flex; gap: 12px; }
.soc__i {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: #b4bcb0;
  border: 1px solid var(--contrast-line);
  background: color-mix(in srgb, var(--contrast-bg) 70%, transparent);
  backdrop-filter: blur(2px);
  transition: color .45s var(--ease-soft), border-color .45s var(--ease-soft),
              background-color .45s var(--ease-soft), transform .45s var(--ease-soft);
}
.soc__i:hover, .soc__i:focus-visible {
  color: var(--lamp);
  border-color: color-mix(in srgb, var(--lamp) 45%, transparent);
  background-color: color-mix(in srgb, var(--lamp) 10%, transparent);
  transform: translateY(-2px);
}
.soc__i svg { display: block; }

@media (max-width: 1080px) {
  .foot__top { grid-template-columns: 1fr 1fr; }
  .foot__col--brand { grid-column: 1 / -1; max-width: 46ch; }
}
@media (max-width: 620px) {
  .foot__top { grid-template-columns: 1fr; gap: var(--s4); }
  .foot__col--brand { max-width: none; }
  .foot__base { min-height: 92px; padding-top: var(--s3); }
  .foot__bot { justify-content: center; text-align: center; }
  .foot__cr { text-align: center; align-items: center; width: 100%; }
  .soc { justify-content: center; width: 100%; }
  .soc__i { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .foot__word.is-in .hw__draw { animation: none; stroke-dashoffset: 0; }
  .soc__i:hover { transform: none; }
  .foot__dot { animation: none; opacity: .8; }
}

/* ============================================================
   ПРАВОВОЙ ДОКУМЕНТ (политика конфиденциальности)
   Длинный текст, который читают по делу: узкая мера строки,
   оглавление сбоку, никаких украшений.
   ============================================================ */
.doc__kicker { display: block; margin-bottom: var(--s2); color: var(--fg-3); }
.doc__top h1 { max-width: 22ch; }

.doc__wrap {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: var(--s6);
  align-items: start;
}

.doc__toc {
  position: sticky;
  top: calc(var(--head-h) + var(--s3));
  font-size: 14px;
}
/* Селектор из двух классов намеренно: .sec h2 имеет специфичность (0,1,1)
   и перебивает одиночный класс, набирая заголовок дисплейным шрифтом в 54px.
   Та же ловушка, что с [hidden] и .theme__sun — см. DESIGN.md. */
.doc__toc .doc__tocH {
  font-family: var(--meas);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 14px;
  font-weight: 400;
}
.doc__toc ol {
  list-style: none;
  margin: 0; padding: 0;
  counter-reset: toc;
  border-left: 1px solid var(--line);
}
.doc__toc li { counter-increment: toc; }
.doc__toc a {
  display: block;
  padding: 7px 0 7px 14px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--fg-2);
  text-decoration: none;
  line-height: 1.35;
  transition: color .4s var(--ease-soft), border-color .4s var(--ease-soft);
}
.doc__toc a::before {
  content: counter(toc) ". ";
  font-family: var(--meas);
  font-size: 11px;
  color: var(--fg-3);
}
.doc__toc a:hover,
.doc__toc a:focus-visible { color: var(--fg); border-left-color: var(--moss); }

.doc__body { max-width: 68ch; }
.doc__body h2 {
  font-family: var(--display);
  font-size: clamp(21px, 2.1vw, 28px);
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: var(--s5) 0 var(--s2);
  scroll-margin-top: calc(var(--head-h) + 20px);
}
.doc__body h2:first-child { margin-top: 0; }
.doc__body p { margin: 0 0 var(--s2); line-height: 1.7; color: var(--fg-2); }
.doc__body b { color: var(--fg); font-weight: 500; }
.doc__body a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px;
               text-decoration-color: var(--line-2); transition: text-decoration-color .4s var(--ease-soft); }
.doc__body a:hover { text-decoration-color: var(--moss); }

.doc__body ul {
  margin: 0 0 var(--s3);
  padding: 0;
  list-style: none;
}
.doc__body ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  line-height: 1.65;
  color: var(--fg-2);
}
.doc__body ul li::before {
  content: "";
  position: absolute;
  left: 2px; top: .68em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--moss);
}

.doc__body code {
  font-family: var(--meas);
  font-size: .88em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--moss-field);
  color: var(--fg);
}

/* определения: реквизиты и подрядчики */
.doc__dl { margin: 0 0 var(--s3); }
.doc__dl > div {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: var(--s3);
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.doc__dl dt {
  font-family: var(--meas);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  /* не --fg-3: в светлой теме он даёт 4.23:1 на светлом фоне */
  color: var(--fg-2);
  padding-top: 2px;
}
.doc__dl dd { margin: 0; color: var(--fg-2); line-height: 1.6; }
.doc__dl--wide > div { grid-template-columns: 150px minmax(0, 1fr); }
.doc__dl--wide dt { text-transform: none; font-size: 13px; letter-spacing: .04em; color: var(--fg); }

/* таблица целей */
.doc__t {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--s3);
  font-size: 14.5px;
}
.doc__t th {
  font-family: var(--meas);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 400;
  text-align: left;
  padding: 0 var(--s3) 10px 0;
  border-bottom: 1px solid var(--line-2);
}
.doc__t td {
  padding: 13px var(--s3) 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--fg-2);
  line-height: 1.55;
  vertical-align: top;
}
.doc__t td:last-child, .doc__t th:last-child { padding-right: 0; }

/* важное примечание */
.doc__note {
  padding: 16px 20px;
  border-left: 2px solid var(--moss);
  background: var(--moss-field);
  border-radius: 0 6px 6px 0;
  margin-bottom: var(--s3) !important;
}

/* Незаполненное поле. Специально видное: документ нельзя
   публиковать, пока эти места не закрыты настоящими реквизитами. */
.doc__fill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  border: 1px dashed var(--lamp);
  color: var(--lamp);
  font-family: var(--meas);
  font-size: 12.5px;
}
.doc__fill::before { content: "- "; }
/* Янтарь --lamp на светлом фоне даёт всего 2.6:1 — для светлой темы
   берём затемнённый вариант того же тона. */
[data-theme="light"] .doc__fill { color: #7a530f; border-color: #7a530f; }

@media (max-width: 900px) {
  .doc__wrap { grid-template-columns: 1fr; gap: var(--s4); }
  .doc__toc { position: static; padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
  .doc__toc ol { columns: 2; column-gap: var(--s4); border-left: 0; }
  .doc__toc a { padding-left: 0; border-left: 0; }
  .doc__toc a:hover { border-left: 0; }
  .doc__dl > div, .doc__dl--wide > div { grid-template-columns: 1fr; gap: 4px; }
  .doc__t { font-size: 13.5px; }
  .doc__t th:nth-child(2), .doc__t td:nth-child(2) { display: none; }
}
@media (max-width: 560px) {
  .doc__toc ol { columns: 1; }
}

/* реквизиты набираем моноширинным: цифры выравниваются и легче сверять */
.doc__num { font-family: var(--meas); font-variant-numeric: tabular-nums; letter-spacing: .04em; color: var(--fg); }

/* ============================================================
   ТЕНИ ПОД ФОТОГРАФИЯМИ

   Три вещи держатся на РАЗНЫХ слоях и не мешают друг другу:
     заливка — background у .plate;
     обводка — inset-кольцо у .plate::after;
     тень    — box-shadow у .plate, и в этом списке только тень.
   Смешивать inset-кольцо и внешнюю тень в одном box-shadow нельзя:
   они начинают конфликтовать при смене темы и при скруглениях.

   Тень набрана из шести слоёв с примерно удваивающимся радиусом и
   падающей непрозрачностью — так ведёт себя настоящий рассеянный
   свет: плотное контактное ядро у самой кромки и длинный мягкий
   вынос. Один слой с большим blur всегда читается как «наклейка».

   Цвет не чистый чёрный, а зелёно-угольный: на этом сайте свет
   тёплый, а среда зелёная, и нейтрально-серая тень выглядит
   инородной.
   ============================================================ */
:root {
  --sh-c: 14, 20, 13;          /* зелёно-угольный, а не чёрный */
  --sh-1: 0 1px 2px   rgba(var(--sh-c), .20);
  --sh-2: 0 3px 7px   rgba(var(--sh-c), .17);
  --sh-3: 0 8px 17px  rgba(var(--sh-c), .15);
  --sh-4: 0 17px 34px rgba(var(--sh-c), .13);
  --sh-5: 0 32px 62px rgba(var(--sh-c), .11);
  --sh-6: 0 58px 108px rgba(var(--sh-c), .09);
}
[data-theme="light"] {
  /* на светлом фоне тень должна быть заметнее, иначе снимок висит в воздухе */
  --sh-c: 26, 34, 24;
  --sh-1: 0 1px 2px   rgba(var(--sh-c), .13);
  --sh-2: 0 3px 7px   rgba(var(--sh-c), .12);
  --sh-3: 0 8px 17px  rgba(var(--sh-c), .11);
  --sh-4: 0 17px 34px rgba(var(--sh-c), .10);
  --sh-5: 0 32px 62px rgba(var(--sh-c), .085);
  --sh-6: 0 58px 108px rgba(var(--sh-c), .07);
}

/* Только плиты с настоящим снимком или роликом. Заглушки остаются
   плоскими: тень под пустым местом выглядела бы враньём. */
.plate:has(> img),
.plate:has(> video) {
  box-shadow:
    var(--sh-1),
    var(--sh-2),
    var(--sh-3),
    var(--sh-4),
    var(--sh-5),
    var(--sh-6);
}

/* Главный кадр крупнее прочих — ему нужен более длинный вынос,
   иначе тень читается мелкой относительно самого снимка. */
.hero__plate:has(> img) {
  box-shadow:
    var(--sh-1),
    var(--sh-2),
    var(--sh-3),
    0 22px 44px rgba(var(--sh-c), .14),
    0 44px 86px rgba(var(--sh-c), .12),
    0 80px 150px rgba(var(--sh-c), .10);
}

/* Портреты мастеров стоят в ряд: у них тень мягче и короче, иначе
   шесть одинаковых выносов рядом дают грязь. */
.crew__plate:has(> img) {
  box-shadow:
    var(--sh-1),
    var(--sh-2),
    var(--sh-3),
    var(--sh-4);
  transition: box-shadow .6s var(--ease-soft), transform .6s var(--ease-soft);
}
.crew__c:hover .crew__plate:has(> img) {
  box-shadow: var(--sh-1), var(--sh-2), var(--sh-3), var(--sh-4), var(--sh-5);
  transform: translateY(-3px);
}

@media (max-width: 720px) {
  /* на телефоне длинный вынос съедает воздух между блоками */
  .plate:has(> img),
  .plate:has(> video),
  .hero__plate:has(> img) {
    box-shadow: var(--sh-1), var(--sh-2), var(--sh-3), var(--sh-4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .crew__c:hover .crew__plate:has(> img) { transform: none; }
}

/* ============================================================
   СОЦСЕТИ В ШАПКЕ И В ГАМБУРГЕРЕ

   Блок один и лежит внутри .nav. На широком экране он стоит в верхней
   плашке рядом с пунктами меню, на узком - уезжает вместе с меню под
   бургер. Второй разметки и вторых иконок не нужно: и там, и там
   работает <use> по символам из шапки документа.

   Базовый .soc__i покрашен для подвала, а тот тёмный в обеих темах.
   В шапке цвета берём из токенов темы, иначе иконки пропали бы
   на светлом фоне - ровно та же ловушка, что была с .foot__h.
   ============================================================ */
.soc--nav {
  gap: 6px;
  align-items: center;
  /* flex: none обязателен. Иконки - гибкие элементы, и при нехватке
     места браузер сжимал бы им ШИРИНУ, оставляя высоту: круги поехали бы
     в овалы. Заодно отделяем ряд от пунктов меню волоском, иначе
     он сливается со словом «Прайслист». */
  flex: none;
  margin-left: var(--s2);
  padding-left: var(--s2);
  border-left: 1px solid var(--line);
}
/* padding обязателен. .soc__i - это <a> внутри .nav, и правило
   .nav a наливает ему padding: 10px 13px. Внутренняя коробка кружка
   становится 8x14 вместо 34x34, значок перестаёт попадать в центр
   и уезжает на 6px вправо и 3px вниз. */
.nav .soc__i { flex: none; padding: 0; }
.nav .soc__i svg { width: var(--ctl-ico); height: var(--ctl-ico); }

.nav .soc__i {
  width: var(--ctl); height: var(--ctl);
  color: var(--fg-2);
  border-color: var(--line);
  background: transparent;
  backdrop-filter: none;
}
/* повторяем идиому соседних пунктов меню, а не подвальную:
   в плотной строке подскок вверх читается как дрожь */
.nav .soc__i:hover,
.nav .soc__i:focus-visible {
  color: var(--fg);
  border-color: var(--line-2);
  background: var(--nav-hover);
  transform: none;
}

@media (max-width: 1460px) {
  :root { --ctl: 30px; --ctl-ico: 16px; }
  .soc--nav { margin-left: 12px; padding-left: 12px; gap: 5px; }
}

/* 1080, а не 980: именно с этой ширины показывается бургер,
   и именно с неё меню может раскрыться. */
@media (max-width: 1080px) {
  /* В раскрытом меню это отдельный ряд под ссылками.
     Селектор длиннее, чем кажется нужным: .nav.is-open a:last-child
     задаёт border-bottom: 0 и с двумя классами перебил бы кольцо
     у последней иконки - нужен третий класс. */
  .nav.is-open .soc--nav {
    width: 100%;
    gap: 10px;
    /* .soc на узком экране центрируется ради подвала - в меню ряд
       должен начинаться от той же кромки, что и пункты выше */
    justify-content: flex-start;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
    margin-top: var(--s2);
    padding-top: var(--s3);
    border-top: 1px solid var(--line);
  }
  .nav.is-open .soc--nav .soc__i {
    width: 42px; height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
  }
  .nav.is-open .soc--nav .soc__i svg { width: 19px; height: 19px; }
}

/* ============================================================
   БЛОГ
   Карточка статьи собрана из тех же деталей, что и остальной сайт:
   плита под кадр, служебная строка моноширинным, заголовок Prata.
   ============================================================ */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6) var(--s3); }
/* Карточка тянется на всю высоту строки, чтобы «Читать» у всех статей
   стояло на одной линии независимо от длины заголовка. */
.post { display: flex; }
.posts:empty { display: none; }

.post__link { display: flex; flex-direction: column; width: 100%; text-decoration: none; color: inherit; }
.post__plate { aspect-ratio: 3 / 2; margin-bottom: var(--s3); }
.post__meta { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.post__t {
  font-family: var(--display);
  /* Было 26px: «Фитореконструкция» шире колонки в 426px и рвалось
     посреди слова. Переносы по слогам плюс запас по кеглю. */
  font-size: clamp(19px, 1.45vw, 23px);
  hyphens: auto;
  overflow-wrap: break-word;
  line-height: 1.2; letter-spacing: -.01em;
  margin: 10px 0 0;
  transition: color .35s var(--ease-soft);
}
.post__d { margin-top: 10px; color: var(--fg-2); font-size: 15px; line-height: 1.6; }
.post__more {
  align-self: flex-start;
  margin-top: auto; padding-top: var(--s2); padding-bottom: 3px;
  font-family: var(--meas); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--moss);
  border-bottom: 1px solid var(--line-2);
  transition: color .35s var(--ease-soft), border-color .35s var(--ease-soft);
}
.post__link:hover .post__t { color: var(--moss); }
.post__link:hover .post__more { color: var(--lamp); border-bottom-color: var(--lamp); }

/* Пока статей нет, список пуст и скрыт, а на его месте стоит
   честное объяснение со ссылками, а не пустая полоса. */
.blog__empty {
  max-width: 62ch;
  padding: var(--s5) var(--s4);
  border: 1px dashed var(--line-2);
  color: var(--fg-2);
  line-height: 1.7;
}
.blog__empty a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.blog__empty a:hover, .blog__empty a:focus-visible { color: var(--lamp); border-bottom-color: var(--lamp); }

/* --- страница статьи --- */
.post__body { max-width: 68ch; }
.post__body ul { margin: 0 0 var(--s2); padding-left: 1.15em; color: var(--fg-2); line-height: 1.7; }
.post__body li { margin-bottom: 6px; }
.post__back { color: var(--fg-2); text-decoration: none; border-bottom: 1px solid var(--line); }
.post__back:hover, .post__back:focus-visible { color: var(--lamp); border-bottom-color: var(--lamp); }
.post__end { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }

@media (max-width: 980px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) var(--s3); } }
@media (max-width: 620px) { .posts { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------
   ШАПКА: где что помещается

   1. Ряд соцсетей занимает около 160px. Вместе с шестью пунктами меню,
      телефоном и кнопкой он влезает в плашку только на широком экране -
      ниже 1260px кнопка «Записаться» уезжала за край. Поэтому в верхней
      плашке ряд прячется, а в подвале и в гамбургере остаётся.

   2. Бургер появляется с 1080px, а стили РАСКРЫТОГО меню лежали
      в блоке 980px. Между 981 и 1080px кнопка была видна, но нажатие
      ничего не открывало: .nav оставался display: none, и навигации
      на этих ширинах не было вовсе. Правила перенесены сюда, к той же
      границе, где показывается сам бургер.
   ------------------------------------------------------------ */
@media (max-width: 1260px) {
  .soc--nav { display: none; }
}

@media (max-width: 1080px) {
  .nav.is-open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%;
    margin: 0;
    background: var(--bg);
    border-block: 1px solid var(--line);
    padding: var(--s1) var(--edge) var(--s3);
  }
  .nav.is-open a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
  .nav.is-open a:last-child { border-bottom: 0; }
  .nav.is-open a:hover { background: transparent; border-color: var(--line); }
  /* в раскрытом меню ряд обязан вернуться, несмотря на правило выше */
  .nav.is-open .soc--nav { display: flex; }
}

@media (min-width: 1261px) {
  /* тот же кружок, что у соцсетей: они соседи по ряду */
  .theme { width: var(--ctl); height: var(--ctl); }
  .theme svg { width: var(--ctl-ico); height: var(--ctl-ico); }
}

/* ============================================================
   КАРТА

   Окно карты - сторонний сервис в отдельном браузерном контексте.
   Это осознанный выбор вместо скрипта-конструктора: окно грузится
   лениво (loading="lazy"), не выполняет чужой код на нашей странице
   и растягивается обычным CSS, без единой строки JS.
   ============================================================ */
.geo__map {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; display: block;
}

/* Щит от перехвата прокрутки. Ставится скриптом, см. app.js. */
.geo__veil {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  width: 100%; padding: 0;
  border: 0; cursor: pointer;
  background: color-mix(in srgb, var(--bg) 26%, transparent);
  transition: background .4s var(--ease-soft), opacity .35s var(--ease-soft);
}
.geo__veil > span {
  font-family: var(--meas); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line-2);
  padding: 11px 18px;
  transition: color .35s var(--ease-soft), border-color .35s var(--ease-soft);
}
.geo__veil:hover { background: color-mix(in srgb, var(--bg) 10%, transparent); }
.geo__veil:hover > span,
.geo__veil:focus-visible > span { color: var(--lamp); border-color: var(--lamp); }
.geo__plate.is-live .geo__veil { opacity: 0; pointer-events: none; }

@media (max-width: 980px) {
  /* 16:10 на телефоне даёт полоску около 240px - на карте в ней ничего
     не разобрать. Делаем выше, но не во весь экран. */
  .geo__plate { aspect-ratio: 4 / 3; max-height: 62svh; }
}

/* ============================================================
   СВЕТОВОЕ ПЯТНО ЗА КУРСОРОМ
   Холст создаёт spotlight.js и только на устройствах с мышью.
   Кликам не мешает, поэтому лежит поверх всего.
   ============================================================ */
.spot {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ============================================================
   АКЦИЯ И КАЛЬКУЛЯТОР

   Панель калькулятора лежит ПОВЕРХ снимка, поэтому фон под ней тёмный
   в обеих темах. Цвета внутри .calc заданы постоянными, а не токенами:
   var(--fg) в светлой теме стал бы почти чёрным и утонул бы в кадре.
   Той же ловушкой уже были испорчены .foot__h и иконки соцсетей.
   ============================================================ */
.promo__grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: var(--s6);
  align-items: start;
}
.promo__kick { display: block; color: var(--moss); margin-bottom: var(--s2); }
.promo h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3.2vw, 50px);
  line-height: 1.08; letter-spacing: -.02em;
  margin-bottom: var(--s3);
  max-width: 15ch;
}
.promo__text p { color: var(--fg-2); margin-bottom: var(--s2); max-width: 46ch; }
.promo__terms { margin-top: var(--s4); }

/* --- плита: снимок + стеклянная панель --- */
.promo__plate { display: flex; }

.calc {
  position: relative; z-index: 1;
  flex: 1;
  /* min-width: 0 обязателен. У гибкого элемента min-width по умолчанию
     auto, и ряд из девяти вкладок (flex: none, nowrap) раздувал панель
     до 1780px внутри плиты шириной 700: строки итога уезжали за правый
     край, и суммы просто не было видно. */
  min-width: 0;
  /* сверху отступ больше: из-под панели видно лампы и зелень,
     иначе снимок превращается в тонкую рамку */
  margin: var(--s5) var(--s4) var(--s4);
  display: flex; flex-direction: column; gap: var(--s2);
  padding: var(--s3);
  background: rgba(11, 14, 11, .82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(237, 239, 232, .14);
  color: #edefe8;
}
.calc__t {
  font-family: var(--display);
  font-size: 21px; line-height: 1.2;
  color: #edefe8;
}
.calc__note { font-size: 13.5px; line-height: 1.5; color: #b4bcb0; margin-top: 4px; }

/* --- разделы прайса --- */
/* Ряд разделов длиннее панели: девять названий, часть длинные.
   Полосу прокрутки браузера тут прятать пришлось - она бы резала
   низ вкладок, - поэтому доступ дают стрелки и растворяющиеся края.
   Без них четыре последних раздела на десктопе были недостижимы:
   колесо мыши по горизонтали само не крутит. */
.calc__nav { position: relative; min-width: 0; }

.calc__tabs {
  display: flex; gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.calc__tabs::-webkit-scrollbar { display: none; }

/* края тают, когда за ними ещё что-то есть */
.calc__nav::before,
.calc__nav::after {
  content: "";
  position: absolute; top: 0; bottom: 0;
  width: 46px; z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s var(--ease-soft);
}
.calc__nav::before {
  left: 0;
  background: linear-gradient(to right, rgba(11, 14, 11, .96), rgba(11, 14, 11, 0));
}
.calc__nav::after {
  right: 0;
  background: linear-gradient(to left, rgba(11, 14, 11, .96), rgba(11, 14, 11, 0));
}
.calc__nav.can-l::before,
.calc__nav.can-r::after { opacity: 1; }

.calc__arr {
  position: absolute; top: 50%; z-index: 2;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  display: none; place-items: center;
  padding: 0;
  color: #edefe8;
  background: rgba(11, 14, 11, .9);
  border: 1px solid rgba(237, 239, 232, .22);
  border-radius: 50%;
  cursor: pointer;
  transition: color .3s var(--ease-soft), border-color .3s var(--ease-soft),
              background-color .3s var(--ease-soft);
}
.calc__arr--l { left: -2px; }
.calc__arr--r { right: -2px; }
.calc__arr--r svg { transform: rotate(180deg); }
.calc__nav.can-l .calc__arr--l,
.calc__nav.can-r .calc__arr--r { display: grid; }
.calc__arr:hover,
.calc__arr:focus-visible { color: #e2b45c; border-color: #e2b45c; background: rgba(11, 14, 11, .98); }

@media (max-width: 560px) {
  /* на телефоне палец справляется сам, но стрелка остаётся подсказкой,
     что ряд продолжается - и попасть по ней проще, чем по краю */
  .calc__arr { width: 32px; height: 32px; }
}

.calc__tab {
  flex: none;
  padding: 7px 12px;
  font-family: var(--meas); font-size: 10px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  white-space: nowrap;
  color: #b4bcb0;
  background: transparent;
  border: 1px solid rgba(237, 239, 232, .18);
  cursor: pointer;
  transition: color .3s var(--ease-soft), border-color .3s var(--ease-soft),
              background-color .3s var(--ease-soft);
}
.calc__tab:hover { color: #edefe8; border-color: rgba(237, 239, 232, .4); }
.calc__tab.is-on { color: #0e110e; background: #e2b45c; border-color: #e2b45c; }

/* --- список услуг --- */
.calc__list {
  max-height: 292px;
  overflow-y: auto;
  border-top: 1px solid rgba(237, 239, 232, .12);
  border-bottom: 1px solid rgba(237, 239, 232, .12);
  scrollbar-width: thin;
  scrollbar-color: rgba(237, 239, 232, .28) transparent;
}
.calc__i {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid rgba(237, 239, 232, .07);
  cursor: pointer;
  transition: background-color .25s var(--ease-soft);
}
.calc__i:last-child { border-bottom: 0; }
.calc__i:hover { background: rgba(237, 239, 232, .05); }
.calc__box {
  width: 15px; height: 15px;
  accent-color: #e2b45c;
  cursor: pointer;
  align-self: center;
}
.calc__nm { font-size: 13.5px; line-height: 1.4; color: #d6dad2; }
.calc__i.is-on .calc__nm { color: #edefe8; }
.calc__pr {
  font-family: var(--meas); font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap; color: #b4bcb0;
}
.calc__i.is-on .calc__pr { color: #e2b45c; }
.calc__empty { padding: var(--s3) 2px; font-size: 13.5px; color: #b4bcb0; }
.calc__empty a { color: #e2b45c; }

/* --- итог --- */
.calc__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.calc__k {
  font-family: var(--meas); font-size: 10px; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase; color: #98a094;
}
.calc__v, .calc__old {
  font-family: var(--meas); font-size: 13px;
  font-variant-numeric: tabular-nums; color: #b4bcb0;
}
.calc__old { text-decoration-color: rgba(180, 188, 176, .8); }
.calc__row--final { padding-top: 4px; }
.calc__new {
  font-family: var(--display); font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 400; line-height: 1; color: #e2b45c;
}
.calc__save { font-size: 12.5px; color: #98a094; }
.calc__save b { color: #b4bcb0; font-weight: 500; }
.calc__reset {
  align-self: flex-start;
  margin-top: 2px; padding: 0 0 2px;
  background: none; border: 0;
  border-bottom: 1px solid rgba(237, 239, 232, .3);
  font-family: var(--meas); font-size: 10px; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase;
  color: #98a094; cursor: pointer;
  transition: color .3s var(--ease-soft), border-color .3s var(--ease-soft);
}
.calc__reset:hover { color: #e2b45c; border-bottom-color: #e2b45c; }

/* Приглушать эти строки нельзя: при opacity .45 зачёркнутая цена
   давала 4.42:1 против фона, ниже порога. Пока ничего не выбрано,
   вместо нулей стоит прочерк - см. calc.js. */

@media (max-width: 980px) {
  .promo__grid { grid-template-columns: 1fr; gap: var(--s4); }
  .promo h2 { max-width: none; }
  .calc { margin: var(--s3) var(--s2) var(--s2); }
  .calc__list { max-height: 248px; }
}

@media (max-width: 560px) {
  .calc__i { grid-template-columns: 18px minmax(0, 1fr); row-gap: 2px; }
  .calc__pr { grid-column: 2; }
}

/* ============================================================
   КАРТА ДЛИНЫ ВОЛОС (страница прайса)
   Силуэт нарисован вектором, а не снят: четыре отдельных снимка
   были бы четырьмя разными людьми, и при движении ползунка фигура
   прыгала бы. К вектору же можно привязать отметки уха, плеча и
   лопатки - именно они снимают спор о длине.
   ============================================================ */
.len {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: var(--s6);
  align-items: start;
}

/* Фигура держится в поле зрения, пока читаешь список цен */
.len__fig { position: sticky; top: calc(var(--head-h) + 24px); }
.len__svg { display: block; width: 100%; height: auto; overflow: visible; }

/* Фигура - контурная схема, а не иллюстрация. Сплошная заливка спорила
   с массой волос и читалась бутылкой; линия честно говорит «это чертёж»
   и не тянет на себя внимание с цен. */
.len__body {
  fill: color-mix(in srgb, var(--fg) 7%, transparent);
  stroke: var(--line-2);
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.len__hair { fill: var(--lamp); opacity: .92; }

.len__marks line {
  stroke: var(--line-2);
  stroke-width: 1;
  stroke-dasharray: 2 5;
}
.len__marks circle { fill: var(--line-2); }
.len__marks text {
  font-family: var(--meas);
  font-size: 11px;
  letter-spacing: .06em;
  fill: var(--fg-3);
}
.len__mark { cursor: pointer; transition: opacity .3s var(--ease-soft); }
.len__mark:hover { opacity: .75; }
.len__mark.is-on line { stroke: var(--lamp); stroke-dasharray: none; }
.len__mark.is-on circle { fill: var(--lamp); }
.len__mark.is-on text { fill: var(--fg); }

/* ---------- панель ---------- */
.len__lab {
  font-family: var(--meas); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3);
}
.len__name {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(28px, 3.4vw, 46px); line-height: 1.04;
  letter-spacing: -.02em; margin-top: 8px;
}
.len__where { color: var(--fg-2); margin-top: 6px; }

/* ---------- ползунок ---------- */
.len__range {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; margin: var(--s4) 0 0;
  background: transparent; cursor: pointer;
}
.len__range::-webkit-slider-runnable-track {
  height: 2px; background: var(--line-2); border-radius: 2px;
}
.len__range::-moz-range-track {
  height: 2px; background: var(--line-2); border-radius: 2px;
}
.len__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -10px;
  background: var(--lamp); border: 0; border-radius: 50%;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--lamp) 18%, transparent);
}
.len__range::-moz-range-thumb {
  width: 22px; height: 22px;
  background: var(--lamp); border: 0; border-radius: 50%;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--lamp) 18%, transparent);
}
.len__range:focus-visible { outline: 2px solid var(--lamp); outline-offset: 8px; }

/* ---------- ступени ---------- */
.len__ticks {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--s1); margin-top: var(--s2);
}
.len__tick {
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 10px; text-align: left;
  background: transparent; border: 1px solid var(--line);
  border-radius: 3px; cursor: pointer; color: var(--fg-3);
  transition: border-color .3s var(--ease-soft), color .3s var(--ease-soft),
              background .3s var(--ease-soft);
}
.len__tick b {
  font-size: 13.5px; font-weight: 500; color: var(--fg-2);
  transition: color .3s var(--ease-soft);
}
.len__tick span { font-family: var(--meas); font-size: 11px; letter-spacing: .04em; }
.len__tick:hover { border-color: var(--line-2); }
.len__tick.is-on { border-color: var(--lamp); background: color-mix(in srgb, var(--lamp) 8%, transparent); }
.len__tick.is-on b { color: var(--fg); }
.len__tick.is-on span { color: var(--lamp-ink); }

/* ---------- список услуг ---------- */
.len__list { margin-top: var(--s5); border-top: 1px solid var(--line); }
.len__cat {
  font-family: var(--meas); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3);
  padding: var(--s3) 0 10px;
}
.len__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 152px;
  column-gap: var(--s3);
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.len__cat + .len__row { border-top: 0; }
.len__n { grid-column: 1; grid-row: 1; font-size: 15px; }
.len__dif {
  grid-column: 1; grid-row: 2;
  margin-top: 3px;
  font-family: var(--meas); font-size: 11.5px;
  letter-spacing: .03em; color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}
.len__d {
  grid-column: 2; grid-row: 1 / 3; align-self: center; text-align: right;
  font-family: var(--meas); font-size: 12.5px; color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}
.len__p {
  grid-column: 3; grid-row: 1 / 3; align-self: center; text-align: right;
  font-family: var(--meas); font-size: 14px; font-weight: 500;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.len__foot {
  margin-top: var(--s4); padding-top: var(--s3);
  border-top: 1px solid var(--line);
  max-width: 66ch; color: var(--fg-2);
  font-size: 14.5px; line-height: 1.6;
}
.len__fail { color: var(--fg-2); padding: var(--s3) 0; }

@media (max-width: 1080px) {
  .len { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: var(--s4); }
  .len__row { grid-template-columns: minmax(0, 1fr) 84px 136px; column-gap: var(--s2); }
}

@media (max-width: 860px) {
  /* Фигура уезжает наверх и перестаёт липнуть: на узком экране
     она съедала бы половину высоты, а список ради неё не пролистать. */
  .len { grid-template-columns: 1fr; gap: var(--s4); }
  .len__fig { position: static; max-width: 320px; margin: 0 auto; }
  .len__ticks { grid-template-columns: repeat(2, 1fr); }
  .len__list { margin-top: var(--s4); }
  .len__row { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s2); }
  .len__n { grid-column: 1; grid-row: 1; }
  .len__dif { grid-column: 1; grid-row: 2; }
  .len__p { grid-column: 2; grid-row: 1; align-self: end; }
  .len__d { grid-column: 2; grid-row: 2; align-self: start; }
}

/* Пояснение вилки в калькуляторе. Панель лежит на снимке, поэтому цвет
   фиксированный, а не токен: --fg-2 на светлой теме уползает в тёмный. */
.calc__why {
  margin-top: 2px;
  font-size: 11.5px; line-height: 1.45; color: #98a094;
}

/* Второй абзац лида на прайсе: объяснение вилки. Отделён отступом,
   чтобы не слипался с первым. */
.pr-lede--why { margin-top: var(--s2); }


/* ============================================================
   ИНТЕРЕСНОЕ — мини-игра «Кот бежит»
   ============================================================ */
.game { display: grid; gap: var(--s6); }
.game__intro { max-width: 66ch; display: grid; gap: var(--s3); }
.game__lede { color: var(--fg-2); line-height: 1.62; }
.game__start { justify-self: start; }
.game__start:disabled { opacity: .55; cursor: default; }
.game__had { font-size: 14px; color: var(--fg-2); }
.game__had b { color: var(--lamp-ink); font-family: var(--meas); letter-spacing: .06em; }

.game__hud {
  display: flex; flex-wrap: wrap; gap: var(--s4);
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.game__stat { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.game__stat i {
  font-style: normal; font-family: var(--meas); font-size: 10.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3);
}
.game__stat b {
  font-family: var(--display); font-size: 24px; font-weight: 400; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--fg);
}
.game__stat em { font-style: normal; font-family: var(--meas); font-size: 12px; color: var(--fg-3); }

.game__stage { position: relative; margin-top: var(--s3); }
.game__cv {
  display: block; width: 100%; height: auto;
  aspect-ratio: 900 / 260;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  /* без этого браузер на телефоне трактует касание как жест страницы:
     двойной тап зумит, а протяжка прокручивает вместо прыжка */
  touch-action: manipulation;
  cursor: pointer;
}
.game__cv:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }

.game__cover {
  position: absolute; inset: 0;
  display: grid; place-items: center; padding: var(--s3);
  text-align: center;
  /* сцену видно сквозь заслонку: чёрный прямоугольник до запуска
     читается как «не загрузилось», а не как «нажмите кнопку» */
  background: color-mix(in srgb, var(--bg) 58%, transparent);
  border-radius: 3px;
  font-family: var(--meas); font-size: 12px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2);
}
.game.is-armed .game__cover { display: none; }

.game__hint {
  margin-top: 12px;
  font-family: var(--meas); font-size: 12.5px; color: var(--fg-3);
}

/* ---------- окно победы ---------- */
/* hidden в разметке само по себе не спрячет: у [hidden] специфичность
   такая же, как у класса, а это правило ниже по файлу и побеждает.
   Без явной строки ниже окно победы висело поверх игры с первой секунды. */
.game__win[hidden] { display: none; }
.game__win {
  position: absolute; inset: 0;
  display: grid; place-items: center; padding: var(--s2);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-radius: 3px;
}
.game__winIn {
  max-width: 46ch; text-align: center;
  display: grid; gap: 10px; justify-items: center;
}
.game__winKick { color: var(--lamp-ink); }
.game__winIn h3 { font-family: var(--display); font-size: clamp(22px, 2.6vw, 34px); font-weight: 400; line-height: 1.1; }
.game__winIn p { color: var(--fg-2); font-size: 14.5px; line-height: 1.5; }
.game__code {
  font-family: var(--meas); font-size: clamp(20px, 2.4vw, 30px); font-weight: 500;
  letter-spacing: .16em; color: var(--lamp-ink);
  padding: 8px 18px; border: 1px dashed var(--line-2); border-radius: 3px;
}
.game__winFine { font-size: 12.5px !important; color: var(--fg-3) !important; }

/* ---------- условия ---------- */
.game__rules { max-width: 74ch; border-top: 1px solid var(--line); padding-top: var(--s3); }
.game__rules h3 {
  font-family: var(--meas); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3);
  margin-bottom: var(--s2);
}
.game__rules ul { list-style: none; display: grid; gap: 10px; }
.game__rules li {
  position: relative; padding-left: 20px;
  color: var(--fg-2); font-size: 14.5px; line-height: 1.55;
}
.game__rules li::before {
  content: ''; position: absolute; left: 2px; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--lamp);
}
.game__rules li b { color: var(--fg); font-weight: 500; }
.game__fine { margin-top: var(--s3); font-size: 12.5px; line-height: 1.5; color: var(--fg-3); }

@media (max-width: 720px) {
  .game__hud { gap: var(--s3); }
  .game__stat b { font-size: 20px; }
  .game__code { letter-spacing: .12em; }
}

/* Только для скринридеров: строка состояния забега. */
.vh {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.game__winAgain[hidden] { display: none; }
.game__winAgain { color: var(--lamp-ink) !important; font-size: 13px !important; }

/* ============================================================
   СТАТЬЯ: блок с иллюстрацией и врезкой
   ============================================================ */
.art {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: var(--s5);
  align-items: center;
  margin-bottom: var(--s6);
}
.art__plate { aspect-ratio: 3 / 2; }
.art__kick { color: var(--fg-3); margin-bottom: var(--s2); }
.art__facts { list-style: none; display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: var(--s2); }
.art__facts li {
  position: relative; padding-left: 20px;
  color: var(--fg-2); font-size: 15px; line-height: 1.55;
}
.art__facts li::before {
  content: ''; position: absolute; left: 2px; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--lamp);
}
.art__facts li b { color: var(--fg); font-weight: 500; }

.doc__body h3 {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.25; letter-spacing: -.01em;
  margin: var(--s4) 0 var(--s2);
  color: var(--fg);
}
.doc__body i { font-style: italic; }
.doc__src { font-size: 14px; }
.doc__src li { line-height: 1.5; }

@media (max-width: 860px) {
  .art { grid-template-columns: 1fr; gap: var(--s3); }
}

/* ============================================================
   ПЫЛЬЦА ДРАКОНА — ритм-игра
   Свои токены цвета: сцена тёмная в обеих темах, поэтому --fg и --moss
   здесь брать нельзя - на светлой теме они уползают и текст тонет.
   ============================================================ */
.dg {
  --dg-ink: #efe6d2;
  --dg-dim: #bdb298;
  --dg-gold: #e6b455;
  --dg-line: rgba(230, 180, 85, .22);
  --dg-deep: #0b0906;
  display: grid; gap: var(--s5);
}
.dg__intro { max-width: 66ch; display: grid; gap: var(--s3); }
.dg__lede { color: var(--fg-2); line-height: 1.62; }
.dg__open { justify-self: start; }
.dg__had { font-size: 14px; color: var(--fg-2); }
.dg__had b { color: var(--lamp-ink); font-family: var(--meas); letter-spacing: .06em; }

/* ---------- сцена ---------- */
.dg__stage[hidden] { display: none; }
.dg__stage {
  position: relative; isolation: isolate;
  /* Колонка обязана быть minmax(0, 1fr): при grid-template-columns по
     умолчанию ширину задаёт max-content детей, и табло с white-space:
     nowrap распирало сцену за края экрана. Снаружи это не было видно -
     overflow: hidden молча срезал, и проверка на прокрутку страницы
     ничего не находила. */
  display: grid; grid-template-columns: minmax(0, 1fr);
  align-content: space-between; gap: var(--s4);
  min-height: 420px; padding: var(--s4);
  border: 1px solid var(--dg-line); border-radius: 4px;
  background: var(--dg-deep);
  overflow: hidden;
}
.dg__scene {
  position: absolute; inset: 0; z-index: -1;
  background-image: image-set(url(./dragon-lair@sm.webp) 1x, url(./dragon-lair.webp) 2x);
  background-size: cover; background-position: 50% 38%;
  opacity: .85;
}
.dg__scene::after {
  /* нижняя треть притемнена: там табло и полоса, поверх картинки текст не читался */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(11,9,6,.15) 0%, rgba(11,9,6,.5) 45%, rgba(11,9,6,.9) 100%);
}
.dg.is-shake .dg__stage { animation: dg-shake .32s ease; }
@keyframes dg-shake {
  0%, 100% { transform: translate3d(0,0,0); }
  25% { transform: translate3d(-5px, 1px, 0); }
  50% { transform: translate3d(4px, -2px, 0); }
  75% { transform: translate3d(-3px, 1px, 0); }
}

/* ---------- загрузка ---------- */
.dg__load[hidden] { display: none; }
.dg__load {
  position: absolute; inset: 0; z-index: 3;
  display: grid; place-content: center; justify-items: center; gap: var(--s2);
  padding: var(--s4); text-align: center;
  background: rgba(11, 9, 6, .82);
  transition: background .5s var(--ease-soft);
}
.dg__load.is-done { background: rgba(11, 9, 6, .55); }
.dg__loadT {
  font-family: var(--display); font-size: clamp(20px, 2.4vw, 30px);
  color: var(--dg-ink); line-height: 1.15;
}
.dg__barWrap {
  width: min(320px, 70vw); height: 3px; border-radius: 2px;
  background: rgba(239, 230, 210, .16); overflow: hidden;
}
.dg__bar {
  height: 100%; width: calc(var(--p, 0) * 1%);
  background: linear-gradient(90deg, #a9762a, var(--dg-gold));
  transition: width .18s linear;
}
.dg__pct {
  font-family: var(--meas); font-size: 12px; letter-spacing: .14em;
  color: var(--dg-dim); font-variant-numeric: tabular-nums;
}
.dg__start[hidden] { display: none; }
.dg__start { margin-top: var(--s2); }

/* ---------- табло ---------- */
.dg__hud {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4);
}
.dg__stat { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.dg__stat i {
  font-style: normal; font-family: var(--meas); font-size: 10.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--dg-dim);
}
.dg__stat b {
  font-family: var(--display); font-size: 26px; font-weight: 400; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--dg-ink);
}
.dg__stat em { font-style: normal; font-family: var(--meas); font-size: 12px; color: var(--dg-dim); }
.dg__stat--wake { align-items: center; }
.dg__wake {
  position: relative; display: block; width: 72px; height: 6px; border-radius: 3px;
  background: rgba(239, 230, 210, .16); overflow: hidden;
}
.dg__wake::after {
  content: ""; position: absolute; inset: 0 auto 0 0;
  width: calc(var(--wake, 0) * 100%);
  background: linear-gradient(90deg, #8a5a12, #d4552f);
  transition: width .25s var(--ease-soft);
}

.dg__runes { margin-left: auto; display: flex; gap: 10px; }
.dg__rune {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(239, 230, 210, .18);
  color: rgba(239, 230, 210, .32);
  transition: color .4s var(--ease-soft), border-color .4s var(--ease-soft),
              box-shadow .4s var(--ease-soft);
}
.dg__rune.is-on {
  color: var(--dg-gold); border-color: var(--dg-gold);
  box-shadow: 0 0 0 4px rgba(230, 180, 85, .12);
}

/* ---------- полоса дыхания ---------- */
.dg__track {
  position: relative; z-index: 2;
  height: 74px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--dg-line);
  background: linear-gradient(180deg, rgba(239,230,210,.05), rgba(11,9,6,.5));
  /* касание тут - ход в игре, а не жест страницы */
  touch-action: manipulation;
}
.dg__track:focus-visible { outline: 2px solid var(--dg-gold); outline-offset: 3px; }
.dg__track::after {
  content: ""; position: absolute; left: 8px; right: 8px; top: 50%;
  height: 1px; background: rgba(239, 230, 210, .14);
}

.dg__zone[hidden] { display: none; }
.dg__zone {
  position: absolute; top: 6px; bottom: 6px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(230,180,85,.5), rgba(230,180,85,.18));
  border: 1px solid rgba(230, 180, 85, .8);
  box-shadow: 0 0 22px rgba(230, 180, 85, .35);
}
@media (prefers-reduced-motion: no-preference) {
  .dg__zone { animation: dg-glow 1.1s ease-in-out infinite alternate; }
  @keyframes dg-glow {
    from { box-shadow: 0 0 14px rgba(230, 180, 85, .25); }
    to   { box-shadow: 0 0 30px rgba(230, 180, 85, .5); }
  }
}

.dg__marker {
  position: absolute; top: 50%; left: 0;
  transform: translate(-50%, -50%);
  color: var(--dg-ink);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6));
  pointer-events: none;
}
.dg.is-run .dg__marker { color: #fff6e4; }

.dg__sparks { position: absolute; inset: 0; pointer-events: none; }
.dg__spark {
  position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%; background: var(--dg-gold);
  animation: dg-spark .7s ease-out forwards;
}
@keyframes dg-spark {
  from { transform: scale(.5); opacity: 1; box-shadow: 0 0 0 0 rgba(230,180,85,.6); }
  to   { transform: scale(3.6); opacity: 0; box-shadow: 0 0 0 18px rgba(230,180,85,0); }
}

/* ---------- успех ---------- */
.dg__win[hidden] { display: none; }
.dg__win {
  position: absolute; inset: 0; z-index: 4;
  display: grid; place-items: center; padding: var(--s3);
  background: rgba(11, 9, 6, .9);
}
.dg__winIn { max-width: 50ch; text-align: center; display: grid; gap: 12px; justify-items: center; }
.dg__winKick { color: var(--dg-gold); }
.dg__winIn h3 {
  font-family: var(--display); font-weight: 400; line-height: 1.12;
  font-size: clamp(22px, 2.8vw, 34px); color: var(--dg-ink);
}
.dg__winIn p { color: var(--dg-dim); font-size: 14.5px; line-height: 1.55; }
.dg__code {
  font-family: var(--meas); font-size: clamp(18px, 2.2vw, 26px); font-weight: 500;
  letter-spacing: .14em; color: var(--dg-gold);
  padding: 8px 18px; border: 1px dashed rgba(230, 180, 85, .5); border-radius: 3px;
}
.dg__winAgain[hidden] { display: none; }
.dg__winAgain { color: var(--dg-gold) !important; font-size: 13px !important; }
.dg__winAct { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: center; margin-top: 6px; }
.dg__closeBtn {
  background: transparent; color: var(--dg-ink);
  border-color: rgba(239, 230, 210, .4);
}

/* ---------- подсказка и условия ---------- */
.dg__hint { font-family: var(--meas); font-size: 12.5px; color: var(--fg-3); }
.dg__rules { max-width: 74ch; border-top: 1px solid var(--line); padding-top: var(--s3); }
.dg__rules h3 {
  font-family: var(--meas); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3);
  margin-bottom: var(--s2);
}
.dg__rules ul { list-style: none; display: grid; gap: 10px; }
.dg__rules li {
  position: relative; padding-left: 20px;
  color: var(--fg-2); font-size: 14.5px; line-height: 1.55;
}
.dg__rules li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--lamp);
}
.dg__rules li b { color: var(--fg); font-weight: 500; }
.dg__fine { margin-top: var(--s3); font-size: 12.5px; line-height: 1.5; color: var(--fg-3); }

@media (max-width: 720px) {
  .dg__stage { min-height: 380px; padding: var(--s3); }
  .dg__hud { gap: var(--s3); }
  .dg__stat b { font-size: 21px; }
  .dg__runes { margin-left: 0; }
  /* полоса выше: пальцем по 74px попадать неудобно */
  .dg__track { height: 88px; }
  .dg__winAct .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   ИГРЫ: блок управления и телефон
   ============================================================ */
.ctrl {
  max-width: 62ch;
  border: 1px solid var(--line); border-radius: 3px;
  padding: var(--s3);
}
.ctrl__h {
  font-family: var(--meas); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3);
  margin-bottom: var(--s2);
}
.ctrl__list { display: grid; gap: 10px; margin-bottom: var(--s2); }
.ctrl__list > div { display: flex; align-items: baseline; gap: var(--s2); }
.ctrl__list dt { flex: none; width: 96px; }
.ctrl__list dd { margin: 0; color: var(--fg-2); font-size: 14.5px; line-height: 1.5; }
.ctrl kbd {
  display: inline-block; min-width: 84px; text-align: center;
  padding: 5px 9px;
  font-family: var(--meas); font-size: 11px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--fg); background: var(--bg-3, transparent);
  border: 1px solid var(--line-2); border-radius: 3px;
}
.ctrl__task {
  padding-top: var(--s2); border-top: 1px solid var(--line);
  color: var(--fg-2); font-size: 14.5px; line-height: 1.6;
}
.ctrl__task b { color: var(--fg); font-weight: 500; }

/* ---------- кот: поле игры ----------
   Пропорцию задаёт JS: на узком экране он показывает меньший кусок мира,
   и холст становится выше, а кот - крупнее. */
.game__cv { aspect-ratio: var(--ar, 900 / 260); }

@media (max-width: 700px) {
  /* Табло в две строки: три показателя в ряд на 350px наезжают друг
     на друга, как только счёт доходит до четырёх знаков. */
  .game__hud {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px var(--s3);
  }
  .game__stat:first-child { grid-column: 1 / -1; }
  .game__hud, .dg__hud { row-gap: 12px; }

  .ctrl { padding: var(--s2); }
  .ctrl__list > div { flex-direction: column; gap: 4px; }
  .ctrl__list dt { width: auto; }
  .ctrl kbd { min-width: 0; }
}

/* ---------- дракон: телефон ---------- */
@media (max-width: 700px) {
  .dg__stage { min-height: 460px; }
  /* Табло раскладываем сеткой: во flex-строке «Дракон» с полосой
     переносился под руны и они наезжали. */
  /* Две строки по два столбца: слева показатель, справа - руны и полоса
     дракона. Так самая широкая строка укладывается в 320px экрана. */
  .dg__hud {
    display: grid; grid-template-columns: auto auto;
    justify-content: space-between; align-items: center;
    gap: 10px var(--s2);
  }
  .dg__stat:nth-of-type(1) { grid-column: 1; grid-row: 1; }
  .dg__runes        { grid-column: 2; grid-row: 1; justify-self: end; }
  .dg__stat:nth-of-type(2) { grid-column: 1; grid-row: 2; }
  .dg__stat--wake   { grid-column: 2; grid-row: 2; justify-self: end; }
  .dg__rune { width: 30px; height: 30px; }
  .dg__rune svg { width: 17px; height: 17px; }
  .dg__runes { gap: 7px; }
  /* Полоса выше: по ней бьют пальцем, и она же главный элемент экрана */
  .dg__track { height: 104px; }
  .dg__wake { width: 64px; }
}

@media (max-width: 420px) {
  .dg__stat b { font-size: 19px; }
  .dg__stat i { font-size: 10px; letter-spacing: .1em; }
  .game__stat b { font-size: 18px; }
  .dg__stage { padding: var(--s2); }
  .dg__runes { gap: 5px; }
  .dg__rune { width: 27px; height: 27px; }
  .dg__rune svg { width: 15px; height: 15px; }
  .dg__wake { width: 52px; }
  .dg__hud { column-gap: 10px; }
}

/* ============================================================
   ОКНА ПОБЕДЫ НА УЗКОМ ЭКРАНЕ
   Накладка поверх поля работает, пока поле выше содержимого. На телефоне
   поле кота - 135-194px, а в окне помещается заголовок, абзац, номер и
   кнопка: содержимое вылезало на 150-277px и ложилось поверх условий
   ниже. Поэтому на узком экране окно перестаёт быть накладкой и
   становится обычной карточкой результата под полем - она просто
   раздвигает страницу и читается целиком.
   ============================================================ */
@media (max-width: 700px) {
  .game__win,
  .dg__win {
    position: static;
    padding: var(--s3) var(--s2);
    margin-top: var(--s2);
    border-radius: 3px;
  }
  .game__win {
    background: var(--bg-2);
    border: 1px solid var(--line);
  }
  .dg__win {
    background: rgba(11, 9, 6, .94);
    border: 1px solid var(--dg-line);
  }
  .game__winIn,
  .dg__winIn { max-width: none; }

  /* Кнопки в карточке во всю ширину: пальцем удобнее, и строка
     «Записаться и забрать батончик» перестаёт переноситься неровно. */
  .dg__winAct { flex-direction: column; width: 100%; }
  .dg__winAct .btn { width: 100%; justify-content: center; }
  .game__winBtn { width: 100%; justify-content: center; }
}
