/* BIODOM — Пътят на водата */
:root {
  --ink: #0d0f10;
  --blue: #1b75bb;
  --green: #39b54a;
  --paper: #f6f4f1;
  /* Един мащаб за целия интерфейс: 1800px е референтната ширина. По-малък
     екран смалява картите и надписите пропорционално, по-голям ги качва,
     и композицията изглежда еднакво навсякъде. Кадрите не се пипат — те
     са cover и сами се държат така.
     СТОЙНОСТТА я слага main.js при resize: scale() иска ЧИСЛО, а
     calc(100vw/1800) в CSS е дължина и трансформът тихо умира. Тук стои
     само резервното 1. */
  --uiz: 1;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  overflow-x: clip; /* НЕ hidden — чупи sticky на iOS */
  scroll-behavior: auto;
}
body {
  background: var(--ink);
  color: var(--paper);
  font-family: "Golos Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* ---------- topbar ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 26px;
  mix-blend-mode: difference;
  pointer-events: none;
}
.brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
}
.brand span {
  color: #8ec9ff;
}
.brand img {
  display: block;
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}
@media (max-width: 820px) and (orientation: portrait) {
  .brand img {
    height: 22px;
  }
}
.tag {
  font-size: 10px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  opacity: 0.75;
}

/* ---------- film ---------- */
.film {
  position: relative;
  width: 100%;
}
.film-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  width: 100%;
  overflow: hidden;
  background: var(--ink);
}
.js-pin .film-stage {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}
#filmCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- scroll hint ---------- */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  font-size: 9.5px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transition: opacity 0.5s ease;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.6),
    0 0 14px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 5;
}
.scroll-hint i {
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, #fff, transparent);
  animation: drip 2.1s ease-in-out infinite;
}
@keyframes drip {
  0% {
    transform: scaleY(0.2);
    transform-origin: top;
    opacity: 0;
  }
  40% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    transform-origin: bottom;
    opacity: 0;
  }
}

