/* ============================================================
   Секции после героя: проекты, услуги, прищепки,
   бегущая строка логотипов, финал с формой и подвалом.
   Теней нет нигде (Ана), скругления 12.

   Сетка — вертикали макета 1:2 (1440):
     30   — левое поле: лого, картинка       (линия «logo»)
     263  — начало меню «{ проекты }»        (линия «menu»)
     720  — середина: линия зигзага проектов (линия «mid»)
     1265 — «{ связаться со мной }»          (линия «contact»)
     1410 — правое поле                      (линия «right»)
   Внутри контейнера с полями 30 колонки: 233 / 457 / 545 / 145 из 1380.

   Кегли (единые для всех блоков):
     заголовок блока .h  — Lanze Pike, один кегль везде, интерлиньяж 90%, капсом
     название проекта    — Lanze Pike 48 / 90%
     тело .body, .row__text, .step__d — 20 / 110%
     подпись .label, .kicker, .pcard__year — 14
   ============================================================ */

:root {
  --lime: #eeffa3;
  --blue: #eeffa3;
  --h-size: 15vw;   /* заголовок блока: один кегль во всех блоках, в одну строку; точное значение ставит скрипт по самому длинному */
  --body-size: 20px;
  --label-size: 14px;
  --r: 12px;
  --line: rgba(50, 66, 70, 0.35);
}

/* ---------- сетка ---------- */

.grid {
  display: grid;
  grid-template-columns:
    [logo] 16.884% [menu] 33.116% [mid] 39.493% [contact] 10.507% [right];
  column-gap: 0;
  row-gap: 28px;
  padding: 0 var(--pad-x);
  align-items: start;
}

.col-left  { grid-column: logo / menu; }
.col-main  { grid-column: menu / contact; }
.col-mid   { grid-column: menu / mid; padding-right: 40px; }
.col-right { grid-column: mid / contact; padding-right: 40px; }
.col-full  { grid-column: logo / right; }

/* ---------- типографика блоков ---------- */

.label,
.kicker {
  font-size: var(--label-size);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.label { grid-column: logo / menu; padding-top: 0.55em; }
.kicker { text-align: center; margin-bottom: 0.25em; }
.projects__head .h { padding-top: 0.22em; }

.h {
  grid-column: menu / contact;
  font-family: var(--font-display);
  font-variation-settings: "wght" 0, "opsz" 0;
  font-size: var(--h-size);
  font-weight: 400;
  line-height: 0.7;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.h .line { padding: 0.22em 0; margin: -0.22em 0; }   /* у Lanze высокие знаки: запас маски, чтобы не срезало */
.h--center { text-align: center; }

.body {
  font-size: var(--body-size);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* ---------- 2. проекты: жёлтый фон, зигзаг вдоль центральной линии ---------- */

.projects {
  position: relative;
  padding: clamp(96px, 14vh, 180px) 0 clamp(120px, 16vh, 200px);
  background: var(--bg);
}

.projects__head { padding: 0 var(--pad-x); }

.zig {
  position: relative;
  margin-top: clamp(56px, 8vh, 96px);
  padding: 0 var(--pad-x);
}

/* линия по центру: бледная во всю высоту, сверху её закрашивает тёмная часть
   с шариком на конце — по прогрессу скролла (как у trebuchet). --p ставит скрипт */
.zig__line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  margin-left: -0.5px;
  background: var(--ink);
  opacity: 0.2;
}

.zig__fill {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  margin-left: -0.5px;
  height: calc(var(--p, 0) * 100%);
  background: var(--ink);
}

.zig__fill::after {              /* шарик */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 10px; height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--ink);
}

/* раскладка как у trebuchet: карточка 36% ширины, ряды перекрываются на 26 px;
   1-я у левого края, 2-я с отступом от правого, 3-я с отступом от левого, 4-я у правого */
.zig__list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.zig__item { width: 36%; }
.zig__item + .zig__item { margin-top: -26px; }
.zig__item--r1 { margin-left: auto; margin-right: 9.4%; }
.zig__item--l2 { margin-left: 8.3%; }
.zig__item--r2 { margin-left: auto; }

/* работа проявляется, когда шарик доехал до неё (класс ставит скрипт) */
.pcard { opacity: 0; transform: translateY(60px); transition: opacity 1s var(--ease), transform 1.3s var(--ease); }
.pcard.is-in { opacity: 1; transform: none; }


.pcard {
  display: block;
  border-radius: var(--r);
  overflow: hidden;
  background: #fff;
}

.pcard__cover {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e9ecd9;
}

.pcard__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.pcard:hover .pcard__cover img { transform: scale(1.04); }

.pcard__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 72px 26px 26px;
}

.pcard__year { font-size: var(--label-size); line-height: 1.1; letter-spacing: -0.02em; }

.pcard__title {
  font-family: var(--font-display);
  font-variation-settings: "wght" 0, "opsz" 0;
  font-size: 56px;
  line-height: 0.7;
  text-transform: uppercase;
  white-space: nowrap;
}

.pcard__arrow {
  position: absolute;
  right: 22px;
  bottom: 24px;
  width: 24px; height: 24px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.5s var(--ease);
}

.pcard:hover .pcard__arrow { transform: translateX(6px); }

/* ---------- 3. услуги: плашки (контент и цены с imba-studio.ru) ----------
   Проба (Ана): текст блока моноширинным JetBrains Mono (кириллица есть, знак уже,
   чем у PT Mono), пробелы между словами ужаты word-spacing, чтобы не зияли */

.services { --font-mono: "JetBrains Mono", "PT Mono", ui-monospace, Menlo, monospace; }
.services .plate__text,
.services .plate__title,
.services .plate__btn,
.services .kicker {
  font-family: var(--font-mono);
  word-spacing: -0.28em;
  letter-spacing: -0.03em;
}
.services .plate__text { font-size: 17px; line-height: 1.1; }
.services .plate__title { font-size: 22px; font-weight: 500; }
.services .plate__btn { font-size: 17px; }


.services {
  position: relative;
  padding: clamp(96px, 14vh, 180px) 0 clamp(120px, 16vh, 200px);
  background: var(--lime);
}

.services__head2 { margin-top: clamp(96px, 14vh, 180px); }

.plates {
  list-style: none;
  display: grid;
  gap: 20px;
  margin-top: clamp(56px, 8vh, 96px);
  padding: 0 var(--pad-x);
}

.plates--4 { grid-template-columns: repeat(4, 1fr); }
.plates--3 { grid-template-columns: repeat(3, 1fr); }

.plate {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 320px;
  padding: 28px 28px 30px;
  border-radius: var(--r);
  border: 0.4px solid var(--ink);   /* строук везде 0.4 (Ана) */
  transition-delay: calc(var(--i, 0) * 0.07s);
}

.plate--lime  { background: var(--lime); }
.plate--blue  { background: var(--blue); }
.plate--white { background: rgba(255, 255, 255, 0.55); }

