/* =========================================================================
   IS STUDIO — base.css
   Единицы: em. Корень масштабируется от ширины окна:
     десктоп (макет 1440) → 1em = 16px макета при 1440px окна
     мобайл  (макет 375)  → 1em = 16px макета при 375px окна
   Пересчёт: px макета / 16 = em (если у элемента нет своего font-size).
   У текстовых элементов со своим кеглем отступы НЕ задаём — только у обёрток.
   Токены цвета — из UI Kit макета (2020:11).
   ========================================================================= */

/* ---------- шрифты: свои файлы (assets/fonts), те же, что отдаёт Google Fonts; вариативные — один файл на все начертания ---------- */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300; font-display: swap; src: url(../assets/fonts/cormorant-garamond-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300; font-display: swap; src: url(../assets/fonts/cormorant-garamond-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300; font-display: swap; src: url(../assets/fonts/cormorant-garamond-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300; font-display: swap; src: url(../assets/fonts/cormorant-garamond-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/cormorant-garamond-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/cormorant-garamond-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/cormorant-garamond-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/cormorant-garamond-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 300; font-display: swap; src: url(../assets/fonts/manrope-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 300; font-display: swap; src: url(../assets/fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 300; font-display: swap; src: url(../assets/fonts/manrope-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 300; font-display: swap; src: url(../assets/fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/manrope-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/manrope-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/manrope-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/manrope-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: dark;                         /* сайт однотемный, тёмный */
  --bg: #0f0f10;                              /* bg/primary */
  --light: #f3eee7;                           /* bg/light, text/primary, border/light */
  --ink: #0f0f10;                             /* text/inverse */
  --text: #f3eee7;
  --text-80: rgba(243, 238, 231, .8);         /* text/secondary */
  --text-60: rgba(243, 238, 231, .6);         /* text/tertiary */
  --border: rgba(243, 238, 231, .6);          /* border/default */
  --divider: rgba(243, 238, 231, .2);         /* border/divider */
  --divider-strong: rgba(243, 238, 231, .4);  /* border/divider-strong */
  --overlay: rgba(15, 15, 16, .5);            /* overlay/50 */
  --gold-solid: #c9a24a;                      /* accent/gold — ховеры, активные пункты */
  --gold: linear-gradient(90deg, #f5bb5f 0%, #fce0b4 100%); /* градиент в заголовках */
  --error: #d9705f;                           /* feedback/error */

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* моушн-токены: «дорого и спокойно» */
  --ease-out: cubic-bezier(.16, 1, .3, 1);      /* expo-out — основные входы */
  --ease-soft: cubic-bezier(.22, 1, .36, 1);    /* quint-out — прозрачность */
  --ease-in: cubic-bezier(.55, 0, .75, .06);    /* выходы */
  --ease-io: cubic-bezier(.65, 0, .35, 1);      /* шторки */
  --ease-ui: cubic-bezier(0, 0, .2, 1);         /* ease-out для ховеров (спека: 200 мс) */
  --ease-btn: cubic-bezier(.3, .1, .3, 1);      /* инверсия кнопки: ровное перетекание цвета, без рывка в начале */
  --ease-reveal: cubic-bezier(.33, 1, .68, 1);  /* шторки-появления картинок: ровнее expo, движение видно целиком */
  --t-ui: .2s;
  --t-hover: .2s;          /* совместимость со стилями страниц */
  --t-hover-out: .2s;
  --t-reveal: 1.2s;

  --pad: 2.5em;            /* боковое поле 40px */
  --header-h: 5.75em;      /* 92px — над первым экраном */
  --header-h-s: 4.5em;     /* 72px — после прокрутки */
}

/* ---------- масштаб ---------- */
html { font-size: 1.1111vw; }                       /* 16 / 1440 */
@media (max-width: 767.98px) {
  html { font-size: 4.2667vw; }                     /* 16 / 375 */
  :root { --pad: 1em; --header-h-s: 4em; }          /* 64px */
}
/* телефон в альбомной ориентации: масштаб от ширины давал шапку в треть экрана и гигантский текст —
   здесь масштаб ограничен высотой окна (как у телефона шириной ~375) */
@media (max-width: 767.98px) and (orientation: landscape) and (max-height: 500px) {
  html { font-size: min(4.2667vw, 4.4vh); }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; }   /* ширина страницы не прыгает, когда прокрутка блокируется */
body {
  margin: 0;
  font-size: 1em;
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: -.02em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  /* короткая страница в высоком окне (планшет в портрете): футер прижат к низу, пустой полосы под ним нет */
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh;
}
body > main { flex: 1 0 auto; }
body > main, body > footer { width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
a, button, label, summary, [role="button"] { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
/* фото и видео нельзя перетащить, выделить или сохранить долгим нажатием */
img, video, picture {
  -webkit-user-drag: none; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none;
}
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; }
:focus { outline: none; }
:focus-visible { outline: 1px solid var(--light); outline-offset: .25em; }   /* спека: 1px border/light, отступ 4px */
::selection { background: var(--light); color: var(--ink); }
[hidden] { display: none !important; }

.nowrap { white-space: nowrap; }
.mob-only { display: none; }
@media (max-width: 767.98px) {
  .desk-only { display: none; }
  .mob-only { display: initial; }
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.page-top { padding-top: var(--header-h); }

/* ---------- типографика (стили из макета) ---------- */
.t-display { font: 300 8.5em/1 var(--serif); letter-spacing: 0; }                    /* 136 */
.t-h1      { font: 300 5em/1.17 var(--serif); letter-spacing: 0; text-transform: uppercase; }   /* 80 */
.t-h2      { font: 500 2.75em/1.17 var(--serif); letter-spacing: -.02em; text-transform: uppercase; } /* 44 */
.t-h3      { font: 500 1.75em/1.17 var(--serif); letter-spacing: -.02em; text-transform: uppercase; } /* 28 */
.t-lead    { font: 400 1.25em/1.4 var(--sans); letter-spacing: -.02em; }            /* 20 */
.t-tagline { font: 400 1.625em/1.1 var(--sans); letter-spacing: -.02em; }           /* 26 */
.t-title-m { font: 500 1.5em/1.1 var(--sans); letter-spacing: -.02em; }             /* 24 */
.t-title-s { font: 500 1.25em/1.4 var(--sans); letter-spacing: -.02em; }            /* 20 */
.t-body    { font: 300 1em/1.4 var(--sans); letter-spacing: -.02em; }               /* 16 */
.t-body-l  { font: 400 1.125em/1.4 var(--sans); letter-spacing: -.02em; }           /* 18 */
.t-nav     { font: 500 .9375em/1.4 var(--sans); letter-spacing: -.02em; text-transform: uppercase; } /* 15 */
.t-small   { font: 400 .875em/1.4 var(--sans); letter-spacing: -.02em; }            /* 14 */
.t-btn     { font: 400 .875em/1.1 var(--sans); letter-spacing: -.02em; text-transform: uppercase; } /* 14 */
.t-legal   { font: 400 .75em/1.1 var(--sans); letter-spacing: -.02em; }             /* 12 */

@media (max-width: 767.98px) {
  .t-display { font-size: 3.75em; }   /* 60 */
  .t-h1      { font-size: 2.5em; }    /* 40 */
  .t-h2      { font-size: 1.9375em; } /* 31 — Mobile/H2 */
  .t-h3      { font-size: 1.5em; }    /* 24 */
  .t-lead    { font-size: 1.125em; }  /* 18 */
  .t-tagline { font-size: 1.125em; line-height: 1.4; } /* 18 */
}

.gold, .gold-in {
  background: var(--gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gold-solid { color: var(--gold-solid); }

/* =========================================================================
   ССЫЛКИ И КНОПКИ — спека «Ховеры и фокусы» (2031:321):
   все переходы 200 мс ease-out; на тёмном фоне ссылки и иконки → золото;
   на светлом — без золота, через подчёркивание; фокус = hover + обводка.
   ========================================================================= */
.gold-link, .nav-link { transition: color var(--t-ui) var(--ease-ui); }
@media (hover: hover) { .gold-link:hover, .nav-link:hover { color: var(--gold-solid); } }
.gold-link:focus-visible, .nav-link:focus-visible { color: var(--gold-solid); }

/* пункт меню: активный — золото и точка 5px */
.nav-link { position: relative; display: inline-block; font: 500 .9375em/1.4 var(--sans); letter-spacing: -.02em; text-transform: uppercase; }
.nav-link.is-active { color: var(--gold-solid); }
/* точка стоит слева от слова и не сдвигает пункты (5px, отступ 8) */
.nav-link.is-active::before { content: ""; position: absolute; right: calc(100% + .5333em); top: 50%; width: .3333em; height: .3333em; margin-top: -.1667em; border-radius: 50%; background: currentColor; }

/* совместимость: старый класс .link-line ведёт себя как золотая ссылка */
.link-line { transition: color var(--t-ui) var(--ease-ui); }
@media (hover: hover) { .link-line:hover { color: var(--gold-solid); } }
.link-line:focus-visible { color: var(--gold-solid); }

/* «Подробнее» на светлом: подчёркивание уходит слева направо (300 мс), текст остаётся тёмным */
.more-link { position: relative; display: inline-block; padding-bottom: .2857em; color: var(--ink); }
.more-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform-origin: 100% 50%;
  transition: transform .3s var(--ease-ui);
}
@media (hover: hover) { .more-link:hover::after { transform: scaleX(0); } }
.more-link:focus-visible::after { transform: scaleX(0); }
.more-link:focus-visible { outline-color: var(--ink); }

/* иконки соцсетей — маской, чтобы краситься в золото */
.icon-link {
  display: block; width: 2em; height: 2em; flex: none;
  background: var(--light);
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  transition: background-color var(--t-ui) var(--ease-ui);
}
@media (hover: hover) { .icon-link:hover { background-color: var(--gold-solid); } }
.icon-link:focus-visible { background-color: var(--gold-solid); }

/* кнопка: hover — инверсия (кремовый фон, тёмный текст и стрелка) */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .75em;
  height: 3.625em; padding: 0 .9375em;
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
  /* инверсия: уход быстрее (.35s), приход спокойнее (.55s) — в тон остальному движению сайта */
  --btn-t: .4s;
  transition: background-color var(--btn-t) var(--ease-btn), color var(--btn-t) var(--ease-btn), border-color var(--btn-t) var(--ease-btn), opacity var(--t-ui) var(--ease-ui);
}
.btn--sm { height: 2.875em; }                     /* 46 */
.btn__label { font: 400 .875em/1.1 var(--sans); letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap; }
.btn__arrow {
  width: .875em; height: .5em; flex: none;         /* 14 × 8 */
  background: currentColor;
  -webkit-mask: url(../assets/img/arrow.svg) center / 100% 100% no-repeat;
  mask: url(../assets/img/arrow.svg) center / 100% 100% no-repeat;
  transition: transform var(--btn-t, .35s) var(--ease-btn);
}
.btn__spinner {
  display: none; width: .875em; height: .875em; flex: none;
  background: currentColor;
  -webkit-mask: url(../assets/img/ui/spinner.svg) center / 100% 100% no-repeat;
  mask: url(../assets/img/ui/spinner.svg) center / 100% 100% no-repeat;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (hover: hover) {
  .btn:hover { --btn-t: .55s; background-color: var(--light); border-color: var(--light); color: var(--ink); }
  .btn:hover .btn__arrow { transform: translateX(.25em); }
}
.btn:focus-visible { background-color: var(--light); border-color: var(--light); color: var(--ink); }
.btn:disabled, .btn.is-disabled { opacity: .4; pointer-events: none; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn__arrow { display: none; }
.btn.is-loading .btn__spinner { display: block; }

/* =========================================================================
   ЛОГОТИП
   ========================================================================= */
.logo-inline { display: inline-flex; align-items: center; gap: .5em; }
.logo-inline__mark { width: 3.6243em; height: 3.6243em; }          /* 58 */
.logo-inline__word { width: 5.5625em; height: 1.9248em; }          /* 89 × 30.8 */
.logo-inline--footer { gap: .7924em; }                             /* 12.68 */
.logo-inline--footer .logo-inline__mark { width: 4.8125em; height: 4.8125em; } /* 77 */
.logo-inline--footer .logo-inline__word { width: 8.7523em; height: 3.0286em; } /* 140 × 48.5 */
@media (max-width: 767.98px) {
  .logo-inline { gap: .338em; }
  .logo-inline__mark { width: 2.0531em; height: 2.0531em; }        /* 32.85 */
  .logo-inline__word { width: 3.7339em; height: 1.2921em; }        /* 59.7 × 20.7 */
  .logo-inline--footer { gap: .5347em; }
  .logo-inline--footer .logo-inline__mark { width: 3.2473em; height: 3.2473em; } /* 52 */
  .logo-inline--footer .logo-inline__word { width: 5.9056em; height: 2.0436em; } /* 94.5 × 32.7 */
}

/* большой знак: IS + STUDIO + architecture & design. --m — размер знака */
.brand-big { --m: 10.797em; position: relative; width: calc(var(--m) * 1.95); height: calc(var(--m) * 1.1415); }
.brand-big__mark { position: absolute; left: 0; top: 0; width: var(--m); height: var(--m); }
.brand-big__word { position: absolute; left: calc(var(--m) * .8321); top: calc(var(--m) * .5272); width: calc(var(--m) * 1.1128); height: auto; }
.brand-big__arch { position: absolute; left: 0; top: calc(var(--m) * 1.0347); width: calc(var(--m) * .9906); height: auto; }
@media (max-width: 767.98px) { .brand-big { --m: 4.4668em; } }   /* 71.47 */

/* =========================================================================
   ХЕДЕР — одно состояние, компактное (макет «Хедер при скролле» 2031:218):
   сплошной фон, линия border/divider, 72px (desktop) / 64px (mobile), лого ×0.8.
   Размер не меняется и при скролле не прячется — ничего не «подпрыгивает».
   ========================================================================= */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h-s);
  background: var(--bg);
  border-bottom: 1px solid var(--divider);
}
.header__inner {
  position: relative; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
}
.header__nav { display: flex; gap: 1.875em; }       /* 30 */
.header__logo {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(.8);       /* лого ×0.8 */
}
.header__social { display: flex; gap: 1.125em; }    /* 18 */
.header__burger { display: none; }

@media (max-width: 767.98px) {
  .header__nav, .icon-link--desk { display: none; }
  .header__social { gap: .75em; }
  .header__burger { display: block; position: relative; width: 2.75em; height: 1.625em; }   /* 44 × 26 */
  .header__burger span {
    position: absolute; left: .0625em; right: .0625em; top: 50%; height: 1.5px; margin-top: -.75px; border-radius: 1px;
    background: var(--light);
    transition: transform .6s var(--ease-out), opacity .25s var(--ease-soft);
  }
  .header__burger span:nth-child(1) { transform: translateY(-.75em); }
  .header__burger span:nth-child(3) { transform: translateY(.75em); }
  /* крест 24×24 по центру контейнера 44×26 */
  .is-menu-open .header__burger span:nth-child(1) { transform: rotate(45deg) scaleX(.81); }
  .is-menu-open .header__burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .is-menu-open .header__burger span:nth-child(3) { transform: rotate(-45deg) scaleX(.81); }
}

/* =========================================================================
   МОБИЛЬНОЕ МЕНЮ (2029:203): шторка сверху вниз, пункты поднимаются каскадом
   ========================================================================= */
.menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--bg);
  transform: translate3d(0, -100%, 0);             /* transform, а не clip-path: на телефоне считается видеокартой */
  will-change: transform;
  visibility: hidden;
  transition: transform .5s var(--ease-io), visibility 0s linear .5s;
}
.menu__body {
  height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h-s) + 2em) var(--pad) 2em;   /* 32 под хедером */
  overflow-y: auto;
}
.menu__top { display: flex; flex-direction: column; gap: 2em; }   /* 32 */
.menu__nav { display: flex; flex-direction: column; }
.menu__link {
  display: flex; align-items: center; gap: .3871em;               /* 12 при 31px */
  padding: .5806em 0;                                              /* 18 при 31px */
  border-bottom: 1px solid var(--divider);
  font: 500 1.9375em/1.17 var(--serif); letter-spacing: -.02em; text-transform: uppercase;
  transition: color var(--t-ui) var(--ease-ui);
}
.menu__link:last-child { border-bottom: 0; }
.menu__link.is-active { color: var(--gold-solid); }
.menu__link.is-active::before { content: ""; flex: none; width: .1935em; height: .1935em; border-radius: 50%; background: currentColor; } /* 6px */
.menu__link > span { display: block; }
.menu__cta { width: 100%; }
.menu__foot { display: flex; flex-direction: column; gap: 1.25em; padding-top: 2em; }   /* 20 */
.menu__contacts { display: flex; flex-direction: column; gap: .4444em; }               /* 8 при 18px */
.menu__social { display: flex; gap: 1.6em; padding-top: .8em; color: var(--text-80); }  /* 24 / 12 при 15px */
.menu__legal { color: var(--text-60); }

/* вход: пункты и низ появляются после шторки. Слово и точка активного пункта проявляются и поднимаются ВМЕСТЕ
   (одинаковый сдвиг в em и одна задержка) — без маски, которая показывала слова «наполовину» */
.menu__link > span, .menu__link::before { opacity: 0; transform: translate3d(0, .45em, 0); transition: opacity .2s var(--ease-in), transform .25s var(--ease-in); }
.menu__link { border-bottom-color: transparent; }
.menu__cta, .menu__foot { opacity: 0; transition: opacity .25s var(--ease-soft); }
.is-menu-open .menu {
  transform: none; visibility: visible;
  transition: transform .75s var(--ease-out), visibility 0s;
}
.is-menu-open .menu__link { border-bottom-color: var(--divider); transition: color var(--t-ui) var(--ease-ui), border-color .6s var(--ease-soft) calc(.25s + var(--i, 0) * 60ms); }
.is-menu-open .menu__link:last-child { border-bottom-color: transparent; }
.is-menu-open .menu__link > span,
.is-menu-open .menu__link::before { opacity: 1; transform: none; transition: opacity .7s var(--ease-soft) calc(.24s + var(--i, 0) * 70ms), transform .9s var(--ease-out) calc(.24s + var(--i, 0) * 70ms); }
.is-menu-open .menu__cta { opacity: 1; transition: opacity .7s var(--ease-soft) .42s; }
.is-menu-open .menu__foot { opacity: 1; transition: opacity .7s var(--ease-soft) .5s; }
@media (hover: hover) { .menu__link:hover, .menu__social a:hover, .menu__contacts a:hover { color: var(--gold-solid); } }
.menu__social a, .menu__contacts a { transition: color var(--t-ui) var(--ease-ui); }
@media (min-width: 768px) { .menu { display: none; } }

/* =========================================================================
   ФУТЕР
   ========================================================================= */
.footer {
  margin-bottom: 1.4375em;                       /* 23 */
  border-top: 1px solid var(--light);
  border-bottom: 1px solid var(--light);
  padding: 1.9375em var(--pad) 0;                /* 31 */
}
.footer__top { display: grid; grid-template-columns: 1fr 41.875em; align-items: start; } /* колонки с x=730 */
.footer__cols { display: grid; grid-template-columns: 16.8333em 16.6667em auto; white-space: nowrap; }   /* колонки с x=730 / 982.5 / 1232.5 (при 15px) — жёстко, чтобы нижняя строка вставала по тем же направляющим */
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: .8em; } /* 12 при 15px */
.footer__bottom {
  display: grid; grid-template-columns: 1fr 15.7813em 26.0938em; align-items: start;   /* политика — под колонкой меню (730), дисклеймер — под колонкой соцсетей (982.5) */
  margin-top: 7.4375em;                          /* 151 → 270 */
  padding-bottom: .4375em;                       /* нижняя линия на 303 */
}
.footer__copy, .footer__legal { opacity: .5; }
.footer__policy { color: rgba(243, 238, 231, .5); justify-self: start; }
.footer__copy { margin-top: .14em; }

@media (max-width: 767.98px) {
  .footer { margin-bottom: .875em; }
  .footer__top { grid-template-columns: 1fr; row-gap: 2.6875em; }   /* логотип 31 → колонки 125 */
  .footer__col--nav { display: none; }
  .footer__cols { display: flex; justify-content: space-between; gap: 0; }
  .footer__bottom { display: flex; flex-direction: column; margin-top: 1.875em; padding-bottom: 1.8125em; }
  .footer__policy { order: 1; }
  .footer__copy { order: 2; margin-top: 4.5714em; }               /* 64 при 14px */
  .footer__legal { order: 3; margin-top: 1.9167em; }               /* 23 при 12px */
}

/* =========================================================================
   CTA «Обсудим Ваш проект» — без вопросительного знака (требование заказчика)
   ========================================================================= */
.cta {
  width: 61.3125em; margin: 9.375em auto 9.0625em;   /* 981, сверху 150, до футера 145 */
  display: flex; flex-direction: column; align-items: center; gap: 2.4375em; text-align: center;
}
.cta__text { display: flex; flex-direction: column; align-items: center; gap: 1.1875em; }
.cta__lead { color: var(--text-60); }
.cta__btn { width: 29.6875em; }                  /* 475 */
@media (max-width: 767.98px) {
  .cta { width: auto; margin: 6.3125em var(--pad) 5.875em; }
  .cta__btn { width: 100%; }
}

/* =========================================================================
   ФОРМА (компоненты 2026:61)
   Поле: подчёркивание 1px; Focus — светлая линия; Error — линия и подсказка error.
   Textarea: в пустом виде одна строка, растёт до ~6 строк (auto-resize в main.js).
   ========================================================================= */
.form { display: flex; flex-direction: column; align-items: stretch; width: 100%; }
.form__title { margin-bottom: 1.6667em; }        /* 40 при 24px */
.form__fields { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 1.5em; } /* 24; z-index: список стран раскрывается поверх согласия и кнопки */
.form__row { display: flex; gap: 1em; align-items: flex-start; }
.field { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: .5em; } /* подсказка — через 8 */
.field--area { flex: none; }
.field__input {
  display: block; width: 100%; margin: 0; padding: 1em 0; border: 0; border-radius: 0; outline: 0; background: none;
  border-bottom: 1px solid var(--border);
  font: 300 1em/1.4 var(--sans); letter-spacing: -.02em; color: var(--text);
  resize: none; overflow: hidden;
  caret-color: var(--light);
  transition: border-color var(--t-ui) var(--ease-ui);
}
.field__input::placeholder { color: var(--text-60); opacity: 1; }
.field__input:focus { border-bottom-color: var(--light); }
.field__input:focus-visible { outline: none; }
textarea.field__input { min-height: 3.375em; max-height: 11.4em; }   /* 1 строка … ~6 строк */
textarea.field__input.is-capped { overflow-y: auto; }
.field__hint {
  display: none;
  font: 400 .875em/1.4 var(--sans); letter-spacing: -.02em; color: var(--error);
}
.field.is-invalid .field__input { border-bottom-color: var(--error); }
.field.is-invalid .field__hint, .check.is-invalid .field__hint { display: block; animation: hint-in .4s var(--ease-out); }
@keyframes hint-in { from { opacity: 0; transform: translateY(-.3em); } }

/* ---------- телефон: код страны (флаг, поиск по названию и коду) + номер с «прочерками» ---------- */
@font-face { font-family: 'Twemoji Country Flags'; src: url(../assets/fonts/twemoji-country-flags.woff2) format('woff2'); font-display: swap;
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F; }
.no-flag-emoji .tel__flag { font-family: 'Twemoji Country Flags', var(--sans); }   /* Windows: системного шрифта с флагами нет — подставляем свой; на остальных он не грузится */
.tel { display: flex; align-items: stretch; border-bottom: 1px solid var(--border); transition: border-color var(--t-ui) var(--ease-ui); }
.tel:focus-within { border-bottom-color: var(--light); }
.field.is-invalid .tel { border-bottom-color: var(--error); }
.tel .field__input, .field.is-invalid .tel .field__input { border-bottom: 0; }
.tel__country {
  flex: none; display: flex; align-items: center; gap: .375em; padding: 0 .75em 0 0;
  font: 300 1em/1.4 var(--sans); letter-spacing: -.02em; color: var(--text);
  transition: color var(--t-ui) var(--ease-ui);
}
.tel__flag { font-size: 1.125em; line-height: 1; }
.tel__chev { width: .4375em; height: .4375em; margin: -.2em 0 0 .125em; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); opacity: .6; transition: transform .3s var(--ease-out); }
.tel__country[aria-expanded="true"] .tel__chev { transform: translateY(.2em) rotate(225deg); }
@media (hover: hover) { .tel__country:hover { color: var(--gold-solid); } }
.tel__country:focus-visible { outline-offset: -.125em; }
.tel__box { position: relative; flex: 1 1 auto; min-width: 0; }
/* «прочерки»: под полем лежит тот же текст — введённая часть невидима (держит ширину), остаток шаблона приглушён */
/* цифры табличные (одной ширины), прочерк — ячейка ровно в цифру (--tel-w меряет main.js): при вводе ничего не сдвигается.
   Пробелы между группами расширены (word-spacing), чтобы группы читались отдельно. */
.tel__ghost {
  position: absolute; left: 0; top: 0; padding: 1em 0; white-space: pre; pointer-events: none;
  font: 300 1em/1.4 var(--sans); color: rgba(243, 238, 231, .45);
  opacity: 0; transition: opacity var(--t-ui) var(--ease-ui);
}
/* ВАЖНО: это правило стоит ПОСЛЕ правил с сокращённой записью font — она сбрасывает font-variant-numeric */
.field__input.tel__input, .tel__ghost { font-variant-numeric: tabular-nums; letter-spacing: 0; word-spacing: .3em; }
.tel__ghost i { font-style: normal; visibility: hidden; }
.tel__ghost b { position: relative; display: inline-block; width: var(--tel-w, .62em); height: 1em; vertical-align: baseline; }
.tel__ghost b::after { content: ""; position: absolute; left: .09em; right: .09em; bottom: -.1em; height: 1px; background: currentColor; }   /* отдельный прочерк на каждую цифру, с зазором между соседними */
.field--tel.is-live .tel__ghost { opacity: 1; }
.field--tel.is-live .tel__input::placeholder { color: transparent; }

.tel__drop {
  position: absolute; left: 0; right: 0; top: calc(100% - .5em); z-index: 10;
  display: flex; flex-direction: column; max-height: 17.5em;
  background: var(--bg); border: 1px solid var(--divider-strong);
  opacity: 0; transform: translate3d(0, -.375em, 0);
  transition: opacity .2s var(--ease-in), transform .2s var(--ease-in);
}
.tel__drop.is-open { opacity: 1; transform: none; transition: opacity .35s var(--ease-soft), transform .45s var(--ease-out); }
.field.is-invalid .tel__drop { top: calc(100% - 2.25em); }   /* над подсказкой об ошибке: список стоит сразу под линией поля */
.tel__search {
  flex: none; width: 100%; margin: 0; padding: .875em 1em; border: 0; border-bottom: 1px solid var(--divider); border-radius: 0; outline: 0; background: none;
  font: 300 1em/1.4 var(--sans); letter-spacing: -.02em; color: var(--text); caret-color: var(--light);
}
.tel__search::placeholder { color: var(--text-60); opacity: 1; }
.tel__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: .375em 0; }
.tel__opt { display: flex; align-items: center; gap: .625em; padding: .5em 1em; cursor: pointer; font: 300 .9375em/1.4 var(--sans); letter-spacing: -.02em; }
.tel__opt .tel__flag { flex: none; }
.tel__opt-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tel__opt-code { flex: none; color: var(--text-60); font-variant-numeric: tabular-nums; }
.tel__opt.is-active { background: rgba(243, 238, 231, .07); }
.tel__opt[aria-selected="true"] .tel__opt-name { color: var(--gold-solid); }
.tel__empty { padding: .75em 1em; color: var(--text-60); font-size: .9375em; }
@media (max-width: 767.98px) { .tel__drop { max-height: 15em; } }

.check { display: flex; flex-direction: column; gap: .375em; margin-top: 1.5em; }   /* 24; подсказка через 6 */
.check__row { display: flex; align-items: flex-start; gap: .625em; align-self: flex-start; }
.check__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box { position: relative; flex: none; width: 1.0625em; height: 1.0625em; margin-top: .0625em; border: 1px solid var(--light); transition: border-color var(--t-ui) var(--ease-ui); }
.check__box::after {
  content: ""; position: absolute; inset: -1px; background: var(--light);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 17'%3E%3Cpath d='M2.43 6.01l4.72 6.94 7.42-9.71' fill='none' stroke='%23000' stroke-width='1.21'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 17'%3E%3Cpath d='M2.43 6.01l4.72 6.94 7.42-9.71' fill='none' stroke='%23000' stroke-width='1.21'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path .2s var(--ease-ui);
}
.check__input:checked + .check__box::after { clip-path: inset(0 0 0 0); transition: clip-path .35s var(--ease-out); }
.check__input:focus-visible + .check__box { outline: 1px solid var(--light); outline-offset: .25em; }
.check__text { color: var(--text-80); }
.check.is-invalid .check__box { border-color: var(--error); }

.form__alert { margin-top: 1.7143em; padding: .8571em 1.1429em; border: 1px solid var(--error); color: var(--text); } /* 12/16 при 14px */
.form__alert a { text-decoration: underline; text-underline-offset: .15em; }
.form__submit { margin-top: 1.5em; width: 100%; }

.form-success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.5em; }  /* 24 */
.form-success__icon {
  width: 4.5em; height: 4.5em;                   /* 72 */
  background: url(../assets/img/ui/icon-success.svg) center / contain no-repeat;
}
.form-success__text { color: var(--text-80); }
.form-success__btn { width: 20.8125em; margin-top: .5em; }   /* 333; 24+8 = 32 */
.form-box.is-done .form-success > * { animation: success-in 1s var(--ease-out) both; }
.form-box.is-done .form-success > *:nth-child(2) { animation-delay: .08s; }
.form-box.is-done .form-success > *:nth-child(3) { animation-delay: .16s; }
.form-box.is-done .form-success > *:nth-child(4) { animation-delay: .24s; }
@keyframes success-in { from { opacity: 0; transform: translateY(1em); } }

@media (max-width: 767.98px) {
  .form__row { flex-direction: column; gap: 1.5em; align-items: stretch; }
  .form-success__btn { width: 100%; }
}

/* =========================================================================
   ПОПАП «Обсудим ваш проект» (2027:58): окно 680 по центру; на мобайле — весь экран
   ========================================================================= */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 2em;
  visibility: hidden;
  transition: visibility 0s linear .4s;
}
.modal__backdrop {
  position: absolute; inset: 0; background: var(--overlay);
  opacity: 0; transition: opacity .35s var(--ease-soft);
}
.modal__panel {
  position: relative;
  width: 42.5em; max-height: 100%;               /* 680 */
  padding: 4em 3em 3em;                          /* 64 / 48 */
  display: flex; flex-direction: column; gap: 2em;   /* 32 */
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg);
  border: 1px solid var(--divider);
  margin-bottom: 2.875em;                        /* оптический центр: в макете окно на 23px выше середины */
  opacity: 0; transform: translateY(1.5em) scale(.985);
  transition: opacity .3s var(--ease-in), transform .35s var(--ease-in);
}
.modal__head { display: flex; flex-direction: column; align-items: center; gap: 1em; text-align: center; } /* 16 */
.modal__lead { color: var(--text-80); }
.modal .form-box.is-done ~ .modal__head, .modal__panel:has(.form-box.is-done) .modal__head { display: none; }
.modal__close { position: absolute; top: 1.375em; right: .9375em; width: 2.75em; height: 1.625em; z-index: 1; } /* 44×26 у 22 / 15 */
.modal__close span {
  position: absolute; left: 50%; top: 50%; width: 2.125em; height: 1.5px; margin: -.75px 0 0 -1.0625em; border-radius: 1px;
  background: var(--light);
  transition: transform .6s var(--ease-out), background-color var(--t-ui) var(--ease-ui);
}
.modal__close span:nth-child(1) { transform: rotate(45deg); }
.modal__close span:nth-child(2) { transform: rotate(-45deg); }
@media (hover: hover) {
  .modal__close:hover span { background-color: var(--gold-solid); }
  .modal__close:hover span:nth-child(1) { transform: rotate(135deg); }
  .modal__close:hover span:nth-child(2) { transform: rotate(45deg); }
}
.modal.is-open { visibility: visible; transition: visibility 0s; }
.modal.is-open .modal__backdrop { opacity: 1; transition: opacity .6s var(--ease-soft); }
.modal.is-open .modal__panel { opacity: 1; transform: none; transition: opacity .7s var(--ease-soft) .05s, transform .9s var(--ease-out) .05s; }
.modal.is-open .modal__head > *, .modal.is-open .form > * { animation: modal-item 1s var(--ease-out) both; }
.modal.is-open .modal__lead { animation-delay: .1s; }
.modal.is-open .form > *:nth-child(2) { animation-delay: .16s; }
.modal.is-open .form > *:nth-child(3) { animation-delay: .22s; }
.modal.is-open .form > *:nth-child(n+4) { animation-delay: .28s; }
@keyframes modal-item { from { opacity: 0; transform: translateY(.8em); } }
.modal .form-box { width: 100%; }