/* ---------- outro ---------- */
.outro {
  position: relative;
  z-index: 10;
  background: var(--ink);
  padding: 16vh 8vw 18vh;
  text-align: center;
}
.outro h1 {
  font-size: clamp(28px, 5.2vw, 64px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 26px;
}
.outro h1 em {
  font-style: normal;
  color: #8ec9ff;
}
.outro p {
  font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.65;
  opacity: 0.72;
  max-width: 620px;
  margin: 0 auto 38px;
}
.cta {
  display: inline-block;
  padding: 15px 34px;
  border: 1.5px solid var(--paper);
  border-radius: 2px;
  color: var(--paper);
  text-decoration: none;
  font-size: 11.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition:
    background 0.25s ease,
    color 0.25s ease;
}
.cta:hover {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- mobile ---------- */
@media (max-width: 820px) and (orientation: portrait) {
  .topbar {
    padding: 14px 18px;
  }
  .brand {
    font-size: 13px;
  }
  .tag {
    font-size: 9px;
    letter-spacing: 2.5px;
  }
  .film-stage::after {
    /* долен скрим — текстът на моб. е bottom-anchored */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 32%;
    background: linear-gradient(
      to top,
      rgba(13, 15, 16, 0.86),
      transparent 70%
    );
    pointer-events: none;
  }
}

/* ================= ИНТРО ================= */
.intro {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition:
    opacity 0.8s ease,
    visibility 0.8s;
}
.intro.out {
  opacity: 0;
  visibility: hidden;
}
.intro-word {
  display: flex;
  gap: 0.06em;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: clamp(30px, 8vw, 86px);
  line-height: 1;
}
.intro-word i {
  font-style: normal;
  display: inline-block;
  opacity: 0;
  transform: translateY(26px) scale(0.9);
  transition:
    opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.intro-word i.in {
  opacity: 1;
  transform: none;
}
.intro-word i:nth-child(3),
.intro-word i:nth-child(4) {
  color: #8ec9ff;
}
.intro-sub {
  font-size: clamp(9px, 2.4vw, 12px);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.intro.sub-in .intro-sub {
  opacity: 0.6;
  transform: none;
}

/* ================= СПИРКИ ================= */
.stops {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
.stop {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  will-change: opacity;
}
.stop-in {
  transition: transform 0.28s ease;
  will-change: transform;
}
.stop-in {
  /* по-прозрачна и по-стегната: картата е за цъкане, не за четене на роман —
     системата отзад трябва да се вижда (искане на magic, 11.08) */
  background: rgba(10, 12, 13, 0.66);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  padding: 15px 17px;
}
.stop-eyebrow {
  display: block;
  font-size: 9px;
  letter-spacing: 3.2px;
  text-transform: uppercase;
  color: #8ec9ff;
  margin-bottom: 9px;
}
.stop h2 {
  font-size: 16px;
  line-height: 1.22;
  font-weight: 700;
  margin-bottom: 9px;
  letter-spacing: -0.2px;
}
/* 06.10 (бележка на клиента): дългите заглавия се пренасят на два реда и вторият ред висеше
   отляво („Термопомпа въздух- / вода"). Шапката на картата се центрира; текстът остава отляво. */
.stop-eyebrow,
.stop h2 {
  text-align: center;
}
.stop p {
  font-size: 12.5px;
  line-height: 1.66;
  opacity: 0.94;
  margin-bottom: 17px;
}

.stop-specs {
  list-style: none;
  margin-bottom: 14px;
}
.stop-specs li {
  font-size: 13px;
  opacity: 0.72;
  padding-left: 15px;
  position: relative;
  margin-bottom: 5px;
}
.stop-specs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  background: #8ec9ff;
  border-radius: 50%;
}
.stop-points {
  margin-bottom: 12px;
}
.stop-points dt {
  font-size: 15.5px;
  font-weight: 700;
  margin-top: 14px;
}
.stop-points dt:first-child {
  margin-top: 0;
}
.stop-points dd {
  font-size: 15.5px;
  line-height: 1.62;
  opacity: 0.88;
  margin-top: 4px;
}

.stop-picklabel {
  display: block;
  font-size: 9px;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 8px;
}
.stop-opts {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.opt {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  padding: 7px 10px;
  color: var(--paper);
  font-family: inherit;
  transition:
    background 0.18s ease,
    border-color 0.18s ease;
}
.opt:hover {
  background: rgba(255, 255, 255, 0.1);
}
.opt.on {
  background: rgba(142, 201, 255, 0.16);
  border-color: #8ec9ff;
}
.opt b {
  display: block;
  font-size: 13px;
  font-weight: 700;
}
.opt i {
  display: block;
  font-style: normal;
  font-size: 11px;
  opacity: 0.72;
  margin-top: 3px;
}

/* --- карта с 5+ варианта (лирите): по-стегнати редове --- */
.stop--dense .stop-opts {
  gap: 5px;
}
.stop--dense .opt {
  padding: 5px 10px;
}
.stop--dense .opt i {
  margin-top: 1px;
}
.stop--dense p {
  margin-bottom: 10px;
}

/* --- подизбор на цвят: кръгчета с истинската тъкан (ATY DC DEKO) --- */
.stop-colors {
  margin-top: 12px;
}
.stop-colors[hidden] {
  display: none;
}
.sc-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 9px;
}
.sc-head .stop-picklabel {
  margin-bottom: 0;
}
.sc-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.sc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  /* пръстенът на избраното кръгче излиза 4px извън него — да не го реже картата */
  padding: 4px 4px 2px;
  margin: 0 -4px;
}
.sw {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background-color: #888;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.sw:hover {
  transform: scale(1.1);
}
.sw.on {
  border-color: transparent;
  box-shadow:
    0 0 0 2px #0d0f10,
    0 0 0 4px #8ec9ff;
}
.sw:focus-visible {
  outline: 2px solid #8ec9ff;
  outline-offset: 3px;
}
@media (max-width: 820px) and (orientation: portrait) {
  /* на телефон картата покрива долната половина на екрана — докато се избира цвят, тя
     става пулт: абзацът, заглавието и надзаглавието се прибират (името на продукта стои
     горе в големия надпис), за да се вижда самият продукт над нея */
  .stop.colors-open p,
  .stop.colors-open h2,
  .stop.colors-open .stop-eyebrow {
    display: none;
  }
  /* 7 × 34 + 6 × 10 = 298px — един ред и на 360px телефон (картата е 304px отвътре) */
  .sc-row {
    gap: 10px;
  }
  .sw {
    width: 34px;
    height: 34px;
  } /* мишена за пръст */
}

.stop-link,
.stop-openlink {
  display: inline-block;
  margin-top: 13px;
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #8ec9ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(142, 201, 255, 0.4);
  padding-bottom: 2px;
}

/* --- десктоп: карта вдясно --- */
@media (min-width: 821px), (orientation: landscape) {
  .stop {
    right: 3vw;
    top: 50%;
    transform: translateY(-50%);
    width: min(370px, 27vw);
  }
  .stop-in {
    max-height: 78vh;
    overflow-y: auto;
  }
}

/* --- мобилно: картата долу, палецът я стига --- */
@media (max-width: 820px) and (orientation: portrait) {
  .stop {
    left: 12px;
    right: 12px;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .stop-in {
    padding: 16px 16px 18px;
    max-height: 56svh;
    overflow-y: auto;
    background: rgba(12, 14, 15, 0.74);
  }
  .stop h2 {
    font-size: 17px;
  }
  .stop p {
    font-size: 12.5px;
    margin-bottom: 12px;
  }
  .stop-points dd {
    font-size: 11.5px;
  }
  .opt {
    padding: 12px 12px;
  } /* по-голяма мишена за пръст */
  .opt b {
    font-size: 12.5px;
  }
  .scroll-hint {
    bottom: auto;
    top: calc(60px + env(safe-area-inset-top));
  }
  /* горе на телефона стои и големият надпис на спирката — подсказката се
     скрива, докато той е на екрана, за да не се четат един върху друг */
  /* !important, защото main.js пише opacity инлайн на подсказката */
  .big.on ~ .scroll-hint {
    opacity: 0 !important;
  }
}

/* ---------- смяна на визията върху филма ---------- */
.swap {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    visibility 0.35s;
  cursor: pointer;
}
.swap.on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.swap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.swap-x {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(12, 14, 15, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 10px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}
@media (max-width: 820px) and (orientation: portrait) {
  .swap-x {
    top: calc(52px + env(safe-area-inset-top));
    font-size: 9.5px;
    padding: 9px 15px;
  }
}

/* ================= СТАЯТА — потапящ режим ================= */
/* Кликваш кадъра на варианта → интерфейсът се маха, оставаш сам в стаята.
   Изход: „← Назад към обиколката", повторен клик или Escape. */
.swap-hint {
  display: none; /* само вариант със своя стая (has-room) го показва */
  position: absolute;
  right: calc(18px + env(safe-area-inset-right));
  bottom: calc(20px + env(safe-area-inset-bottom));
  background: rgba(12, 14, 15, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 10px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  animation: hintPulse 2.6s ease-in-out infinite;
}
.swap.has-room .swap-hint {
  display: block;
}
.swap.has-room {
  cursor: zoom-in;
}
@keyframes hintPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.14);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(255, 255, 255, 0);
  }
}
.swap img {
  transition: transform 1.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.room-back {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 30;
  background: rgba(12, 14, 15, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: inherit;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 10px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    visibility 0.4s;
}
html.room-view .room-back {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
html.room-view .topbar,
html.room-view .rail,
html.room-view .big,
html.room-view .stops,
html.room-view .mark,
html.room-view .gatebar,
html.room-view .ava-btn,
html.room-view .scroll-hint,
html.room-view .swap-x,
html.room-view .swap-hint {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.4s ease;
}
html.room-view .swap img {
  transform: scale(1.045);
}

/* ================= GATE — заключена спирка ================= */
.gatebar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.4s ease,
    visibility 0.4s;
}
.gatebar.on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.gate-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  background: #8ec9ff;
  color: #0d0f10;
  border: 0;
  border-radius: 999px;
  padding: 14px 30px;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.42);
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}
.gate-btn:hover {
  transform: translateY(-2px);
  background: #a8d5ff;
}
.gate-btn i {
  width: 8px;
  height: 8px;
  border-right: 2px solid #0d0f10;
  border-bottom: 2px solid #0d0f10;
  transform: rotate(45deg) translate(-1px, -1px);
  animation: gnudge 1.7s ease-in-out infinite;
}
@keyframes gnudge {
  0%,
  100% {
    opacity: 0.5;
    margin-top: 0;
  }
  50% {
    opacity: 1;
    margin-top: 4px;
  }
}
.gate-note {
  font-size: 9.5px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  opacity: 0.6;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}
.is-gated .scroll-hint {
  opacity: 0 !important;
}

@media (max-width: 820px) and (orientation: portrait) {
  /* на телефон картата е долу — бутонът отива НАД нея */
  .gatebar {
    bottom: auto;
    top: calc(60px + env(safe-area-inset-top));
  }
  .gate-btn {
    padding: 12px 24px;
    font-size: 11px;
    letter-spacing: 2px;
  }
  .gate-note {
    display: none;
  }
  .swap-x {
    top: calc(112px + env(safe-area-inset-top));
  }
}

/* ============ ГОЛЯМ НАДПИС — кино/корица ============ */
.big {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 9vh;
  /* ПОД картата на спирката (z=6 е .stops, тук 5): заглавието е декор,
     картата е интерфейс — при застъпване интерфейсът печели. */
  z-index: 5;
  width: min(1200px, 90vw);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.big.on {
  opacity: 1;
}
.big-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #cfe4f7;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(-10px);
  margin-bottom: 14px;
}
.big.on .big-eyebrow {
  animation: bigDown 0.6s cubic-bezier(0.16, 0.84, 0.28, 1) 0.1s forwards;
}
.big-num {
  color: #8ec9ff;
  font-weight: 600;
}
.big-line {
  width: 44px;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
}
.big-t {
  font-family: "Prata", Georgia, serif;
  font-weight: 400;
  font-size: clamp(38px, 6.8vw, 104px);
  line-height: 1.02;
  letter-spacing: 0.2px;
  text-shadow:
    0 4px 30px rgba(0, 0, 0, 0.85),
    0 0 90px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(30px) scale(0.985);
  clip-path: inset(0 0 100% 0);
}
.big.on .big-t {
  animation: bigReveal 0.9s cubic-bezier(0.16, 0.84, 0.28, 1) 0.18s forwards;
}
/* Малък вариант (технически кадри като сервизното): заглавието не бива
   да ляга върху оборудването — по-дребно, горе, над тавана на стаята. */
.big--s .big-t {
  font-size: clamp(24px, 3vw, 46px);
  line-height: 1.05;
}
.big--s .big-specs {
  margin-top: 12px;
  gap: 8px;
}
.big--s .big-specs span {
  padding: 6px 13px;
  font-size: 10px;
  letter-spacing: 1.8px;
}
.big--s .big-eyebrow {
  margin-bottom: 8px;
}
@keyframes bigReveal {
  40% {
    clip-path: inset(0 0 0 0);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}
@keyframes bigDown {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes bigIn {
  to {
    opacity: 1;
    transform: none;
  }
}
.big-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 22px;
  justify-content: center;
}
.big-specs span {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(10, 12, 13, 0.46);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 9px 19px;
  font-size: 12px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(16px);
}
.big.on .big-specs span {
  animation: bigIn 0.55s cubic-bezier(0.16, 0.84, 0.28, 1) forwards;
}

/* ============ HERO КОРИЦА ============ */
/* мека тъмна подложка зад текста на корицата: къщата отзад е шарена (камък, стъкло, дърво) и буквите се губеха */
.cover::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6vh;
  width: min(1100px, 92vw);
  height: 46vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 58%, rgba(8, 10, 12, 0.62) 0%, rgba(8, 10, 12, 0.38) 42%, rgba(8, 10, 12, 0) 72%);
  pointer-events: none;
  z-index: -1;
}
.cover {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 16vh;
  text-align: center;
  opacity: 0;
  pointer-events: none;
}
html.cover-in .cover {
  transition: opacity 0.9s ease 0.1s;
  opacity: 1;
}
.cover-eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #cfe4f7;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(12px);
}
.cover-t {
  font-family: "Prata", Georgia, serif;
  font-weight: 400;
  /* по-малко и по-четимо (magic, 21.09): беше 7.4vw / до 116px и лягаше върху цялата къща */
  font-size: clamp(34px, 4.6vw, 74px);
  line-height: 1.1;
  letter-spacing: 0.2px;
  text-shadow:
    0 2px 14px rgba(0, 0, 0, 0.9),
    0 6px 44px rgba(0, 0, 0, 0.75),
    0 0 110px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(26px);
}
.cover-sub {
  margin-top: 18px;
  font-size: clamp(13px, 1.25vw, 17px);
  letter-spacing: 0.6px;
  opacity: 0;
  transform: translateY(12px);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}
html.cover-in .cover-eyebrow {
  animation: bigDown 0.7s cubic-bezier(0.16, 0.84, 0.28, 1) 0.25s forwards;
}
html.cover-in .cover-t {
  animation: bigIn 0.9s cubic-bezier(0.16, 0.84, 0.28, 1) 0.4s forwards;
}
html.cover-in .cover-sub {
  animation: bigIn 0.7s cubic-bezier(0.16, 0.84, 0.28, 1) 0.75s forwards;
}

/* интрото също на Prata */
.intro-word {
  font-family: "Prata", Georgia, serif;
  font-weight: 400;
}

/* панелите: заглавие в Prata, eyebrow в Mono */
.stop h2 {
  font-family: "Prata", Georgia, serif;
  font-weight: 400;
  font-size: 30px;
}
.stop-eyebrow {
  font-family: "IBM Plex Mono", monospace;
}
.stop-picklabel {
  font-family: "IBM Plex Mono", monospace;
}
.gate-note {
  font-family: "IBM Plex Mono", monospace;
}

/* лека горна винетка за четимост на надписите */
.film-stage::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 34%;
  z-index: 6;
  background: linear-gradient(
    to bottom,
    rgba(10, 12, 13, 0.5),
    transparent 75%
  );
  pointer-events: none;
}

