/* Купленный шрифт: файлы в fonts/Aeonik-Bold.woff2 и fonts/Aeonik-Black.woff2 */
@font-face {
  font-family: "Aeonik";
  src:
    local("Aeonik Bold"),
    local("Aeonik-Bold"),
    url("fonts/Aeonik-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aeonik";
  src:
    local("Aeonik Black"),
    local("Aeonik-Black"),
    url("fonts/Aeonik-Black.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* радиус блока в момент приземления полос; синхронно с JS REEL_R0() */
  --reel-r0: 16px;
  --bg: #000000;
  --paper: #fff;
  --ink: #0b0b0b;
  --muted: rgba(11, 11, 11, 0.58);
  --blue: #2f5bff;
  --blue-deep: #1a3fd4;
  --pill-dark: #17171b;
  --pill-light: #ececef;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: "Aeonik", system-ui, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-logo: "Aeonik", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Aeonik", system-ui, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: auto;
  /* overflow-x on html/body breaks position:sticky in mobile WebKit/Telegram */
  overflow-x: visible;
  /* 2026-09-29: Chrome/Android сам подправлял позицию скролла («якорение»),
     когда при смене направления показывалась адресная строка и что-то на
     странице меняло высоту, — экран на миг ехал не туда. Позицию страницы
     меняет только пользователь. */
  overflow-anchor: none;
}

body {
  overflow-anchor: none;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: visible;
  -webkit-tap-highlight-color: transparent;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

.wrap {
  width: min(92%, 1480px);
  margin-inline: auto;
}

/* ——— Loader: ring fill → roll away (no grow, ~20°) ——— */
.loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
  transition: visibility 0s linear 1.4s;
}

.loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 0;
}

.loader.is-entering::before {
  animation: loader-veil-out 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.loader.is-done {
  visibility: hidden;
  pointer-events: none;
}

.loader__orb {
  position: relative;
  z-index: 1;
  width: clamp(140px, 14vw, 180px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform-origin: 50% 50%;
}

.loader.is-entering .loader__orb {
  /* path only — spin is on the ring (linear = no mobile jerk) */
  will-change: transform, opacity;
  animation: loader-orb-move 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.loader.is-entering .loader__ring {
  will-change: transform;
  animation: loader-ring-spin 1.4s linear forwards;
}

.loader__ring-track,
.loader__ring-progress {
  fill: none;
  stroke-width: 14;
}

.loader__ring-track {
  stroke: transparent;
}

.loader__ring-progress {
  stroke: #fff;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

/* засечки теперь проявляет .loader__ticks (см. блок Loader ring ниже) */

/* Constant size, roll down-right at ~20° (dy/dx ≈ tan 20°) */
@keyframes loader-orb-move {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
  75% {
    opacity: 1;
  }
  100% {
    transform: translate3d(130vw, 47.3vw, 0);
    opacity: 0;
  }
}

@keyframes loader-ring-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(980deg);
  }
}

@keyframes loader-veil-out {
  0% { opacity: 1; }
  35% { opacity: 1; }
  100% { opacity: 0; }
}

/* ——— Loader ring: заливка на transform (PERF) ———
   Было: JS каждый кадр писал stroke-dashoffset — пока главный поток занят
   загрузкой, кольцо стояло. Теперь та же кривая (0→90% за 2 с,
   easeInOutCubic) в CSS-анимациях transform/opacity. */
.loader__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
}

.loader__half {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.loader__half--r { left: 50%; }
.loader__half--l { left: 0; }

.loader__rot {
  position: absolute;
  top: 0;
  width: 200%;
  height: 100%;
  transform-origin: 50% 50%;
  will-change: transform;
}

.loader__half--r .loader__rot { left: -100%; }
.loader__half--l .loader__rot { left: 0; }

.loader__rot svg,
.loader__cap,
.loader__ticks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.loader__arc {
  fill: none;
  stroke: #fff;
  stroke-width: 14;
  stroke-linecap: round;
}

.loader__cap circle { fill: #fff; }

/* Кольцо проявляется, когда дуга уже пошла. Раньше первые ~0,5 с на месте
   кольца стояла неподвижная белая точка: круглый край дуги при нулевой заливке
   (заливка стартует медленно, easeInOutCubic). Только opacity — идёт на видеокарте. */
.loader__ring {
  animation: loader-ring-in var(--loader-fill) linear both;
}

@keyframes loader-ring-in {
  0%, 12% { opacity: 0; }
  24%, 100% { opacity: 1; }
}

/* Плашки выбора (ховер кейсов, «Нейрон») не показываем поверх лоадера:
   у плашки ховера z-index выше лоадера, и её белая кнопка светилась
   пятном под кольцом всё время загрузки */
.loader:not(.is-entering) ~ .fx-panel,
.loader:not(.is-entering) ~ .ntune {
  visibility: hidden;
}

/* длительность заливки 0→90%. Меняешь тут — поправь FILL_DUR в script.js */
.loader {
  --loader-fill: 3s;
}

.loader__rot--a {
  animation: loader-fill-a var(--loader-fill) linear both;
}

.loader__rot--b {
  opacity: 0;
  animation:
    loader-fill-b var(--loader-fill) linear both,
    loader-fill-b-show var(--loader-fill) linear both;
}

/* 90% → 100%, когда фон готов (класс ставит script.js) */
.loader.is-rush .loader__rot--b {
  opacity: 1;
  animation: loader-rush-b 0.26s cubic-bezier(0.65, 0, 0.35, 1) both;
}

.loader__ticks {
  opacity: 0;
  will-change: opacity;
  /* задержка повторяет старый transition 0.35s, с которым засечки догоняли кольцо */
  animation: loader-ticks-in var(--loader-fill) linear 0.15s both;
}

.loader.is-rush .loader__ticks,
.loader.is-entering .loader__ticks {
  opacity: 1;
  animation: none;
}

@keyframes loader-fill-a {
  0.0% { transform: rotate(0.00deg); }
  2.5% { transform: rotate(0.02deg); }
  5.0% { transform: rotate(0.16deg); }
  7.5% { transform: rotate(0.55deg); }
  10.0% { transform: rotate(1.30deg); }
  12.5% { transform: rotate(2.53deg); }
  15.0% { transform: rotate(4.37deg); }
  17.5% { transform: rotate(6.95deg); }
  20.0% { transform: rotate(10.37deg); }
  22.5% { transform: rotate(14.76deg); }
  25.0% { transform: rotate(20.25deg); }
  27.5% { transform: rotate(26.95deg); }
  30.0% { transform: rotate(34.99deg); }
  32.5% { transform: rotate(44.49deg); }
  35.0% { transform: rotate(55.57deg); }
  37.5% { transform: rotate(68.34deg); }
  40.0% { transform: rotate(82.94deg); }
  42.5% { transform: rotate(99.49deg); }
  45.0% { transform: rotate(118.10deg); }
  47.5% { transform: rotate(138.89deg); }
  50.0% { transform: rotate(162.00deg); }
  52.5% { transform: rotate(180.00deg); }
  55.0% { transform: rotate(180.00deg); }
  57.5% { transform: rotate(180.00deg); }
  60.0% { transform: rotate(180.00deg); }
  62.5% { transform: rotate(180.00deg); }
  65.0% { transform: rotate(180.00deg); }
  67.5% { transform: rotate(180.00deg); }
  70.0% { transform: rotate(180.00deg); }
  72.5% { transform: rotate(180.00deg); }
  75.0% { transform: rotate(180.00deg); }
  77.5% { transform: rotate(180.00deg); }
  80.0% { transform: rotate(180.00deg); }
  82.5% { transform: rotate(180.00deg); }
  85.0% { transform: rotate(180.00deg); }
  87.5% { transform: rotate(180.00deg); }
  90.0% { transform: rotate(180.00deg); }
  92.5% { transform: rotate(180.00deg); }
  95.0% { transform: rotate(180.00deg); }
  97.5% { transform: rotate(180.00deg); }
  100.0% { transform: rotate(180.00deg); }
}

@keyframes loader-fill-b {
  0.0% { transform: rotate(0.00deg); }
  2.5% { transform: rotate(0.00deg); }
  5.0% { transform: rotate(0.00deg); }
  7.5% { transform: rotate(0.00deg); }
  10.0% { transform: rotate(0.00deg); }
  12.5% { transform: rotate(0.00deg); }
  15.0% { transform: rotate(0.00deg); }
  17.5% { transform: rotate(0.00deg); }
  20.0% { transform: rotate(0.00deg); }
  22.5% { transform: rotate(0.00deg); }
  25.0% { transform: rotate(0.00deg); }
  27.5% { transform: rotate(0.00deg); }
  30.0% { transform: rotate(0.00deg); }
  32.5% { transform: rotate(0.00deg); }
  35.0% { transform: rotate(0.00deg); }
  37.5% { transform: rotate(0.00deg); }
  40.0% { transform: rotate(0.00deg); }
  42.5% { transform: rotate(0.00deg); }
  45.0% { transform: rotate(0.00deg); }
  47.5% { transform: rotate(0.00deg); }
  50.0% { transform: rotate(0.00deg); }
  52.5% { transform: rotate(5.11deg); }
  55.0% { transform: rotate(25.90deg); }
  57.5% { transform: rotate(44.51deg); }
  60.0% { transform: rotate(61.06deg); }
  62.5% { transform: rotate(75.66deg); }
  65.0% { transform: rotate(88.43deg); }
  67.5% { transform: rotate(99.51deg); }
  70.0% { transform: rotate(109.01deg); }
  72.5% { transform: rotate(117.05deg); }
  75.0% { transform: rotate(123.75deg); }
  77.5% { transform: rotate(129.24deg); }
  80.0% { transform: rotate(133.63deg); }
  82.5% { transform: rotate(137.05deg); }
  85.0% { transform: rotate(139.63deg); }
  87.5% { transform: rotate(141.47deg); }
  90.0% { transform: rotate(142.70deg); }
  92.5% { transform: rotate(143.45deg); }
  95.0% { transform: rotate(143.84deg); }
  97.5% { transform: rotate(143.98deg); }
  100.0% { transform: rotate(144.00deg); }
}

@keyframes loader-fill-b-show {
  0% { opacity: 0; }
  51.88% { opacity: 0; }
  51.93% { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes loader-rush-b {
  from { transform: rotate(144deg); }
  to { transform: rotate(180deg); }
}

@keyframes loader-ticks-in {
  0.0% { opacity: 0.000; }
  2.5% { opacity: 0.000; }
  5.0% { opacity: 0.000; }
  7.5% { opacity: 0.000; }
  10.0% { opacity: 0.000; }
  12.5% { opacity: 0.000; }
  15.0% { opacity: 0.000; }
  17.5% { opacity: 0.000; }
  20.0% { opacity: 0.000; }
  22.5% { opacity: 0.000; }
  25.0% { opacity: 0.000; }
  27.5% { opacity: 0.000; }
  30.0% { opacity: 0.000; }
  32.5% { opacity: 0.000; }
  35.0% { opacity: 0.000; }
  37.5% { opacity: 0.000; }
  40.0% { opacity: 0.000; }
  42.5% { opacity: 0.006; }
  45.0% { opacity: 0.046; }
  47.5% { opacity: 0.131; }
  50.0% { opacity: 0.259; }
  52.5% { opacity: 0.411; }
  55.0% { opacity: 0.555; }
  57.5% { opacity: 0.680; }
  60.0% { opacity: 0.783; }
  62.5% { opacity: 0.862; }
  65.0% { opacity: 0.920; }
  67.5% { opacity: 0.959; }
  70.0% { opacity: 0.982; }
  72.5% { opacity: 0.995; }
  75.0% { opacity: 1.000; }
  77.5% { opacity: 1.000; }
  80.0% { opacity: 1.000; }
  82.5% { opacity: 1.000; }
  85.0% { opacity: 1.000; }
  87.5% { opacity: 1.000; }
  90.0% { opacity: 1.000; }
  92.5% { opacity: 1.000; }
  95.0% { opacity: 1.000; }
  97.5% { opacity: 1.000; }
  100.0% { opacity: 1.000; }
}

/* ——— Лоадер: логотип STUDiiO ———
   Чёрный экран. Слово проявляется слева направо белым (две встречные сдвижки —
   только transform, не замирает, пока грузятся скрипты). Цифры 000→100 у нижнего
   края. Заполнилось — лоадер гаснет, сайт проявляется. */
.loader {
  --loader-fill: 3s;
  --ls-fill: #fff;
  --ls-ease: cubic-bezier(0.45, 0.05, 0.35, 1);
}

.loader__s {
  position: relative;
  z-index: 1;
  color: var(--ls-fill);
  font-family: var(--font-logo);
  font-weight: 800;
  font-size: clamp(64px, 13.5vw, 188px);
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}

.loader__word {
  display: block;
}

.loader__word--ghost {
  opacity: 0;
}

/* сдвижка: внешний слой едет вправо, внутренний — навстречу, буквы стоят на месте */
.loader__s-wipe {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: translate3d(-100%, 0, 0);
  animation: ls-wipe var(--loader-fill) var(--ls-ease) both;
}

.loader__s-inner {
  position: absolute;
  inset: 0;
  transform: translate3d(100%, 0, 0);
  animation: ls-wipe-inner var(--loader-fill) var(--ls-ease) both;
}

@keyframes ls-wipe { from { transform: translate3d(-100%, 0, 0); } to { transform: translate3d(-10%, 0, 0); } }
@keyframes ls-wipe-inner { from { transform: translate3d(100%, 0, 0); } to { transform: translate3d(10%, 0, 0); } }

.loader.is-rush .loader__s-wipe { animation: ls-rush 0.26s cubic-bezier(0.65, 0, 0.35, 1) both; }
.loader.is-rush .loader__s-inner { animation: ls-rush-inner 0.26s cubic-bezier(0.65, 0, 0.35, 1) both; }
@keyframes ls-rush { from { transform: translate3d(-10%, 0, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes ls-rush-inner { from { transform: translate3d(10%, 0, 0); } to { transform: translate3d(0, 0, 0); } }

/* счётчик: ровно под полосой, прижат к низу экрана; цифры прокручиваются лентой */
.loader__count {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: -0.12em;
  transform: translateX(-50%);
  display: flex;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(72px, 10vw, 168px);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  user-select: none;
}

.loader__digit {
  display: block;
  height: 1em;
  overflow: hidden;
}

.loader__strip {
  display: flex;
  flex-direction: column;
  transform: translate3d(0, calc(var(--d, 0) * -1em), 0);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.loader__strip i {
  display: block;
  height: 1em;
  font-style: normal;
  text-align: center;
}

/* выход: без полёта и вращения — лоадер просто гаснет */
.loader.is-entering::before { animation: none; }
.loader.is-entering {
  animation: ls-out 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes ls-out { from { opacity: 1; } to { opacity: 0; } }

.site[aria-hidden="true"] { visibility: hidden; }

/* First-screen handoff while the loader rolls off. */

/* Весь сайт плавно появляется сразу при старте портала */
.site.is-entering {
  animation: site-fadein 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes site-fadein {
  0%   { opacity: 0; }
  15%  { opacity: 0; }
  100% { opacity: 1; }
}

/* Дополнительный slide-up для ключевых блоков первого экрана */
.site.is-entering .hero__scroll-btn {
  animation: hero-btn-in 1s cubic-bezier(0.22, 1, 0.36, 1) 1.5s both;
}
@keyframes hero-btn-in {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: none; }
}
/* Заголовок и подзаголовок первого экрана появляются по словам (2026-10-06).
   Слова режет script.js; без него текст просто проявляется вместе с сайтом.
   Заголовок: слово выезжает снизу из-под маски строки с лёгким наклоном и
   расфокусом. Подзаголовок: слова проявляются волной чуть позже. */
.hw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.hw__in { display: inline-block; transform-origin: 0 100%; }
.site.is-entering .hero__title .hw__in {
  animation: hw-rise 1.15s cubic-bezier(0.19, 1, 0.22, 1) calc(0.35s + var(--i) * 0.075s) both;
}
@keyframes hw-rise {
  from { transform: translateY(105%) rotate(5deg); filter: blur(6px); opacity: 0; }
  60%  { filter: blur(0); opacity: 1; }
  to   { transform: none; filter: none; opacity: 1; }
}
.iw { display: inline-block; }
.site.is-entering .hero__intro .iw {
  animation: iw-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) calc(0.95s + var(--i) * 0.03s) both;
}
@keyframes iw-in {
  from { transform: translateY(0.45em); filter: blur(4px); opacity: 0; }
  to   { transform: none; filter: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .site.is-entering .hero__title .hw__in,
  .site.is-entering .hero__intro .iw { animation: none; }
}

.site.is-entering #threads,
.site.is-entering #neuro {
  animation: block-rise 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0.38s both;
}
.site.is-entering .nav__inner {
  animation: block-rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.52s both;
}

/* 2026-09-25: первый экран просто проявляется, без подъёма.
   Вернуть подъём: from { opacity: 0; transform: translate3d(0, 20px, 0); } */
@keyframes block-rise {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ——— Fixed nav ——— */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 22px 0 0;
  pointer-events: none;
  color: #fff;
  mix-blend-mode: normal;
}

.nav.is-light { color: #fff; }

/* Paper / white sections: difference makes logo "flicker" over scrolling text */
html.threads-paper-site .nav,
html:not(.threads-dark) .nav {
  mix-blend-mode: normal;
  color: #0b0b0b;
}

.nav__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 48px;
  pointer-events: none;
}

.nav__left,
.nav__links,
.nav__links > *,
.nav .logo {
  pointer-events: auto;
}

.nav__left {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 28px);
  z-index: 1;
  mix-blend-mode: difference;
}

.nav__lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 56px;
  flex-shrink: 0;
}

.nav__line {
  display: block;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0.85;
}

.nav__line--a { width: 100%; }
.nav__line--b { width: 68%; }

.nav.is-ready .nav__line--a {
  animation: nav-line-grow 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.04s forwards;
}

.nav.is-ready .nav__line--b {
  animation: nav-line-grow 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

@keyframes nav-line-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.logo {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  z-index: 1;
  color: inherit;
  font-family: var(--font-logo);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
}

/* ——— Language slider ——— */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  user-select: none;
}

.lang-switch__lab {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: 700 10px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.45;
  cursor: pointer;
}

.lang-switch.is-en .lang-switch__lab[data-lang-set="en"],
.lang-switch:not(.is-en) .lang-switch__lab[data-lang-set="ru"] {
  opacity: 1;
}

.lang-switch__track {
  position: relative;
  width: 42px;
  height: 22px;
  padding: 0;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  flex-shrink: 0;
}

.lang-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: currentColor;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.lang-switch.is-en .lang-switch__thumb {
  transform: translateX(20px);
}

.nav__links {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 28px);
  z-index: 1;
  position: relative;
  pointer-events: auto;
}

.nav__menu {
  position: relative;
  /* 2026-09-29: кнопка «Меню» стояла на базовой линии строки 16px и была на
     3px ниже «Калькулятора» — центрируем так же, как ссылку */
  display: flex;
  align-items: center;
}

.nav__links > a,
.nav__menu-label {
  mix-blend-mode: difference;
}

.nav__drop {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: max-content;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(8, 8, 8, 0.86);
  mix-blend-mode: normal;
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, -6px, 0);
  transition:
    clip-path 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.45s ease,
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.7s;
}

.nav__links.is-open .nav__drop {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  transition:
    clip-path 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.45s ease,
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s;
}

.nav__drop a {
  padding: 10px 14px;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
}

.nav__drop a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav__burger {
  display: none;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  flex-direction: column;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  gap: 5px;
  line-height: 0;
  font-size: 0;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
}

.nav__burger-line {
  display: block;
  width: 16px;
  height: 1.5px;
  flex: 0 0 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.28s var(--ease), opacity 0.2s ease;
}

.nav__links.is-open .nav__burger-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav__links.is-open .nav__burger-line:nth-child(2) {
  opacity: 0;
}
.nav__links.is-open .nav__burger-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav__panel {
  display: flex;
  align-items: center;
  gap: inherit;
}

.nav__links a,
.nav__text-btn {
  font: 600 11px/1 var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.3s var(--ease);
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.nav__links a:hover,
.nav__text-btn:hover {
  color: #fff;
}

.nav__actions {
  display: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font: 700 11px/1 var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}

.pill:hover { transform: translateY(-1px); }

.pill--dark {
  background: var(--pill-dark);
  color: #fff;
}

.pill--light {
  background: var(--pill-light);
  color: #0a0a0a;
}

.pill--soft {
  background: #fff;
  color: #0a0a0a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* nav uses text links — pills kept for in-page CTAs only */

.pill__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.pill__dots {
  display: inline-flex;
  gap: 4px;
}

.pill__dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

/* ——— Hero + threads stage ——— */
html.threads-dark,
html.threads-dark body,
html.threads-dark .site {
  background: #050507 !important;
}

.threads-stage {
  position: relative;
  height: 260svh;
  z-index: 1;
  background: #050507;
}

.threads-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  /* lvh only — dvh jumps when mobile chrome shows/hides and shakes the page */
  height: 100vh;
  height: 100lvh;
  min-height: 100vh;
  min-height: 100lvh;
  overflow: hidden;
  background: #050507;
}

/* JS pin for iOS/Telegram where sticky fails during fast scroll */
.threads-sticky.is-fixed-pin {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--pin-vh, 100lvh);
  min-height: var(--pin-vh, 100lvh);
  z-index: 3;
}

/* once paper is solid the overlay must scroll with the page, not cover it */
html.threads-paper-site .threads-sticky.is-fixed-pin {
  position: sticky;
  left: auto;
  right: auto;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  min-height: 100vh;
  min-height: 100lvh;
  z-index: auto;
}

#threads {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  pointer-events: none;
}

#neuro {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  pointer-events: none;
}

#neuroWhite {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
}

html.has-neuro #threads {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* ——— Neuro sliders: square toggle ——— */
/* панель настроек фона спрятана совсем, даже с ?lab=1 — попросили убрать.
   Чтобы вернуть: удалить строку ниже, останется html:not(.neuro-lab-on)
   .neuro-lab (панель снова покажется только с ?lab=1, как было). */
.neuro-lab {
  display: none !important;
}

.neuro-lab {
  position: fixed;
  left: 16px;
  bottom: 18px;
  z-index: 40;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}

.neuro-lab__btn,
.neuro-lab__sheet {
  pointer-events: auto;
}

.neuro-lab__btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #2a2a32;
  background: rgba(0, 0, 0, 0.62);
  color: #c8c8d0;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.neuro-lab__btn::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 1.5px solid #c8c8d0;
  background: transparent;
}

.neuro-lab.is-open .neuro-lab__btn::before {
  background: #c8c8d0;
}

.neuro-lab__sheet {
  width: min(460px, calc(100vw - 28px));
  max-height: min(80vh, 720px);
  overflow-y: auto;
  font: 11px/1.35 ui-monospace, monospace;
  color: #83838c;
  background: rgba(0, 0, 0, 0.72);
  padding: 10px 12px;
  border: 1px solid #22222a;
}

.neuro-lab__reset {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 6px 8px;
  border: 1px solid #2a2a32;
  background: rgba(255, 255, 255, 0.06);
  color: #c8c8d0;
  font: 11px/1.2 ui-monospace, monospace;
  cursor: pointer;
  letter-spacing: 0.04em;
}

.neuro-lab__reset:hover {
  background: rgba(255, 255, 255, 0.12);
}

.neuro-lab__sheet .grp {
  color: #55555e;
  margin: 9px 0 3px;
  letter-spacing: 0.06em;
}

.neuro-lab__sheet .grp:first-child {
  margin-top: 0;
}

.neuro-lab__sheet .row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 1px 0;
}

.neuro-lab__sheet .nm {
  width: 118px;
  flex: none;
}

.neuro-lab__sheet .vl {
  width: 34px;
  flex: none;
  color: #e2e2e8;
  text-align: right;
}

.neuro-lab__sheet input[type='range'] {
  flex: 1;
  min-width: 160px;
  height: 22px;
}

.neuro-lab__sheet::-webkit-scrollbar {
  width: 6px;
}

.neuro-lab__sheet::-webkit-scrollbar-thumb {
  background: #2c2c34;
}

.neuro-lab.is-away,
html.threads-paper-site .neuro-lab {
  opacity: 0;
  pointer-events: none;
}

body.quiz-open .neuro-lab,
body.brief-open .neuro-lab {
  display: none;
}

html.has-neuro .threads-reveal {
  background: transparent;
}

html.has-neuro .threads-reveal.is-solid {
  background: var(--paper);
}

html.has-neuro .threads-reveal__inner {
  opacity: var(--paper-in, 0);
  transform: translate3d(0, calc((1 - var(--paper-in, 0)) * 22px), 0);
  filter: blur(calc((1 - var(--paper-in, 0)) * 10px));
  will-change: opacity, transform, filter;
}

/* 2026-09-29: тач — полёты reel и кейсов без SVG-клипа (прямой клип = тот же
   прямоугольник, а на iPhone он мешал двигать блок видеокартой) и без тени,
   которая менялась каждый кадр и перерисовывала весь блок (script.js,
   FLIGHT_LITE). Скругление даёт border-radius + overflow: hidden. */
@media (pointer: coarse) {
  .morph-video__shell,
  .work-card__fly-shell {
    clip-path: none !important;
    -webkit-clip-path: none !important;
  }

  .morph-video__shell {
    box-shadow: none;
  }

  /* волна краёв рила — clip-path: path() в пикселях из script.js (touchWave);
     в покое и после стыковки --wclip = none */
  .morph-video__shell {
    clip-path: var(--wclip, none) !important;
    -webkit-clip-path: var(--wclip, none) !important;
  }

  .work-card__fly-shell {
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.2);
    will-change: transform;
  }
}