@media (max-width: 767.98px) {
  .modal { padding: 0; align-items: stretch; }
  .modal__panel { width: 100%; max-height: none; margin: 0; border: 0; padding: 6em var(--pad) 2.5em; gap: 2em; } /* заголовок с 96, до формы 32 */
  .modal__close { top: 1.9375em; right: var(--pad); }   /* 31 */
}

/* =========================================================================
   COOKIE (2029:257): у нижнего края, при первом визите; выбор — localStorage
   ========================================================================= */
.cookie {
  position: fixed; left: 50%; bottom: 1.25em; z-index: 35;      /* 20; ниже меню и хедера */
  display: flex; align-items: center; gap: 1.5em;
  padding: 1.5em;                                               /* 24 */
  background: var(--bg);
  border: 1px solid var(--divider-strong);
  transform: translate(-50%, 1.5em); opacity: 0;
  transition: opacity .35s var(--ease-in), transform .35s var(--ease-in);
}
.cookie.is-shown { transform: translate(-50%, 0); opacity: 1; transition: opacity .9s var(--ease-soft), transform 1.1s var(--ease-out); }
.cookie__text { flex: 1 1 auto; color: var(--text-80); white-space: nowrap; }
@media (min-width: 768px) { .cookie { width: 55.8125em; } }        /* 893 по макету */
.cookie__text a { color: var(--light); text-decoration: underline; text-underline-offset: .15em; transition: color var(--t-ui) var(--ease-ui); }
@media (hover: hover) { .cookie__text a:hover { color: var(--gold-solid); } }
.cookie__btn { flex: none; width: 10.625em; padding: 0 2.5em; }    /* 170 */
@media (max-width: 767.98px) {
  .cookie { left: var(--pad); right: var(--pad); bottom: 1em; flex-direction: column; align-items: stretch; gap: 1.25em; transform: translateY(1.5em); }
  .cookie.is-shown { transform: none; }
  .cookie__text { white-space: normal; }
  .cookie__btn { width: 100%; padding: 0 .9375em; }
}