@media (max-width: 820px) and (orientation: portrait) {
  .big {
    top: calc(70px + env(safe-area-inset-top));
    width: 94vw;
  }
  .big-t {
    font-size: clamp(26px, 8vw, 40px);
  }
  .big-eyebrow {
    font-size: 9px;
    letter-spacing: 2.6px;
    margin-bottom: 10px;
  }
  .big-specs {
    gap: 6px;
    margin-top: 12px;
  }
  .big-specs span {
    font-size: 9px;
    padding: 6px 11px;
    letter-spacing: 1.2px;
  }
  .cover {
    padding-bottom: 22vh;
  }
  .cover-t {
    /* 23.09: новият надпис е дълъг — при 9.6vw се чупеше на 4 реда на телефон; 7.4vw го държи на 2 */
    font-size: clamp(25px, 7.4vw, 34px);
  }
  /* gate бутонът долу, панелът над него */
  .gatebar {
    top: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }
  .stop {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }
  .stop-in {
    max-height: 46svh;
  }
  /* „Затвори ✕" стои в тясната ивица между горната лента и надписа, вдясно: на 64px в средата лягаше точно
     върху първия ред на надписа (намерено от одита на 21.09). */
  .swap-x {
    top: calc(41px + env(safe-area-inset-top));
    left: auto;
    right: 12px;
    transform: none;
    padding: 6px 12px;
  }
}