/* 2026-09-29: тач — блок рила в покое живёт внутри своего места
   (script.js, updateMorphTouch): места — опора для absolute */
@media (pointer: coarse) {
  .ideas__video-slot,
  .reel__slot-inner {
    position: relative;
  }
}

/* 2026-09-29: тач — белый экран проявляется без размытия (blur на весь экран
   каждый кадр на iPhone тормозил): только прозрачность и сдвиг */
@media (pointer: coarse) {
  html.has-neuro .threads-reveal__inner {
    filter: none;
    will-change: opacity, transform;
  }
}

@media (max-width: 720px) {
  .neuro-lab {
    left: 12px;
    bottom: 12px;
  }
}

.threads-reveal {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: var(--paper);
  display: none;
  will-change: clip-path;
  pointer-events: none;
  color: #0b0b0b;
}

.threads-reveal.is-on {
  display: block;
}

.threads-reveal.is-solid {
  pointer-events: auto;
}

/* dark threads sit under copy when canvas is reparented into paper */
.threads-reveal #threads,
#threads.is-paper {
  z-index: 0;
}

/* after white is solid — lines stay fixed across the whole white site */
#threads.is-paper-site {
  position: fixed !important;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

#vines {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 48;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.7s ease;
  mix-blend-mode: difference;
}

