:root {
  color-scheme: dark;
  --bg: #03040a;
  --text: #f7f3e8;
  --muted: rgb(247 243 232 / 0.68);
  --stroke: rgb(255 255 255 / 0.18);
  --shadow: 0 24px 80px rgb(0 0 0 / 0.55);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

/* Эталонная сцена image3.png имеет natural ratio 1536:1024 = 1.5:1 (3:2).
   Чтобы кнопки в % ложились на правильные здания, оборачиваем сцену
   в aspect-ratio контейнер, который центрируется во viewport.
   Картинка object-fit: cover — растягивается на весь frame, без чёрных полос. */
.stage {
  position: fixed;
  inset: 0;
  min-height: 100svh;
  background:
    radial-gradient(circle at 50% 0%, rgb(120 84 255 / 0.16), transparent 40%),
    #03040a;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* Контейнер сцены с правильным aspect-ratio 3:2 (как image3.png 1536×1024).
   Используем width/height 100% от родителя + aspect-ratio — браузер
   автоматически поддерживает пропорции на любом размере viewport.
   Через grid place-items: center в .stage — frame центрируется. */
.scene-frame {
  position: relative;
  aspect-ratio: 3 / 2;  /* 1.5:1 = natural ratio сцены 1536:1024 */
  width: min(100vw, calc(100vh * 1.5));
  max-height: 100vh;
  background: #03040a;
  overflow: hidden;
  /* Гарантируем фиксированный layout для child-элементов в % */
  contain: layout size;
}

/* На мобиле — чёрный фон чтобы при object-fit: contain были аккуратные чёрные полосы */
@media (max-width: 700px) {
  .stage {
    background: #03040a;
  }
}

.media-layer,
.media-layer picture,
.scene-image,
.scene-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.media-layer {
  z-index: 1;
  overflow: hidden;
  background: #03040a;
}

.media-item {
  opacity: 0;
  transform: scale(1.012);
  transition:
    opacity 900ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1200ms cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 900ms ease;
  filter: brightness(0.86) saturate(0.96);
}

.media-enter {
  opacity: 0;
  transform: scale(1.018);
  filter: brightness(0.78) saturate(0.92) blur(14px);
}

.media-visible {
  opacity: 1;
  transform: scale(1);
  filter: brightness(1) saturate(1) blur(0);
}

/* Уходящий слой: fade-out + blur + лёгкий zoom-out.
   Остаётся в DOM до конца transition (см. swapMedia), поэтому нет чёрного мигания. */
.media-leaving {
  opacity: 0 !important;
  transform: scale(0.988) !important;
  filter: brightness(1.18) saturate(0.86) blur(16px) !important;
  pointer-events: none;
  transition:
    opacity 1200ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 1200ms cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 1200ms cubic-bezier(0.22, 0.61, 0.36, 1) !important;
}

.scene-image,
.scene-video {
  object-fit: cover;
  width: 100%;
  height: 100%;
  object-position: center center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.scene-video {
  background: #03040a;
}

.ui-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 1;
  transition: opacity 520ms ease;
}

.top-logo {
  position: absolute;
  top: clamp(18px, 3.5vh, 42px);
  left: 50%;
  width: clamp(150px, 18vw, 290px);
  height: auto;
  translate: -50% 0;
  filter:
    drop-shadow(0 0 12px rgb(89 224 255 / 0.48))
    drop-shadow(0 0 28px rgb(170 72 255 / 0.34))
    drop-shadow(0 18px 34px rgb(0 0 0 / 0.58));
  pointer-events: none;
  animation: logoAppear 900ms ease both, neonLogo 4.8s ease-in-out infinite 900ms;
}

body[data-scene="choice1"] .top-logo {
  width: clamp(300px, 36vw, 580px);
}

.pulse-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(140px, 15vw, 220px);
  aspect-ratio: 1;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: clamp(10px, 1.4vw, 18px);
  background:
    radial-gradient(circle,
      rgba(255, 255, 255, 0.32) 0%,
      rgba(90, 210, 255, 0.18) 46%,
      rgba(0, 0, 0, 0.55) 100%);
  box-shadow:
    0 0 28px rgba(90, 210, 255, 0.55),
    0 0 64px rgba(170, 72, 255, 0.42),
    0 24px 80px rgb(0 0 0 / 0.5);
  cursor: pointer;
  pointer-events: auto;
  animation: buttonBreath 2.35s ease-in-out infinite;
  transition: scale 180ms ease, filter 180ms ease, border-color 180ms ease;
}

.pulse-button::before,
.pulse-button::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  border: 1px solid rgb(90 210 255 / 0.22);
  box-shadow: 0 0 30px rgb(90 210 255 / 0.24);
  animation: ring 2.35s ease-out infinite;
}

.pulse-button::after {
  border-color: rgb(184 88 255 / 0.18);
  animation-delay: 0.72s;
}

.pulse-button:hover {
  scale: 1.045;
  border-color: rgb(255 255 255 / 0.44);
  filter: brightness(1.08);
}

.pulse-button:active {
  scale: 0.98;
}

.pulse-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 0 12px rgb(89 224 255 / 0.48))
    drop-shadow(0 0 24px rgb(170 72 255 / 0.34))
    drop-shadow(0 10px 28px rgb(0 0 0 / 0.52));
  pointer-events: none;
  animation: logoBreath 2.35s ease-in-out infinite;
}

.hotspot-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: auto;
}

.hotspot-svg {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: block;
  pointer-events: auto;
}

.hotspot-svg polygon {
  fill: var(--hotspot-color);
  fill-opacity: 0;
  stroke: var(--hotspot-color);
  stroke-opacity: 0;
  stroke-width: 0.22;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill-opacity 220ms ease, stroke-opacity 220ms ease, filter 220ms ease;
  filter: drop-shadow(0 0 0 transparent);
}

/* Хитбокс здания. Видимого контура нет — но события мыши (hover/click)
   должны работать. SVG <rect> с fill:none + stroke:none НЕ ловит hover,
   поэтому ставим прозрачный fill (alpha=0.01) + pointer-events:all !important.
   !important нужен чтобы .is-hidden (parent) не блокировал нас на других сценах. */
.hotspot-rect,
.hotspot-rect:hover,
.hotspot-rect:focus {
  /* Старые SVG-rect стили не нужны — теперь клик ловится через .hot-btn */
  display: none;
}

/* Видимая пульсирующая кнопка-индикатор в центре здания.
   Аналог кнопки «ИИ» на главной (pulseButton), но поменьше, для каждого хотспота.
   Кнопка = основная hit-зона. Без неё кликнуть по зданию нельзя.
   Внутри — белая точка как визуальный центральный маркер. */