/* телефон: надписът под продукта, когато продуктът е горе в кадъра (stop.mBigTop) */
@media (max-width: 820px) and (orientation: portrait) {
  .big.big--m-low {
    top: var(--m-big-top, 38svh);
  }
  .big.big--m-low .big-specs {
    display: none;
  }
}

/* ============ ПОЗИЦИИ НА ГОЛЕМИЯ НАДПИС ============ */
.big--bc {
  top: auto;
  bottom: 13vh;
}
.big--tl,
.big--bl {
  left: 5vw;
  transform: none;
  text-align: left;
  width: min(720px, 48vw);
}
.big--tr,
.big--br {
  left: auto;
  right: 5vw;
  transform: none;
  text-align: right;
  width: min(720px, 48vw);
}
.big--bl,
.big--br {
  top: auto;
  bottom: 13vh;
}
.big--tl .big-eyebrow,
.big--bl .big-eyebrow {
  justify-content: flex-start;
}
.big--tr .big-eyebrow,
.big--br .big-eyebrow {
  justify-content: flex-end;
}
.big--tl .big-specs,
.big--bl .big-specs {
  justify-content: flex-start;
}
.big--tr .big-specs,
.big--br .big-specs {
  justify-content: flex-end;
}

/* ============ МАРКЕР КЪМ ОБЕКТА ============ */
.mark {
  position: absolute;
  z-index: 7;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease 0.25s;
  transform: translate(-50%, -50%);
}
.mark.on {
  opacity: 1;
}
.mark-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8ec9ff;
  box-shadow: 0 0 0 0 rgba(142, 201, 255, 0.65);
  animation: markPulse 2s ease-out infinite;
}
@keyframes markPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(142, 201, 255, 0.65);
  }
  70% {
    box-shadow: 0 0 0 22px rgba(142, 201, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(142, 201, 255, 0);
  }
}
.mark-label {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #e9f3fc;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
  padding-left: 12px;
}
.mark-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 1px;
  background: rgba(142, 201, 255, 0.8);
}