html.threads-paper-site #vines {
  display: block;
}

html.threads-paper-site #vines.is-on {
  opacity: 1;
}

#cursor-trail {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 70;
  pointer-events: none;
  mix-blend-mode: plus-lighter;
  opacity: 1;
}

html.threads-paper-site #cursor-trail {
  mix-blend-mode: multiply;
}

@media (prefers-reduced-motion: reduce) {
  #cursor-trail {
    display: none !important;
  }
}

html.draw-path {
  cursor: crosshair;
}

html.draw-path.draw-path-on {
  cursor: none;
}

html.draw-path #cursor-trail {
  display: none !important;
}

#path-draw {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 120;
  pointer-events: none;
}

html.draw-path #path-draw {
  display: block !important;
}

#path-draw-ui {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 200;
  width: min(94vw, 560px);
  padding: 16px 18px 18px;
  border-radius: 18px;
  background: rgba(12, 12, 14, 0.94);
  color: #f3f3f5;
  font: 500 14px/1.45 var(--font-sans);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

html.draw-path #path-draw-ui {
  display: block !important;
}

.path-draw-ui__badge {
  margin: 0 0 10px;
  font: 700 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c8b496;
}

.path-draw-ui__steps {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

.path-draw-ui__steps li {
  margin: 0 0 6px;
}

.path-draw-ui__steps li:last-child {
  margin-bottom: 0;
}

.path-draw-ui__stat {
  margin: 0 0 12px;
  font: 500 13px/1.35 var(--font-sans);
  color: #c8b496;
}

html.draw-path-on .path-draw-ui__stat {
  color: #fff;
}

.path-draw-ui__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#path-draw-ui button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: #ececef;
  color: #111;
  font: 600 12px/1 var(--font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

#path-draw-ui button.path-draw-ui__save {
  background: #c8b496;
  color: #111;
}

@media (prefers-reduced-motion: reduce) {
  #vines {
    display: none !important;
  }
}

html.threads-paper-site,
html.threads-paper-site body,
html.threads-paper-site .site {
  background: var(--paper) !important;
}

html.threads-paper-site .threads-stage,
html.threads-paper-site .threads-sticky,
html.threads-paper-site .threads-reveal,
html.threads-paper-site .showcase,
html.threads-paper-site .work,
html.threads-paper-site .work-card,
html.threads-paper-site .ideas,
html.threads-paper-site .contact,
html.threads-paper-site .footer {
  background: transparent !important;
}

html.threads-paper-site .threads-stage,
html.threads-paper-site .showcase,
html.threads-paper-site .work,
html.threads-paper-site .ideas,
html.threads-paper-site .team,
html.threads-paper-site .contact,
html.threads-paper-site .footer {
  position: relative;
  z-index: 2;
}

@media (max-width: 980px) {
  /* difference over scrolling paper text = constant color flicker / "jumping" */
  .nav {
    mix-blend-mode: normal;
  }

  html.threads-dark .nav {
    color: #fff;
  }

  html.threads-paper-site .nav,
  html:not(.threads-dark) .nav {
    color: #0b0b0b;
  }
}

html.threads-paper-site .grain {
  /* overlay grain over paper text shimmers while scrolling */
  opacity: 0.025;
  mix-blend-mode: multiply;
  z-index: 4;
}

html.threads-paper-site .nav {
  z-index: 50;
}

.threads-reveal__inner {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  min-height: 100svh;
  padding: clamp(100px, 14vh, 148px) 0 clamp(40px, 6vh, 72px);
  /* 2026-09-25: 1200 → 1280, чтобы рядом с увеличенным рилом поместился заголовок */
  max-width: 1280px;
  pointer-events: auto;
}

/* white screen: title + small copy left, play reel on the right */
.ideas-board {
  display: grid;
  /* правая колонка — ровно по ширине стартового рила */
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
  width: 100%;
}

.ideas-board__main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.ideas-board__aside {
  justify-self: end;
  align-self: start;
  /* стартовый рил на 30% больше: было clamp(260px, 38vw, 460px) */
  width: clamp(338px, 49.4vw, 598px);
  max-width: 100%;
  margin-top: clamp(72px, 18vh, 160px);
}

.ideas-board__copy {
  max-width: 36ch;
  margin: 22px 0 0;
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.45;
  color: rgba(11, 11, 11, 0.72);
}

.ideas-board__cta {
  pointer-events: auto;
}

/* рил стал шире — заголовок не переносим на 4 строки на средних экранах */
@media (min-width: 901px) {
  .ideas-board__main .ideas__title {
    white-space: nowrap;
  }
}

@media (max-width: 900px) {
  .ideas-board {
    grid-template-columns: 1fr;
  }

  .ideas-board__aside {
    justify-self: start;
    margin-top: 28px;
    max-width: 100%;
  }
}

/* title + main block ABOVE threads, UNDER white paper reveal */
.hero {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  background: transparent;
  overflow: hidden;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  transform-origin: 50% 40%;
  pointer-events: none;
}

.hero__top {
  position: relative;
  z-index: 6;
  padding-top: clamp(88px, 11vh, 120px);
  pointer-events: auto;
}

.hero__copy {
  max-width: min(640px, 100%);
  margin-left: clamp(0px, 12vw, 180px);
}

/* Стрелки «листайте вниз» (2026-10-06): внизу первого экрана, по левому краю
   текста; три тонких шеврона по очереди загораются сверху вниз */
.hero__scroll {
  position: relative;
  z-index: 6;
  margin-top: auto;
  padding-bottom: clamp(28px, 6vh, 56px);
  pointer-events: none;
}

.hero__scroll-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 0 0 clamp(0px, 12vw, 180px);
  padding: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: opacity 0.5s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.3s ease, border-color 0.3s ease;
}

/* расходящееся кольцо — зовёт нажать */
.hero__scroll-btn::after {
  content: '';
  position: absolute;
  inset: -1.5px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  animation: hero-ring 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  pointer-events: none;
}