/* =========================================================================
   ВОЛНА — переход из тёмного в светлый (разъезжающиеся линии)
   JS выставляет каждой линии сдвиг; без JS линии стоят как в макете (3px).
   ========================================================================= */
.wave { position: absolute; left: 0; right: 0; top: 0; overflow-x: clip; pointer-events: none; }
.wave__svg { width: calc(100% + 2px); max-width: none; margin-left: -1px; overflow: visible; }
.wave__svg--desk { height: 10em; }                       /* 160 из 1441 */
.wave__svg--mob { display: none; height: 7.5em; }        /* 120 из 375 */
@media (max-width: 767.98px) {
  .wave__svg--desk { display: none; }
  .wave__svg--mob { display: block; }
}
.wave__fill { fill: var(--light); }
.wave__line {
  fill: none; stroke: var(--light); stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}
html:not(.js) .wave__line { transform: translateY(calc(var(--i) * -3px - 1px)); }
.wave-bottom { position: absolute; left: 0; right: 0; top: 100%; height: 0; pointer-events: none; }
.wave-bottom i {
  position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--light);
  transform: translateY(calc(var(--i) * 3px));
}
.js .wave__line, .js .wave-bottom i { opacity: 0; }   /* с JS линии появляются из края по скроллу */

/* =========================================================================
   ПОЯВЛЕНИЕ ПО СКРОЛЛУ
   ========================================================================= */