/* ============ ПРОГРЕС РЕЙЛ ============ */
.rail {
  position: fixed;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 22;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rail-dot {
  position: relative;
  width: 22px;
  height: 22px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rail-dot i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  transition:
    background 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.rail-dot.done i {
  background: rgba(142, 201, 255, 0.55);
}
.rail-dot.on i {
  background: #8ec9ff;
  transform: scale(1.5);
  box-shadow: 0 0 12px rgba(142, 201, 255, 0.8);
}
.rail-tip {
  position: absolute;
  left: 26px;
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  background: rgba(12, 14, 15, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  padding: 6px 10px;
  color: #e9f3fc;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.rail-dot:hover .rail-tip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 820px) and (orientation: portrait) {
  .rail {
    display: none;
  }
  .mark-label {
    display: none;
  }
  .big--tl,
  .big--tr,
  .big--bl,
  .big--br,
  .big--bc {
    top: calc(70px + env(safe-area-inset-top));
    bottom: auto;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    text-align: center;
    width: 94vw;
  }
  .big--tl .big-eyebrow,
  .big--bl .big-eyebrow,
  .big--tr .big-eyebrow,
  .big--br .big-eyebrow {
    justify-content: center;
  }
  .big--tl .big-specs,
  .big--bl .big-specs,
  .big--tr .big-specs,
  .big--br .big-specs {
    justify-content: center;
  }
}

/* ============ ИНТРО ВИДЕО ============ */
#introVid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.intro.vid #introVid {
  opacity: 1;
}
/* Изправен екран (телефон): с cover от 16:9 клипа остава само средната четвърт и знакът се реже.
   Тук клипът се вижда ЦЕЛИЯТ като кинолента по средата, а горният и долният му ръб се стопяват в тъмното. */
@media (max-aspect-ratio: 1/1) {
  #introVid {
    object-fit: contain;
    -webkit-mask-image: linear-gradient(to bottom, transparent calc(50% - 28.125vw), #000 calc(50% - 20vw), #000 calc(50% + 20vw), transparent calc(50% + 28.125vw));
    mask-image: linear-gradient(to bottom, transparent calc(50% - 28.125vw), #000 calc(50% - 20vw), #000 calc(50% + 20vw), transparent calc(50% + 28.125vw));
  }
}
.intro.vid .intro-word,
.intro.vid .intro-sub {
  opacity: 0 !important;
}

/* панел отляво за спирки, чийто обект е вдясно */
@media (min-width: 821px), (orientation: landscape) {
  .stop--left {
    /* спирката може да даде свое място (stops.js → panelAt), напр. сервизното: върху пода */
    left: var(--stop-left, 4vw);
    right: auto;
    top: auto;
    bottom: var(--stop-bottom, 8vh);
    transform: none;
  }
}

/* ============ OUTRO — в стила на biodom.bg ============ */
.outro {
  background: #ffffff;
  color: #22262a;
  font-family: "Golos Text", "Helvetica Neue", Arial, sans-serif;
}
.outro-logo {
  display: block;
  margin: 0 auto 34px;
  width: min(240px, 56vw);
  height: auto;
}
.outro h1 {
  font-family: "Golos Text", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  color: #22262a;
  letter-spacing: -0.4px;
}
.outro h1 em {
  color: #1b75bb;
}
.outro p {
  color: #4d555b;
  opacity: 1;
}

/* водещият ред на финала — носи философията, затова е по-голям и по-тъмен */
.outro-lead {
  font-size: clamp(16px, 2vw, 23px);
  line-height: 1.5;
  font-weight: 600;
  color: #22262a;
  max-width: 680px;
  margin: 0 auto 20px;
}
.outro-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.cta-green {
  display: inline-block;
  background: #39b54a;
  color: #fff;
  text-decoration: none;
  padding: 15px 34px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}
.cta-green:hover {
  background: #2fa03f;
  transform: translateY(-1px);
}
.cta-plain {
  color: #1b75bb;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  border-bottom: 1.5px solid rgba(27, 117, 187, 0.35);
  padding-bottom: 2px;
}

/* ============ COVER — логото събира блока ============ */
.cover-logo {
  width: min(210px, 42vw);
  height: auto;
  margin-bottom: 10px;
  filter: brightness(0) invert(1) drop-shadow(0 2px 14px rgba(0, 0, 0, 0.55));
  opacity: 0;
  transform: translateY(12px);
}
html.cover-in .cover-logo {
  animation: bigDown 0.7s cubic-bezier(0.16, 0.84, 0.28, 1) 0.15s forwards;
}
.cover-eyebrow {
  margin-bottom: 10px;
}
.cover-t {
  margin-top: 2px;
}
.cover-sub {
  margin-top: 14px;
  text-shadow:
    0 1px 6px rgba(0, 0, 0, 0.95),
    0 2px 22px rgba(0, 0, 0, 0.8);
}
@media (max-width: 820px) and (orientation: portrait) {
  .outro-logo {
    width: 180px;
  }
  .cover-logo {
    width: 150px;
  }
}

/* ============ ЗВУК ============ */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: auto;
}
.snd {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px 4px;
}
.snd-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
}
.snd-bars i {
  width: 2.5px;
  background: #fff;
  height: 4px;
  border-radius: 1px;
  opacity: 0.9;
  transition: height 0.3s ease;
}
.snd.on .snd-bars i {
  animation: eq 1.1s ease-in-out infinite;
}
.snd.on .snd-bars i:nth-child(1) {
  animation-delay: 0s;
}
.snd.on .snd-bars i:nth-child(2) {
  animation-delay: 0.25s;
}
.snd.on .snd-bars i:nth-child(3) {
  animation-delay: 0.1s;
}
.snd.on .snd-bars i:nth-child(4) {
  animation-delay: 0.35s;
}
@keyframes eq {
  0%,
  100% {
    height: 4px;
  }
  50% {
    height: 15px;
  }
}
.snd-lbl {
  font-size: 10px;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.85;
}

/* ================= ЖИВИЯТ КОНСУЛТАНТ ================= */
.ava-btn {
  position: absolute;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px);
  z-index: 14;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(12, 14, 15, 0.72);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 13.5px;
  letter-spacing: 0.03em;
  font-weight: 600;
  opacity: 0;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    border-color 0.2s;
}
.ava-btn.show {
  display: inline-flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ava-btn:hover {
  border-color: rgba(255, 255, 255, 0.45);
}
.ava-btn.on {
  display: none;
}
.ava-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5dd39e;
  flex: 0 0 auto;
  box-shadow: 0 0 0 0 rgba(93, 211, 158, 0.6);
  animation: avaPulse 2.2s infinite;
}
@keyframes avaPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(93, 211, 158, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(93, 211, 158, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(93, 211, 158, 0);
  }
}