@keyframes hero-ring {
  0%   { transform: scale(1); opacity: 0.8; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

.hero__scroll-btn svg {
  display: block;
  width: 26px;
  height: 32px;
  overflow: visible;
}

.hero__chev {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.35;
  animation: hero-chev 1.6s ease-in-out infinite;
}

.hero__chev--2 { animation-delay: 0.22s; }

@keyframes hero-chev {
  0%, 100% { opacity: 0.35; transform: translateY(-3px); }
  40%      { opacity: 1; transform: translateY(2px); }
  75%      { opacity: 0.35; transform: translateY(4px); }
}

.hero__scroll-btn:hover {
  transform: translateY(4px);
  background: rgba(255, 255, 255, 0.16);
  border-color: #fff;
}
.hero__scroll-btn:hover .hero__chev { animation-duration: 1s; }

.hero__scroll-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}

/* ушли с первого экрана — кнопка гаснет */
.hero__scroll-btn.is-gone {
  opacity: 0 !important;
  pointer-events: none;
}

@media (max-width: 720px) {
  .hero__scroll-btn { width: 58px; height: 58px; margin-left: 0; }
  .hero__scroll-btn svg { width: 22px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__chev { animation: none; opacity: 0.9; }
  .hero__scroll-btn::after { animation: none; opacity: 0; }
}

.hero__title {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 2.6vw, 48px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.18;
}

.hero__title em {
  font-style: italic;
  font-weight: 500;
  white-space: nowrap;   /* «видео для бизнеса» переносится целиком */
}

.hero__intro {
  max-width: 36ch;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.45;
}

.hero__stage,
.hero__canvas {
  display: none !important;
}

/* PERF: было 400%×400% (16 экранов) — огромный слой под overlay-смешиванием.
   Тайл шума 300px бесшовный, поэтому хватает запаса в 300px с каждой стороны. */
.grain {
  position: fixed;
  top: -300px;
  left: -300px;
  width: calc(100% + 600px);
  height: calc(100% + 600px);
  z-index: 55;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(8) infinite;
}

@keyframes grain {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-180px, 60px, 0); }
  50% { transform: translate3d(-60px, 150px, 0); }
  75% { transform: translate3d(-120px, -60px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
}

@media (max-width: 980px) {
  /* static grain on phones — same look, no 400% layer thrash */
  .grain { animation: none; }
}

/* ——— Ideas ——— */
.ideas {
  background: var(--paper);
  padding: clamp(48px, 8vh, 110px) 0 clamp(40px, 6vh, 80px);
}

.ideas .wrap {
  position: relative;
}

.ideas__title {
  margin: 0;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(40px, 6.6vw, 108px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.98;
  color: #0b0b0b;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.ideas__title .split__line {
  position: relative;
}

/* portal under title — left, same width as start frame */
.ideas__portal {
  display: block;
  width: clamp(338px, 49.4vw, 598px);
  max-width: 100%;
  height: 2px;
  margin-top: 0.4em;
  background: transparent;
  transform: scaleX(0);
  transform-origin: left center;
  border-radius: 1px;
  pointer-events: none;
}

.ideas__portal.is-open {
  animation: portal-open 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes portal-open {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* video start frame under portal */
.ideas__video-slot {
  width: clamp(338px, 49.4vw, 598px);
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  margin-top: 12px;
  visibility: hidden;
  pointer-events: none;
}

.assemble-layer {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  overflow: hidden;
  visibility: hidden;
}

.assemble-layer.is-on {
  visibility: visible;
}

/* скруглённый корпус: полосы падают внутрь и режутся по радиусу */
.assemble-mask {
  position: absolute;
  overflow: hidden;
  pointer-events: none;
  border-radius: var(--reel-r0, 16px);
}

.assemble-strip {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 0;
  /* flat fill — same silhouette as final morph block (no shadow = no size jump) */
  background: #12081f;
  opacity: 0;
}

/* until portal assemble finishes, keep morph frame hidden */
.morph-video[data-assemble="pending"] {
  opacity: 0 !important;
}

/* ——— Showcase scroll morph ——— */
.showcase {
  position: relative;
  background: var(--paper);
  padding-top: clamp(20px, 4vh, 48px);
}

.showcase__track {
  position: relative;
  z-index: 2;
  /* sticky hold for Play Reel, then Featured Work — no long empty gap */
  height: 150vh;
}

.showcase__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase__layout {
  position: absolute;
  inset: 8vh 0 auto;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  pointer-events: none;
}

.showcase__layout .pill {
  pointer-events: auto;
}

.showcase__right {
  max-width: 38ch;
  justify-self: end;
  padding-bottom: 2vh;
  pointer-events: auto;
  transition: opacity 0.15s linear, transform 0.15s linear;
}

.showcase__right--solo {
  justify-self: end;
}

.showcase__copy {
  margin: 0 0 28px;
  font-size: clamp(16px, 1.35vw, 20px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.45;
  color: rgba(11, 11, 11, 0.78);
}

.showcase__reel {
  position: relative;
  /* final Play Reel — roomy but not edge-to-edge; no transform (breaks fixed coords) */
  top: auto;
  left: auto;
  transform: none;
  width: min(86vw, 1180px);
  height: min(62vh, 620px);
  inset: auto;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  max-width: none;
  margin: 0;
  flex: 0 0 auto;
}

.reel__slot-inner {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  visibility: hidden;
}

.morph-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ——— Morph video ——— */
.morph-video {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  pointer-events: none;
  will-change: transform, width, height;
  --rx: 0deg;
  --ry: 0deg;
  --rz: 0deg;
  --skew: 0deg;
  --sx: 1;
  --sy: 1;
  /* стартовый радиус = радиус приземления полос; JS доводит до 28px к рилу */
  --r-tl: var(--reel-r0, 16px);
  --r-tr: var(--reel-r0, 16px);
  --r-br: var(--reel-r0, 16px);
  --r-bl: var(--reel-r0, 16px);
  --p: 0;
  --wave: 0;
}

.morph-video__ripple {
  display: none;
  position: absolute;
  inset: 0;
  border-radius:
    var(--r-tl) var(--r-tr) var(--r-br) var(--r-bl)
    / var(--r-tl-y, var(--r-tl)) var(--r-tr-y, var(--r-tr)) var(--r-br-y, var(--r-br)) var(--r-bl-y, var(--r-bl));
  border: 3px solid rgba(96, 96, 96, 0.92);
  pointer-events: none;
  z-index: 0;
}

/* 2026-09-25: волны-«рамка» вокруг рила убраны по просьбе клиента.
   Вернуть: display: block; animation: reel-ripple 2.8s ease-out infinite (у --b задержка 1.4s) */
.morph-video.is-rest .morph-video__ripple {
  display: none;
}

@keyframes reel-ripple {
  0% { inset: 0; opacity: 1; }
  100% { inset: -26px; opacity: 0.18; }
}

@media (prefers-reduced-motion: reduce) {
  .morph-video__ripple { animation: none !important; display: none !important; }
}

.morph-video__shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, calc(var(--p) * 0.16));
  border-radius:
    var(--r-tl) var(--r-tr) var(--r-br) var(--r-bl)
    / var(--r-tl-y, var(--r-tl)) var(--r-tr-y, var(--r-tr)) var(--r-br-y, var(--r-br)) var(--r-bl-y, var(--r-bl));
  clip-path: url(#morphClip);
  -webkit-clip-path: url(#morphClip);
  box-shadow:
    0 calc(18px + var(--wave) * 36px) calc(48px + var(--wave) * 50px) rgba(0, 0, 0, calc(var(--wave) * 0.28)),
    inset 0 1px 0 rgba(255, 255, 255, calc(var(--p) * 0.08));
  transform:
    perspective(1100px)
    rotateX(var(--rx))
    rotateY(var(--ry))
    rotateZ(var(--rz))
    skewY(var(--skew))
    skewX(var(--skew-x, 0deg))
    scale(var(--sx), var(--sy));
  transform-origin: center center;
  background: #12081f;
  will-change: transform, border-radius;
  z-index: 1;
}

.morph-video__el {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(calc(1.08 + var(--wave) * 0.06)) translate(var(--vx, 0px), var(--vy, 0px));
  transform-origin: center center;
}

.morph-video__el:not([src]) {
  visibility: hidden;
}

.morph-video__poster {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 28% 30%, hsla(265, 72%, 52%, 0.5), transparent 44%),
    radial-gradient(circle at 78% 70%, hsla(210, 70%, 42%, 0.35), transparent 46%),
    linear-gradient(145deg, #141418, #1c1c24 52%, #0d0d10);
}

.morph-video.has-reel .morph-video__poster {
  display: none;
}

.morph-video.has-reel .morph-video__el {
  visibility: visible;
}

/* no phase hard-cuts — start/end look is driven only by --p / --wave (fully scrubbable) */

.morph-video__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 35%, transparent 55%, rgba(0, 0, 0, calc(0.15 + var(--p) * 0.25))),
    radial-gradient(circle at 50% 50%, transparent 40%, rgba(0, 0, 0, calc(var(--wave) * 0.12)) 100%);
  pointer-events: none;
}

.morph-video__reel {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 28px);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 78px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: uppercase;
  /* только в состоянии покоя (карточка ещё не улетела) — см. .is-rest ниже;
     видео проигрывается само, в полёте и в приземлённом виде кнопка/подпись
     не нужны */
  opacity: 0;
  transform: translateY(20px);
  cursor: pointer;
  pointer-events: none;
}

/* виден только белый значок-плашка в состоянии покоя; текст PLAY/REEL
   скрыт правилом ниже — нигде не показывается */
.morph-video.is-rest .morph-video__reel {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.morph-video.is-rest .morph-video__reel > span:not(.morph-video__play) {
  position: absolute;
  width: 0;
  overflow: hidden;
  opacity: 0;
}

.morph-video__play {
  width: clamp(48px, 4.8vw, 72px);
  height: clamp(24px, 2.4vw, 38px);
  border-radius: 999px;
  background: #fff;
  position: relative;
}

.morph-video__play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #0b0b0b;
  transform: translate(-35%, -50%);
}

/* ——— Featured work ——— */
.work {
  position: relative;
  background: transparent;
  padding: clamp(48px, 8vh, 100px) 0 clamp(40px, 7vh, 72px);
  overflow: visible;
}

.work__head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(20px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(36px, 5vh, 64px);
}

.work__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 6.5vw, 96px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.95;
  color: #0b0b0b;
}

.work__lead {
  margin: 0;
  max-width: 34ch;
  justify-self: end;
  font: 500 11px/1.55 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(11, 11, 11, 0.55);
}

.work__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(22px, 3vw, 40px) clamp(18px, 2.4vw, 32px);
}

/* нечётная последняя карточка — по центру своего ряда, а не одна слева
   (сейчас их шесть — правило не срабатывает, оставлено на случай пяти);
   в одну колонку (≤980px) ничего не меняется */
@media (min-width: 981px) {
  .work__grid > .work-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - clamp(18px, 2.4vw, 32px)) / 2);
  }
}

.work-card {
  display: block;
  text-decoration: none;
  color: inherit;
  perspective: 1000px;
  perspective-origin: 50% 40%;
  background: transparent;
}

.work-card:focus {
  outline: none;
}

.work-card:focus-visible {
  outline: 2px solid rgba(11, 11, 11, 0.35);
  outline-offset: 6px;
  border-radius: 8px;
}

.work-card__media {
  position: relative;
  overflow: hidden;
  border-radius: clamp(22px, 2.4vw, 36px);
  aspect-ratio: 16 / 11;
  background: #0c0c0e;
  transform: translate3d(0, 0, 0);
  transition:
    border-radius 0.55s var(--ease),
    box-shadow 0.45s var(--ease),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.08),
    0 28px 56px rgba(0, 0, 0, 0.1);
}

/* until morph flight hands off, keep real media invisible */
.work-card[data-reveal="card"]:not(.is-assembled) .work-card__media {
  opacity: 0;
  box-shadow: none;
}

.work-card.is-assembled .work-card__media {
  opacity: 1;
}

.work-card.is-morphing {
  pointer-events: none;
}

/* flying clone — same jelly shell as showreel morph */
.work-card__fly {
  position: fixed;
  z-index: 47;
  pointer-events: none;
  will-change: transform;
  --rx: 0deg;
  --ry: 0deg;
  --rz: 0deg;
  --skew: 0deg;
  --skew-x: 0deg;
  --sx: 1;
  --sy: 1;
  --r-tl: 22px;
  --r-tr: 22px;
  --r-br: 22px;
  --r-bl: 22px;
  --p: 0;
  --wave: 0;
  --vx: 0px;
  --vy: 0px;
}

.work-card__fly-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius:
    var(--r-tl) var(--r-tr) var(--r-br) var(--r-bl)
    / var(--r-tl-y, var(--r-tl)) var(--r-tr-y, var(--r-tr)) var(--r-br-y, var(--r-br)) var(--r-bl-y, var(--r-bl));
  box-shadow:
    0 calc(14px + var(--wave) * 32px) calc(36px + var(--wave) * 44px) rgba(0, 0, 0, calc(0.1 + var(--wave) * 0.22)),
    inset 0 1px 0 rgba(255, 255, 255, calc(0.08 + var(--p) * 0.06));
  transform:
    perspective(1100px)
    rotateX(var(--rx))
    rotateY(var(--ry))
    rotateZ(var(--rz))
    skewY(var(--skew))
    skewX(var(--skew-x))
    scale(var(--sx), var(--sy));
  transform-origin: center center;
  will-change: transform, border-radius, clip-path;
}

.work-card__fly-shell .work-card__face {
  transform: scale(calc(1.06 + var(--wave) * 0.05)) translate(var(--vx), var(--vy));
  transform-origin: center center;
}

.work-assemble-layer {
  position: fixed;
  inset: 0;
  z-index: 46;
  pointer-events: none;
  overflow: hidden;
  visibility: hidden;
}

.work-assemble-layer.is-on {
  visibility: visible;
}

/* rounded case silhouette from frame 1 — slats clip inside, size never grows */
.work-assemble-mask {
  position: absolute;
  overflow: hidden;
  pointer-events: none;
}

.work-assemble-strip {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: left center;
  opacity: 0;
  will-change: transform, opacity;
  /* no per-strip shadow — it made the assemble look crooked / noisy */
}

.work-card__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  overflow: hidden;
  font-size: clamp(64px, 9vw, 120px);
  line-height: 1;
  color: rgba(255, 255, 255, 0.94);
  background:
    radial-gradient(circle at 28% 30%, hsla(var(--hue), 80%, 62%, 0.55), transparent 42%),
    radial-gradient(circle at 75% 70%, hsla(calc(var(--hue) + 40), 70%, 45%, 0.4), transparent 45%),
    linear-gradient(145deg, #141418, #1c1c24 50%, #0d0d10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -18px 40px rgba(0, 0, 0, 0.35);
}

.work-card__face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.14) 0%,
    transparent 36%,
    transparent 70%,
    rgba(0, 0, 0, 0.2) 100%
  );
  opacity: 0.55;
}

.work-card__name {
  margin: 16px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.work-card__label {
  display: inline;
  font: inherit;
  letter-spacing: inherit;
}

.work-card__label .split__char {
  font: inherit;
  letter-spacing: inherit;
}

.work-card__arrow {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  flex-shrink: 0;
  font-family: inherit;
}

.work-card:hover .work-card__arrow,
.work-card:focus-visible .work-card__arrow {
  opacity: 1;
  transform: translateX(0);
}

.work-card.is-tilting .work-card__media,
.work-card:focus-visible .work-card__media {
  animation: case-membrane 3.6s ease-in-out infinite;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.14),
    0 8px 16px rgba(0, 0, 0, 0.08);
}

@keyframes case-membrane {
  0%, 100% { border-radius: 32% 20% 28% 16% / 22% 30% 18% 34%; }
  50% { border-radius: 16% 34% 18% 30% / 32% 16% 28% 20%; }
}

.work-card__visual {
  position: absolute;
  inset: -56px;
  transform: translate3d(0, 0, 0) scale(1.24);
  will-change: transform;
}

.work-card__poster,
.work-card__clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.case-slides__img {
  opacity: 0;
  transition: opacity 0.55s ease;
}

.case-slides__img.is-on {
  opacity: 1;
}

.case-slides__btn {
  display: none;
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(12, 12, 14, 0.42);
  color: #fff;
  font: 28px/1 system-ui, sans-serif;
  cursor: pointer;
  pointer-events: auto;
}

.case-slides__btn--prev { left: 14px; transform: translateY(-50%); }
.case-slides__btn--next { right: 14px; transform: translateY(-50%); }

.work-card__lift .case-slides__btn {
  display: grid;
}

.case-slides__btn:hover {
  background: rgba(12, 12, 14, 0.62);
}

.case-slides__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* AI-изображения: лента во всю высоту карточки, бесконечная панорама справа налево.
   В открытом кейсе — один кадр во весь рост + стрелки. */
.case-panorama {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #1b1b1f;
}

.case-panorama__track {
  display: flex;
  align-items: stretch;
  height: 100%;
  width: max-content;
  will-change: transform;
  animation: case-panorama-run 32s linear infinite;
}