.plate__text {
  font-size: var(--body-size);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.plate .chip--static { margin-bottom: auto; }

.plate__title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.plate__price {
  font-family: var(--font-display);
  font-variation-settings: "wght" 0, "opsz" 0;
  font-size: 56px;
  line-height: 0.7;
  white-space: nowrap;
}

.plate__btn {
  margin-top: auto;
  align-self: flex-start;
  padding: 14px 24px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: var(--body-size);
  line-height: 1;
  letter-spacing: -0.01em;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}

.plate__btn:hover { background: var(--ink); color: var(--bg); }

/* пилюли направлений — те же, что на герое, но в потоке и без анимации */
.chip--static { position: static; transform: none; justify-self: start; align-self: flex-start; }
.chip--static .chip__in { opacity: 1; --k: 0.5px; }   /* 86 → 43 px */
.chip--glass.chip--static { --chip-fill: rgba(255, 255, 255, 0.6); }
.plate--lime .chip--lime .chip__in { --chip-fill: rgba(255, 255, 255, 0.55); }

/* ---------- 4. прищепки на верёвке: голубой фон ----------
   Верёвка — SVG-кривая с провисом. Плашки висят на прищепках в точках --x,
   высоту точки на верёвке (--y) считает скрипт по кривой.
   Появление: прищепка с плашкой падает сверху и раскачивается, потом
   медленно качается на ветру; на ховер качнётся сильнее. */

.pins {
  position: relative;
  padding: clamp(96px, 14vh, 180px) 0 clamp(48px, 6vh, 80px);
  /* небо с пластилиновыми облаками и холмами (ChatGPT, 18.09) — вместо голубой плашки */
  background: #a8a473 url("assets/sky-hills.jpg") center top / 100% auto no-repeat;   /* подложка = цвет нижнего края картинки */
  background-image: url("assets/sky-hills.webp");
  background-size: 100% auto;          /* картинка целиком по ширине, ничего не режем */
  background-position: center top;
  background-repeat: no-repeat;
  min-height: calc(100vw * 941 / 1672 - 2px);  /* высота блока = высота картинки (1672×941) */
  display: flex;
  flex-direction: column;
  color: #fff;   /* на небе текст белый (Ана) */
}

.pins .marquee-wrap { margin-top: auto; }   /* логотипы прижаты к низу, к холмам */

.pins .peg__clip { color: var(--ink); }
.pins .rope__line { background: #fff; }

.rope {
  position: relative;
  display: flex;
  height: 380px;
  margin-top: clamp(40px, 6vh, 72px);
  overflow: hidden;
}

/* верёвка: прямая линия, как у референса */
.rope__line {
  position: absolute;
  left: 0; right: 0;
  top: 40px;
  height: 2px;
  background: var(--ink);
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 2s cubic-bezier(0.6, 0, 0.2, 1);
}

.rope.is-in .rope__line { transform: scaleX(1); }

/* лента: два одинаковых набора едут влево, скорость ≈ 73 px/с (референс) */
.rope__track {
  list-style: none;
  display: flex;
  flex: 0 0 auto;
  gap: var(--rope-gap, 120px);
  padding-right: var(--rope-gap, 120px);
  animation: rope-run var(--rope-dur, 24s) linear infinite;
}

@keyframes rope-run {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

.peg {
  position: relative;
  width: 260px;
  height: 320px;
  margin-top: 20px;                   /* верх прищепки на верёвке */
  transform-origin: 50% 20px;         /* качаемся вокруг точки на верёвке */
  animation: peg-hang var(--dur, 1s) ease-in-out infinite;
}

/* качание ±5° со своим периодом у каждой (референс: 0.7…1.5 с) */
@keyframes peg-hang {
  0%   { transform: rotate(-5deg); }
  50%  { transform: rotate(5deg); }
  100% { transform: rotate(-5deg); }
}

/* прищепка: две дощечки с пружинкой */
.peg__clip {
  position: absolute;
  left: 50%;
  top: 0;
  width: 22px;
  height: 66px;
  margin-left: -11px;
  border-radius: 8px 8px 5px 5px;
  background: var(--peg-color, #fff);
  border: 0.4px solid var(--ink);
  z-index: 2;
}

.peg__clip::before {           /* пружинка */
  content: "";
  position: absolute;
  left: 50%; top: 24px;
  width: 30px; height: 12px;
  margin-left: -15px;
  border-radius: 6px;
  background: var(--ink);
}

.peg__clip::after {            /* щель между дощечками */
  content: "";
  position: absolute;
  left: 50%; top: 36px; bottom: 6px;
  width: 1.5px;
  margin-left: -0.75px;
  background: var(--ink);
  opacity: 0.6;
}

/* три вида плашек, как пилюли на герое: лайм, стекло, голубая — все со стеклом (blur),
   строук и текст тёмные */
.peg--lime  { --peg-color: var(--lime); --peg-card: var(--lime); }   /* наши цвета, без просветов */
.peg--blue  { --peg-color: var(--blue); --peg-card: var(--blue); }
.peg--white { --peg-color: #fff;        --peg-card: rgba(255, 255, 255, 0.14); }


.peg__card {
  position: absolute;
  left: 0; right: 0;
  top: 50px;
  padding: 28px 26px 26px;
  border-radius: var(--r);
  background: var(--peg-card);
  border: 0.4px solid var(--ink);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.peg__card b {
  font-family: var(--font-display);
  font-variation-settings: "wght" 0, "opsz" 0;
  font-weight: 400;
  font-size: 72px;
  line-height: 0.7;
  white-space: nowrap;
}

.peg__card span {
  font-size: var(--body-size);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* ---------- бегущая строка логотипов ----------
   Обёртка тянется по вертикали и размывается, когда строка уходит вверх (paaam.ru):
   значения ставит скрипт в --stretch и --blur. Пока строка в нижней половине окна — обычная. */

.marquee-wrap {
  position: relative;
  z-index: 1;
  padding: clamp(24px, 4vh, 48px) 0 0;
  transform-origin: 50% 0;
  transform: scaleY(var(--stretch, 1));
  filter: blur(var(--blur, 0px));
  will-change: transform, filter;
}

.marquee {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}

.marquee__set {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-right: 20px;
}

/* каждый логотип в стеклянной пилюле (как плашки услуг в макете) */
.marquee__set span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 84px;
  padding: 0 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
}

/* один визуальный вес: вордмарки 30 px, знак+слово 40, вертикальный знак 60;
   на небе логотипы белые полупрозрачные (исходники тёмные → инвертируем) */
.marquee__set img { display: block; height: 30px; width: auto; object-fit: contain; filter: brightness(0) invert(1); opacity: 1; }
.marquee__set img[src*="lemana"]  { height: 62px; }
.marquee__set img[src*="magnit"]  { height: 30px; }
.marquee__set img[src*="tanuki"]  { height: 30px; }
.marquee__set img[src*="rigla"]   { height: 40px; }
.marquee__set img[src*="s7"]      { height: 40px; }
.marquee__set img[src*="hoff"]    { height: 44px; }
.marquee__set img[src*="restore"] { height: 40px; }
.marquee__set img[src*="cofix"]   { height: 36px; }
.marquee__set img[src*="ozon"]    { height: 26px; }
.marquee__set img[src*="yandex"]  { height: 28px; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- 5. финал: крупный призыв, форма, подвал ---------- */

.finale {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(80px, 12vh, 140px) 0 30px;
  background: var(--bg);
}

/* кегль подгоняет скрипт: самая длинная строка ровно в 76% ширины окна */
.finale__title {
  margin: 0 auto;
  width: 90%;
  font-family: var(--font-display);
  font-variation-settings: "wght" 0, "opsz" 0;
  font-size: 10vw;
  font-weight: 400;
  line-height: 0.7;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.finale__title .line { padding: 0.22em 0; margin: -0.22em 0; }

.finale__bottom {
  margin-top: auto;
  padding-top: clamp(40px, 6vh, 80px);
  row-gap: 0;
}

.finale__contacts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: var(--body-size);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.finale__link { width: max-content; border-bottom: 1px solid var(--line); transition: border-color 0.3s; }
.finale__link:hover { border-color: var(--ink); }

/* форма: две колонки, поле «о задаче» во всю ширину, кнопка слева */
.form {
  grid-column: menu / right;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  row-gap: 28px;
  align-items: end;
}

.form__honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form__field { display: flex; flex-direction: column; gap: 8px; }
.form__field--wide { grid-column: 1 / -1; }

.form__label { font-size: var(--label-size); line-height: 1.1; letter-spacing: -0.02em; }

.form__input {
  width: 100%;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 var(--body-size) / 1.1 var(--font);
  letter-spacing: -0.01em;
  outline: none;
  resize: none;
  transition: border-color 0.3s;
}

.form__input:focus { border-color: var(--ink); }

.form__btn {
  position: relative;
  justify-self: start;
  padding: 18px 34px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font: 400 var(--body-size) / 1 var(--font);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}

.form__btn:hover, .form__btn:focus-visible { background: var(--lime); color: var(--ink); }
.form__btn-ok { display: none; }
.form.is-sent .form__btn { background: var(--lime); color: var(--ink); pointer-events: none; }
.form.is-sent .form__btn-t { display: none; }
.form.is-sent .form__btn-ok { display: inline; }
.form.is-busy .form__btn { opacity: 0.6; pointer-events: none; }

.form__note { align-self: center; font-size: var(--label-size); line-height: 1.1; letter-spacing: -0.02em; }
.form.is-error .form__note { color: #d0483a; }

.footer {
  margin-top: clamp(40px, 6vh, 80px);
  font-size: var(--label-size);
  line-height: 1.1;
  letter-spacing: -0.02em;
  align-items: baseline;
}

.footer__up { grid-column: contact / right; justify-self: end; border-bottom: 1px solid var(--line); }

/* ---------- сетка-подсказка: клавиша G показывает вертикали макета ---------- */

.guides { position: fixed; inset: 0; z-index: 3000; pointer-events: none; display: none; }
html.show-guides .guides { display: block; }

.guides::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent calc(var(--pad-x) - 1px), rgba(255, 0, 90, 0.5) var(--pad-x), transparent calc(var(--pad-x) + 1px)),
    linear-gradient(90deg, transparent calc(18.264% - 1px), rgba(255, 0, 90, 0.5) 18.264%, transparent calc(18.264% + 1px)),
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 0, 90, 0.3) 50%, transparent calc(50% + 1px)),
    linear-gradient(90deg, transparent calc(87.847% - 1px), rgba(255, 0, 90, 0.5) 87.847%, transparent calc(87.847% + 1px)),
    linear-gradient(90deg, transparent calc(100% - var(--pad-x) - 1px), rgba(255, 0, 90, 0.5) calc(100% - var(--pad-x)), transparent calc(100% - var(--pad-x) + 1px));
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .marquee-wrap { transform: none !important; filter: none !important; }
  .peg, .rope__track { animation: none; }
  .rope__line { transition: none; transform: none; }
  .zig__fill { height: 100%; }
}

/* ============================================================
   Планшет
   ============================================================ */

@media (max-width: 1199px) {
  .zig__item { width: 44%; }
  .pcard__title { font-size: 44px; }
  .pcard__title { font-size: 40px; }
  .plates--4, .plates--3 { grid-template-columns: repeat(2, 1fr); }
  .peg { width: 220px; }
  .peg__card b { font-size: 56px; }
}

/* ============================================================
   Мобильная раскладка
   ============================================================ */

@media (max-width: 760px) {
  :root { --body-size: 18px; }
  .h { white-space: normal; }

  .grid { grid-template-columns: 1fr; row-gap: 20px; }
  .label, .h, .col-left, .col-main, .col-mid, .col-right, .col-full, .form, .footer__up { grid-column: 1 / -1; padding-right: 0; }
  .label { padding-top: 0; }

  .projects, .services, .pins { padding: 64px 0; }

  /* зигзаг → колонка, линия слева */
  .zig { margin-top: 40px; padding-left: calc(var(--pad-x) + 24px); }
  .zig__line { left: var(--pad-x); }
  .zig__list { display: flex; flex-direction: column; gap: 24px; }
  .zig__list { gap: 24px; }
  .zig__item, .zig__item--l1, .zig__item--r1, .zig__item--l2, .zig__item--r2 { width: 100%; margin: 0; }
  .zig__line, .zig__fill { left: var(--pad-x); }
  .pcard__title { font-size: 34px; white-space: normal; }

  .plates { margin-top: 40px; gap: 14px; }
  .plates--4, .plates--3 { grid-template-columns: 1fr; }
  .plate { min-height: 0; padding: 22px 20px 24px; }
  .plate__price { font-size: 44px; }
  .chip--static .chip__in { --k: 0.42px; }
  .services__head2 { margin-top: 72px; }

  .rope { height: 330px; --rope-gap: 48px; --rope-dur: 22s; }
  .peg { width: 190px; height: 250px; }
  .peg__card { padding: 20px 20px 18px; }
  .peg__card b { font-size: 48px; }

  .marquee-wrap { padding: 24px 0 0; }
  .marquee__set { gap: 12px; padding-right: 12px; }
  .marquee__set span { height: 60px; padding: 0 24px; }
  .marquee__set img { height: 22px; }
  .marquee__set img[src*="lemana"] { height: 44px; }
  .marquee__set img[src*="rigla"], .marquee__set img[src*="s7"], .marquee__set img[src*="restore"], .marquee__set img[src*="hoff"] { height: 30px; }

  .finale { padding-top: 96px; }
  .finale__title { width: 92%; }
  .finale__bottom { padding-top: 64px; row-gap: 40px; }
  .form { grid-template-columns: 1fr; row-gap: 22px; }
  .form__btn { width: 100%; }
  .form__note { text-align: center; }
  .footer { margin-top: 64px; row-gap: 8px; }
  .footer__up { justify-self: start; }
}

/* ============================================================
   Проекты в стиле paaam.ru: тонкая мета-строка + лента тайлов.
   ============================================================ */
.cases { padding: 0; margin-top: clamp(48px, 7vh, 96px); }

.pcase { opacity: 0; transform: translateY(50px); transition: opacity 0.9s var(--ease), transform 1.2s var(--ease); }
.pcase.is-in { opacity: 1; transform: none; }
.pcase + .pcase { margin-top: clamp(52px, 6vw, 104px); }

.pcase__meta {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding: 0 var(--pad-x) 18px;
  text-decoration: none;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0;
}
.pcase__kicker,
.pcase__tags { font-size: 15px; line-height: 1.1; opacity: 0.62; }
.pcase__title { font-size: clamp(16px, 1.7vw, 23px); line-height: 1; font-weight: 600; font-family: var(--font-body, "Suisse Intl", Arial, sans-serif); }
.pcase__cta {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; line-height: 1.1;
  border-bottom: 1.5px solid currentColor; padding-bottom: 2px;
  transition: gap 0.35s var(--ease);
}
.pcase__meta:hover .pcase__cta { gap: 14px; }
.pcase__cta svg,
.ptile__btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.pcase__strip {
  display: flex;
  gap: 14px;
  padding: 0 var(--pad-x);
  height: clamp(280px, 34vw, 470px);
}
.ptile {
  position: relative;
  flex: 0 0 auto;
  width: var(--w, 33%);
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  background: #ececec;
}
.ptile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.9s var(--ease); }
.ptile:hover img { transform: scale(1.045); }

.ptile--panel {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 24px;
}
.ptile--lime { background: #eeffa3; }
.ptile--blue { background: #eeffa3; }
.ptile__head { font-size: 14px; text-transform: uppercase; letter-spacing: 0; opacity: 0.7; }
.ptile__foot { display: flex; flex-direction: column; gap: 16px; }
.ptile__t {
  font-family: var(--font-display);
  font-variation-settings: "wght" 0, "opsz" 0;
  text-transform: uppercase;
  font-size: clamp(26px, 2.7vw, 46px);
  line-height: 0.82;
}
.ptile__btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; text-transform: uppercase; letter-spacing: 0;
  transition: gap 0.35s var(--ease);
}
.ptile:hover .ptile__btn { gap: 14px; }

@media (max-width: 760px) {
  .pcase__meta { grid-template-columns: 1fr auto; gap: 6px 14px; row-gap: 4px; }
  .pcase__title { grid-column: 1 / -1; font-size: 20px; order: 2; }
  .pcase__kicker { order: 1; }
  .pcase__tags { order: 3; opacity: 0.62; }
  .pcase__cta { order: 4; }
  .pcase__strip { height: auto; flex-direction: column; }
  .ptile { width: 100% !important; height: clamp(220px, 62vw, 340px); }
}

/* ============================================================
   Проекты v2 — две колонки в шахмат (как главная paaam.ru):
   крупные карточки-картинки, заголовок наложен, параллакс + появление.
   Переопределяет ленточную версию выше.
   ============================================================ */
.cases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3vw, 44px) clamp(20px, 2.4vw, 36px);
  padding: 0 var(--pad-x);
  margin-top: clamp(64px, 9vh, 128px);
  align-items: start;
}
.pcase { margin: 0; }
.pcase:nth-child(even) { margin-top: clamp(56px, 8vw, 128px); }   /* сдвиг правой колонки вниз */

.pc {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: #e7e7e2;
}
.pc__media { display: block; aspect-ratio: var(--ar, 5 / 4); overflow: hidden; transition: transform 0.9s var(--ease); }
.pc:hover .pc__media { transform: scale(1.04); }
.pc__media img {
  width: 100%; height: 122%;
  object-fit: cover; display: block;
  transform: translateY(-9%);
  will-change: transform;
}
.pc__scrim {
  position: absolute; left: 0; right: 0; top: 0; height: 62%;
  background: linear-gradient(180deg, rgba(16, 22, 26, 0.66) 0%, rgba(16, 22, 26, 0.16) 55%, rgba(16, 22, 26, 0) 100%);
  pointer-events: none;
}
.pc__cap {
  position: absolute; top: clamp(18px, 2vw, 28px); left: clamp(20px, 2vw, 30px); right: clamp(20px, 2vw, 30px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
}
.pc__kicker {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0; color: var(--ink);
  padding: 6px 13px; border-radius: 999px; line-height: 1;
}
.pc__kicker--lime { background: #eeffa3; }
.pc__kicker--blue { background: #eeffa3; }
.pc__title {
  font-family: var(--font-display); font-variation-settings: "wght" 0, "opsz" 0;
  text-transform: uppercase; color: #fff;
  font-size: clamp(30px, 3.6vw, 62px); line-height: 0.82;
}
.pc__go {
  position: absolute; left: clamp(20px, 2vw, 30px); bottom: clamp(18px, 1.8vw, 26px);
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 0;
  opacity: 0; transform: translateY(10px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), gap 0.35s var(--ease);
}
.pc__go svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pc:hover .pc__go { opacity: 1; transform: none; }
.pc:hover .pc__go { gap: 14px; }

@media (max-width: 760px) {
  .cases { grid-template-columns: 1fr; gap: 20px; }
  .pcase:nth-child(even) { margin-top: 0; }
  .pc__go { opacity: 1; transform: none; }
}

/* ============================================================
   Проекты v3 — каждый проект на всю ширину (как «Наследие»):
   широкая картинка, кикер сверху, крупное название снизу,
   параллакс + появление, большие отступы. Переопределяет 2-кол.
   ============================================================ */
.cases {
  display: block;
  grid-template-columns: none;
  padding: 0 var(--pad-x);
  margin-top: clamp(64px, 9vh, 128px);
}
.pcase { margin: 0; }
.pcase:nth-child(even) { margin-top: 0; }
.pcase + .pcase { margin-top: 32px; }   /* Ана 21.09: отступ между кейсами на десктопе */

.pc { position: relative; display: block; width: 100%; border-radius: 12px; overflow: hidden; text-decoration: none; color: #fff; background: #e7e7e2; }
.pc__media { display: block; aspect-ratio: var(--ar, 16 / 8); overflow: hidden; transition: transform 0.9s var(--ease); }
.pc:hover .pc__media { transform: scale(1.03); }
.pc__media img { width: 100%; height: 122%; object-fit: cover; display: block; transform: translateY(-9%); will-change: transform; }

.pc__grad {
  position: absolute; left: 0; right: 0; bottom: 0; height: 64%;
  background: linear-gradient(0deg, rgba(14, 20, 24, 0.72) 0%, rgba(14, 20, 24, 0.18) 46%, rgba(14, 20, 24, 0) 100%);
  pointer-events: none;
}
.pc__kicker {
  position: absolute; top: clamp(20px, 2vw, 30px); left: clamp(22px, 2.2vw, 36px);
  font-size: 14px; text-transform: uppercase; letter-spacing: 0; color: var(--ink);
  padding: 7px 15px; border-radius: 999px; line-height: 1;
}
.pc__bar {
  position: absolute; left: clamp(22px, 2.2vw, 36px); right: clamp(22px, 2.2vw, 36px); bottom: clamp(20px, 2.2vw, 34px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
}
.pc__title {
  font-family: var(--font-display); font-variation-settings: "wght" 0, "opsz" 0;
  text-transform: uppercase; color: #fff; letter-spacing: 0;
  font-size: clamp(40px, 6vw, 104px); line-height: 0.82;
}
.pc__go {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: 0;
  transition: gap 0.35s var(--ease);
}
.pc:hover .pc__go { gap: 14px; }
.pc__go svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 760px) {
  .pc__media { aspect-ratio: 4 / 3; }
  .pc__title { font-size: clamp(32px, 10vw, 56px); }
  .pc__bar { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ============================================================
   Проекты v4 — две колонки: слева картинка, справа цветная
   панель (название, описание, кнопка «открыть»). Переопределяет v3.
   ============================================================ */
.pc {
  display: grid;
  grid-template-columns: 2.9fr 1fr;   /* колонка с названием вдвое уже */
  gap: clamp(16px, 1.8vw, 26px);
  align-items: stretch;
  background: none;
  border-radius: 0;
  overflow: visible;
  color: var(--ink);
}
.pc__media { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: #e7e7e2; }
.pc:hover .pc__media { transform: none; }
/* картинка чуть выше рамки для параллакса (translateY ставит cases-fx.js) */
.pc__media img { width: 100%; height: 122%; object-fit: cover; display: block; transform: translateY(-9%); will-change: transform; }

.pc__info {
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  padding: clamp(26px, 2.6vw, 46px);
  border-radius: 12px;
}
.pc__info--lime { background: #eeffa3; }
.pc__info--blue { background: #eeffa3; }

.pc__kicker {
  position: static; align-self: flex-start;
  font-size: 14px; text-transform: uppercase; letter-spacing: 0; color: var(--ink); opacity: 0.62;
  padding: 0; background: none; border-radius: 0; line-height: 1.1;
}
.pc__info-b { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(14px, 1.4vw, 22px); }
.pc__title {
  position: static; font-family: var(--font-display); font-variation-settings: "wght" 0, "opsz" 0;
  text-transform: uppercase; color: var(--ink); letter-spacing: 0;
  font-size: clamp(40px, 4.6vw, 88px); line-height: 0.82;
}
.pc__desc { font-size: clamp(16px, 1.2vw, 21px); line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); max-width: 26ch; }
.pc__btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 15px; text-transform: uppercase; letter-spacing: 0; text-decoration: none;
  transition: gap 0.35s var(--ease);
}
.pc__btn:hover { gap: 16px; }
.pc__btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 760px) {
  .pc { grid-template-columns: 1fr; gap: 14px; }
  .pc__media { aspect-ratio: 16 / 10; }
}

/* ============================================================
   Услуги и стоимость — зиг-заг: центральная линия + шарик едет
   по скроллу, плашки цен появляются по обе стороны (как раньше).
   ============================================================ */
.zig--services { margin-top: clamp(56px, 8vh, 100px); }
.zig--services .zig__list { display: flex; flex-direction: column; gap: clamp(30px, 4.5vw, 80px); }
.zig--services .zig__item { width: 44%; margin: 0; }
.zig--services .zig__item:nth-child(even) { align-self: flex-end; }
.zig--services .plate { opacity: 0; transform: translateY(46px); transition: opacity 0.9s var(--ease), transform 1.2s var(--ease); }
.zig--services .plate.is-in { opacity: 1; transform: none; }

/* без заглавных в плашках (Ана) */
.pc__title, .pc__kicker, .pc__btn { text-transform: none; }

@media (max-width: 760px) {
  .zig--services .zig__item { width: 100%; }
  .zig--services .zig__item:nth-child(even) { align-self: stretch; }
}

/* ============================================================
   Появление кейсов «как Наследие»: картинка проявляется из-под
   маски (клип сверху вниз), панель всплывает следом. На всех.
   ============================================================ */
.pcase { opacity: 1 !important; transform: none !important; }
/* влёт картинки ведёт cases-fx.js по скроллу (сдвиг + поворот + масштаб) */
.pc__media { clip-path: none; opacity: 0; transform-origin: 50% 65%; will-change: transform, opacity; }
.pc__info { opacity: 0; transform: translateY(40px); transition: opacity 0.8s var(--ease) 0.14s, transform 1s var(--ease) 0.14s; }
.pcase.is-in .pc__info { opacity: 1; transform: none; }

/* цифры в прищепках — Lanze толстым начертанием, не гигантские */
.pins .peg__card b { font-variation-settings: "wght" 1000, "opsz" 120; font-size: 48px; }

/* карточка со сферами клиентов — одним блоком, мелким текстом */
.peg__card--spheres { justify-content: center; }
.peg__spheres { display: block; max-width: 300px; font-family: "Suisse Intl", "Inter", Arial, sans-serif; font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); }

/* прищепки: все карточки одного размера */
.peg__card { width: 216px; min-height: 148px; box-sizing: border-box; justify-content: center; left: 50%; right: auto; margin-left: -108px; }   /* карточка по центру пега = прищепка ровно по середине карточки */
.peg__card--spheres { justify-content: center; gap: 8px; }
.peg__stitle { font-family: "Suisse Intl", "Inter", Arial, sans-serif; font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.peg__card--spheres .peg__spheres { max-width: none; font-size: 13px; line-height: 1.32; }

/* единый отступ заголовка от верха во всех блоках */
.services__head2 { margin-top: 0; }
.finale { padding-top: clamp(96px, 14vh, 180px); }

/* блок «Клиенты, с которыми работала» — отдельная секция с единым отступом */
.clients { position: relative; padding: clamp(96px, 14vh, 180px) 0 clamp(120px, 16vh, 200px); background: var(--bg); }
.clients .marquee-wrap { margin-top: clamp(56px, 8vh, 96px); }
/* логотипы крупнее */
.marquee__set img { height: 42px; }
.marquee__set img[src*="lemana"]  { height: 86px; }
.marquee__set img[src*="magnit"]  { height: 42px; }
.marquee__set img[src*="tanuki"]  { height: 42px; }
.marquee__set img[src*="rigla"]   { height: 56px; }
.marquee__set img[src*="s7"]      { height: 56px; }
.marquee__set img[src*="hoff"]    { height: 62px; }
.marquee__set img[src*="cofix"]   { height: 50px; }
.marquee__set img[src*="ozon"]    { height: 36px; }
.marquee__set img[src*="yandex"]  { height: 40px; }

/* услуги: убираем моно-шрифт, ставим наш (Suisse) */
.services .plate__text, .services .plate__title, .services .plate__btn, .services .kicker {
  font-family: "Suisse Intl", "Inter", Arial, sans-serif;
  word-spacing: normal;
  letter-spacing: -0.01em;
}

/* цены: названия обычным шрифтом, цифры обычным и мельче */
.services .plate__title {
  font-family: "Suisse Intl", "Inter", Arial, sans-serif; font-variation-settings: normal;
  font-weight: 600; font-size: 24px; line-height: 1.1; text-transform: none; letter-spacing: -0.01em; white-space: normal;
}
.services .plate__price {
  font-family: "Suisse Intl", "Inter", Arial, sans-serif; font-variation-settings: normal;
  font-weight: 500; font-size: 34px; line-height: 1.0; letter-spacing: -0.02em; white-space: normal;
}
.services .plate__text { font-size: 20px; line-height: 1.25; }

/* небо-картинка одна на два блока: прищепки + клиенты */
.sky {
  background: #a8a473 url("assets/sky-hills.jpg") center top / cover no-repeat;
  background-image: url("assets/sky-hills.webp");
}
.sky > .pins, .sky > .clients { background: transparent; min-height: 0; }
.sky > .pins { padding-bottom: clamp(40px, 6vh, 80px); }
.clients { color: #fff; }
.clients .kicker { color: #fff; opacity: 0.85; }

/* цены: плашки уже и прижаты к центральной линии зигзага */
.zig--services .zig__item { width: 33%; align-self: auto; }
.zig--services .zig__item:nth-child(odd)  { margin-left: calc(50% - 33% - 2.5%); margin-right: 0; }
.zig--services .zig__item:nth-child(even) { margin-left: calc(50% + 2.5%); margin-right: 0; }
@media (max-width: 860px) {
  .zig--services .zig__item,
  .zig--services .zig__item:nth-child(odd),
  .zig--services .zig__item:nth-child(even) { width: 100%; margin-left: 0; }
}

/* сброс align-self, чтобы правые плашки шли по margin-left, а не к краю */
.zig--services .zig__item:nth-child(odd),
.zig--services .zig__item:nth-child(even) { align-self: flex-start; }

/* клиенты на небе: единый зазор на стыке (не два паддинга) + лого не раздутые */
.sky > .clients { padding-top: clamp(40px, 6vh, 80px); padding-bottom: clamp(44px, 6.5vh, 92px); }
.clients .marquee-wrap { margin-top: clamp(28px, 4vh, 48px); }
.clients .marquee__set img            { height: 28px; }
.clients .marquee__set img[src*="lemana"] { height: 50px; }
.clients .marquee__set img[src*="magnit"] { height: 28px; }
.clients .marquee__set img[src*="tanuki"] { height: 28px; }
.clients .marquee__set img[src*="rigla"]  { height: 34px; }
.clients .marquee__set img[src*="s7"]     { height: 34px; }
.clients .marquee__set img[src*="hoff"]   { height: 38px; }
.clients .marquee__set img[src*="cofix"]  { height: 32px; }
.clients .marquee__set img[src*="ozon"]   { height: 24px; }
.clients .marquee__set img[src*="yandex"] { height: 26px; }

/* бренды выше на 100px: двигаем весь блок (заголовок+лого), небо на .sky не трогаем */
.sky > .clients { transform: translateY(-100px); }

/* цены: карточки шире (40%) и прилеплены к краям блока, не к центру */
.zig--services .zig__item { width: 40%; }
.zig--services .zig__item:nth-child(odd)  { margin-left: 0;    margin-right: 0; align-self: flex-start; }
.zig--services .zig__item:nth-child(even) { margin-left: auto; margin-right: 0; align-self: flex-start; }

/* лого клиентов — чисто белые, без стеклянной плашки под ними */
.clients .marquee__set span { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0 26px; height: 64px; }
.clients .marquee__set img { opacity: 1; filter: brightness(0) invert(1); }

.clients .marquee__set img[src*="iledebeaute"] { height: 26px; }

/* кнопки по макету 157:4: радиус 20, кремовая заливка #fbffee, рамка 1px чёрная */
.pc__btn, .plate__btn {
  border-radius: 12px;
  background: #324246;
  border: none;
  color: #fbffee;
}
.pc__btn:hover, .plate__btn:hover { background: #263236; color: #fbffee; }
.pc__btn svg { stroke: currentColor; }

/* проекты: плашка под картинку — картинка целиком, ничего не режется */
.pc__media { aspect-ratio: 16 / 9; background: #e7e7e2; }
.pc__media img { height: 100%; transform: none; object-fit: contain; }

/* панель проекта по макету 157:10: паддинг 24, кнопка во всю ширину блока снизу */
.pc__info { padding: 24px; }
.pc__btn { width: 100%; justify-content: center; box-sizing: border-box; }
/* картинка заполняет плашку проекта целиком (как эталон image 22) */
.pc__media img { object-fit: cover; }

/* плашка проекта всегда = высоте карточки, картинка заполняет без серой полосы */
.pc { align-items: stretch; }
.pc__media { aspect-ratio: auto; height: 100%; min-height: 100%; background: transparent; }
.pc__media img { width: 100%; height: 100%; object-fit: cover; }

/* картинка проекта: ровно, без сдвига вверх, заполняет плашку целиком (перебиваем всё) */
.pc__media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  transform: none !important;
}
.pc__media { background: transparent !important; }

/* финал как trebuchet: слева большой заголовок + контакты, справа форма */
.finale__cta {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 5vw, 90px);
  align-items: end;
  padding: 0 var(--pad-x);
}
.finale__left { display: flex; flex-direction: column; align-items: flex-start; }
.finale__title { width: 100%; margin: 0; text-align: left; }
.finale__contacts { margin-top: clamp(24px, 3vh, 44px); }
.finale__form { grid-column: auto; }
@media (max-width: 860px) {
  .finale__cta { grid-template-columns: 1fr; gap: 40px; align-items: start; }
}

/* форма: без поля задачи; кнопка тёмная r12 во всю ширину */
.form__btn {
  grid-column: 1 / -1;
  width: 100%;
  justify-self: stretch;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 12px;
  background: #eeffa3; color: #324246;
  padding: 18px 24px;
}
.form__btn:hover, .form__btn:focus-visible { background: #e2f77e; color: #324246; }
.form__note[hidden] { display: none; }

/* заголовок финала крупнее (x3), задаётся в CSS вместо JS */
.finale__title { line-height: 0.8; }

/* кнопка «Обсудить проект» на плашках цен — во всю ширину плашки */
.services .plate__btn { width: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; align-self: stretch; }

/* финал: меньше запас маски у строк, чтобы крупный заголовок влез в экран */
.finale__title .line { padding: 0.2em 0; margin: -0.2em 0; }

/* +200px сверху всего финал-блока (отступ перед блоком), остальное на месте */
.finale { margin-top: 100px; }

/* контакты финала — по сетке (левое поле как у заголовка и подвала) */
.finale__contacts { padding: 0 var(--pad-x); }

/* почту поднять на 10px */
.finale__contacts .finale__link:nth-child(2) { margin-top: -10px; }

/* логотипы клиентов — на сплошных БЕЛЫХ плашках, в тёмном виде (без прозрачности) */
.clients .marquee__set span {
  background: #fff;
  border-radius: 12px;
  padding: 0 22px;
  height: 64px;
}
.clients .marquee__set img { filter: none !important; opacity: 1 !important; }

/* форму с кнопкой поднять на 20px */
.finale__form { margin-bottom: 30px; }

/* лого клиентов: белые, БЕЗ плашки (Ана) */
.clients .marquee__set span { background: none !important; }
.clients .marquee__set img { filter: brightness(0) invert(1) !important; opacity: 1 !important; }

.clients .marquee__set img[src*="beeline"] { height: 30px; }

/* пластилиновая собака в финале (справа, как в макете) */
.finale { position: relative; }
.finale__dog {
  position: absolute;
  top: clamp(40px, 9vh, 120px);
  right: clamp(20px, 4vw, 90px);
  width: clamp(160px, 20vw, 280px);
  height: auto;
  z-index: 3;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 860px) { .finale__dog { width: 130px; top: 20px; right: 12px; } }

/* собака: крупнее, центр по вертикали кнопки, за формой */
.finale__dog { top: auto; bottom: 231px; transform: translateY(50%); width: clamp(200px, 24vw, 340px); z-index: 1; }
.finale__form { position: relative; z-index: 2; }
.finale__contacts, .finale .footer { position: relative; z-index: 2; }

/* собака: выше, над формой, полностью видна */
.finale__dog { top: clamp(30px, 7vh, 100px); bottom: auto; transform: none; right: clamp(20px, 4vw, 90px); width: clamp(200px, 22vw, 320px); z-index: 3; }

/* собака: над формой, сдвинута влево (Ана) */
.finale__dog { top: clamp(20px, 5vh, 80px); right: clamp(150px, 17vw, 320px); width: clamp(200px, 22vw, 320px); z-index: 3; }

/* небо-карточки на местах 2,4,5 в ценах (Figma 164:78) */
.zig--services .plate--sky {
  position: relative;
  min-height: 320px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  background-image: url("assets/sky2.jpg");
  background-size: 200% auto;
  background-repeat: no-repeat;
  text-decoration: none;
}
.zig--services .plate--sky2 { background-position: 20% 8%; }
.zig--services .plate--sky4 { background-position: 60% 62%; }
.zig--services .plate--sky5 { background-position: 92% 78%; }
.zig--services .plate--sky .plate__btn { width: 100%; margin: 0; }

/* ===== небо-карточки цен: белый текст, кнопка снизу (Figma 164:78) ===== */
.zig--services .plate--sky {
  position: relative;
  min-height: 320px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  background-image: url("assets/sky2.jpg");
  background-size: 210% auto;
  background-repeat: no-repeat;
  text-decoration: none;
}
/* картинка отражена по горизонтали: флипаем контейнер, контент возвращаем */
.zig--services .plate--sky { transform: scaleX(-1); }
.zig--services .plate--sky::before { content: none; }
.zig--services .plate__body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; transform: scaleX(-1); }
.zig--services .plate--sky .plate__title { color: #fff; font-size: 30px; font-weight: 600; line-height: 1.05; letter-spacing: -0.01em; }
.zig--services .plate--sky .plate__price { color: #fff; font-size: 46px; line-height: 1; font-family: "Suisse Intl","Inter",Arial,sans-serif; }
.zig--services .plate--sky .plate__num { font-family: "Suisse Intl","Inter",Arial,sans-serif !important; font-variation-settings: normal !important; font-weight: 500; }
.zig--services .plate--sky .plate__text { color: #fff; font-size: 22px; line-height: 1.2; text-wrap: balance; max-width: 96%; }
.zig--services .plate--sky .plate__btn { position: relative; z-index: 1; width: 100%; margin: 0; transform: scaleX(-1); }
.zig--services .plate--sky1 { background-position: 8% 6%; }
.zig--services .plate--sky2 { background-position: 34% 22%; }
.zig--services .plate--sky3 { background-position: 58% 42%; }
.zig--services .plate--sky4 { background-position: 80% 62%; }
.zig--services .plate--sky5 { background-position: 96% 84%; }

/* ===== ФИНАЛ: небо-карточки цен — картинка отражена, текст прямой, без тени ===== */
.zig--services .plate--sky { transform: none !important; position: relative; overflow: hidden; background: none !important; }
.zig--services .plate--sky::before {
  content: "" !important;
  position: absolute; inset: 0; z-index: 0;
  background-image: url("assets/sky2.jpg");
  background-size: 210% auto;
  background-repeat: no-repeat;
  background-position: 34% 22%;
  transform: scaleX(-1);
}
.zig--services .plate--sky1::before { background-position: 8% 6%; }
.zig--services .plate--sky2::before { background-position: 34% 22%; }
.zig--services .plate--sky3::before { background-position: 58% 42%; }
.zig--services .plate--sky4::before { background-position: 80% 62%; }
.zig--services .plate--sky5::before { background-position: 96% 84%; }
.zig--services .plate__body { transform: none !important; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; }
.zig--services .plate--sky .plate__btn { transform: none !important; position: relative; z-index: 1; width: 100%; margin: 0; }
.zig--services .plate--sky .plate__title { color: #fff; font-size: 28px; font-weight: 600; line-height: 1.05; letter-spacing: -0.01em; }
.zig--services .plate--sky .plate__price { color: #fff; font-size: 31px; line-height: 1; font-family: "Suisse Intl","Inter",Arial,sans-serif; }
.zig--services .plate--sky .plate__num { font-family: "Suisse Intl","Inter",Arial,sans-serif !important; font-variation-settings: normal !important; font-weight: 500; }
.zig--services .plate--sky .plate__text { color: #fff; font-size: 19px; line-height: 1.2; text-wrap: balance; max-width: 96%; }

/* ===== мобильные правки секций (Ана 19.09) ===== */
@media (max-width: 760px) {
  /* заголовки блоков крупнее в 1.5 раза, с переносом строк без наезда (lh 90%) */
  .h { font-size: 22.5vw; line-height: 0.9; white-space: normal; }
  /* меньше расстояние между проектами */
  .cases { margin-top: 40px; }
  .pcase + .pcase { margin-top: 42px; }
  /* собака — по центру НАД заголовком; финалу добавляем место сверху (низ опускаем),
     чтобы собака не заходила ни на предыдущий блок, ни на заголовок */
  .finale { padding-top: 258px; }
  .finale__dog {
    top: -30px; bottom: auto; left: 50%; right: auto;
    transform: translateX(-50%); width: 262px; z-index: 5;
  }
}

/* карточки услуг: текст на 1.2 меньше ТОЛЬКО на мобилке (десктоп без изменений) */
@media (max-width: 760px) {
  .zig--services .plate--sky .plate__title { font-size: 23px; }
  .zig--services .plate--sky .plate__price { font-size: 26px; }
  .zig--services .plate--sky .plate__text  { font-size: 16px; }
}

/* ===== прищепки и логотипы: свайп-листание + автопрокрутка на transform (GPU, без лагов) ===== */
.rope, .marquee { overflow: hidden; cursor: grab; touch-action: pan-y; }
.rope.grabbing, .marquee.grabbing { cursor: grabbing; }
.rope.grabbing .rope__track, .marquee.grabbing .marquee__track,
.rope.grabbing .peg, .rope.grabbing .peg__card { user-select: none; }
.rope__track { animation: none !important; will-change: transform; }
.marquee__track { animation: none !important; will-change: transform; }

/* мобилка: без тяжёлого backdrop-blur у пилюль логотипов и карточек прищепок (лаги при движении) */
@media (max-width: 760px) {
  .marquee__set span { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: rgba(255, 255, 255, 0.22); }
  .peg__card { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}

/* мобилка: лёгкое размытие у стеклянных плашек услуг на видео (тяжёлое пересчитывалось при скролле → дёргания) */
@media (max-width: 760px) {
  .chip__in { -webkit-backdrop-filter: blur(5px) !important; backdrop-filter: blur(5px) !important; }
}


/* ===== небо-карточки: положение картинки ровно как в Figma 164:78 (Ана 23.09) =====
   картинка без отражения; размер — доля высоты карточки 320 из макета, сдвиг — доля
   размера самой картинки (translate %) от ПРАВОГО края — на мобиле карточка выше/уже, фон не оголяется,
   а облака и дерево (они у правого края) не уезжают.
   В макете 3 варианта: 1 — облака, 2 — дерево, 3 — холмы; карточки 4–5 повторяют 1–2 */
.zig--services .plate--sky::before {
  right: 0 !important; top: 0 !important; left: auto !important; bottom: auto !important;
  height: var(--sky-h);
  width: auto;
  aspect-ratio: 1672 / 941;
  background-image: url("assets/sky2.jpg");
  background-size: 100% 100% !important;
  background-position: 0 0 !important;
  transform: translate(var(--sky-tx), var(--sky-ty)) !important;
}
/* Figma: картинка 1375×774 @ (−793, −146) и 2054×1156 @ (−1464, −740) / (−1001, −779) в карточке 546×320 */
.zig--services .plate--sky1, .zig--services .plate--sky4 { --sky-h: 241.88%; --sky-tx: 2.62%; --sky-ty: -18.86%; }
.zig--services .plate--sky2, .zig--services .plate--sky5 { --sky-h: 361.25%; --sky-tx: 2.14%; --sky-ty: -64.01%; }
.zig--services .plate--sky3 { --sky-h: 361.25%; --sky-tx: 24.68%; --sky-ty: -67.39%; }

/* небо-карточки: текст ×1.2 только на десктопе (Ана 23.09): заголовок 28→33.6, описание 19→22.8; мобила без изменений */
@media (min-width: 761px) {
  .zig--services .plate--sky .plate__title { font-size: 31px; }  /* было 33.6 — Ана: «слишком сильно», теперь ×1.1 от исходных 28/19 */
  .zig--services .plate--sky .plate__text { font-size: 21px; }
}

/* ===== прищепки на мобиле — карточки меньше на 20 % (Ана 23.09): 216×148 → 172×118, текст пропорционально ===== */
@media (max-width: 760px) {
  .rope { height: 270px; --rope-gap: 36px; }
  .peg { width: 152px; height: 200px; }
  .peg__card { width: 172px; min-height: 118px; margin-left: -86px; padding: 16px 16px 14px; }
  .pins .peg__card b, .peg__card b { font-size: 38px; }
  .peg__card span { font-size: 15px; }
  .peg__stitle { font-size: 14px; }
  .peg__card--spheres .peg__spheres { font-size: 12px; line-height: 1.25; }
}

/* небо-карточки на мобиле чуть меньше (Ана 23.09): высота 320 → 272, поля 26 → 20 */
@media (max-width: 760px) {
  .zig--services .plate--sky { min-height: 272px; padding: 20px; }
}

/* собака на ДЕСКТОПЕ крупнее ×1.25 (Ана 23.09): 22vw (316 при 1440) → 27.5vw (396), max 320 → 400;
   top и right не меняются — растёт вниз (и влево от правого края). Мобила без изменений */
@media (min-width: 761px) {
  .finale__dog { width: clamp(250px, 27.5vw, 400px); }
}

/* собака на десктопе ещё больше и ниже (Ана 23.09): 27.5vw → 30.5vw (440 при 1440), top 5vh → 9.5vh (85 при 900);
   низ собаки держим над подписями формы */
@media (min-width: 761px) {
  .finale__dog {
    width: 420px; /* Ана 23.09: «пусть 420 будет» — фиксированно на десктопе */
    top: clamp(50px, 9.5vh, 120px);
    right: calc(clamp(150px, 17vw, 320px) - 40px); /* правее на 40 px (Ана 23.09) */
  }
}

/* ============================================================
   Сетка 07.10.2026 — финальный слой привязки.
   Все отступы секций, гэпы и ширины блоков берутся из токенов
   в styles.css: B = 22, шаг B/2 = 11, --cols 12/8/4, --g, --m,
   ритм --sec / --kick / --head / --item. Слой стоит последним
   и перебивает исторические значения выше (их не трогала, чтобы
   не задеть механику). Ширина блока = span(n) колонок сетки.
   ============================================================ */

/* --- ритм секций: одинаковый паддинг сверху и снизу --- */
.projects, .services, .clients { padding: var(--sec) 0; }
.sky > .pins { padding: var(--sec) 0 0; }                         /* небо одно на два блока: зазор на стыке = один --sec */
.sky > .clients { padding: var(--sec) 0; transform: none; }       /* вместо translateY(−100px): тот же подъём честным отступом */
.finale { margin-top: 88px; padding: var(--sec) 0 var(--m); }     /* +88 воздуха перед финалом (просьба Аны «+отступ перед блоком») */

/* --- кикер → заголовок → контент --- */
.kicker { margin-bottom: var(--kick); }
.projects__head .h { padding-top: 0; }
.h { display: flow-root; line-height: 0.9; text-wrap: balance; }   /* все заголовки 90 %; flow-root — маска строк (.line, −0.22em) не схлопывается наружу */
.cases { margin-top: var(--head); }
.zig--services { margin-top: var(--head); }
.clients .marquee-wrap { margin-top: var(--head); padding-top: 0; }
.rope { margin-top: calc(var(--head) - 44px); height: 264px; }     /* верёвка (линия на 44) = --head от заголовка */
.rope__line { top: 44px; }
.peg { margin-top: 22px; transform-origin: 50% 22px; }

/* --- проекты: раскладка карточки Аны без изменений (картинка 2.9fr + панель 1fr, её гэп и кроп);
       к сетке привязаны только внутренние отступы панели и шаг между кейсами --- */
.pcase + .pcase { margin-top: 33px; }                              /* было 32 (Ана 21.09) → 3 × 11 */
.pc__title { line-height: 0.9; text-wrap: balance; }
.pc__desc { line-height: 1.1; text-wrap: pretty; }
.plate__btn { padding: 11px 22px; line-height: 22px; }   /* кнопка плашки услуг: высота 44 = 2B (кнопка проектов — как у Аны, от неё зависит ширина картинки) */

/* --- цифры на прищепках --- */
.peg__card { padding: 22px; gap: 11px; }
.pins .peg__card b, .peg__card b { line-height: 0.9; }
.peg__spheres, .peg__card--spheres .peg__spheres { line-height: 1.1; text-wrap: pretty; }
.rope__track { --rope-gap: 132px; }
.marquee__set { gap: 22px; padding-right: 22px; }
.clients .marquee__set span { height: 66px; }

/* --- услуги: логика Аны — плашки по очереди у левого и правого края, по одной в ряду;
       к сетке привязаны только ширина (5 колонок вместо 40 %) и шаг между плашками --- */
.zig--services .plate,
.zig--services .plate--sky { padding: 22px; gap: 22px; }
.zig--services .plate__body { gap: 11px; }
.zig--services .plate--sky .plate__text { line-height: 1.1; }
.zig--services .zig__list { gap: 66px; }                           /* было clamp(30, 4.5vw, 80) = 65 при 1440 */
@media (min-width: 861px) {
  .zig--services .zig__item { width: calc((100% - (var(--cols) - 1) * var(--g)) / var(--cols) * 5 + 4 * var(--g)); }
}
@media (min-width: 861px) and (max-width: 1023px) {
  .zig--services .zig__item { width: calc((100% - (var(--cols) - 1) * var(--g)) / var(--cols) * 3 + 2 * var(--g)); }
}
@media (max-width: 860px) {
  .zig--services .zig__list { gap: 33px; }                         /* было 30 */
}

/* --- финал: заголовок 6 колонок, колонка воздуха, форма 5 колонок --- */
.finale__cta { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--g); row-gap: var(--head); }
.finale__title { grid-column: 1 / span 6; line-height: 0.9; }
.finale__form { grid-column: 8 / span 5; margin-bottom: 33px; }    /* низ кнопки на базовой линии заголовка */
.finale__contacts { margin-top: 22px; gap: 0; }
.finale__contacts .finale__link:nth-child(2) { margin-top: 0; }
.form { column-gap: 44px; row-gap: 22px; }
.form__field { gap: 11px; }
.form__input { padding: 11px 0; }
.form__btn { padding: 22px; line-height: 22px; }
.footer { margin-top: 44px; }
@media (max-width: 860px) {
  .finale__title, .finale__form { grid-column: 1 / -1; }
}
/* 861–1199: собака 420 закрывала подписи формы — на узком десктопе меньше */
@media (min-width: 861px) and (max-width: 1199px) {
  .finale__dog { width: 297px; }
}


/* --- мобила ≤760 (4 колонки) --- */
@media (max-width: 760px) {
  .pcase + .pcase { margin-top: 44px; }                          /* было 42 (Ана) → 4 × 11 */
  .finale { padding-top: 264px; }                                  /* место под собаку над заголовком (Ана 23.09) */
  .footer { margin-top: 66px; row-gap: 11px; }
  .rope__track { --rope-gap: 33px; }
  .peg__card { padding: 11px; }
  .marquee__set { gap: 11px; padding-right: 11px; }
  .marquee-wrap, .clients .marquee-wrap { padding-top: 0; }
  .zig--services .plate--sky { padding: 22px; }
}

/* --- добивка привязки: кнопки, подвал, мобильная линия зигзага --- */
.kicker { display: flow-root; }                                   /* маска строки не схлопывает отступ кикера */
.footer { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--g); row-gap: 0; }
.footer__copy { grid-column: 1 / span 2; }
.footer__name { grid-column: 3 / span 6; }                         /* колонка 3 = линия меню «{ проекты }» из макета */
.footer__up { grid-column: -4 / -1; padding-right: 66px; }        /* не уходит под круглую кнопку «наверх» (54 + 12) */
@media (max-width: 760px) {
  .footer__copy, .footer__name, .footer__up { grid-column: 1 / -1; padding-right: 0; }
  .footer { row-gap: 11px; }
  .zig { padding-left: calc(var(--m) + 22px); }                   /* линия слева, плашки с отступом (как было: 24 → 22) */
}
/* бокс заголовка = от линии прописных до базовой: у Lanze (asc .82 / desc .18) при 90 % прописные
   торчат над строкой на .05em, под базовой ещё .13em — компенсируем, чтобы --kick и --head были видимыми зазорами */
.h, .projects__head .h { padding-top: 0.05em; margin-bottom: -0.13em; }

/* собака не наезжает на форму/заголовок (07.10): после сетки форма поднялась.
   ≥1200 — собака 420, финал вытягивается, чтобы форма была ниже собаки; 761–1199 — как на мобиле: по центру над заголовком */
@media (min-width: 1200px) {
  /* собака остаётся 420 (Ана), вместо уменьшения блок финала выше на нужное место: низ формы на линии низа заголовка */
  .finale__cta { min-height: calc(clamp(50px, 9.5vh, 120px) + 420px + 22px + 192px - 132px + 22px); }
}
@media (min-width: 761px) and (max-width: 1199px) {
  .finale { padding-top: 286px; }
  .finale__dog { top: -30px; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); width: 262px; z-index: 5; }
}