.avatar {
  position: absolute;
  inset: 0;
  z-index: 16;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.5s ease,
    visibility 0.5s;
}
.avatar.on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
/* Чистият фон: същият последен кадър на влизането, но БЕЗ човека.
   Стои най-отдолу и не мърда. Видеото се стапя в него, а живият аватар
   застава отгоре на същото място — така се сменя само човекът, не цялата
   картина, и прескачането изчезва. */
.avatar .ava-fon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.avatar.on .ava-fon {
  opacity: 1;
}

/* влизането — покрива кадъра, докато аватарът се вдига */
.avatar .ava-intro {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.6s ease;
}
/* Живият аватар ляга ВЪРХУ филма, изрязан от зеления фон.
   Репликата е обучена ОТ последния кадър на влизането — същото лице, същото
   разстояние, същото кадриране. Затова канвасът се държи точно като видеото
   на влизането: cover на целия кадър. Така главата остава на същото място и
   преходът е невидим. Не се смалява — смаляването беше нужно само докато
   лицето беше чуждо и кадрирано другояче. */
.avatar canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--ava-pos, 50% 30%);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.avatar.live .ava-intro {
  opacity: 0;
  transition: opacity 0.9s ease;
}
.avatar.live canvas {
  opacity: 1;
}

.ava-status {
  position: absolute;
  left: 50%;
  bottom: 26%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}