.case-panorama__img {
  display: block;
  height: 100%;
  width: auto;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

@keyframes case-panorama-run {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

.work-card.is-case-active .case-panorama__track,
.work-card.is-case-closing .case-panorama__track,
.work-card__lift .case-panorama__track {
  animation: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transform: none;
}

.work-card.is-case-active .case-panorama__img,
.work-card.is-case-closing .case-panorama__img,
.work-card__lift .case-panorama__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.work-card.is-case-active .case-panorama__img.is-on,
.work-card.is-case-closing .case-panorama__img.is-on,
.work-card__lift .case-panorama__img.is-on {
  opacity: 1;
}

.work-card.is-case-active .case-panorama__img[data-clone],
.work-card.is-case-closing .case-panorama__img[data-clone],
.work-card__lift .case-panorama__img[data-clone] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .case-panorama__track {
    animation: none;
    transform: none;
  }
}

.work-card__clip {
  opacity: 0;
  transition: opacity 0.28s ease;
}

.work-card.is-live .work-card__clip {
  opacity: 1;
}

@media (hover: none), (prefers-reduced-motion: reduce) {
  .work-card {
    perspective: none;
  }

  .work-card__media {
    transform: none;
    animation: none;
  }

  .work-card__visual {
    transform: none;
  }
}

/* ——— Reveal animations (per type, multilevel / replayable) ——— */
.reveal {
  opacity: 0;
}

.reveal.is-in {
  opacity: 1;
}

/* Split units stay invisible until .is-in */
.split__char,
.split__word {
  display: inline-block;
  opacity: 0;
}

/* Glue letters of one word so char-split never wraps mid-word */
.split__glue {
  display: inline-block;
  white-space: nowrap;
  max-width: 100%;
}

.split__space {
  display: inline-block;
  width: 0.28em;
}

.split__line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

/* —— title: сверху вниз + лёгкий сдвиг вбок по букве —— */
.reveal[data-reveal="title"] {
  opacity: 1;
}
.reveal[data-reveal="title"] .split__char {
  transform: translate3d(-12px, -1.1em, 0) rotate(-6deg);
  filter: blur(4px);
}
.reveal[data-reveal="title"].is-in .split__char {
  animation: char-drop-side 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--d, 0ms) + var(--i) * 48ms);
}

/* —— lead / body: целый блок, без нарезки на буквы —— */
.reveal[data-reveal="lead"],
.reveal[data-reveal="body"] {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
}
.reveal[data-reveal="lead"].is-in,
.reveal[data-reveal="body"].is-in {
  animation: copy-fade 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--d, 0ms);
}

/* —— name (под карточками): снизу вверх по одной букве —— */
.reveal[data-reveal="name"] {
  opacity: 1;
}
.reveal[data-reveal="name"] .split__char {
  transform: translate3d(0, 0.7em, 0);
}
.reveal[data-reveal="name"].is-in .split__char {
  animation: char-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--d, 0ms) + var(--i) * 28ms);
}

/* —— headline: по строкам, буквы сверху —— */
.reveal[data-reveal="headline"] {
  opacity: 1;
}
.reveal[data-reveal="headline"] .split__char {
  transform: translate3d(0, -110%, 0);
}
.reveal[data-reveal="headline"].is-in .split__char {
  animation: char-mask-down 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--d, 0ms) + var(--line) * 160ms + var(--i) * 34ms);
}

/* —— card: shell visible; media assembled via JS strips —— */
.reveal[data-reveal="card"].work-card {
  transform: none;
  opacity: 1;
}
.reveal[data-reveal="card"]:not(.work-card) {
  transform: translateY(40px);
  opacity: 0;
}
.reveal[data-reveal="card"]:not(.work-card).is-in {
  animation: reveal-card 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--d, 0ms);
}

/* —— pill: spring —— */
.reveal[data-reveal="pill"] {
  transform: translateY(18px) scale(0.82);
  filter: blur(3px);
}
.reveal[data-reveal="pill"].is-in {
  animation: reveal-pill 0.7s cubic-bezier(0.34, 1.4, 0.64, 1) both;
  animation-delay: var(--d, 0ms);
}

@keyframes copy-fade {
  0% {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes char-drop-side {
  0% {
    opacity: 0;
    transform: translate3d(-12px, -1.1em, 0) rotate(-6deg);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0);
    filter: blur(0);
  }
}

@keyframes char-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 0.7em, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes char-mask-down {
  0% {
    opacity: 0;
    transform: translate3d(0, -110%, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes reveal-card {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reveal-pill {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.82);
    filter: blur(3px);
  }
  70% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(-2px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-in,
  .split__char,
  .split__word {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
    animation: none !important;
  }

  .work-card[data-reveal="card"]:not(.is-assembled) .work-card__media,
  .work-card.is-assembled .work-card__media {
    opacity: 1 !important;
    box-shadow:
      0 10px 24px rgba(0, 0, 0, 0.08),
      0 28px 56px rgba(0, 0, 0, 0.1) !important;
  }

  .work-card__fly,
  .work-assemble-layer {
    display: none !important;
  }
}

/* ——— Case popup: card grows, panel slides out FROM UNDER card ——— */
/* Карточка в #site не может перебить fixed-попап снаружи — поэтому
   поднимаем визуальный клон .work-card__lift на body выше панели. */
.work-card.is-case-active,
.work-card.is-case-closing {
  visibility: hidden;
}

.work-card.is-case-active .work-card__media,
.work-card.is-case-closing .work-card__media {
  opacity: 0;
  /* без scale на оригинале — масштаб только у lift, иначе ломается стык */
  transform: none !important;
  box-shadow: none;
  transition: opacity 0.2s ease;
}

.work-card.is-case-active .work-card__name {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.work-card__lift {
  position: fixed;
  z-index: 200; /* выше .case-popup (90) — панель всегда ПОД карточкой */
  margin: 0;
  pointer-events: none;
  transform-origin: center center;
  will-change: left, top, width, height, transform;
  transition:
    width 0.5s var(--ease),
    height 0.5s var(--ease),
    left 0.5s var(--ease),
    top 0.5s var(--ease),
    transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.22),
    0 8px 24px rgba(0, 0, 0, 0.14);
}

.work-card__lift.is-following {
  /* позицию ведёт JS-кадр, иначе left/top с 0.5s лагают за скроллом */
  transition:
    transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}

.work-card__lift.is-grown {
  transform: scale(1.06);
}

.work-card__lift.is-closing {
  transform: scale(1);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.08),
    0 28px 56px rgba(0, 0, 0, 0.1);
  transition:
    width 0.55s var(--ease),
    height 0.55s var(--ease),
    left 0.55s var(--ease),
    top 0.55s var(--ease),
    transform 0.55s var(--ease),
    box-shadow 0.55s var(--ease);
}

/* ——— Видео кейса в открытой карточке (script.js → caseVideo) ———
   превью 720p и полный ролик лежат друг на друге в .work-card__visual,
   блик .work-card__face::after остаётся поверх видео */
.work-card__lift .work-card__clip {
  opacity: 0;
  transition: opacity 0.45s ease;
}

.work-card__lift .work-card__clip.is-on {
  opacity: 1;
}

/* кадр «отъезжает»: без параллакс-зума видно больше картинки */
.work-card__lift .work-card__visual {
  transition:
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    inset 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card__lift .work-card__visual.is-open {
  inset: 0;
  transform: translate3d(0, 0, 0) scale(1) !important;
}

.case-sound {
  position: absolute;
  left: clamp(12px, 1.6vw, 20px);
  bottom: clamp(12px, 1.6vw, 20px);
  z-index: 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(12, 12, 14, 0.38);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.35s ease 0.25s,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.25s,
    background 0.2s ease;
}

.case-sound.is-in {
  opacity: 1;
  transform: scale(1);
}

.case-sound:hover {
  background: rgba(12, 12, 14, 0.58);
}

.case-sound:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
}

.case-sound svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.case-sound svg path:first-child {
  fill: currentColor;
  stroke: none;
}

.case-sound:not(.is-muted) .w1 {
  animation: case-sound-wave 1.6s ease-in-out infinite;
}

.case-sound:not(.is-muted) .w2 {
  animation: case-sound-wave 1.6s ease-in-out 0.25s infinite;
}

@keyframes case-sound-wave {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .work-card__lift .work-card__visual,
  .case-sound {
    transition: none;
  }

  .case-sound .w1,
  .case-sound .w2 {
    animation: none !important;
  }
}

.work:has(.work-card.is-case-active),
.work:has(.work-card.is-case-closing),
body.case-open .work {
  overflow: visible;
  z-index: 4;
}

.case-popup {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
}

.case-popup.is-open {
  display: block;
}

.case-popup__stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.case-popup__scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(6, 6, 8, 0.6);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.45s var(--ease);
}

.case-popup.is-visible .case-popup__scrim {
  opacity: 1;
}

.case-popup__panel {
  position: fixed;
  top: var(--case-panel-top, 20vh);
  left: var(--case-panel-left, 50vw);
  width: var(--case-panel-w, 360px);
  height: var(--case-panel-h, 320px);
  background: #1b1b1f;
  color: #f3f3f5;
  padding: clamp(20px, 2.4vw, 36px);
  overflow-y: auto;
  pointer-events: auto;
  z-index: 1;
  border-radius: 20px;
  transform: translate3d(var(--case-panel-dx, 0px), var(--case-panel-dy, 0px), 0);
  transition:
    transform 0.55s var(--ease),
    box-shadow 0.4s var(--ease);
  will-change: transform;
}

.case-popup__panel.is-slid {
  transform: translate3d(0, 0, 0);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.case-popup__panel.is-no-motion {
  transition: none !important;
}

.case-popup__panel[data-side="right"] {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  /* панель заходит под карточку на overlap — отодвигаем текст правее стыка */
  padding-left: calc(clamp(20px, 2.4vw, 36px) + 36px);
}

.case-popup__panel[data-side="left"] {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  /* зеркально: текст левее, чтобы карточка не наезжала */
  padding-right: calc(clamp(20px, 2.4vw, 36px) + 36px);
}

.case-popup__panel[data-side="bottom"] {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  padding-top: calc(clamp(20px, 2.4vw, 36px) + 28px);
}

.case-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #f3f3f5;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.case-popup__panel[data-side="left"] .case-popup__close {
  right: auto;
  left: 14px;
}

.case-popup__close:hover,
.case-popup__close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.case-popup__title {
  margin: 0 44px 14px 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.case-popup__panel[data-side="left"] .case-popup__title {
  margin: 0 0 14px 44px;
}

.case-popup__body {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(243, 243, 245, 0.82);
}

.case-popup__body p {
  margin: 0 0 1em;
}

.case-popup__body p:last-child {
  margin-bottom: 0;
}

/* перечисления в описании кейса — пунктами с кружками */
.case-points {
  list-style: none;
  margin: 0 0 1em;
  padding: 0;
}

.case-popup__body p + .case-points {
  margin-top: -0.45em;
}

.case-points:last-child {
  margin-bottom: 0;
}

.case-points li {
  position: relative;
  padding-left: 1.15em;
}

.case-points li + li {
  margin-top: 0.2em;
}

.case-points li::before {
  content: '';
  position: absolute;
  left: 0.15em;
  top: 0.62em;
  width: 0.36em;
  height: 0.36em;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.case-popup__card,
.case-popup__media,
.case-popup__video {
  display: none;
}

@media (max-width: 980px) {
  .case-popup__panel[data-side="left"] .case-popup__close {
    right: 14px;
    left: auto;
  }

  .case-popup__panel[data-side="left"] .case-popup__title {
    margin: 0 44px 14px 0;
  }
}

@media (max-width: 720px) {
  .work-card__lift.is-grown {
    transform: scale(1.03);
  }

  .case-popup__title {
    font-size: clamp(19px, 5.4vw, 24px);
  }

  .case-popup__body {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-popup__scrim,
  .work-card__lift {
    transition: none !important;
  }

  .work-card__lift.is-grown {
    transform: none !important;
  }

  .case-popup__panel {
    transition: none !important;
    transform: translate(0, 0) !important;
  }
}

body.case-open {
  /* intentionally empty */
}

/* ——— Team: two portrait cards ——— */
.page-team {
  background: var(--paper);
}

.page-team .site--team {
  visibility: visible;
  min-height: 100svh;
  padding-top: clamp(72px, 10vh, 112px);
}

.page-team .nav {
  color: #000;
  mix-blend-mode: normal;
}

.page-team .nav__left,
.page-team .nav__links > a,
.page-team .nav__menu-label {
  mix-blend-mode: normal;
}

.page-team .nav__links a,
.page-team .nav__text-btn {
  color: rgba(0, 0, 0, 0.72);
}

.page-team .nav__drop a,
.page-team .nav__drop a:hover {
  color: rgba(255, 255, 255, 0.92);
}

.page-team .nav__links a:hover,
.page-team .nav__text-btn:hover {
  color: #000;
}

.team {
  --team-gold: #c8b496;
  --team-gold-dim: rgba(200, 180, 150, 0.42);
  position: relative;
  z-index: 3;
  background: transparent;
  color: #f3f3f5;
  padding: clamp(16px, 2.4vw, 32px) clamp(10px, 1.8vw, 24px);
  overflow: visible;
}

.team__plate {
  position: relative;
  width: 100%;
  border-radius: clamp(22px, 2.4vw, 36px);
  background: #000;
  color: #f3f3f5;
  padding: clamp(40px, 6vh, 72px) clamp(20px, 3.5vw, 56px) clamp(40px, 6vh, 72px);
  overflow: hidden;
}

.team__net {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.team__head,
.team__stage {
  position: relative;
  z-index: 1;
}

.team__head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(20px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(28px, 4.5vh, 48px);
}

.team__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 6.5vw, 96px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.95;
  color: #f3f3f5;
}

.team__lead {
  margin: 0;
  max-width: 36ch;
  justify-self: end;
  font: 500 11px/1.55 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243, 243, 245, 0.5);
}

.team__stage {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vh, 36px);
}

.team__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 1.6vw, 24px);
}

.team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: min(56vh, 560px);
  padding: clamp(18px, 2vw, 28px) clamp(18px, 2vw, 28px) clamp(52px, 5vw, 64px);
  overflow: hidden;
  background: transparent;
  color: inherit;
}