.hotspot-indicator {
  fill: var(--hotspot-color);
  fill-opacity: 1;
  stroke: rgb(255 255 255 / 0.9);
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  pointer-events: all;
  filter:
    drop-shadow(0 0 3px rgb(0 0 0 / 0.7))
    drop-shadow(0 0 14px var(--hotspot-color));
  transform-box: fill-box;
  transform-origin: center;
  animation: hotspot-pulse 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Белая точка-сердечко внутри */
.hotspot-indicator-dot {
  fill: rgb(255 255 255 / 0.95);
  pointer-events: none;  /* не блокирует клик по родительской кнопке */
}

/* Невидимый overlay-зона увеличенного клика — прозрачный rect с hitbox.
   Здесь ничего не рисуется, только ловит клики. */
.hotspot-rect--visual {
  fill: transparent;
  stroke: none;
  cursor: pointer;
  pointer-events: all;
}

/* На десктопе hover — увеличение, на тач-устройствах не используется */
@media (hover: hover) {
  .hotspot-indicator:hover {
    transform: scale(1.2);
  }
}

.hotspot-indicator:active {
  transform: scale(0.92);
}

/* На скрытом слое всё выключено */
.hotspot-layer.is-hidden .hot-btn,
.hotspot-layer.is-hidden .hot-btn * {
  pointer-events: none !important;
  animation: none;
  opacity: 0;
}

/* Все стили для кнопок-индикаторов зданий теперь в .hot-btn блоке ниже.
   Старые .hotspot-indicator/.hotspot-rect/.hotspot-indicator-dot — устарели.
   Оставляю display:none на всякий случай если где-то в HTML остались хвосты. */
.hotspot-indicator,
.hotspot-rect--visual,
.hotspot-indicator-dot {
  display: none;
}

/* ===== Современные кнопки-индикаторы зданий — см. ниже ===== */

/* ========================================================
   Кнопки-индикаторы на сцене со зданиями (scene2).
   кольцо + логотип-буква внутри.
   ======================================================== */
.hot-btn {
  position: absolute;
  width: clamp(56px, 7vw, 96px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 0;
  margin: 0;
  background:
    radial-gradient(circle,
      rgba(255, 255, 255, 0.32) 0%,
      color-mix(in srgb, var(--hot-btn-color, #4ade80) 18%, transparent) 46%,
      rgba(0, 0, 0, 0.55) 100%);
  box-shadow:
    0 0 18px color-mix(in srgb, var(--hot-btn-color, #4ade80) 55%, transparent),
    0 0 48px color-mix(in srgb, var(--hot-btn-color, #4ade80) 30%, transparent),
    0 12px 32px rgb(0 0 0 / 0.45);
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  animation: hot-btn-breath 2.35s ease-in-out infinite;
  transition: scale 180ms ease, filter 180ms ease, border-color 180ms ease;
  font-family: inherit;
  color: #fff;
  font-weight: 700;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  z-index: 6;
}

.hot-btn:hover {
  filter: brightness(1.15);
  border-color: rgba(255, 255, 255, 0.85);
  scale: 1.06;
}

.hot-btn:active {
  scale: 0.96;
}

.hot-btn:focus-visible {
  outline: 3px solid rgba(120, 200, 255, 0.7);
  outline-offset: 4px;
}

/* Кольцо за кнопкой (как buttonBreath но персональное) */
.hot-btn__ring {
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  opacity: 0.6;
  animation: hot-btn-breath-ring 2.35s ease-in-out infinite;
  pointer-events: none;
}

/* Внутренний круг с логотипом/иконкой */
.hot-btn__core {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: clamp(22px, 2.6vw, 32px);
  text-shadow:
    0 0 8px color-mix(in srgb, var(--hot-btn-color, #4ade80) 60%, transparent),
    0 2px 6px rgb(0 0 0 / 0.6);
  letter-spacing: -0.02em;
  overflow: hidden;  /* чтобы логотип не вылезал за круг */
}

/* Логотип-картинка ИИшников и Контактов (image(logo2).webp).
   Делает круг визуально похожим на pulseButton с логотипом. */
.hot-btn__core .hot-btn__logo {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--hot-btn-color, #4ade80) 70%, transparent))
          drop-shadow(0 2px 4px rgb(0 0 0 / 0.55));
}

/* SVG-иконки для остальных зданий — наследуют currentColor от родителя,
   который красится в цвет здания. */
.hot-btn__core svg {
  width: 56%;
  height: 56%;
  display: block;
  color: var(--hot-btn-color, #4ade80);
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--hot-btn-color, #4ade80) 70%, transparent))
          drop-shadow(0 1px 2px rgb(0 0 0 / 0.55));
}

/* Подписи под кнопкой нет — по запросу пользователя. Только круглая кнопка. */

@keyframes hot-btn-breath {
  0%   { scale: 1;    filter: brightness(1); }
  50%  { scale: 1.05; filter: brightness(1.15); }
  100% { scale: 1;    filter: brightness(1); }
}

@keyframes hot-btn-breath-ring {
  0%   { transform: scale(1);    opacity: 0.55; }
  50%  { transform: scale(1.18); opacity: 0.15; }
  100% { transform: scale(1);    opacity: 0.55; }
}

/* На тач-устройствах чуть медленнее */
@media (hover: none) {
  .hot-btn {
    animation-duration: 4s;
  }
  .hot-btn__ring {
    animation-duration: 4s;
  }
}

@media (max-width: 700px) {
  .hot-btn {
    width: clamp(48px, 13vw, 72px);
  }
  /* Подписей нет — мобильный media-запрос удалён. */
}

/* На тач-устройствах — медленнее анимация, чтобы не отвлекала */
@media (hover: none) {
  .hotspot-indicator {
    animation-duration: 4s;
  }
}

@keyframes hotspot-pulse {
  0%   { transform: scale(1);    fill-opacity: 0.92; }
  20%  { transform: scale(1.25); fill-opacity: 0.5; }
  40%  { transform: scale(0.95); fill-opacity: 1; }
  60%  { transform: scale(1.15); fill-opacity: 0.65; }
  80%  { transform: scale(1.05); fill-opacity: 0.85; }
  100% { transform: scale(1);    fill-opacity: 0.92; }
}

/* Когда слой скрыт (не на scene2), хитбоксы ВЫКЛЮЧЕНЫ.
   Без этого SVG-rect ловит events даже при visibility:hidden, что вызывало
   выскакивание менюшек на choice1/video2.
   
   ФИКС: pointer-events отключаем на самом hotspot-layer.is-hidden,
   потому что SVG-rect (SVGAnimatedString class — не HTMLElement) может игнорировать
   правило .hotspot-rect { pointer-events: none } в режиме strict-CSS. */
.hotspot-layer.is-hidden,
.hotspot-layer.is-hidden .hotspot-svg,
.hotspot-layer.is-hidden .hotspot-rect {
  pointer-events: none !important;
}

.hotspot-tooltip {
  position: fixed;
  z-index: 8;
  width: min(290px, calc(100vw - 36px));
  padding: 14px 16px 12px;
  border: 1px solid color-mix(in srgb, var(--hotspot-color) 62%, white 18%);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgb(9 12 22 / 0.82), rgb(2 4 12 / 0.72)),
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--hotspot-color) 28%, transparent), transparent 68%);
  box-shadow:
    0 0 34px color-mix(in srgb, var(--hotspot-color) 34%, transparent),
    0 24px 80px rgb(0 0 0 / 0.55);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  pointer-events: none;
  transition: opacity 180ms ease;
  animation: tooltip-appear 240ms cubic-bezier(0.22, 0.61, 0.36, 1.05) both;
}

@keyframes tooltip-appear {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Открытая (по клику) — крупнее, есть кнопка "Подробнее" */
.hotspot-tooltip.is-active {
  pointer-events: auto;
  width: min(460px, calc(100vw - 36px));
  padding-bottom: 20px;
}

/* Закреплённая (по клику) — реальная позиция выставляется JS рядом с rect.
   CSS гарантирует что плашка не схлопнется в (0,0) и не следует за курсором. */
.hotspot-tooltip.is-pinned {
  position: fixed !important;
  /* left/top устанавливаются инлайн из JS около rect */
  animation: tooltip-appear 280ms cubic-bezier(0.22, 0.61, 0.36, 1.05) both;
}

.hotspot-tooltip__bar {
  width: 32px;
  height: 3px;
  border-radius: 2px;
  margin-bottom: 12px;
  background: var(--hotspot-color);
  box-shadow: 0 0 14px var(--hotspot-color);
}

.hotspot-tooltip__type {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hotspot-color);
  text-shadow: 0 0 14px color-mix(in srgb, var(--hotspot-color) 56%, transparent);
}

.hotspot-tooltip__title {
  margin-top: 4px;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: #fff;
}

.hotspot-tooltip__text {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.hotspot-tooltip.is-active .hotspot-tooltip__text {
  font-size: 14px;
  margin-bottom: 14px;
}

/* Подзаголовок — акцентная строка с описанием направления */
.hotspot-tooltip__tagline {
  margin-top: 2px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: color-mix(in srgb, var(--hotspot-color) 80%, white 20%);
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.hotspot-tooltip.is-active .hotspot-tooltip__tagline {
  font-size: 14px;
  margin-bottom: 12px;
}

/* Список примеров: иконка + текст */
.hotspot-tooltip__examples {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;  /* все ячейки в одном ряду одинаковой высоты */
  gap: 8px 10px;
  overflow: hidden;  /* страховка: ничто не должно вылезать за границы списка */
}

.hotspot-tooltip.is-active .hotspot-tooltip__examples {
  margin-bottom: 18px;
  gap: 10px 12px;
}

.hotspot-tooltip__example {
  display: flex;
  align-items: center;
  gap: 8px;
  /* Стандартный паддинг: 8px вертикаль, 12px горизонталь.
     Иконка и текст не должны упираться в обводку. */
  padding: 8px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--hotspot-color) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--hotspot-color) 22%, transparent);
  font-size: 12px;
  line-height: 1.3;
  color: color-mix(in srgb, #fff 92%, var(--hotspot-color) 8%);
}

.hotspot-tooltip.is-active .hotspot-tooltip__example {
  /* Стандарт отступов: 10px вертикаль, 14px горизонталь.
     Гарантирует воздух от иконки/текста до края мини-кнопки,
     чтобы длинные русские слова не упирались в обводку. */
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.35;
  min-height: 48px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hotspot-tooltip__example-label {
  flex: 1 1 auto;
  min-width: 0;
  /* Многострочный текст с обрезкой по 2 строкам. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  hyphens: auto;
  text-overflow: ellipsis;
}

.hotspot-tooltip__example-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--hotspot-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hotspot-tooltip__example-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hotspot-tooltip__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--hotspot-color) 60%, transparent);
  background: color-mix(in srgb, var(--hotspot-color) 14%, transparent);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.hotspot-tooltip.is-active .hotspot-tooltip__more {
  display: inline-flex;
}

.hotspot-tooltip__more:hover {
  background: color-mix(in srgb, var(--hotspot-color) 26%, transparent);
  border-color: var(--hotspot-color);
  transform: translateY(-1px);
}

.hotspot-tooltip__close {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 14px;
  border: 1px solid color-mix(in srgb, var(--hotspot-color) 50%, transparent);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--hotspot-color);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 180ms ease, background 180ms ease, transform 180ms ease;
}

.hotspot-tooltip__close:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--hotspot-color) 22%, transparent);
  transform: translateY(-1px);
}

/* ========================================================
   Форма партнёрства: открывается при клике на "ПАРТНЁРСТВО"
   ======================================================== */
.partner-form {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgb(2 4 12 / 0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  animation: partner-fade-in 220ms ease both;
  /* .ui-layer выставляет pointer-events: none — без явного auto события
     мыши и ввод с клавиатуры не доходят до формы. */
  pointer-events: auto;
}

.partner-form.is-hidden {
  display: none;
}

.partner-form__card {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 14px 18px 18px;
  border: 1px solid color-mix(in srgb, var(--hotspot-color, #22c55e) 50%, white 18%);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgb(9 12 22 / 0.92), rgb(2 4 12 / 0.82)),
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--hotspot-color, #22c55e) 24%, transparent), transparent 68%);
  box-shadow:
    0 0 40px color-mix(in srgb, var(--hotspot-color, #22c55e) 30%, transparent),
    0 24px 80px rgb(0 0 0 / 0.55);
  animation: partner-slide-in 280ms cubic-bezier(0.22, 0.61, 0.36, 1.05) both;
  /* Тоже явно: все интерактивные элементы внутри карточки должны работать */
  pointer-events: auto;
}

.partner-form__close {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 14px;
  border: 1px solid color-mix(in srgb, var(--hotspot-color, #22c55e) 50%, transparent);
  border-radius: 999px;
  background: rgb(0 0 0 / 0.35);
  color: var(--hotspot-color, #22c55e);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 180ms ease, background 180ms ease, transform 180ms ease;
  z-index: 2;
}

.partner-form__close:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--hotspot-color, #22c55e) 22%, transparent);
  transform: translateY(-1px);
}

.partner-form__bar {
  width: 32px;
  height: 3px;
  border-radius: 2px;
  margin-bottom: 10px;
  background: var(--hotspot-color, #22c55e);
  box-shadow: 0 0 14px var(--hotspot-color, #22c55e);
}

.partner-form__type {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hotspot-color, #22c55e);
  text-shadow: 0 0 14px color-mix(in srgb, var(--hotspot-color, #22c55e) 56%, transparent);
}

.partner-form__title {
  margin: 4px 0 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: #fff;
}

.partner-form__tagline {
  margin-bottom: 12px;
  font-size: 13px;
  color: color-mix(in srgb, var(--hotspot-color, #22c55e) 80%, white 20%);
}

.partner-form__body {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.partner-form__field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.partner-form__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, #fff 86%, transparent);
}

.partner-form__label em {
  color: color-mix(in srgb, var(--hotspot-color, #22c55e) 80%, white 20%);
  font-style: normal;
}

.partner-form__input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, #fff 22%, transparent);
  border-radius: 8px;
  background: rgb(0 0 0 / 0.32);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.partner-form__input:focus {
  border-color: var(--hotspot-color, #22c55e);
  background: rgb(0 0 0 / 0.48);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hotspot-color, #22c55e) 26%, transparent);
}

.partner-form__input.is-invalid {
  border-color: #f87171;
  box-shadow: 0 0 0 3px color-mix(in srgb, #f87171 24%, transparent);
}

.partner-form__input.is-valid {
  border-color: color-mix(in srgb, var(--hotspot-color, #22c55e) 60%, transparent);
}

.partner-form__error {
  min-height: 12px;
  font-size: 10.5px;
  color: #fca5a5;
}

.partner-form__field--captcha .partner-form__label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.partner-form__field--captcha .partner-form__label em {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--hotspot-color, #22c55e) 18%, transparent);
}

.partner-form__submit {
  margin-top: 4px;
  padding: 11px 18px;
  border: 1px solid var(--hotspot-color, #22c55e);
  border-radius: 999px;
  background: var(--hotspot-color, #22c55e);
  color: #051a08;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease;
}

.partner-form__submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.partner-form__submit:active {
  transform: translateY(0);
}

.partner-form__submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.partner-form__status {
  margin-top: 10px;
  min-height: 16px;
  font-size: 12px;
  text-align: center;
}

.partner-form__status.is-success { color: #86efac; }
.partner-form__status.is-error { color: #fca5a5; }

.lead-success-notice {
  position: fixed;
  inset: 0;
  z-index: 34;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgb(2 4 12 / 0.34);
  -webkit-backdrop-filter: blur(8px) saturate(1.12);
  backdrop-filter: blur(8px) saturate(1.12);
  pointer-events: auto;
  animation: partner-fade-in 180ms ease both;
}

.lead-success-notice.is-hidden {
  display: none;
}

.lead-success-notice__card {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  padding: 14px 16px 16px;
  border: 1px solid color-mix(in srgb, #38bdf8 58%, white 18%);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgb(9 12 22 / 0.94), rgb(2 4 12 / 0.86)),
    radial-gradient(circle at 20% 0%, rgb(56 189 248 / 0.24), transparent 68%);
  box-shadow:
    0 0 36px rgb(56 189 248 / 0.28),
    0 22px 70px rgb(0 0 0 / 0.58);
  color: #fff;
  animation: partner-slide-in 240ms cubic-bezier(0.22, 0.61, 0.36, 1.05) both;
}

.lead-success-notice__close {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 14px;
  border: 1px solid rgb(56 189 248 / 0.5);
  border-radius: 999px;
  background: rgb(0 0 0 / 0.35);
  color: #38bdf8;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.lead-success-notice__bar {
  width: 32px;
  height: 3px;
  border-radius: 2px;
  margin-bottom: 10px;
  background: #38bdf8;
  box-shadow: 0 0 14px rgb(56 189 248 / 0.75);
}

.lead-success-notice__type {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #38bdf8;
}

.lead-success-notice__title {
  margin: 5px 72px 8px 0;
  font-size: 22px;
  line-height: 1.1;
  color: #fff;
}

.lead-success-notice__text {
  margin: 0 0 14px;
  color: rgb(247 243 232 / 0.86);
  font-size: 14px;
  line-height: 1.45;
}

.lead-success-notice__ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 10px 18px;
  border: 1px solid #38bdf8;
  border-radius: 999px;
  background: #38bdf8;
  color: #03111a;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

@keyframes partner-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes partner-slide-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.back-button,
.manual-start {
  border: 1px solid var(--stroke);
  color: var(--text);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.13), rgb(255 255 255 / 0.05));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.back-button {
  position: absolute;
  left: clamp(18px, 3.6vw, 56px);
  bottom: clamp(22px, 4.6vh, 52px);
  z-index: 6;
  min-width: 118px;
  padding: 13px 22px;
  border-radius: 999px;
  pointer-events: auto;
  opacity: 0.84;
  transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.back-button:hover {
  opacity: 1;
  transform: translateY(-1px);
  border-color: rgb(255 255 255 / 0.38);
}

.manual-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  translate: -50% -50%;
  padding: 15px 28px;
  border-radius: 999px;
}

.loader {
  position: absolute;
  right: clamp(18px, 3vw, 38px);
  bottom: clamp(18px, 3vw, 38px);
  z-index: 9;
  padding: 10px 14px;
  border: 1px solid rgb(255 255 255 / 0.11);
  border-radius: 999px;
  background: rgb(0 0 0 / 0.34);
  color: var(--muted);
  font-size: 13px;
  backdrop-filter: blur(12px);
  transition: opacity 220ms ease;
}

.is-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  left: -9999px !important;
  top: -9999px !important;
}

body[data-scene="introVideo"] .ui-layer,
body[data-scene="video2"] .pulse-button,
body[data-scene="video2"] .hotspot-layer,
body[data-scene="scene2"] .pulse-button {
  opacity: 0;
  pointer-events: none;
}

/* Жёсткое правило: на любой сцене кроме choice1 — НЕТ ни лого, ни кнопки ИИ.
   Анимации у элементов идут с `forwards` (logoAppear ставит opacity:1 в конце),
   поэтому нужен !important + перебить animation. */
body:not([data-scene="choice1"]) .top-logo,
body:not([data-scene="choice1"]) .pulse-button,
body:not([data-scene="choice1"]) .pulse-button *,
body:not([data-scene="choice1"]) .top-logo * {
  opacity: 0 !important;
  pointer-events: none !important;
  animation: none !important;
}

body[data-scene="choice1"] .top-logo {
  animation: logoAppear 900ms ease both, neonLogo 4.8s ease-in-out infinite 900ms;
}

@keyframes buttonBreath {
  0%, 100% {
    transform: scale(0.975);
    box-shadow:
      0 0 18px rgb(90 210 255 / 0.2),
      0 0 44px rgb(170 72 255 / 0.14),
      0 24px 80px rgb(0 0 0 / 0.5);
  }
  50% {
    transform: scale(1.055);
    box-shadow:
      0 0 34px rgb(90 210 255 / 0.34),
      0 0 76px rgb(170 72 255 / 0.22),
      0 24px 80px rgb(0 0 0 / 0.5);
  }
}

@keyframes logoBreath {
  0%, 100% {
    transform: scale(0.96);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes ring {
  0% {
    opacity: 0.58;
    transform: scale(0.9);
  }
  100% {
    opacity: 0;
    transform: scale(1.42);
  }
}

@keyframes logoAppear {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes neonLogo {
  0%, 100% {
    filter:
      drop-shadow(0 0 10px rgb(89 224 255 / 0.38))
      drop-shadow(0 0 24px rgb(170 72 255 / 0.24))
      drop-shadow(0 18px 34px rgb(0 0 0 / 0.58));
  }
  50% {
    filter:
      drop-shadow(0 0 18px rgb(89 224 255 / 0.64))
      drop-shadow(0 0 42px rgb(170 72 255 / 0.38))
      drop-shadow(0 18px 34px rgb(0 0 0 / 0.58));
  }
}

@keyframes hotspotGlow {
  0%, 100% {
    fill-opacity: 0.14;
    stroke-opacity: 0.72;
  }
  50% {
    fill-opacity: 0.28;
    stroke-opacity: 1;
  }
}

@media (max-width: 700px) {
  .top-logo,
  body[data-scene="choice1"] .top-logo {
    width: min(64vw, 360px);
  }

  .pulse-button {
    width: clamp(104px, 26vw, 152px);
  }

  .back-button {
    min-width: 96px;
    padding: 11px 17px;
    font-size: 13px;
  }
}

/* ========================================================
   Мобильная адаптация (планшеты и телефоны)
   ======================================================== */

/* Картинки и видео — на широких экранах по умолчанию cover, на узких — contain */
.scene-image,
.scene-video video {
  object-fit: cover;
  object-position: center center;
}

/* Телефоны портретно: сцена вписывается полностью по высоте (contain).
   Это убирает обрезание которое было когда fit был cover.
   По бокам остаются тонкие чёрные полосы, зато пользователь видит всю сцену.
   На ландшафтной ориентации — снова cover чтобы заполнить экран. */
@media (max-width: 700px) {
  .scene-image,
  .scene-video video {
    object-fit: contain;
  }
}
@media (max-width: 700px) and (orientation: landscape) {
  .scene-image,
  .scene-video video {
    object-fit: cover;
  }
}

/* Универсальное правило: любой экран где высота > ширины и не помещается 16:9 — contain.
   Активируется независимо от ширины (если пользователь открыл на маленьком вертикальном окне десктопа).
   Это не ломает текущие breakpoints — только дополняет. */
@media (max-aspect-ratio: 4/3) {
  .scene-image,
  .scene-video video {
    object-fit: contain;
  }
}

/* Очень маленькие viewport (smart watches, split-screen на мобиле) */
@media (max-width: 380px), (max-height: 380px) {
  .scene-image,
  .scene-video video {
    object-fit: contain;
  }
  .hotspot-tooltip.is-active {
    width: calc(100vw - 8px);
    padding: 11px 12px 12px;
  }
  .partner-form__card {
    padding: 12px 14px 14px;
  }
}

/* Планшеты и маленькие ноутбуки */
@media (max-width: 900px) {
  .hotspot-tooltip {
    width: min(420px, calc(100vw - 32px));
  }
  .hotspot-tooltip.is-active {
    width: min(440px, calc(100vw - 28px));
  }
}

/* Маленькие планшеты и большие телефоны */
@media (max-width: 700px) {
  .top-logo,
  body[data-scene="choice1"] .top-logo {
    width: min(60vw, 320px);
  }
  .hotspot-tooltip {
    width: min(380px, calc(100vw - 24px));
    font-size: 13px;
  }
  .hotspot-tooltip.is-active {
    width: min(420px, calc(100vw - 20px));
  }
  .hotspot-tooltip__title {
    font-size: 19px;
  }
  .hotspot-tooltip__text {
    font-size: 13px;
  }
  .hotspot-tooltip__examples {
    gap: 8px 10px;
  }
  .back-button {
    min-width: 90px;
    padding: 10px 16px;
    font-size: 12.5px;
  }
  .pulse-button {
    width: clamp(96px, 24vw, 130px);
  }
  .manual-start {
    padding: 11px 18px;
    font-size: 13px;
  }
}

/* Телефоны (портретная ориентация) */
@media (max-width: 480px) {
  /* Главная — компактнее */
  .top-logo,
  body[data-scene="choice1"] .top-logo {
    width: min(72vw, 280px);
  }
  .hotspot-tooltip {
    width: calc(100vw - 18px);
    font-size: 12.5px;
    padding: 12px 14px 10px;
  }
  .hotspot-tooltip.is-active {
    width: calc(100vw - 14px);
    padding-bottom: 16px;
  }
  .hotspot-tooltip__type {
    font-size: 9.5px;
  }
  .hotspot-tooltip__title {
    font-size: 17px;
  }
  .hotspot-tooltip__tagline {
    font-size: 12.5px;
  }
  .hotspot-tooltip__text {
    font-size: 12.5px;
    line-height: 1.45;
  }
  .hotspot-tooltip.is-active .hotspot-tooltip__text {
    margin-bottom: 12px;
  }
  .hotspot-tooltip__examples {
    gap: 7px 8px;
    margin-bottom: 12px;
  }
  .hotspot-tooltip.is-active .hotspot-tooltip__examples {
    margin-bottom: 14px;
    gap: 8px 9px;
  }
  .hotspot-tooltip__example {
    padding: 7px 10px;
    font-size: 11.5px;
    min-height: 42px;
  }
  .hotspot-tooltip.is-active .hotspot-tooltip__example {
    padding: 8px 12px;
    min-height: 44px;
  }
  .hotspot-tooltip__close {
    top: 8px;
    right: 8px;
    padding: 5px 12px;
    font-size: 10px;
  }

  /* Кнопка НАЗАД — закреплена снизу */
  .back-button {
    min-width: 88px;
    padding: 10px 14px;
    font-size: 12px;
  }

  /* Pulse-button (главная) — поменьше */
  .pulse-button {
    width: clamp(88px, 22vw, 116px);
  }

  /* Партнёрская форма — fullscreen */
  .partner-form {
    padding: 0;
    align-items: stretch;
  }
  .partner-form__card {
    width: 100%;
    max-height: 100vh;
    max-height: 100svh; /* мобильный viewport */
    height: 100vh;
    height: 100svh;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: max(env(safe-area-inset-top, 12px), 14px) 16px max(env(safe-area-inset-bottom, 12px), 18px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .partner-form__close {
    top: max(env(safe-area-inset-top, 8px), 10px);
    right: 12px;
  }
  .partner-form__title {
    font-size: 20px;
  }
  .partner-form__input {
    font-size: 16px; /* Без 16px iOS зумит */
  }
  .partner-form__tagline {
    font-size: 12.5px;
  }

  /* Поля формы — компактнее */
  .partner-form__body {
    gap: 10px;
  }
  .partner-form__field--captcha .partner-form__label em {
    padding: 3px 9px;
  }
  .partner-form__submit {
    font-size: 12px;
    padding: 13px 18px;
  }
}

/* Очень маленькие экраны (320px iPhone SE) */
@media (max-width: 360px) {
  .hotspot-tooltip.is-active {
    width: calc(100vw - 8px);
    left: 4px !important;
  }
  .hotspot-tooltip {
    width: calc(100vw - 12px);
  }
  .partner-form__card {
    padding: 10px 12px 14px;
  }
  .partner-form__title {
    font-size: 18px;
  }
}

/* Высокие маленькие экраны — ландшафтная ориентация мобилы */
@media (max-height: 480px) and (orientation: landscape) {
  /* На лежащем телефоне: tooltip не должен занимать весь экран */
  .hotspot-tooltip.is-active {
    max-height: calc(100vh - 20px);
    overflow-y: auto;
  }
  .partner-form__card {
    max-height: 100vh;
    max-height: 100svh;
  }
}

/* Тач-устройства — убираем hover-эффекты чтобы не залипали */
@media (hover: none) {
  .hotspot-rect:hover {
    opacity: 0;
  }
}

/* Большие экраны — на десктопе не сжимаем */
@media (min-width: 1280px) {
  .hotspot-tooltip.is-active {
    width: 460px;
  }
}

/* Ультра-широкие мониторы (UWQHD 3440×1440, 4K 3840×2160 и шире).
   Картинки сцен имеют aspect-ratio ~1.78 (1672×941). Чтобы не растягивались
   на 21:9, держим пропорцию 16:9 — по бокам остаются тонкие чёрные полосы
   но сцена показывается целиком, без обрезания. */
@media (min-aspect-ratio: 16/10) and (min-width: 1600px) {
  .stage {
    /* фиксируем сцену пропорционально контенту */
    background: #03040a;
  }
  .media-layer picture,
  .scene-image,
  .scene-video,
  .scene-video video {
    /* contain вместо cover — вписываем сцену полностью без обрезки,
       оставляя чёрные полосы сверху/снизу или по бокам при несовпадении пропорций */
    object-fit: contain;
    object-position: center center;
    background: #03040a;
  }
}

/* Очень широкие экраны (≥21:9) — гарантируем что scene показывается полностью */
@media (min-aspect-ratio: 21/9) {
  .scene-image,
  .scene-video video {
    object-fit: contain;
  }
}

/* Стандартные десктопы 1024×768-1280×800 — немного компактнее чтобы не вылезало */
@media (max-width: 1280px) and (min-width: 1025px) {
  .hotspot-tooltip {
    width: min(290px, calc(100vw - 36px));
  }
  .hotspot-tooltip.is-active {
    width: min(440px, calc(100vw - 36px));
  }
  .pulse-button {
    width: clamp(118px, 12vw, 150px);
  }
  .top-logo,
  body[data-scene="choice1"] .top-logo {
    width: min(34vw, 480px);
  }
}

/* Очень узкие десктопы (960-1024) — то же что для планшетов */
@media (max-width: 1024px) and (min-width: 901px) {
  .hotspot-tooltip.is-active {
    width: min(420px, calc(100vw - 32px));
  }
}

/* prefers-reduced-motion — отключаем анимации если пользователь их отключил */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================================================ */
/* Левая панель: страницы + услуги + счетчик исследования            */
/* Правая часть остаётся интерактивным кино.                         */
/* ================================================================ */
.side-nav {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: min(190px, calc(100vw - 24px));
  max-height: calc(100vh - 132px);
  padding: 10px;
  border: 1px solid rgb(56 189 248 / 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgb(3 4 10 / 0.72), rgb(3 4 10 / 0.42));
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.28);
  backdrop-filter: blur(10px) saturate(1.12);
  -webkit-backdrop-filter: blur(10px) saturate(1.12);
  pointer-events: auto;
  overflow-y: auto;
  scrollbar-width: thin;
}
.side-nav__btn {
  display: block;
  width: 100%;
  padding: 9px 12px;
  background: rgb(3 4 10 / 0.66);
  color: rgb(56 189 248);
  border: 1px solid rgb(56 189 248 / 0.42);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.18;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.2s, color 0.2s, transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  white-space: normal;
  pointer-events: auto;
}
.side-nav__btn:hover,
.side-nav__btn:focus-visible {
  background: rgb(56 189 248);
  color: #03040a;
  transform: translateX(2px);
  border-color: rgb(56 189 248);
  box-shadow: 0 0 22px rgb(56 189 248 / 0.18);
  outline: none;
}
.side-nav__btn--service {
  padding-left: 18px;
  font-weight: 650;
  font-size: 12.5px;
  color: rgb(186 230 253);
  background: rgb(15 23 42 / 0.52);
}
.side-nav__btn--muted span {
  display: block;
  margin-top: 2px;
  color: rgb(247 243 232 / 0.52);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.side-nav__label {
  margin: 5px 2px 1px;
  color: rgb(247 243 232 / 0.68);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  pointer-events: none;
}
.side-nav.is-hidden { display: none; }

/* НОВОЕ: чекбокс согласия на обработку ПД в форме партнёрства */
.partner-form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: rgb(247 243 232 / 0.7);
  margin: 12px 0 16px;
  cursor: pointer;
}
.partner-form__checkbox input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: rgb(56 189 248);
}
.partner-form__checkbox a {
  color: rgb(56 189 248);
  text-decoration: none;
}
.partner-form__checkbox a:hover { text-decoration: underline; }


/* ================================================================
   Кино-UX: счетчик исследованных локаций внутри левой панели
   ================================================================ */
.scene-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid rgb(56 189 248 / 0.28);
  border-radius: 14px;
  background: rgb(3 4 10 / 0.58);
  color: rgb(247 243 232 / 0.78);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  pointer-events: none;
}
.scene-progress.is-hidden { display: none; }
.scene-progress--mobile { display: none; }
.scene-progress__label {
  line-height: 1.25;
}
.scene-progress__value {
  flex: 0 0 auto;
  color: #38bdf8;
  font-weight: 900;
  text-shadow: 0 0 12px rgb(56 189 248 / 0.5);
}
.mobile-legal-strip {
  display: none;
}

.hotspot-tooltip__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.hotspot-tooltip__lead {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--hotspot-color) 42%, white 14%);
  background: rgb(255 255 255 / 0.08);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}
.hotspot-tooltip__lead:hover {
  background: color-mix(in srgb, var(--hotspot-color) 18%, transparent);
  border-color: var(--hotspot-color);
  transform: translateY(-1px);
}
.partner-form__textarea {
  resize: vertical;
  min-height: 82px;
}
.partner-form__field--hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.partner-form__status a { color: #fef3c7; font-weight: 700; }
@media (max-width: 700px) {
  /* Mobile-only: вместо длинной левой башни делаем две компактные колонки.
     Слева остаются О нас/Проекты/Контакты/Блог, справа — услуги.
     Так меню меньше перекрывает город на iPhone 16 Pro и похожих экранах. */
  .side-nav {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    top: max(10px, env(safe-area-inset-top));
    width: min(360px, calc(100vw - 20px));
    right: auto;
    max-width: calc(100vw - 20px);
    max-height: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(128px, 0.86fr);
    grid-auto-flow: row;
    grid-auto-rows: min-content;
    align-items: start;
    gap: 6px 8px;
    padding: 8px;
    overflow: visible;
  }

  .side-nav__btn,
  .side-nav__label {
    min-width: 0;
  }

  .side-nav__btn {
    width: auto;
    min-height: 34px;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: clamp(11px, 3.15vw, 12.5px);
    line-height: 1.12;
  }

  .side-nav__btn:not(.side-nav__btn--service) {
    grid-column: 1;
  }

  /* Главное: обе колонки стартуют сверху на одном уровне, а не ступенькой. */
  .side-nav__btn:not(.side-nav__btn--service):nth-of-type(1) { grid-row: 1; }
  .side-nav__btn:not(.side-nav__btn--service):nth-of-type(2) { grid-row: 2; }
  .side-nav__btn:not(.side-nav__btn--service):nth-of-type(3) { grid-row: 3; }
  .side-nav__btn:not(.side-nav__btn--service):nth-of-type(4) { grid-row: 4; }

  .side-nav__label,
  .side-nav__btn--service {
    grid-column: 2;
  }

  .side-nav__label {
    display: none;
  }

  .side-nav__btn--service:nth-of-type(5) { grid-row: 1; }
  .side-nav__btn--service:nth-of-type(6) { grid-row: 2; }
  .side-nav__btn--service:nth-of-type(7) { grid-row: 3; }
  .side-nav__btn--service:nth-of-type(8) { grid-row: 4; }
  .side-nav__btn--service:nth-of-type(9) { grid-row: 5; }

  .side-nav__btn--service {
    min-height: 31px;
    padding: 6px 8px;
    padding-left: 9px;
    font-size: clamp(10.2px, 2.85vw, 11.5px);
    color: rgb(210 240 252);
  }

  .side-nav__btn--muted span {
    display: block;
    margin-top: 1px;
    margin-left: 0;
    font-size: 8.5px;
    letter-spacing: 0.06em;
    white-space: normal;
  }

  /* Встроенный десктопный счётчик на телефоне прячем, а отдельный мобильный ставим над «Назад». */
  .side-nav > .scene-progress {
    display: none;
  }

  .scene-progress--mobile:not(.is-hidden) {
    position: absolute;
    left: max(18px, env(safe-area-inset-left));
    bottom: calc(env(safe-area-inset-bottom) + 78px);
    z-index: 31;
    display: flex;
    width: min(156px, calc(100vw - 36px));
    margin: 0;
    padding: 8px 10px;
    gap: 7px;
    border-radius: 13px;
    font-size: 9.5px;
    background: rgb(3 4 10 / 0.66);
    box-shadow: 0 16px 42px rgb(0 0 0 / 0.26);
  }

  .mobile-legal-strip {
    position: absolute;
    left: max(18px, env(safe-area-inset-left));
    right: max(18px, env(safe-area-inset-right));
    bottom: calc(env(safe-area-inset-bottom) + 132px);
    z-index: 31;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    max-width: 360px;
    color: rgb(247 243 232 / 0.58);
    font-size: 9.2px;
    line-height: 1.28;
    letter-spacing: 0.01em;
    pointer-events: auto;
  }
  .mobile-legal-strip a {
    color: rgb(56 189 248 / 0.9);
    text-decoration: underline;
    text-underline-offset: 2px;
  }
}


/* Cookies: небольшая плашка, не вмешивается в кинематографичную сцену */
.cookie-banner {
  position: fixed;
  z-index: 80;
  left: clamp(14px, 3vw, 32px);
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 18px;
  border: 1px solid rgb(56 189 248 / 0.28);
  border-radius: 18px;
  background: rgb(3 4 10 / 0.86);
  color: #f7f3e8;
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.38);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
}
.cookie-banner.is-hidden { display: none; }
.cookie-banner__text { display: grid; gap: 3px; font-size: 13px; line-height: 1.45; color: rgb(247 243 232 / 0.76); }
.cookie-banner__text strong { color: #fff; font-size: 14px; }
.cookie-banner a { color: #38bdf8; text-decoration: none; font-weight: 800; }
.cookie-banner a:hover { text-decoration: underline; }
.cookie-banner__actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.cookie-banner__button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: #38bdf8;
  color: #03040a;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.cookie-banner__button:hover { filter: brightness(1.08); }
@media (max-width: 700px) {
  /* Мобильная cookie/legal плашка: компактно снизу справа, чтобы не закрывать
     левый нижний узел с «исследовано локаций» и кнопкой «Назад». */
  .cookie-banner {
    left: min(188px, calc(100vw - 202px));
    right: auto;
    bottom: calc(env(safe-area-inset-bottom) + 12px);
    width: clamp(168px, calc(100vw - 206px), 196px);
    min-width: 0;
    max-width: 196px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 11px;
    border-radius: 14px;
  }
  .cookie-banner__text {
    gap: 2px;
    font-size: 10.5px;
    line-height: 1.3;
  }
  .cookie-banner__text strong {
    font-size: 11.5px;
  }
  .cookie-banner__text span {
    display: none;
  }
  .cookie-banner__actions {
    justify-content: space-between;
    gap: 8px;
  }
  .cookie-banner__actions a {
    font-size: 11px;
  }
  .cookie-banner__button {
    padding: 8px 11px;
    font-size: 11px;
  }
}

@media (max-width: 700px) {
  /* Mobile-only: карточки зданий после тапа были слишком крупными и уходили
     под верхнее меню. Сжимаем примерно на 30%, поднимаем слой над меню и
     ограничиваем высоту, чтобы legal/progress/Назад снизу оставались видимыми. */
  .hotspot-tooltip.is-active.is-pinned {
    z-index: 32;
    left: max(12px, env(safe-area-inset-left)) !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    top: clamp(214px, 26svh, 252px) !important;
    width: auto;
    max-width: none;
    max-height: min(46svh, 430px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 9px 11px 10px;
    border-radius: 14px;
    box-shadow:
      0 0 24px color-mix(in srgb, var(--hotspot-color) 28%, transparent),
      0 18px 54px rgb(0 0 0 / 0.48);
  }
  .hotspot-tooltip.is-active.is-pinned .hotspot-tooltip__bar {
    width: 24px;
    height: 2px;
    margin-bottom: 7px;
  }
  .hotspot-tooltip.is-active.is-pinned .hotspot-tooltip__type {
    font-size: 8px;
    letter-spacing: 0.14em;
  }
  .hotspot-tooltip.is-active.is-pinned .hotspot-tooltip__title {
    margin-top: 2px;
    margin-bottom: 5px;
    font-size: 15px;
    line-height: 1.12;
  }
  .hotspot-tooltip.is-active.is-pinned .hotspot-tooltip__tagline {
    margin-bottom: 6px;
    font-size: 10.5px;
    line-height: 1.25;
  }
  .hotspot-tooltip.is-active.is-pinned .hotspot-tooltip__text {
    margin-bottom: 8px;
    font-size: 10.8px;
    line-height: 1.34;
  }
  .hotspot-tooltip.is-active.is-pinned .hotspot-tooltip__examples {
    margin-bottom: 9px;
    gap: 6px;
  }
  .hotspot-tooltip.is-active.is-pinned .hotspot-tooltip__example {
    min-height: 32px;
    padding: 5px 7px;
    gap: 6px;
    border-radius: 8px;
    font-size: 10px;
    line-height: 1.18;
  }
  .hotspot-tooltip.is-active.is-pinned .hotspot-tooltip__example-icon {
    width: 16px;
    height: 16px;
  }
  .hotspot-tooltip.is-active.is-pinned .hotspot-tooltip__actions {
    gap: 8px;
    align-items: center;
  }
  .hotspot-tooltip.is-active.is-pinned .hotspot-tooltip__more,
  .hotspot-tooltip.is-active.is-pinned .hotspot-tooltip__lead {
    margin-top: 3px;
    padding: 8px 12px;
    min-height: 36px;
    font-size: 10.5px;
    letter-spacing: 0.13em;
  }
  .hotspot-tooltip.is-active.is-pinned .hotspot-tooltip__close {
    top: 7px;
    right: 7px;
    padding: 4px 9px;
    font-size: 8.5px;
  }
}

@media (max-width: 700px) {
  /* Mobile-only: форма заявки не должна быть fullscreen-простынёй.
     Делаем её компактной карточкой в той же зоне, что и уменьшенные менюшки:
     ниже верхней навигации и выше legal/progress/back-кластера. */
  .partner-form {
    z-index: 32;
    align-items: flex-start;
    justify-content: center;
    padding:
      clamp(214px, 26svh, 252px)
      max(12px, env(safe-area-inset-right))
      calc(env(safe-area-inset-bottom) + 120px)
      max(12px, env(safe-area-inset-left));
    background: rgb(2 4 12 / 0.16);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .partner-form__card {
    width: 100%;
    height: auto;
    max-height: min(52svh, 430px);
    padding: 9px 11px 10px;
    border-radius: 14px;
    border-left: 1px solid color-mix(in srgb, var(--hotspot-color, #22c55e) 50%, white 18%);
    border-right: 1px solid color-mix(in srgb, var(--hotspot-color, #22c55e) 50%, white 18%);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow:
      0 0 24px color-mix(in srgb, var(--hotspot-color, #22c55e) 28%, transparent),
      0 18px 54px rgb(0 0 0 / 0.48);
  }
  .partner-form__bar {
    width: 24px;
    height: 2px;
    margin-bottom: 7px;
  }
  .partner-form__type {
    font-size: 8px;
    letter-spacing: 0.14em;
  }
  .partner-form__title {
    margin: 2px 72px 4px 0;
    font-size: 15px;
    line-height: 1.12;
  }
  .partner-form__tagline {
    margin-bottom: 7px;
    font-size: 10.5px;
    line-height: 1.25;
  }
  .partner-form__body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 8px;
  }
  .partner-form__field--captcha {
    grid-column: 1;
  }
  .partner-form__checkbox {
    grid-column: 2;
  }
  .partner-form__submit,
  .partner-form__status {
    grid-column: 1 / -1;
  }
  .partner-form__field {
    gap: 2px;
  }
  .partner-form__label {
    font-size: 9.8px;
    line-height: 1.2;
    letter-spacing: 0.035em;
  }
  .partner-form__input {
    min-height: 34px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 16px; /* важно для iOS: без 16px Safari зумит поле */
    line-height: 1.12;
  }
  .partner-form__textarea {
    min-height: 48px;
    max-height: 64px;
  }
  .partner-form__error {
    min-height: 0;
    font-size: 9px;
    line-height: 1.12;
  }
  .partner-form__checkbox {
    gap: 6px;
    margin: 6px 0 8px;
    font-size: 9.8px;
    line-height: 1.25;
  }
  .partner-form__checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
  }
  .partner-form__field--captcha .partner-form__label em {
    padding: 2px 7px;
  }
  .partner-form__submit {
    margin-top: 2px;
    min-height: 36px;
    padding: 8px 12px;
    font-size: 10.5px;
    letter-spacing: 0.13em;
  }
  .partner-form__status {
    margin-top: 7px;
    min-height: 12px;
    font-size: 10.5px;
    line-height: 1.28;
  }
  .partner-form__close {
    top: 7px;
    right: 7px;
    padding: 4px 9px;
    font-size: 8.5px;
  }
  .lead-success-notice {
    align-items: flex-start;
    justify-content: center;
    padding:
      clamp(214px, 26svh, 252px)
      max(12px, env(safe-area-inset-right))
      calc(env(safe-area-inset-bottom) + 120px)
      max(12px, env(safe-area-inset-left));
    background: rgb(2 4 12 / 0.18);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .lead-success-notice__card {
    width: 100%;
    padding: 10px 11px 12px;
    border-radius: 14px;
  }
  .lead-success-notice__bar {
    width: 24px;
    height: 2px;
    margin-bottom: 7px;
  }
  .lead-success-notice__type {
    font-size: 8px;
    letter-spacing: 0.14em;
  }
  .lead-success-notice__title {
    margin: 2px 72px 6px 0;
    font-size: 17px;
    line-height: 1.12;
  }
  .lead-success-notice__text {
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.35;
  }
  .lead-success-notice__ok {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 10.5px;
    letter-spacing: 0.13em;
  }
  .lead-success-notice__close {
    top: 7px;
    right: 7px;
    padding: 4px 9px;
    font-size: 8.5px;
  }
}