.ava-x {
  position: absolute;
  top: calc(64px + env(safe-area-inset-top));
  right: 18px;
  background: rgba(12, 14, 15, 0.72);
  color: #fff;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 10.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
@media (max-width: 820px) and (orientation: portrait) {
  .ava-btn {
    bottom: calc(112px + env(safe-area-inset-bottom));
    font-size: 12.5px;
    padding: 12px 18px;
  }
  .ava-status {
    bottom: 22%;
  }
}

/* ================= РЪЧКАТА НА ВОДАТА ================= */
.wslider {
  position: absolute;
  left: 50%;
  bottom: calc(104px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px);
  z-index: 15;
  width: min(420px, 78vw);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    visibility 0.45s;
}
.wslider.on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.wsl-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 10.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.wsl-warm {
  color: #e8a05c;
}
.wsl-cool {
  color: #7fb4e8;
}
.wsl-track {
  position: relative;
  height: 44px;
  border-radius: 999px;
  cursor: grab;
  background: rgba(12, 14, 15, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow: hidden;
  touch-action: none;
}
.wslider.dragging .wsl-track {
  cursor: grabbing;
}
.wsl-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(
    90deg,
    rgba(232, 160, 92, 0.55),
    rgba(127, 180, 232, 0.55)
  );
  transition: width 0.06s linear;
}
.wsl-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  transition:
    left 0.06s linear,
    background 0.35s ease;
}
.wslider.is-cool .wsl-knob {
  background: #eaf3fb;
}
.wsl-track:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.wsl-hint {
  margin-top: 9px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
@media (max-width: 820px) and (orientation: portrait) {
  .wslider {
    bottom: calc(120px + env(safe-area-inset-bottom));
    width: 82vw;
  }
  .wsl-track {
    height: 48px;
  }
  .wsl-knob {
    width: 38px;
    height: 38px;
  }
}

/* слоят на ръчката — ляга ВЪРХУ филма, не го движи */
.wsl-layer {
  position: absolute;
  inset: 0;
  z-index: 13;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    visibility 0.25s;
}
.wsl-layer.on {
  opacity: 1;
  visibility: visible;
}
.wsl-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============ ЕДНАКЪВ МАЩАБ НА ВСЕКИ ЕКРАН (десктоп) ============
   Картите и заглавията са в px и на малък лаптоп изглеждаха „зумнати" —
   px-ът е константа, а кадърът се смалява. Скалираме контейнерите с
   transform по --uiz: не пипа подредбата (абсолютни са), а вътрешните
   px стойности се смаляват заедно като една снимка. Мобилното (≤820)
   има своя подредба и не се пипа. */
@media (min-width: 821px), (orientation: landscape) {
  .big {
    transform: translateX(-50%) scale(var(--uiz-big, var(--uiz)));
    transform-origin: 50% 0;
  }
  .big--bc {
    transform-origin: 50% 100%;
    /* центрирано: картата е дребна и вертикално центрирана, а заглавието е
       долу — не се стигат. Ако картата пак порасне, върни центрирането в
       свободната зона (git blame ще го покаже). */
  }
  .big--tl {
    transform: scale(var(--uiz-big, var(--uiz)));
    transform-origin: 0 0;
  }
  .big--tr {
    transform: scale(var(--uiz-big, var(--uiz)));
    transform-origin: 100% 0;
  }
  .big--bl {
    transform: scale(var(--uiz-big, var(--uiz)));
    transform-origin: 0 100%;
  }
  .big--br {
    transform: scale(var(--uiz-big, var(--uiz)));
    transform-origin: 100% 100%;
  }
  .big-t {
    /* махаме vw-клампа: иначе буквата се скалира двойно (веднъж от vw,
       веднъж от --uiz) и на широк екран удря стария px-таван.
       88 вместо 104 — „една идея по-малка" (magic, 11.08). */
    font-size: 88px;
  }
  .stop {
    transform: translateY(-50%) scale(var(--uiz));
    transform-origin: 100% 50%;
  }
  /* Картата ВЛЯВО е закотвена долу-вляво (left: 4vw; bottom: 8vh) и расте оттам. Преди
     наследяваше горното правило — origin в десния ръб + translateY(-50%) — и на широк екран
     се издуваше НАЛЯВО, забита в ръба на екрана върху точките на релсата (magic, 19.09). */
  .stop--left {
    /* и двете са числа (не дължини) — scale() ги приема; --stop-k идва от panelAt.scaleWide */
    transform: scale(calc(var(--uiz) * var(--stop-k, 1)));
    transform-origin: 0 100%;
  }
  /* Карта вдясно под надпис ГОРЕ ВДЯСНО (лирите: 5 варианта = висока карта): закотвя се
     долу, за да не се качва в чиповете на надписа. */
  .stop--low {
    top: auto;
    bottom: 8vh;
    transform: scale(var(--uiz));
    transform-origin: 100% 100%;
  }
  .gatebar {
    transform: translateX(-50%) scale(var(--uiz));
    transform-origin: 50% 100%;
  }
}

/* Лява карта, която в ТЕСЕН / почти квадратен прозорец се връща ВДЯСНО (stops.js → panelNarrow: "right").
   Радиаторът в коридора: на широк екран долу вляво са вратата и ламелите; под 8:5 кадърът се реже отстрани,
   радиаторът идва вляво и лявата карта лягаше върху термоглавата му. */
@media (min-width: 821px) and (max-aspect-ratio: 8/5), (orientation: landscape) and (max-aspect-ratio: 8/5) {
  .stop--left.stop--narrow-right {
    left: auto;
    right: 3vw;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) scale(var(--uiz));
    transform-origin: 100% 50%;
  }
}

/* Лява карта, която на ШИРОК екран е една идея по-малка (stops.js → panelAt.scaleWide). Сервизното:
   в почти квадратен прозорец картата ляга цялата върху пода и не пречи на нищо; на широк екран подът е
   нисък, картата се качва по стената и при „TOWER" закриваше ръба на колоната (magic, 20.09). */
@media (min-width: 821px) and (min-aspect-ratio: 5/4), (orientation: landscape) and (min-aspect-ratio: 5/4) {
  .stop--left {
    --stop-k: var(--stop-k-wide, 1);
  }
}

/* ============ ЛЕГНАЛ ТЕЛЕФОН — „както на компютър" (magic, 21.09) ============
   Завъртян настрани, телефонът гледа ПЪЛНИЯ 16:9 кадър и десктоп подредбата (всички мобилни правила горе вече са
   „and (orientation: portrait)", десктоп правилата — „, (orientation: landscape)"). Класът html.phone-land се слага
   от main.js (pointer: coarse + легнал + височина ≤ 560px). Тук са само поправките, без които десктоп подредбата
   не се побира в ~390px височина: релсата с точките не се събира, картата е по-едра от пропорционалното (иначе
   текстът ѝ е ~6px) и се скролва вътрешно, а големият надпис е по-дребен (--uiz-big), за да не закрива кадъра. */