.team-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    105deg,
    transparent 0 18px,
    rgba(255, 255, 255, 0.018) 18px 20px
  );
  mask-image: radial-gradient(ellipse 58% 62% at 50% 48%, transparent 0 72%, #000 100%);
}

.team-card__photo:has(video),
.team-card__photo--mesh {
  height: min(52vh, 500px);
  margin: 8px 0 0;
  z-index: 2;
  flex-direction: column;
  align-items: center;
}

.team-card__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  width: 100%;
  transform: translateY(4px) scale(1.02);
  transform-origin: 50% 100%;
  transition: transform 0.7s var(--ease);
}

.team-card__job {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: block;
  margin: -0.38em 0 0;
  padding: 0 8px 2px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 2.2vw, 32px);
  letter-spacing: -0.04em;
  line-height: 0.9;
  text-transform: uppercase;
  color: #f0f0f3;
  background-image: linear-gradient(165deg, #ffffff 0%, #d4d4da 45%, #8a8a93 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.team-card__mesh {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  mix-blend-mode: screen;
}

.team-card__photo {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: min(38vh, 340px);
  margin: 36px 0 48px;
  pointer-events: none;
}

.team-card__mesh::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 82% at 50% 42%, transparent 72%, rgba(0, 0, 0, 0.16) 100%);
}

.team-card__photo img,
.team-card__photo video {
  display: block;
  height: 100%;
  width: auto;
  max-width: 68%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.45));
  transform: translateY(8px) scale(0.98);
  transform-origin: 50% 100%;
  transition: transform 0.7s var(--ease), filter 0.7s var(--ease);
}

.team-card__photo video {
  max-width: 100%;
  background: transparent;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: none;
  transform: translateY(0) scale(1.06);
}

.team-card__mesh video {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
  background: transparent;
  filter: none;
  transform: none;
  mix-blend-mode: normal;
}

.team-card__mesh img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: none;
  transform: none;
}