.js [data-reveal] {
  opacity: 0; transform: translate3d(0, 1.5em, 0);
  transition: opacity 1.1s var(--ease-soft) var(--d, 0s), transform var(--t-reveal) var(--ease-out) var(--d, 0s);
}
.js [data-reveal="fade"] { transform: none; transition: opacity 1.6s var(--ease-soft) var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* кнопка с появлением по скроллу: правило выше заменяло её transition целиком, и ховер менял цвет рывком —
   здесь к появлению добавлены переходы самой кнопки */
.js .btn[data-reveal] {
  transition: opacity 1.1s var(--ease-soft) var(--d, 0s), transform var(--t-reveal) var(--ease-out) var(--d, 0s),
    background-color var(--btn-t) var(--ease-btn), color var(--btn-t) var(--ease-btn), border-color var(--btn-t) var(--ease-btn);
}

/* пословный подъём из маски */
.split-w { display: inline-block; overflow: hidden; vertical-align: top; padding: .12em 0 .06em; margin: -.12em 0 -.06em; }
.split-w > span { display: inline-block; }
.js [data-split] .split-w > span {
  transform: translate3d(0, 110%, 0);
  transition: transform 1.3s var(--ease-out) calc(var(--d, 0s) + var(--wi, 0) * 55ms);
}
.js [data-split].is-in .split-w > span { transform: none; }

/* каскад детей */
.js [data-stagger] > * { --d: calc(var(--si, 0) * 90ms); }

/* =========================================================================
   ПЕРЕХОД МЕЖДУ СТРАНИЦАМИ — тёмная шторка снизу вверх, ровный край
   с тонкой светлой линией по кромке.
   Уход: шторка поднимается снизу и закрывает экран (0.75 с) → переход.
   Приход: новая страница открыта сверху, шторка уезжает дальше вверх (0.9 с).
   ========================================================================= */
.curtain {
  position: fixed; left: 0; right: 0; top: 0; z-index: 200;
  height: 100vh; height: 100lvh;
  pointer-events: none;
  transform: translate3d(0, calc(100% + 2px), 0);
  visibility: hidden;
  border-top: 1px solid var(--divider-strong);
}
.curtain__body { position: absolute; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.curtain__mark { width: 4.5em; height: 4.5em; opacity: 0; transform: translateY(1em); }
/* пришли через шторку: фото героя и шапка уже на месте, только мягко оседают — без вспышки после шторки */
.is-from-curtain .header { transform: none !important; transition: none !important; }
.is-from-curtain .hero__img, .is-from-curtain .ahero__img, .is-from-curtain .ptop__img { opacity: 1 !important; }

.is-leaving .curtain { visibility: visible; transform: none; transition: transform .75s cubic-bezier(.76, 0, .24, 1); pointer-events: auto; }
.is-leaving .curtain__mark { opacity: 1; transform: none; transition: opacity .5s var(--ease-soft) .3s, transform .7s var(--ease-out) .3s; }
.is-curtain-in .curtain { visibility: visible; transform: none; transition: none; pointer-events: auto; }
.is-curtain-in .curtain__mark { opacity: 1; transform: none; transition: none; }
.is-curtain-out .curtain { visibility: visible; transform: translate3d(0, calc(-100% - 2px), 0); border-top-color: transparent; border-bottom: 1px solid var(--divider-strong); transition: transform .9s cubic-bezier(.76, 0, .24, 1), visibility 0s linear .9s; }
.is-curtain-out .curtain__mark { opacity: 0; transform: translateY(-1em); transition: opacity .3s var(--ease-in), transform .4s var(--ease-in); }

/* =========================================================================
   ТЕЛЕФОН: страница под полноэкранным слоем плавно гаснет.
   Зачем: в Safari на iOS 26 закреплённые слои (меню, попап, шторка) не рисуются под панелью браузера —
   там видна сама страница, а потом Safari рывком заливает зону цветом слоя. Когда содержимое страницы
   прозрачно, под панелью виден фон body (#0f0f10) — тот же цвет, что у слоёв: ни «дырки», ни рывка.
   ========================================================================= */
@media (max-width: 767.98px) {
  main, .footer { transition: opacity .45s var(--ease-soft); }
  .is-menu-open main, .is-menu-open .footer,
  .is-modal-open main, .is-modal-open .footer,
  .is-lb-veil main, .is-lb-veil .footer,
  .is-leaving main, .is-leaving .footer { opacity: 0; }
  .is-menu-open main, .is-menu-open .footer { transition: opacity .45s linear .1s; }   /* шторка успевает закрыть экран раньше, чем страница заметно погаснет */
  .is-leaving main, .is-leaving .footer { transition: opacity .55s linear .1s; }
  .is-lb-veil main, .is-lb-veil .footer { transition: opacity .6s linear; }   /* в такт фону лайтбокса: фото успевает «вылететь» из страницы */
  /* новая страница за шторкой: проявляется, когда шторка поехала вверх */
  .is-curtain-in main, .is-curtain-in .footer { opacity: 0; transition: none; }
  .is-curtain-out main, .is-curtain-out .footer { transition: opacity .6s var(--ease-soft); }
}

/* =========================================================================
   НАЖАТИЕ на тач-экране (ховера нет): ссылка-текст — 60%, кнопка — инверсия, как при наведении.
   .is-pressed держит состояние, пока идёт переход на другую страницу — видно, что именно нажато.
   ========================================================================= */
a, button, label { -webkit-tap-highlight-color: transparent; }
@media (hover: none) {
  .gold-link, .nav-link, .link-line, .pager__link, .more-link, .icon-link, .ptab, .pcard__name, .toc__link { transition: opacity .15s var(--ease-ui), color var(--t-ui) var(--ease-ui); }
  .gold-link:active, .nav-link:active, .link-line:active, .pager__link:active, .more-link:active, .icon-link:active, .ptab:active, .toc__link:active,
  .gold-link.is-pressed, .nav-link.is-pressed, .link-line.is-pressed, .pager__link.is-pressed, .more-link.is-pressed, .toc__link.is-pressed { opacity: .6; }
  .pcard__link:active .pcard__name, .pcard__link.is-pressed .pcard__name { opacity: .6; }
  .menu__link:active, .menu__link.is-pressed { color: var(--text-60); }
  .menu__contacts a:active, .menu__social a:active, .footer__logo:active, .header__logo:active { opacity: .6; }
  .menu__link.is-active:active, .menu__link.is-active.is-pressed { color: var(--gold-solid); opacity: .6; }
  .btn:active, .btn.is-pressed, .msg-btn:active { --btn-t: .15s; background-color: var(--light); border-color: var(--light); color: var(--ink); }
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* =========================================================================
   REDUCED MOTION — движение заменяем на прозрачность
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-reveal="fade"] { transform: none; transition: opacity .5s linear var(--d, 0s); }
  .js .btn[data-reveal] { transition: opacity .5s linear var(--d, 0s), background-color var(--btn-t) var(--ease-btn), color var(--btn-t) var(--ease-btn), border-color var(--btn-t) var(--ease-btn); }
  .js [data-split] .split-w > span { transform: none; opacity: 0; transition: opacity .5s linear; }
  .js [data-split].is-in .split-w > span { opacity: 1; }
  .menu, .is-menu-open .menu { transform: none; transition: opacity .3s linear, visibility 0s; opacity: 0; }
  .is-menu-open .menu { opacity: 1; }
  .menu__link > span, .menu__link::before, .is-menu-open .menu__link > span, .is-menu-open .menu__link::before { transform: none; }
  .modal__panel, .modal.is-open .modal__panel { transform: none; }
  .modal.is-open .modal__head > *, .modal.is-open .form > *, .form-box.is-done .form-success > * { animation: none; }
  .cookie, .cookie.is-shown { transform: translate(-50%, 0); }
  .curtain, .is-leaving .curtain, .is-curtain-in .curtain, .is-curtain-out .curtain { transform: none; transition: opacity .25s linear, visibility 0s linear .25s; opacity: 0; }
  .is-leaving .curtain, .is-curtain-in .curtain { opacity: 1; transition: opacity .25s linear; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 767.98px) {
  .cookie, .cookie.is-shown { transform: none; }
}