html.phone-land .rail {
  display: none;
}
html.phone-land .stop {
  width: 360px; /* без клампа 27vw: на 844px той даваше 228px → 125px на екрана */
  right: calc(2.2vw + env(safe-area-inset-right));
}
html.phone-land .stop--left {
  right: auto;
  left: calc(var(--stop-left, 3vw) + env(safe-area-inset-left));
  bottom: 5svh;
}
html.phone-land .stop--low {
  bottom: 5svh;
}
html.phone-land .stop-in {
  /* −80px: картата започва ПОД горната лента (логото, „Звук", „Пътят на водата") и свършва над долния ръб */
  max-height: calc((100svh - 80px) / var(--uiz));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
html.phone-land {
  /* ширината, която картата заема заедно с отстъпа си (360px е ширината ѝ преди мащаба) */
  --pl-card: calc(360px * var(--uiz) + 5vw);
}
/* Надписът: вертикално остава горе или долу (както е решено за спирката), хоризонтално се центрира в СВОБОДНАТА
   зона до картата — тук картата заема почти цялата височина и вертикално разминаване, както на компютър, няма.
   60px отгоре: под лентата с логото и под бутона „Затвори ✕". */
html.phone-land .big,
html.phone-land .big--tl,
html.phone-land .big--tr,
html.phone-land .big--bl,
html.phone-land .big--br,
html.phone-land .big--bc {
  left: 50%;
  right: auto;
  top: 60px;
  bottom: auto;
  width: min(1000px, 96vw);
  text-align: center;
  transform: translateX(-50%) scale(var(--uiz-big));
  transform-origin: 50% 0;
}
html.phone-land .big--bc,
html.phone-land .big--bl,
html.phone-land .big--br,
html.phone-land .big.big--plBottom {
  top: auto;
  bottom: 86px; /* над бутона „Продължи" (gatebar), който стои долу в средата */
  transform-origin: 50% 100%;
}
/* чиповете с характеристиките се скриват: с тях надписът стига до средата на кадъра и ляга върху продукта;
   същите факти стоят в картата */
html.phone-land .big .big-specs {
  display: none;
}
html.phone-land .big-t {
  font-size: 70px; /* „Стенно отопление" да се събира на един ред и на 740px телефон — иначе надписът става на 3 реда */
  line-height: 1.06;
}
html.phone-land .big.big--cardR {
  left: calc((100vw - var(--pl-card)) / 2);
}
html.phone-land .big.big--cardL {
  left: calc((100vw + var(--pl-card)) / 2);
}
html.phone-land .big .big-eyebrow,
html.phone-land .big .big-specs {
  justify-content: center;
}
html.phone-land .big.big--s .big-t {
  font-size: 54px; /* беше clamp(24px, 3vw, 46px) → 25px × 0.51 = 13px на екрана */
}
html.phone-land .big-eyebrow {
  font-size: 17px;
}
html.phone-land .big-specs span {
  font-size: 16px;
  padding: 10px 20px;
}
html.phone-land .topbar {
  padding: 10px calc(18px + env(safe-area-inset-right)) 10px calc(18px + env(safe-area-inset-left));
}
html.phone-land .brand img {
  height: 22px;
}
html.phone-land .cover {
  padding-bottom: 17svh; /* над подсказката „СКРОЛНИ" */
}
/* подсказката „СКРОЛНИ": по-ниско и с по-къса чертичка, за да остане ПОД надписите, които на легнал екран стоят долу */
html.phone-land .scroll-hint {
  bottom: 8px;
  gap: 5px;
}
html.phone-land .scroll-hint i {
  height: 18px;
}

/* ============ ФИНАЛЪТ (outro) НА ТЕЛЕФОН + горната лента над него (magic, 21.09) ============ */
/* Горната лента е fixed и с mix-blend-mode: difference → върху БЕЛИЯ финал ставаше черна и лягаше върху текста му
   (на легнал телефон — точно през заглавието). Финалът си има свое лого, затова лентата, релсата и подсказката
   се скриват, щом той стигне горния край на екрана (класът се слага от main.js). */
.topbar,
.rail {
  transition: opacity 0.35s ease;
}
html.at-outro .topbar,
html.at-outro .rail,
html.at-outro .scroll-hint {
  opacity: 0 !important;
  pointer-events: none;
}
html.at-outro .topbar * {
  pointer-events: none;
}

/* Изправен телефон: финалът е ЕДИН екран, съдържанието е в средата му (преди: 16vh + 18vh празно и дребен текст). */
@media (max-width: 820px) and (orientation: portrait) {
  .outro {
    min-height: 100svh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 9svh 7vw 10svh;
  }
  .outro-logo {
    width: 190px;
    margin-bottom: 30px;
  }
  .outro h1 {
    font-size: clamp(30px, 8.4vw, 38px);
    line-height: 1.14;
    margin-bottom: 22px;
  }
  .outro-lead {
    font-size: 17px;
    margin-bottom: 18px;
  }
  .outro p:not(.outro-lead) {
    font-size: 15px;
    line-height: 1.62;
    margin-bottom: 32px;
  }
  .outro-cta {
    flex-direction: column;
    gap: 18px;
  }
  .cta-green {
    width: min(100%, 320px);
    box-sizing: border-box;
    text-align: center;
    padding: 17px 24px;
    font-size: 15px;
  }
  .cta-plain {
    font-size: 14.5px;
  }
}

/* Легнал телефон: двете половини една до друга — финалът се събира в един екран, без скрол. */
html.phone-land .outro {
  min-height: 100svh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 5.5vw;
  text-align: left;
  padding: 22px calc(7vw + env(safe-area-inset-right)) 22px calc(7vw + env(safe-area-inset-left));
}
html.phone-land .outro-a {
  flex: 0.92 1 0;
}
html.phone-land .outro-b {
  flex: 1.08 1 0;
}
html.phone-land .outro-logo {
  width: 170px;
  margin: 0 0 20px;
}
html.phone-land .outro h1 {
  font-size: clamp(27px, 4.1vw, 38px);
  line-height: 1.14;
  margin-bottom: 0;
}
html.phone-land .outro-lead {
  font-size: 15px;
  line-height: 1.45;
  max-width: none;
  margin: 0 0 12px;
}
html.phone-land .outro p:not(.outro-lead) {
  font-size: 13px;
  line-height: 1.58;
  max-width: none;
  margin: 0 0 18px;
}
html.phone-land .outro-cta {
  justify-content: flex-start;
  gap: 18px;
}
html.phone-land .cta-green {
  padding: 12px 24px;
  font-size: 13.5px;
}