.team-card__socials {
  position: absolute;
  z-index: 4;
  left: clamp(14px, 1.8vw, 24px);
  bottom: clamp(16px, 2vw, 26px);
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.team-card:hover .team-card__socials,
.team-card:focus-within .team-card__socials {
  opacity: 1;
  transform: none;
}

.team-card__social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  max-width: 36px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid rgba(200, 180, 150, 0.28);
  background: rgba(10, 10, 12, 0.55);
  color: var(--team-gold);
  text-decoration: none;
  white-space: nowrap;
  transition:
    max-width 0.45s var(--ease),
    background 0.3s var(--ease),
    border-color 0.3s var(--ease),
    color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.team-card__social svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.team-card__social span {
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s var(--ease) 0.05s, transform 0.3s var(--ease) 0.05s;
}

.team-card__social:hover,
.team-card__social:focus-visible {
  max-width: 148px;
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  transform: translateY(-2px);
}

.team-card__social:hover span,
.team-card__social:focus-visible span {
  opacity: 1;
  transform: none;
}

.team-card__social:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.team-card:hover .team-card__figure,
.team-card:focus-within .team-card__figure {
  transform: translateY(-10px) scale(1.07);
}

.team-card:hover .team-card__photo img,
.team-card:focus-within .team-card__photo img {
  transform: translateY(0) scale(1);
  filter: drop-shadow(0 22px 32px rgba(47, 91, 255, 0.22));
}

.team-card:hover .team-card__photo video,
.team-card:focus-within .team-card__photo video,
.team-card:hover .team-card__mesh img,
.team-card:focus-within .team-card__mesh img,
.team-card:hover .team-card__mesh video,
.team-card:focus-within .team-card__mesh video {
  transform: none;
  filter: none;
}

.team__aside-copy {
  margin: 0 auto;
  max-width: 42ch;
  text-align: center;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.55;
  color: rgba(243, 243, 245, 0.62);
}

@media (max-width: 980px) {
  .team__lead {
    justify-self: start;
    max-width: 100%;
    font-size: 14px;
    text-transform: none;
    letter-spacing: -0.01em;
    line-height: 1.45;
  }

  .team__grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-inline: auto;
  }

  .team-card {
    min-height: 460px;
  }

  .team-card__job {
    font-size: clamp(20px, 5.4vw, 28px);
  }

  .team-card__socials {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .team {
    padding: 16px 10px 24px;
  }

  .team__plate {
    border-radius: 20px;
    padding: 28px 16px 32px;
  }

  .team__title {
    font-size: clamp(30px, 8.5vw, 44px);
  }

  .team-card {
    min-height: 420px;
    padding: 16px 16px 52px;
  }

  .team-card__photo {
    height: 240px;
    margin: 44px 0 56px;
  }

  .team-card__photo:has(video),
  .team-card__photo--mesh {
    height: min(54vh, 400px);
    margin: 8px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-card__figure,
  .team-card__job,
  .team-card__photo img,
  .team-card__photo video,
  .team-card__socials,
  .team-card__social,
  .team-card__social span {
    transition: none;
  }
}

/* ——— Contact ——— */
.contact {
  background: var(--paper);
  padding: clamp(24px, 4vh, 48px) 0 clamp(56px, 8vh, 96px);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.contact__title {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.8vw, 64px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

/* ——— Калькулятор на странице (2026-10-06) — слева от формы ——— */
.calc {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  padding: clamp(22px, 2.4vw, 32px);
  border: 1px solid rgba(11, 11, 11, 0.1);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(11, 11, 11, 0.06);
}
.calc__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.calc__progress {
  height: 3px;
  margin-bottom: 24px;
  border-radius: 3px;
  background: rgba(11, 11, 11, 0.08);
  overflow: hidden;
}
.calc__progress-fill {
  width: 25%;
  height: 100%;
  background: #0b0b0b;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.calc__step[hidden] { display: none !important; }
.calc__step { animation: calc-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes calc-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.calc .quiz-title { font-size: clamp(20px, 2vw, 26px); }
.calc__hint {
  margin: -8px 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(11, 11, 11, 0.62);
}
.calc__consent-text {
  max-height: 230px;
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid rgba(11, 11, 11, 0.12);
  border-radius: 16px;
  background: #fafafa;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(11, 11, 11, 0.74);
  overscroll-behavior: contain;
}
.calc__consent-text p { margin: 0 0 8px; }
.calc__consent-text ul { margin: 0 0 8px; padding-left: 18px; }
.calc__consent-text a { color: #0b0b0b; }
.calc__consent-title { font-weight: 700; color: #0b0b0b; }
.calc__checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 18px;
}
.calc__show { align-self: flex-start; border: 0; }
.calc__result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: auto 0;
}
.calc__result .quiz-result-days,
.calc__result .quiz-result-price { font-size: clamp(32px, 3.4vw, 48px); }
.calc__result .quiz-result-note { margin: 14px 0 22px; font-size: clamp(15px, 1.15vw, 17px); }
.calc__result .quiz-result-actions { justify-content: flex-start; }
.calc__result .pill { border: 0; }
.calc__nav { display: flex; margin-top: auto; padding-top: 16px; }
.contact__form.is-calc-focus { animation: calc-glow 1.4s ease; }
@keyframes calc-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(11, 11, 11, 0); }
  30%      { box-shadow: 0 0 0 8px rgba(11, 11, 11, 0.08); }
}
.contact__form { border-radius: 20px; }


.contact__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

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

.contact__label {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(11, 11, 11, 0.5);
}

.contact__input,
.quiz-input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(11, 11, 11, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #0b0b0b;
  font: 500 15px/1 var(--font-sans);
  outline: none;
  transition: border-color 0.25s var(--ease);
}

.contact__input:focus,
.quiz-input:focus {
  border-color: #0b0b0b;
}

.contact__input.is-error,
.quiz-input.is-error {
  border-color: #c44;
}

.contact__method {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.contact__method-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  font: 700 11px/1 var(--font-sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.contact__method-option input {
  accent-color: #0b0b0b;
}

.contact__submit {
  align-self: flex-start;
  border: 0;
}

.contact__status {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(11, 11, 11, 0.72);
}

.contact__status.is-error { color: #c44; }

.contact__privacy {
  margin: 0;
  max-width: 46ch;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(11, 11, 11, 0.55);
}

.contact__privacy a {
  color: #0b0b0b;
  text-underline-offset: 2px;
}

/* ——— Footer ——— */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px 32px;
  padding: 28px 0 40px;
  color: rgba(0, 0, 0, 0.5);
  font: 500 11px/1.55 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--paper);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer__brand,
.footer__links,
.footer__legal {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer a,
.footer__legal-btn {
  text-decoration: none;
  color: rgba(0, 0, 0, 0.75);
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  cursor: pointer;
}

.footer a:hover,
.footer__legal-btn:hover { color: #000; }

/* ——— Quiz overlay ——— */
.quiz-root {
  position: relative;
  height: 0;
  overflow: visible;
}

.quiz-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(5, 5, 7, 0.72);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  box-sizing: border-box;
}

.quiz-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.quiz-overlay[hidden] { display: none !important; }

.quiz-close {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 12001;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #0b0b0b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.quiz-dialog {
  position: relative;
  width: min(980px, 96vw);
  height: min(620px, 86vh);
  display: flex;
  background: #fff;
  color: #0b0b0b;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.quiz-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 28px 32px 24px;
  box-sizing: border-box;
}

.quiz-sidebar {
  position: relative;
  flex: 0 0 260px;
  width: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b0b0b;
  color: #fff;
  padding: 28px 22px;
  box-sizing: border-box;
  overflow: hidden;
}

.quiz-sidebar__threads {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  touch-action: none;
  cursor: crosshair;
}

.quiz-root.is-result .quiz-sidebar { display: none; }
.quiz-root.is-result .quiz-progress-wrap,
.quiz-root.is-result .quiz-nav { display: none; }
.quiz-root.is-result .quiz-main {
  justify-content: center;
  padding: 40px 48px;
}
.quiz-root.is-result .quiz-body {
  display: flex;
  overflow: auto;
}
.quiz-root.is-result .quiz-step[data-step="3"]:not([hidden]) {
  flex: 1 1 auto;
  display: flex;
  width: 100%;
}

.quiz-sidebar-msg {
  position: relative;
  z-index: 1;
  max-width: 18ch;
  pointer-events: none;
  text-align: center;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.85), 0 0 22px rgba(0, 0, 0, 0.45);
}

.quiz-progress-wrap {
  height: 3px;
  background: rgba(11, 11, 11, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 24px;
}

.quiz-progress {
  height: 100%;
  width: 25%;
  background: #0b0b0b;
  transition: width 0.25s ease;
}

.quiz-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.quiz-step[hidden] { display: none !important; }

.quiz-title {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

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

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid rgba(11, 11, 11, 0.14);
  border-radius: 18px;
  cursor: pointer;
  background: #fff;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 500;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.quiz-option:hover { border-color: #0b0b0b; }

.quiz-option:has(input:checked) {
  border-color: #0b0b0b;
  background: #f3f3f5;
}

.quiz-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quiz-radio {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1.5px solid #0b0b0b;
  border-radius: 50%;
  box-sizing: border-box;
  position: relative;
}

.quiz-option input:checked + .quiz-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: #0b0b0b;
  border-radius: 50%;
}

.quiz-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
}

.quiz-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
}

.quiz-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: #17171b;
  color: #fff;
  font: 700 12px/1 var(--font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quiz-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.quiz-btn-back { width: 44px; padding: 0; font-size: 16px; }

.quiz-send-error { margin: 0 0 12px; color: #c44; font-size: 14px; }

.quiz-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  width: 100%;
  min-height: 100%;
}

.quiz-result-days,
.quiz-result-price {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 5.2vw, 64px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.quiz-result-note {
  max-width: 34ch;
  margin: 16px 0 28px;
  font-size: clamp(17px, 1.55vw, 21px);
  line-height: 1.5;
  color: rgba(11, 11, 11, 0.72);
}

.quiz-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

body.quiz-open { overflow: hidden; }

/* ——— Consent ——— */
.consent[hidden] { display: none !important; }

.consent {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.consent__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 7, 0.72);
}

.consent__dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  background: #fff;
  color: #0b0b0b;
  border-radius: 28px;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.consent__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f3f3f5;
  font-size: 22px;
  cursor: pointer;
}

.consent__title {
  margin: 0 36px 16px 0;
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.consent__body {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(11, 11, 11, 0.78);
}

.consent__body p { margin: 0 0 10px; }
.consent__body ul { margin: 0 0 10px; padding-left: 18px; }
.consent__body a { color: #0b0b0b; }

.consent__footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.consent__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}

.consent__check input {
  margin-top: 2px;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: #0b0b0b;
}

.consent__continue {
  align-self: flex-start;
  border: 0;
}

/* ——— Responsive ——— */
@media (max-width: 980px) {
  .nav {
    padding-top: max(14px, env(safe-area-inset-top, 0px));
    /* solid panel + lang must stay readable on phone */
    mix-blend-mode: normal;
  }

  .nav__inner {
    grid-template-columns: 1fr auto;
    min-height: 44px;
    gap: 12px;
  }

  .nav__left {
    gap: 10px;
    min-width: 0;
  }

  .lang-switch {
    gap: 6px;
    flex-shrink: 0;
  }

  .lang-switch__track {
    width: 36px;
    height: 20px;
  }

  .lang-switch__thumb {
    width: 12px;
    height: 12px;
  }

  .lang-switch.is-en .lang-switch__thumb {
    transform: translateX(16px);
  }

  .nav__links {
    /* было 0 — «Калькулятор» и «Меню» слипались */
    gap: 22px;
  }

  .nav__burger {
    display: none;
  }

  .nav__menu-label {
    display: inline;
  }

  .nav__drop {
    max-width: min(240px, 78vw);
  }

  .nav__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: min(220px, 72vw);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border-radius: 16px;
    background: rgba(8, 8, 8, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -6px, 0);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  }

  .nav__links.is-open .nav__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
  }

  .nav__panel a,
  .nav__panel .nav__text-btn {
    font-size: 12px;
    letter-spacing: 0.06em;
    padding: 14px 14px;
    min-height: 44px;
    display: flex;
    align-items: center;
    color: #fff;
    border-radius: 10px;
  }

  .nav__panel a:hover,
  .nav__panel .nav__text-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
  }

  .nav__lines {
    width: 36px;
    gap: 6px;
  }

  .logo {
    font-size: clamp(18px, 5vw, 24px);
  }

  .showcase__layout {
    grid-template-columns: 1fr;
    gap: 28px;
    inset: 6vh 0 auto;
  }

  .showcase__right {
    justify-self: start;
    max-width: 48ch;
    padding-bottom: 0;
  }

  .showcase__track {
    height: 155vh;
  }

  .work__head,
  .work__grid {
    grid-template-columns: 1fr;
  }

  .work__lead {
    justify-self: start;
  }

  .work-card__media {
    border-radius: 24px;
  }

  .grain {
    animation: none;
    /* contain oversized grain tile so it can't force horizontal scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.035;
  }
}

@media (max-width: 720px) {
  :root {
    --reel-r0: 12px;
  }

  .wrap {
    width: calc(100% - 32px);
  }

  .nav {
    padding-top: max(12px, env(safe-area-inset-top, 0px));
  }

  /* decorative lines eat width next to logo — keep tiny mark only */
  .nav__lines {
    width: 28px;
    gap: 5px;
  }

  .nav__left {
    gap: 10px;
    min-width: 0;
  }

  .nav__links {
    /* было 0 — «Калькулятор» и «Меню» слипались */
    gap: 22px;
  }

  .nav__burger {
    width: 42px;
    height: 42px;
  }

  .loader__box {
    width: min(640px, calc(100vw - 32px));
    gap: 14px;
  }

  /* empty decorative frame — threads are the hero visual on phones */
  .hero__stage {
    display: none;
  }

  .hero__top {
    padding-top: clamp(72px, 12vh, 96px);
  }

  .hero__copy {
    margin-left: 0;
    max-width: 100%;
  }

  .hero__title {
    font-size: clamp(28px, 7.8vw, 37px);
    line-height: 1.18;
  }

  .hero__intro {
    max-width: 34ch;
    font-size: 15px;
    margin-top: 12px;
  }

  /* shorter black scroll on phones — paper reveal sooner, less empty thumb travel */
  .threads-stage {
    height: 220svh;
  }

  /* keep white title clear of fixed nav */
  .threads-reveal__inner {
    /* 2026-09-29: заголовок сверху, блок рила — внизу экрана (ideas-board
       тянется на всю высоту, строки разнесены): до места рила ниже по
       странице лететь вдвое ближе */
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    padding:
      calc(env(safe-area-inset-top, 0px) + 88px)
      0
      clamp(36px, 7vh, 64px);
  }

  .ideas-board {
    grid-template-columns: 1fr;
    gap: 20px;
    flex: 1 1 auto;
    /* 2026-09-29 (фото клиента): блок рила сразу под текстом, а не внизу
       белого экрана — там он был «очень низко» */
    align-content: start;
  }

  .ideas-board__aside {
    justify-self: start;
    align-self: start;
    margin-top: 4px;
    max-width: 100%;
  }

  .ideas-board__copy {
    font-size: 15px;
    margin-bottom: 16px;
  }

  .ideas-board__cta.pill {
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }

  .ideas__title {
    max-width: 12ch;
    font-size: clamp(32px, 9.5vw, 46px);
    line-height: 1.02;
  }

  .ideas__portal,
  .ideas__video-slot {
    /* full column on phones, but cap so the 16:9 frame fits the fold */
    width: min(100%, 520px, calc(min(40svh, 260px) * 16 / 9));
    max-width: 100%;
  }

  .ideas__video-slot {
    margin-top: 10px;
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .showcase {
    padding-top: clamp(8px, 2vh, 20px);
    /* 2026-09-29 (видео IMG_2136): между «белый экран отпустил» и «место рила
       закрепилось» было ~870 px прокрутки — блок ~550 px висел на пустом
       белом. Секция поднята на пол-экрана: превращение идёт ~420 px, пока
       заголовок уезжает вверх. Верх секции прячется под белым экраном
       (у него z-index выше), видимая часть трека прозрачная. */
    margin-top: -50vh;
    margin-top: -50lvh;
  }

  /* трек теперь заходит на белый экран — касания по блоку в слоте
     (кнопка звука, Play) не должен перехватывать; самому блоку
     pointer-events ставит script.js (setMorphVisible) */
  .showcase__track {
    pointer-events: none;
  }

  /* room for hold + flight inside sticky — must match JS FLIGHT_PX budget.
     2026-09-29 (клиент: «блок долго летит в одном виде, сократи финал»):
     рил после посадки стоял ~550 px прокрутки (165svh − 100lvh), пока снизу
     ехали кейсы. Теперь стоянка ровно 180 px на любом телефоне — кейсы
     по-прежнему касаются низа рила в момент, когда sticky отпускает
     (margin-top у .work считается от конца трека). */
  .showcase__track {
    height: calc(100vh + 180px);
    height: calc(100lvh + 180px);
  }

  .showcase__sticky {
    height: 100vh;
    height: 100lvh;
    min-height: 100vh;
    min-height: 100lvh;
    /* avoid rubber-band exposing dark edges under fixed morph */
    overscroll-behavior: contain;
  }

  .showcase__reel {
    width: min(92vw, 100%);
    height: min(42svh, 360px);
    max-width: calc(100% - 8px);
  }

  .showcase__layout {
    inset: 4vh 0 auto;
    gap: 18px;
    padding-inline: 0;
  }

  /* softer morph chrome on phones — less GPU thrash / less edge bleed */
  .morph-video {
    will-change: auto;
  }

  .morph-video__shell {
    perspective: 800px;
    box-shadow:
      0 calc(10px + var(--wave) * 18px) calc(28px + var(--wave) * 28px) rgba(0, 0, 0, calc(var(--wave) * 0.22)),
      inset 0 1px 0 rgba(255, 255, 255, calc(var(--p) * 0.06));
    will-change: auto;
  }

  .morph-video__el {
    transform: scale(calc(1.04 + var(--wave) * 0.03)) translate(var(--vx, 0px), var(--vy, 0px));
  }

  .morph-video__reel {
    font-size: clamp(20px, 7vw, 34px);
    gap: 8px;
    letter-spacing: -0.03em;
    min-height: 44px;
    padding: 8px;
  }

  .morph-video__play {
    width: 40px;
    height: 20px;
  }

  .work {
    padding: clamp(32px, 5vh, 56px) 0 clamp(48px, 8vh, 80px);
    /* 2026-09-29: рил стоит в центре «липкого» экрана высотой 100lvh, под ним
       оставалось ~300px пустого белого до «Сделаем для вас».
       Секция поднимается ровно на эту пустоту (минус 8px): пока рил держится
       на месте, кейсы въезжают под него и касаются его низа в тот момент,
       когда sticky отпускает, — наложения нет. z-index — чтобы прозрачный
       низ sticky (слой z 2) не перехватывал касания по верху карточки. */
    margin-top: calc((min(42svh, 360px) - 100vh) / 2 + 8px);
    margin-top: calc((min(42svh, 360px) - 100lvh) / 2 + 8px);
    z-index: 3;
  }

  .work__title {
    font-size: clamp(30px, 8.5vw, 44px);
  }

  .work__head {
    gap: 14px;
    margin-bottom: 24px;
  }

  .work__lead {
    max-width: 100%;
    font-size: 14px;
    text-transform: none;
    letter-spacing: -0.01em;
    line-height: 1.45;
  }

  .reveal[data-reveal="title"] .split__char {
    filter: none;
    transform: translate3d(-6px, -0.85em, 0) rotate(-3deg);
  }

  .reveal[data-reveal="pill"] {
    filter: none;
  }

  .work__grid {
    gap: 24px;
  }

  .work-card__media {
    border-radius: 18px;
    aspect-ratio: 16 / 11;
    box-shadow:
      0 8px 18px rgba(0, 0, 0, 0.07),
      0 18px 36px rgba(0, 0, 0, 0.08);
  }

  .work-card__face {
    font-size: clamp(52px, 18vw, 88px);
  }

  .work-card__name {
    margin-top: 12px;
    font-size: clamp(18px, 5.2vw, 26px);
  }

  .work-card__fly {
    will-change: auto;
  }

  .work-card__fly-shell {
    will-change: auto;
    perspective: 800px;
    box-shadow:
      0 calc(10px + var(--wave) * 18px) calc(26px + var(--wave) * 26px) rgba(0, 0, 0, calc(0.1 + var(--wave) * 0.18)),
      inset 0 1px 0 rgba(255, 255, 255, calc(0.06 + var(--p) * 0.05));
  }

  .contact {
    padding: 28px 0 calc(48px + env(safe-area-inset-bottom, 0px));
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .calc { min-height: 0; border-radius: 22px; }

  .quiz-dialog {
    flex-direction: column;
    width: min(560px, 96vw);
    height: auto;
    max-height: 90vh;
  }

  .quiz-sidebar {
    flex: 0 0 auto;
    width: auto;
    min-height: 110px;
    order: -1;
    padding: 18px 18px;
  }

  .quiz-root.is-result .quiz-main {
    padding: 28px 20px;
  }

  .quiz-main { padding: 20px 18px 18px; }

  .quiz-close {
    top: 10px;
    right: 12px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 24px 0 calc(28px + env(safe-area-inset-bottom, 0px));
    font-size: 10px;
  }

  .pill {
    height: 44px;
    padding: 0 16px;
    font-size: 10px;
    gap: 8px;
  }

  .pill:hover {
    transform: none;
  }

  /* softer / cheaper split reveals on narrow screens */
  .reveal[data-reveal="title"].is-in .split__char {
    animation-delay: calc(var(--d, 0ms) + var(--i) * 28ms);
  }

  .reveal[data-reveal="name"].is-in .split__char {
    animation-delay: calc(var(--d, 0ms) + var(--i) * 18ms);
  }

  .reveal[data-reveal="headline"].is-in .split__char {
    animation-delay: calc(var(--d, 0ms) + var(--line) * 100ms + var(--i) * 22ms);
  }

  .assemble-layer,
  .work-assemble-layer {
    /* contain strip travel — no sideways page rubber-band */
    touch-action: none;
  }
}

/* 2026-09-29: самые узкие телефоны (320px) — «Калькулятор» с промежутком 22px
   наезжал на переключатель языка */
@media (max-width: 340px) {
  .nav__links {
    gap: 12px;
  }

  .nav__links a,
  .nav__text-btn {
    letter-spacing: 0.02em;
  }
}

@media (max-width: 380px) {
  .wrap {
    width: calc(100% - 24px);
  }

  .ideas__title {
    font-size: clamp(28px, 9vw, 38px);
  }

  .hero__title {
    font-size: clamp(26px, 7.4vw, 33px);
  }

  .showcase__reel {
    height: min(40svh, 300px);
  }

  /* та же подтяжка кейсов под рил, под его высоту на узких экранах */
  .work {
    margin-top: calc((min(40svh, 300px) - 100vh) / 2 + 8px);
    margin-top: calc((min(40svh, 300px) - 100lvh) / 2 + 8px);
  }

  .morph-video__reel {
    font-size: clamp(18px, 6.5vw, 28px);
  }
}

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

/* ——— Brief overlay (logic from studioai brief v8) ——— */
body.brief-open { overflow: hidden; }

.brief-overlay[hidden] { display: none !important; }

.brief-overlay {
  position: fixed;
  inset: 0;
  z-index: 12100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 72px 16px 32px;
  background: rgba(5, 5, 7, 0.82);
  overflow: auto;
  box-sizing: border-box;
}

.brief-progress {
  position: sticky;
  top: 0;
  z-index: 2;
  width: min(720px, 100%);
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 auto 18px;
  color: #fff;
}

.brief-progress__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.72);
}

.brief-progress__label b { color: #fff; font-weight: 800; }

.brief-progress__track {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.brief-progress__fill {
  height: 100%;
  width: 0;
  background: #fff;
  transition: width 0.45s ease;
}

.brief-stage {
  width: min(720px, 100%);
  margin: 0 auto;
}

.brief-card {
  background: #fff;
  color: #0b0b0b;
  border-radius: 28px;
  padding: 40px 40px 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}

.brief-card.is-leave { opacity: 0; transform: scale(1.02); transition: opacity 0.28s ease, transform 0.28s ease; }
.brief-card.is-enter { animation: briefCardIn 0.42s ease both; }

@keyframes briefCardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.brief-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 7px 14px;
  border: 1px solid rgba(11, 11, 11, 0.18);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.brief-welcome h1,
.brief-outro h1,
.brief-block-title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.brief-welcome h1 { font-size: clamp(32px, 5vw, 48px); }
.brief-block-title { font-size: clamp(22px, 3vw, 30px); margin-bottom: 28px; }
.brief-welcome p,
.brief-outro p {
  margin: 0 0 28px;
  max-width: 52ch;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(11, 11, 11, 0.68);
}

.brief-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(11, 11, 11, 0.48);
}

.brief-tag svg { width: 18px; height: 18px; }

.brief-q { margin-bottom: 28px; }
.brief-q-head { display: flex; align-items: baseline; gap: 11px; margin-bottom: 12px; }
.brief-q-n { flex-shrink: 0; font-weight: 800; font-size: 13px; color: rgba(11, 11, 11, 0.4); }
.brief-q-text { font-size: 16px; font-weight: 600; line-height: 1.45; }
.brief-q-hint { margin: 0 0 14px 24px; font-size: 13.5px; line-height: 1.5; color: rgba(11, 11, 11, 0.5); }

.brief-opts { display: flex; flex-wrap: wrap; gap: 9px; margin-left: 24px; }
.brief-opts.is-col { flex-direction: column; align-items: stretch; }
.brief-opt-cell { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; }
.brief-opts.is-col > .brief-opt-cell { width: 100%; }
.brief-opts:not(.is-col) > .brief-opt-cell.has-write { flex: 1 1 100%; width: 100%; }

.brief-opt {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 100%;
  padding: 11px 16px;
  border: 1px solid rgba(11, 11, 11, 0.14);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-size: 14.5px;
  line-height: 1.4;
  font-weight: 500;
  text-align: left;
  color: rgba(11, 11, 11, 0.78);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.brief-opt:hover { border-color: #0b0b0b; }
.brief-opt.is-sel { border-color: #0b0b0b; background: #f3f3f5; color: #0b0b0b; }
.brief-opt .mark {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1.5px solid rgba(11, 11, 11, 0.35);
  display: grid;
  place-items: center;
}
.brief-opt[data-shape="radio"] .mark { border-radius: 50%; }
.brief-opt[data-shape="check"] .mark { border-radius: 5px; }
.brief-opt .mark svg { width: 9px; height: 9px; opacity: 0; }
.brief-opt.is-sel .mark { border-color: #0b0b0b; background: #0b0b0b; color: #fff; }
.brief-opt.is-sel .mark svg { opacity: 1; }

.brief-field {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid rgba(11, 11, 11, 0.14);
  border-radius: 14px;
  color: #0b0b0b;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  padding: 13px 15px;
  resize: vertical;
}
.brief-field:focus { outline: none; border-color: #0b0b0b; }
.brief-field-wrap { margin-left: 24px; }
textarea.brief-field { min-height: 96px; }

.brief-write {
  width: 100%;
  margin-top: 0;
  padding-left: 14px;
  border-left: 2px solid rgba(11, 11, 11, 0.18);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.25s ease;
}
.brief-write.is-open { max-height: 220px; opacity: 1; margin-top: 9px; }
.brief-write textarea { min-height: 60px; }

.brief-seg { margin-left: 24px; display: flex; flex-direction: column; gap: 12px; }
.brief-seg-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f6f6f8;
  border: 1px solid rgba(11, 11, 11, 0.1);
  border-radius: 16px;
  padding: 14px 16px;
}
.brief-seg-label { font-size: 14.5px; font-weight: 700; }
.brief-seg-track {
  display: flex;
  background: #fff;
  border: 1px solid rgba(11, 11, 11, 0.12);
  border-radius: 12px;
  padding: 3px;
}
.brief-seg-opt {
  flex: 1 1 0;
  min-width: 0;
  padding: 9px 8px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  line-height: 1.25;
  color: rgba(11, 11, 11, 0.58);
  text-align: center;
}
.brief-seg-opt.is-sel { background: #0b0b0b; color: #fff; font-weight: 700; }

.brief-upload { margin-left: 24px; }
.brief-group { margin: 0 0 22px 24px; }
.brief-group-label {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(11, 11, 11, 0.1);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(11, 11, 11, 0.5);
}
.brief-group .brief-opts { margin-left: 0; }

.brief-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(11, 11, 11, 0.08);
}
.brief-nav.is-bare { border: 0; margin: 0; padding: 0; }
.brief-nav-hint { font-size: 13px; color: rgba(11, 11, 11, 0.45); }

.brief-consent {
  margin-top: 8px;
  padding: 16px 18px;
  background: #f6f6f8;
  border: 1px solid rgba(11, 11, 11, 0.08);
  border-radius: 16px;
}
.brief-consent .brief-opt { background: transparent; border: 0; padding: 2px; }
.brief-consent a { color: #0b0b0b; text-underline-offset: 2px; }

.brief-outro { text-align: center; padding: 28px 8px; }
.brief-outro p { margin: 0 auto; }
.brief-check {
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: #0b0b0b;
  color: #fff;
  display: grid;
  place-items: center;
}
.brief-check svg { width: 28px; height: 28px; }

.brief-lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  margin: 0 0 18px;
  border: 1px solid rgba(11, 11, 11, 0.16);
  border-radius: 999px;
}
.brief-lang__btn {
  margin: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
  color: rgba(11, 11, 11, 0.5);
  font: 700 11px/1 inherit;
  padding: 6px 10px;
  border-radius: 999px;
}
.brief-lang__btn.is-active { background: #0b0b0b; color: #fff; }

@media (max-width: 560px) {
  .brief-overlay { padding: 64px 10px 20px; }
  .brief-card { padding: 26px 18px 20px; border-radius: 22px; }
  .brief-q-hint, .brief-opts, .brief-seg, .brief-group, .brief-write, .brief-field-wrap, .brief-upload { margin-left: 0; }
}





















































/* PERF: карточка с роликом. Фон «лица» (градиенты + размытая внутренняя тень) лежит под видео
   и не виден, но «мембрана» (анимация border-radius на ховере) перерисовывала его каждый кадр.
   Для карточек с видео фон не рисуем, скругления внутри не дублируем — их режет .work-card__media. */
.work-card__face:has(> .work-card__visual),
.work-card__face:has(> .case-panorama) {
  background: #0c0c0e;
  box-shadow: none;
  border-radius: 0;
}

.work-card__face:has(> .case-panorama) {
  background: #1b1b1f;
}

.work-card__face:has(> .work-card__visual)::after,
.work-card__face:has(> .case-panorama)::after {
  border-radius: 0;
}

.work-card__media:has(.work-card__visual) > .fx-root,
.work-card__media:has(.case-panorama) > .fx-root {
  border-radius: 0;
}

/* ===== PERF v2: мембрана без перерисовки =====
   1) содержимое карточки — отдельный слой, скругления внутри не дублируем (их режет .work-card__media)
   2) мембрана — та же форма через clip-path вместо border-radius
   3) тень при ховере — на .work-card::before (clip-path срезал бы box-shadow) */
.work-card__media > .work-card__face {
  border-radius: 0;
  will-change: transform;
}

.work-card__media > .work-card__face::after {
  border-radius: 0;
}

.work-card__media > .fx-root {
  border-radius: 0;
}

@keyframes case-membrane-clip {
  0%, 100% { clip-path: inset(0 round 32% 20% 28% 16% / 22% 30% 18% 34%); }
  50% { clip-path: inset(0 round 16% 34% 18% 30% / 32% 16% 28% 20%); }
}

.work-card.is-tilting .work-card__media,
.work-card:focus-visible .work-card__media {
  animation: case-membrane-clip 3.6s ease-in-out infinite;
  box-shadow: none;
}

.work-card {
  position: relative;
}

/* заглушка «Скоро»: не открывается, курсор обычный */
.work-card--soon {
  cursor: default;
}

.work-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: clamp(22px, 2.4vw, 36px);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.14),
    0 8px 16px rgba(0, 0, 0, 0.08);
  transform: var(--card-tilt, none);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.work-card.is-tilting::before {
  opacity: 1;
  animation: case-membrane 3.6s ease-in-out infinite;
}

/* 2026-10-02: iPhone рисовал видео рила чёрным (время шло, звук был, кадров
   нет). Видео лежало в 3D-контексте: perspective() в transform оболочки и
   perspective: 800px на ней же — на iOS слой видео в таком контексте может
   не отрисоваться. На таче наклонов и «желе» нет (FLIGHT_LITE), поэтому
   трансформ плоский, перспектива выключена; скругление даёт border-radius +
   overflow: hidden, как и было. */
@media (pointer: coarse) {
  .morph-video__shell {
    perspective: none;
    transform: scale(var(--sx, 1), var(--sy, 1));
    will-change: auto;
  }
}

/* 2026-10-03: iPhone — видео (рил, открытый кейс) играло со звуком, а картинка
   стояла кадром. Поверх всей страницы лежали слои с режимами наложения:
   .grain (overlay/multiply, анимация), #cursor-trail (WebGL-холст, plus-lighter/
   multiply, на таче рисует след от пальца), #vines (difference), а под открытым
   кейсом — подложка с backdrop-filter. На iOS слой с blend или backdrop-filter
   поверх видео выталкивает видео из аппаратного пути, и кадры перестают
   обновляться. На тач-устройствах эти слои выключены (визуально это зерно 5% и
   след за пальцем), подложка кейса без размытия, лишние will-change убраны. */
@media (pointer: coarse) {
  .grain,
  #cursor-trail {
    display: none !important;
  }

  #vines {
    mix-blend-mode: normal;
  }

  .case-popup__scrim {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .work-card__lift {
    will-change: auto;
  }

  .work-card__media > .work-card__face,
  .work-card__visual {
    will-change: auto;
  }
}

/* 2026-10-03: запасной путь для iPhone — ролик карточки как <img src="*.mp4">
   (Safari крутит mp4 в <img> как анимацию даже в энергосбережении, script.js →
   clipAuto.toImg). Лежит поверх <video>, появляется, когда загрузился. */
.work-card__gif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.work-card.is-gif .work-card__gif {
  opacity: 1;
}
