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

/* ПРАВКА 10.08: базовый фон body — нейтральный белый (был --color-black).
   Чёрный ставился «под hero», но фоном он нигде не работал: все секции
   главной красят себя сами (schedule/repertoire/news — --color-white,
   visitors — sand, footer — black-ui). Зато он вылезал в резиновом
   оверскролле iOS и подкрашивал бары Safari — отсюда «чёрная» главная
   на айфонах в тех сборках, где на <body> нет класса .page--light
   (локальный index.html его ставит, CMS-шаблон — не обязательно).
   Чёрный остался только там, где он нужен — на .mobile-app-container. */
body {
  position: relative; /* содержит .header { position: absolute } — чтобы он скроллился со страницей */
  background-color: var(--color-white); display: flex; justify-content: center; flex-direction: column;
  align-items: stretch; font-family: var(--font-main); color: var(--color-black-soft);
  /* ФОЛБЭК для браузеров без поддержки dvh (Chromium < 108): без него
     декларация отбрасывается целиком и высота схлопывается. Порядок важен —
     современные браузеры возьмут последнюю валидную строку. */
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: hidden;           /* предотвращает горизонтальный скролл от дочерних overflow */
  overscroll-behavior-x: none;  /* блокирует горизонтальный свайп трекпада */
}

/* --- СВЕТЛАЯ ТЕМА СТРАНИЦЫ ---
   Модификатор body для всех внутренних страниц с тёплым фоном.
   Главная страница остаётся на нейтральном белом.  */
body.page--light {
  background-color: var(--color-bg-warm);
  color: var(--color-black-soft);
}

a, button {
  -webkit-tap-highlight-color: transparent;
  color: inherit;
  text-decoration: none;
}

button:focus-visible, 
.global-info__title-wrapper:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 4px; }

/* === БАЗА (МОБИЛКИ, ДО 767px) === */
/* Hero занимает полный экран и не сжимается.
   Единственная тёмная зона верхнего уровня: своим color: white задаёт
   тёмный контекст для потомков (a/button наследуют цвет через color: inherit),
   т.к. body теперь светлый. */
/* ФОЛБЭК: height: 100vh идёт первым для браузеров без поддержки svh
   (Chromium < 108 — например замороженный браузер Атом). Без фолбэка
   декларация невалидна → height: auto → все .slide абсолютные → блок
   схлопывается в 0 и hero пропадает целиком. */
.mobile-app-container { flex-shrink: 0; width: 100%; max-width: 768px; height: 100vh; height: 100svh; position: relative; overflow: hidden; background-color: var(--color-black); color: var(--color-white); }
.slider { width: 100%; height: 100%; position: relative; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity var(--duration-slow) cubic-bezier(0.4, 0, 0.2, 1); pointer-events: none; background-color: var(--color-black-soft); z-index: 1; }
.slide.active { opacity: 1; pointer-events: auto; z-index: 5; }
.slide.is-fading { opacity: 0 !important; z-index: 6; transition: opacity var(--duration-fast) ease-out !important;}

.slide__media { width: 100%; height: 100%; position: relative; transition: transform var(--duration-base) var(--ease-out-smooth); }
/* GPU-слой только там, где реально нужен: активный слайд и тот, что уходит */
.slide.active .slide__media,
.slide.is-fading .slide__media { will-change: transform; }
.slide__image, .slide__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide__video { opacity: 0; transition: opacity 0s linear 0.8s; }
.slide.active .slide__video { opacity: 1; transition: opacity 0.85s ease-in-out 1.25s; }

.overlay-gradient { position: absolute; left: 0; width: 100%; pointer-events: none; z-index: 10; }
.overlay-gradient--top {
  top: 0;
  height: 35%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.23) 0%,
    rgba(0, 0, 0, 0.19) 15%,
    rgba(0, 0, 0, 0.13) 32%,
    rgba(0, 0, 0, 0.06) 50%,
    rgba(0, 0, 0, 0.03) 68%,
    rgba(0, 0, 0, 0.015) 84%,
    rgba(0, 0, 0, 0.008) 94%,
    transparent 100%
  );
}

.overlay-gradient--bottom {
  bottom: 0;
  height: 50%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.40) 8%,
    rgba(0, 0, 0, 0.33) 18%,
    rgba(0, 0, 0, 0.24) 30%,
    rgba(0, 0, 0, 0.15) 44%,
    rgba(0, 0, 0, 0.07) 58%,
    rgba(0, 0, 0, 0.01) 72%,
    rgba(0, 0, 0, 0.005) 84%,
    rgba(0, 0, 0, 0.0025) 93%,
    transparent 100%
  );
}

.ui-layer { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; pointer-events: none;}

/* --- ШАПКА САЙТА ---
   Перемещена из .ui-layer в прямой дочерний элемент <body>.
   Мобилка/планшет: position: absolute — шапка живёт только поверх hero
   и уходит вместе с ним при скролле (body не создаёт контекст позиционирования,
   поэтому absolute ведёт себя как fixed, но прокручивается).
   Десктоп 1024px+: position: fixed — шапка остаётся видна при скролле.
   pointer-events: none на корне — не перекрывает клики на hero за пределами элементов.
   Интерактивные дочерние элементы получают pointer-events: auto явно.           */
.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.header__brand-block { pointer-events: auto; width: 128px; height: 128px; background-color: var(--color-brand); position: relative; overflow: visible; }
.header__logo { position: absolute; inset: 0; width: 100%; height: auto; opacity: 0; transition: opacity 0.6s ease; pointer-events: none; }
.header__logo--final { top: 0; left: 0; width: 100%; height: auto; }
.header__right { display: none; }
.header__menu { pointer-events: auto; display: flex; align-items: center; background: none; border: none; color: var(--color-white); font-family: var(--font-accent); font-size: 18px; font-weight: 700; cursor: pointer; padding: 0;}
.header__burger { width: 56px; height: 56px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;}
.header__burger span { display: block; width: 28px; height: 1.5px; background-color: var(--color-white); }
.header__burger span:last-child { width: 12px; align-self: flex-end; margin-right: 14px; }

.global-info { position: absolute; inset: 0; z-index: 15; display: flex; flex-direction: column; pointer-events: none; }
.global-info__left { margin-top: 152px; display: flex; flex-direction: column; align-items: flex-start; pointer-events: none; }
.global-info__dates { margin-left: 10px; display: inline-flex; flex-direction: column; align-items: flex-start; }
.global-info__dates-text { font-family: var(--font-accent); font-size: 32px; font-weight: 700; line-height: 0.9; letter-spacing: -0.04em; color: var(--color-white); text-transform: uppercase; opacity: 0; transition: opacity var(--duration-fast) ease; }
.global-info__dates-text.is-visible { opacity: 1; } 
.global-info__dates-line { 
  height: 10px; 
  background-color: var(--color-white); 
  margin-top: 2px; 
  transition: transform 500ms var(--ease-in-out-smooth); 
  transform-origin: left top; 
}.global-info__dates-line.is-collapsing { transform: scaleX(0.085); } 

.global-info__description { display: none; font-family: var(--font-main); font-size: 18px; line-height: 1.4; letter-spacing: -0.0085em; color: var(--color-white); margin-top: 24px; margin-left: 10px; opacity: 0; transition: opacity var(--duration-base) ease; }
.global-info__description.is-visible { opacity: 1; }

.global-info__title-wrapper { 
  margin-top: auto; 
  margin-bottom: 92px; 
  display: flex; 
  flex-direction: column; 
  align-items: flex-end; 
  position: relative; 
  pointer-events: auto; 
  cursor: pointer; 
  transform-origin: bottom right;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.25, 1);;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0) scale(1); 
}
.global-info__badge { position: absolute; top: -20px; right: 10px; height: 44px; display: flex; align-items: center; justify-content: center; background-color: var(--color-black-ui); color: var(--color-white); font-family: var(--font-accent); font-weight: 700; font-size: 22px; padding: 0 12px; transform: rotate(8.5deg) translateZ(0); 
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden; z-index: 20; transition: opacity var(--duration-fast) ease; opacity: 0; pointer-events: none; }
.global-info__badge.is-visible { opacity: 1; }

.global-info__title { display: flex; flex-direction: column; align-items: flex-end; overflow: hidden; padding-top: 10px; }

.global-info__title-line { 
  position: relative; overflow: hidden; background-color: var(--color-white); color: var(--color-black-soft); font-family: var(--font-main); font-weight: 400; line-height: 0.8; letter-spacing: -0.04em; padding: 6px 8px 4px 8px; margin-top: -4px; display: inline-block; text-transform: uppercase; white-space: nowrap; max-height: 120px; transform: translateY(0); opacity: 1;
  
  /* Мобилка: 350ms */
  transition: transform 350ms var(--ease-out-smooth), 
              opacity 350ms var(--ease-out-smooth), 
              max-height 350ms var(--ease-out-smooth), 
              margin-top 350ms var(--ease-out-smooth), 
              padding-top 350ms var(--ease-out-smooth), 
              padding-bottom 350ms var(--ease-out-smooth);
  
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.global-info__title-line:first-child { margin-top: 0; }
.global-info__title-line.is-entering { 
  transform: translateY(16px); 
  opacity: 0; 
  max-height: 0; 
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
}

/* ВЕРНУЛИ ФИЗИКУ ИСЧЕЗНОВЕНИЯ */
.global-info__title-line.is-exiting {
  transform: translateX(40px);
  opacity: 0;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  
  /* Мобилка: 350ms */
  transition: transform 350ms var(--ease-out-smooth),
              opacity 350ms var(--ease-out-smooth),
              max-height 350ms var(--ease-out-smooth),
              margin-top 350ms var(--ease-out-smooth),
              padding-top 350ms var(--ease-out-smooth),
              padding-bottom 350ms var(--ease-out-smooth);
}

.global-info__title-line.is-animating {
  transition: width 350ms var(--ease-out-smooth);
}

/* УСКОРЕНИЕ ТОЛЬКО ДЛЯ ДЕСКТОПА */
@media (min-width: 1024px) {
  .global-info__title-line.is-animating {
    transition: width 200ms var(--ease-out-smooth);
  }
  
  /* Теперь этот блок надежно спрятан внутри десктопного размера */
  .global-info__title-line,
  .global-info__title-line.is-exiting {
    transition: transform 200ms var(--ease-out-smooth),
                opacity 200ms var(--ease-out-smooth),
                max-height 200ms var(--ease-out-smooth),
                margin-top 200ms var(--ease-out-smooth),
                padding-top 200ms var(--ease-out-smooth),
                padding-bottom 200ms var(--ease-out-smooth);
  }
}

.controls { display: flex; justify-content: space-between; align-items: center; padding: 0 14px 0 10px; margin-bottom: 24px; margin-top: auto; pointer-events: auto; }
.controls__btn { background: none; border: none; padding: 0; display: flex; align-items: center; cursor: pointer; }
.controls__btn-square { width: 50px; height: 50px; background-color: var(--color-black-ui); display: flex; justify-content: center; align-items: center; }
.controls__icon--pause { width: 14px; height: 16px; border-left: 4px solid var(--color-white); border-right: 4px solid var(--color-white); }
.controls__icon--play { border-left: 14px solid var(--color-white); border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }
.controls__btn-text { display: none; } 
.controls__nav { display: flex; gap: 19px; } 
.controls__link { background: none; border: none; color: var(--color-white); font-family: var(--font-accent); font-size: 20px; font-weight: 700; border-bottom: 2px dotted var(--color-white); cursor: pointer; }

.progress { display: flex; gap: 3px; padding: 0 0px 0px 0px; position: absolute; bottom: 0; width: 100%; pointer-events: auto;}
.progress__item { flex: 1; height: 4px; background-color: transparent; overflow: hidden; } 
.progress__fill { height: 100%; background-color: var(--color-white-35); width: 100%; transform-origin: left; transform: scaleX(0); will-change: transform; }


/* === 1. ПЛАНШЕТЫ (768px - 1023px) === */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --js-title-base-size: 100;
    --js-title-padding-x: 40; 
  }
  
  .mobile-app-container { max-width: 100%; }
  
  .header { position: absolute; } /* скроллится вместе со страницей, как на мобилке */

  .controls__btn-square { width: 60px; height: 60px; }
  .controls__link { font-size: 24px; }
}

/* === 2. НОУТБУКИ (1024px - 1439px) === */
@media (min-width: 1024px) and (max-width: 1439px) {
  :root {
    --js-title-base-size: 110;
    --js-title-width-ratio: 0.5;
    --js-title-padding-x: 32;
  }
  .mobile-app-container { max-width: 100%; }
  
  .header__menu { display: none; }
  .header { position: absolute; width: 100%; display: block; height: 180px; }
  .header__brand-block { position: absolute; top: 0; left: 0; width: 180px; height: 180px; z-index: 10; overflow: visible; }
  .header__right { position: absolute; top: 0; right: 0; display: flex; align-items: center; gap: 40px; padding: 20px 30px; z-index: 10; pointer-events: auto; }
  .header__item { display: flex; align-items: center; gap: 12px; background: none; border: none; color: var(--color-white); cursor: pointer; padding: 0; pointer-events: auto; }
  .header__item-text { font-family: var(--font-accent); font-size: 16px; font-weight: 700; line-height: 1; }
  .header__icon { width: 24px; height: 24px; flex-shrink: 0; }
  .header__burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 28px; }
  .header__burger span { display: block; height: 2px; background-color: var(--color-white); margin: 0; }
  .header__burger span:last-child { width: 14px; align-self: flex-end; }
  

  .global-info { flex-direction: row; justify-content: space-between; align-items: flex-end; padding: 0 0 80px 16px; }
  .global-info__left { margin-top: 0; flex: 0 0 35%; width: 35%; display: flex; flex-direction: column; gap: 20px; pointer-events: none; }
  .global-info__dates { margin: 0; }
  .global-info__dates-text { font-size: 32px; }
  .global-info__dates-line { height: 12px; }
  .global-info__description { display: block; margin: 0; width: 100%; font-weight: 500; font-size: 18px; line-height: 1.2; overflow-wrap: break-word; }
  
  .global-info__title-wrapper { margin: 0; max-width: 65%; }
  .global-info__title-line { padding: 4px 16px 10px 16px; max-height: 160px; }
  .global-info__badge { font-size: 20px; height: 40px; top: -20px; right: 16px; }

  .controls { position: absolute; bottom: 24px; left: 16px; right: 16px; margin: 0; padding: 0; }
  .controls__btn { gap: 20px; }
  .controls__btn-square { width: 50px; height: 50px; }
  .controls__icon { transform: scale(1.1); }
  .controls__btn-text { display: block; color: var(--color-white); font-family: var(--font-accent); font-size: 20px; font-weight: 700; line-height: 1; }
  .controls__nav { gap: 28px; }
  .controls__link { font-size: 20px; }

  .progress { padding: 0; bottom: 4px; left: 4px; width: calc(100% - 8px); gap: 6px; }
  .progress__item { height: 4px; background-color: transparent; } 
}

/* === 3. ДЕСКТОП (1440px и выше, МАСШТАБ 1:1) === */
@media (min-width: 1440px) {
  :root {
    --js-title-base-size: 148;
    --js-title-width-ratio: 0.5;
    --js-title-padding-x: 48;
  }
  .mobile-app-container { max-width: 100%; }
  
  .header__menu { display: none; }
  .header { position: absolute; width: 100%; display: block; height: 256px; }
  .header__brand-block { position: absolute; top: 0; left: 0; width: 256px; height: 256px; z-index: 10; overflow: visible; }
  .header__right { position: absolute; top: 0; right: 0; display: flex; align-items: center; gap: 40px; padding: 16px 28px; z-index: 10; pointer-events: auto; }
  .header__item { display: flex; align-items: center; gap: 16px; height: 56px; background: none; border: none; color: var(--color-white); cursor: pointer; padding: 0; pointer-events: auto; text-decoration: none; }
  .header__item-text { font-family: var(--font-accent); font-size: 20px; font-weight: 700;}
  .header__icon { width: 32px; height: 32px; flex-shrink: 0; }
  .header__burger { display: flex; flex-direction: column; justify-content: center; gap: 6px; width: 32px; }
  .header__burger span { display: block; height: 2px; background-color: var(--color-white); margin: 0; }
  .header__burger span:last-child { width: 16px; align-self: flex-end; }
  

  .global-info { flex-direction: row; justify-content: space-between; align-items: flex-end; padding: 0 0 124px 16px; }
  .global-info__left { margin-top: 0; flex: 0 0 30%; width: 30%; display: flex; flex-direction: column; gap: 28px; pointer-events: none; }
  .global-info__dates { margin: 0; }
  .global-info__dates-text { font-size: 40px; }
  .global-info__dates-line { height: 16px; }
  .global-info__description { display: block; margin: 0; width: 100%; font-weight: 500; font-size: 24px; line-height: 1.25; overflow-wrap: break-word; }
  
  .global-info__title-wrapper { margin: 0; max-width: 70%; }
.global-info__title-line { padding: 8px 16px 4px 28px; max-height: 200px; }
  .controls { position: absolute; bottom: 36px; left: 16px; right: 16px; margin: 0; padding: 0; }
  .controls__btn { gap: 28px; }
  .controls__btn-square { width: 60px; height: 60px; }
  .controls__icon { transform: scale(1.33); transform-origin: center; }
  .controls__btn-text { display: block; color: var(--color-white); font-family: var(--font-accent); font-size: 28px; font-weight: 700; line-height: 1; text-transform: none;}
  .controls__nav { gap: 40px; }
  .controls__link { font-size: 28px; }

  .progress { padding: 0; bottom: 0px; left: 0px; width: calc(100% - 8px); gap: 6px; }
  .progress__item { height: 4px; background-color: transparent; } 
  .progress__fill { background-color: var(--color-white-35); }
  
  .global-info__title { transition: none; }
  .global-info__dates-text { transition: opacity var(--duration-fast) ease-out; }
  .global-info__dates-line { transition: transform var(--duration-slower) ease-out; }
  .global-info__description { transition: opacity var(--duration-fast) ease-out; }
}


/* ============================================================
   УТИЛИТЫ — переиспользуемые паттерны
   Не зависят от конкретного компонента.
   ============================================================ */


/* --- КНОПКА-ИКОНКА (касательная зона 56×56) ---
   Универсальный фрейм: закрыть, бургер, назад и любые иконки-кнопки.
   <button class="btn-icon"> <svg>…</svg> </button>
   Приглушённый вариант: добавить .btn-icon--muted               */

.btn-icon {
  width: var(--touch-target);      /* 56px */
  height: var(--touch-target);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--color-white);
  cursor: pointer;
  padding: 0;
  transition: opacity var(--duration-fast) ease;
}

.btn-icon:hover         { opacity: 0.6; }
.btn-icon:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 4px;
}

.btn-icon--muted {
  color: var(--color-white-40);
  transition: color var(--duration-fast) ease;
}
.btn-icon--muted:hover,
.btn-icon--muted:focus-visible { opacity: 1; color: var(--color-white); }


/* --- РАЗДЕЛИТЕЛЬ ---
   Горизонтальная линия без внешних отступов.
   Отступы задаются снаружи через margin на соседних элементах.
   <hr class="divider">                                          */

.divider {
  border: none;
  border-top: var(--divider-width) solid var(--divider-color);
  margin: 0;
}


/* --- СКРОЛЛ БЕЗ ПОЛОСЫ ---
   Добавить к любому overflow-контейнеру.
   <div class="scroll-hidden">                                   */

.scroll-hidden {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-hidden::-webkit-scrollbar { display: none; }


/* --- КНОПКА «КУПИТЬ БИЛЕТЫ» / ПАРТНЁРСКАЯ ---
   Общий CTA театра. Встречается на нескольких страницах (афиша,
   страница спектакля и т.д.). Высота 60px (--btn-h-l), Pragmatica
   Extended, адаптивный кегль: 18px база → 20px на дизайн-базе 1680+.

     <a class="ticket-btn ticket-btn--primary">Купить билеты</a>
     <a class="ticket-btn ticket-btn--secondary">Купить билеты</a>
     <a class="ticket-btn ticket-btn--partner ticket-btn--ticketland">
        <img src="…ticketland.svg" alt="Ticketland">
        <span class="ticket-btn__sep" aria-hidden="true"></span>
        <span>Купить билеты</span>
     </a>
     <span class="ticket-btn ticket-btn--sold">Билеты проданы</span>
     <span class="ticket-btn ticket-btn--soon">Скоро в продаже</span>
     <span class="ticket-btn ticket-btn--canceled">Отмена</span>

   Варианты: --primary (чёрная), --secondary (рамка), --partner (слот
   под партнёра) + бренд-модификатор (--ticketland). Плюс три
   некликабельных статуса на сером фоне: --sold (продано), --soon
   (продажи ещё не открыты) и --canceled (показ отменён). Раскладку/
   позицию (ширину, margin, прижатие к низу карточки) задаёт страница
   на родителе-обёртке — здесь только сам вид кнопки. */
.ticket-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-h-l);            /* 60px */
  border-radius: var(--card-radius); /* 2px */
  font-family: var(--font-accent);   /* Pragmatica Extended */
  font-size: 18px;
  font-weight: var(--font-weight-body);
  letter-spacing: -0.015em;
  text-decoration: none;
  cursor: pointer;
  transition: opacity var(--duration-fast) ease,
              background var(--duration-fast) ease;
}
.ticket-btn:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}
/* Недоступная (нет билетов / продажа закрыта) */
.ticket-btn[disabled],
.ticket-btn[aria-disabled="true"] {
  opacity: 0.30;
  pointer-events: none;
  cursor: default;
}

/* Primary: чёрная заливка, белый текст */
.ticket-btn--primary {
  background: var(--color-black-soft);
  color: var(--color-white);
  border: none;
}
.ticket-btn--primary:hover { opacity: 0.8; }

/* Secondary: прозрачный фон, чёрный бордер (fallback, когда у билета нет партнёра) */
.ticket-btn--secondary {
  background: transparent;
  color: var(--color-black-soft);
  border: 1px solid var(--color-black-soft);
}
.ticket-btn--secondary:hover { opacity: 0.8; }

/* СТАТУСЫ ВМЕСТО КНОПКИ ПОКУПКИ.
   Три случая, когда покупать нечего: билеты кончились (--sold),
   продажи ещё не открыты (--soon), показ отменён (--canceled).
   Ставятся ВМЕСТО пары «Купить билеты» + партнёрская — один элемент
   на всю ширину обёртки.

   Общий вид: габарит .ticket-btn (60px, Extended, 18→20px), плашка
   10% чёрного, рамки нет. Различает их только цвет текста:
     --sold      чёрный  — нейтральная констатация факта
     --soon      красный — акцент, за показом стоит следить
     --canceled  красный — акцент, показ не состоится

   Плотность фона именно 10%: на более плотной плашке фирменный
   красный не добирает порог WCAG AA (на 15% — 4,2:1 при норме 4,5).
   На 10% красный даёт 5,3:1, чёрный — 17:1. Не затемнять.

   Элемент — <span>, а не <a>: кликать некуда, ссылка без href
   не нужна и сама выпадает из tab-порядка (не требуются ни
   tabindex="-1", ни aria-disabled).

     <div class="schedule__card-tickets">
       <span class="ticket-btn ticket-btn--sold">Билеты проданы</span>
     </div>                                                        */
.ticket-btn--sold,
.ticket-btn--soon,
.ticket-btn--canceled {
  background: var(--color-black-soft-10);
  border: none;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.ticket-btn--sold     { color: var(--color-black-soft); }
.ticket-btn--soon     { color: var(--color-brand); }
.ticket-btn--canceled { color: var(--color-brand); }

/* Общий disabled-стиль .ticket-btn гасит кнопку до opacity .30 —
   статусам это не нужно: и серая плашка, и текст должны читаться
   в полную силу.

   Специфичность :is() равна самому «тяжёлому» селектору внутри, то
   есть классу — итог (0,2,0), ровно как у .ticket-btn[aria-disabled].
   При равной специфичности выигрывает порядок в файле, поэтому
   правило обязано стоять ПОСЛЕ общего. Не переносить выше.        */
:is(.ticket-btn--sold, .ticket-btn--soon, .ticket-btn--canceled):is([disabled], [aria-disabled="true"], :hover) {
  opacity: 1;
}

/* Partner — СЛОТ. Вёрстка фиксирует только габарит и доступность.
   Оформление (рамка, цвета, лого, разделители) приносит конкретный
   партнёр своим модификатором (--ticketland и т.п.) — базовый бренд
   не навязывается. CMS кладёт внутрь только ИНЛАЙН-контент (img, svg,
   span, текст), без вложенных <a>/<button>. */
.ticket-btn--partner {
  background: transparent;
  color: var(--color-black-soft);
  border: none;
  gap: 16px;
  overflow: hidden;
}
.ticket-btn--partner img,
.ticket-btn--partner svg {
  max-height: 32px;
  width: auto;
  flex-shrink: 0;
}
/* фокус по всей кнопке, даже если CMS обернула контент в span */
.ticket-btn--partner:focus-within {
  outline: 2px solid var(--color-brand);
  outline-offset: 4px;
}

/* Эталонный партнёр: Ticketland. Образец брендирования слота —
   под нового партнёра заводится свой модификатор .ticket-btn--<name>
   с его рамкой/цветами/лого, не трогая контракт --partner.
   Структура контента: [лого] [.ticket-btn__sep] Купить билеты. */
.ticket-btn--ticketland {
  border: 1px solid var(--color-black-soft);
  gap: 14px;
}

/* Вертикальный разделитель лого ↔ текст: 1px, тянется по высоте
   минус отступы. Хелпер, чтобы CMS не дублировала инлайн-стиль. */
.ticket-btn__sep {
  width: 1px;
  align-self: stretch;
  margin-top: 12px;
  margin-bottom: 12px;
  background-color: var(--color-black-soft);
  flex-shrink: 0;
}

/* Адаптивный кегль: на дизайн-базе 1680+ — 20px */
@media (min-width: 1680px) {
  .ticket-btn { font-size: 20px; }
}


/* --- STAGGER-АНИМАЦИЯ ПОЯВЛЕНИЯ ---
   Блоки появляются поочерёдно: из смещения влево + прозрачности.
   1. Добавить .anim-stagger на родителя
   2. Добавить .is-visible когда нужно запустить
   Прямые потомки анимируются автоматически с задержкой.        */

@keyframes blockIn {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0);     }
}

.anim-stagger > * { opacity: 0; }

.anim-stagger.is-visible > * {
  animation: blockIn 120ms var(--ease-out-expo) both;
}

.anim-stagger.is-visible > *:nth-child(1)  { animation-delay:  80ms; }
.anim-stagger.is-visible > *:nth-child(2)  { animation-delay: 110ms; }
.anim-stagger.is-visible > *:nth-child(3)  { animation-delay: 140ms; }
.anim-stagger.is-visible > *:nth-child(4)  { animation-delay: 170ms; }
.anim-stagger.is-visible > *:nth-child(5)  { animation-delay: 200ms; }
.anim-stagger.is-visible > *:nth-child(6)  { animation-delay: 230ms; }
.anim-stagger.is-visible > *:nth-child(7)  { animation-delay: 260ms; }
.anim-stagger.is-visible > *:nth-child(8)  { animation-delay: 290ms; }
.anim-stagger.is-visible > *:nth-child(9)  { animation-delay: 320ms; }
.anim-stagger.is-visible > *:nth-child(10) { animation-delay: 350ms; }

/* Сброс при скрытии — чтобы анимация сыграла заново */
.anim-stagger:not(.is-visible) > * {
  opacity: 0;
  animation: none;
}




/* --- КРОССФЕЙД СТРОКИ ЗАГОЛОВКА СЛАЙДЕРА --- */

.text-old {
  position: absolute;
  left: 8px;
  top: 6px;
  white-space: nowrap;
  opacity: 1;
  transition: opacity var(--duration-instant) ease-out;
  pointer-events: none;
}

/* БАЗА (Мобилка и Планшет): 350ms */
.text-new {
  position: relative;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 350ms ease-out;
}

.global-info__title-line.is-animating {
  transition: width 350ms var(--ease-out-smooth);
}

/* ДЕСКТОП: Ускоряем до 200ms */
@media (min-width: 1024px) {
  .text-old { left: 16px; top: 12px; }
  
  .text-new { 
    transition: opacity 200ms ease-out; 
  }
  
  .global-info__title-line.is-animating {
    transition: width 200ms var(--ease-out-smooth);
  }
}

@media (min-width: 1440px) {
  .text-old { left: 20px; top: 8px; }
}

.text-old.is-fading  { opacity: 0; }
.text-new.is-visible { opacity: 1; }

/* Анимация ширины строки при смене текста.
   Мобиле — 500ms, десктоп — 400ms (--duration-base).           */
.global-info__title-line.is-animating {
  transition: width 300ms var(--ease-out-smooth);
}

@media (min-width: 1024px) {
  .global-info__title-line.is-animating {
    transition: width 300ms var(--ease-out-smooth);
  }
}


/* --- ИЗМЕРИТЕЛЬ ШИРИНЫ ЗАГОЛОВКА ---
   Невидимый span для расчётов в calculateLayout.
   Типографика совпадает с .global-info__title-line —
   при смене токенов measurer автоматически подхватывает новые значения. */

.title-measurer,
#utils-title-measurer {
  font-family: var(--font-main);
  font-weight: var(--font-weight-book);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  /* Служебные свойства управляются JS: position, visibility, white-space, font-size */
  top: 0;
  left: -9999px;
}

/* --- ТАБ СЕКЦИИ ---
   Универсальный паттерн для всех табов на светлом фоне.
   Используется в schedule, repertoire, news и любых новых блоках.
   
   Структура:
   <button class="section-tab [is-active]" role="tab">
     Название<span class="section-tab__line" aria-hidden="true"></span>
   </button>
   
   Специфика блока (white-space, flex-shrink и т.п.)
   задаётся отдельными правилами в компонентном CSS.        */

.section-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-accent);
  font-size: 22px;
  font-weight: var(--font-weight-bold);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-black-soft);
  opacity: 0.40;
  cursor: pointer;
  transition: opacity var(--duration-fast) ease;
  user-select: none;
}

.section-tab.is-active {
  opacity: 1;
}

.section-tab:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 4px;
}

.section-tab__line {
  display: none;
  width: 100%;
  height: 10px;
  background-color: var(--color-black-soft);
  border-radius: 1px;
  flex-shrink: 0;
}

.section-tab.is-active .section-tab__line {
  display: block;
}

/* Десктопный размер шрифта табов задаётся в каждом компонентном CSS отдельно,
   т.к. значения различаются (28px у repertoire, 30px у news). */


/* --- ЗАГОЛОВОК СЕКЦИИ ---
   Универсальный заголовок для светлых блоков главной страницы.
   Используется в schedule, repertoire, news и любых новых блоках.
   Размер 32px на мобилке, 40px на широком десктопе (≥ 1440px).    */

.section-title {
  font-family: var(--font-accent);
  font-size: 36px;
  font-weight: var(--font-weight-black); /* 900 */
  line-height: 0.85;
  letter-spacing: -0.035em;
  color: var(--color-black-soft);
}

@media (min-width: 1440px) {
  .section-title {
    font-size: 44px;
  }
}


/* --- ОТСТУП ОТ ЗАГОЛОВКА ДО ТАБОВ ---
   Контейнер табов секции всегда отступает 40px от заголовка.
   Применяется на элементе с role="tablist".                        */

.section-tabs {
  margin-top: 40px;
}


/* --- ГОРИЗОНТАЛЬНО ПРОКРУЧИВАЮЩИЕСЯ ТАБЫ ---
   Утилита-модификатор для .section-tabs, когда табов много или они
   длинные и могут не влезть в строку (репертуар, исторические постановки,
   будущие страницы).

   Структура:
   <nav class="section-tabs section-tabs--scrollable" role="tablist">
     <button class="section-tab is-active">…</button>
     <button class="section-tab">…</button>
     …
   </nav>

   Принцип работы:
   — Мобилка/планшет: горизонтальный скролл, скроллбар скрыт.
     Боковые отступы первого/последнего таба задаются через margin
     (НЕ padding на контейнере), потому что padding на flex-контейнере
     со скроллом в некоторых браузерах не отображается у скроллящегося
     контента. Margin на child всегда работает корректно.

   — Десктоп ≥1024px: скролл выключается, отступы крайних табов сбрасываются
     (предполагается, что отступы возвращает родитель через свой padding).

   ВАЖНО: scroll-snap намеренно НЕ используется. При scroll-snap-align: start
   браузер при инициализации выравнивает левый край первого таба к левому краю
   скролл-порта, съедая margin-left и визуально «улетая в край».              */

.section-tabs--scrollable {
  display: flex;
  flex: 1;
  gap: 40px;
  /* Сбрасываем margin-top: 40px от .section-tabs.
     Эта утилита используется внутри .page__bar, который сам
     задаёт вертикальный отступ от интро (margin-top: 80px).
     Если utility наследует +40px, итоговый отступ становится 120px. */
  margin-top: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.section-tabs--scrollable::-webkit-scrollbar { display: none; }

.section-tabs--scrollable .section-tab {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Боковые отступы крайних табов — мобилка 10px */
.section-tabs--scrollable .section-tab:first-child { margin-left:  10px; }
.section-tabs--scrollable .section-tab:last-child  { margin-right: 10px; }

/* Планшет: 16px */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .section-tabs--scrollable .section-tab:first-child { margin-left:  16px; }
  .section-tabs--scrollable .section-tab:last-child  { margin-right: 16px; }
}

/* Десктоп: скролл не нужен, отступы возвращает родитель через padding */
@media (min-width: 1024px) {
  .section-tabs--scrollable {
    overflow: visible;
  }
  .section-tabs--scrollable .section-tab:first-child { margin-left:  0; }
  .section-tabs--scrollable .section-tab:last-child  { margin-right: 0; }
}


 /* --- ВИДЕО-РЕЖИМ: уменьшение UI при воспроизведении видео --- */

.header__brand-block {
  transform-origin: top left;
  transition: transform 1.25s var(--ease-out-smooth),
              background-color 0.6s ease;
}

.global-info__left {
  transform-origin: top left;
  transition: transform 0.85s var(--ease-out-smooth);
}

.global-info__title-wrapper {
  transform-origin: bottom right;
  transition: transform 0.85s var(--ease-out-smooth);
}

/* Мобилка: логотип 20% влево-вверх с отступом 10px */
.header__brand-block.is-video-mode {
  transform: translate(10px, 12px) scale(0.85);
  background-color: transparent;
}
.header__brand-block.is-video-mode .header__logo--final {
  opacity: 1;
}

/* Даты едут вверх вслед за логотипом (логотип освобождает 16px) */
.global-info__left.is-video-mode {
  transform: translateY(-0px) scale(0.75);
}

.global-info__title-wrapper.is-video-mode {
  transform: translateY(8px) scale(0.7);
}

/* Ноутбук и десктоп: логотип 30% влево-вверх с отступом 16px */
@media (min-width: 1024px) {
  .header__brand-block.is-video-mode {
    transform: translate(16px, 16px) scale(0.7);
  }

  .global-info__left {
    transform-origin: bottom left;
  }

  .global-info__left.is-video-mode {
    transform: scale(0.8);
  }

  .global-info__title-wrapper.is-video-mode {
    transform: translateY(8px) scale(0.6);
  }
  
  /* Снимаем overflow:hidden в video-mode чтобы увеличенный текст не обрезался */
  .global-info__title-wrapper.is-video-mode .global-info__title {
    overflow: visible;
  }

  .section-tab {
  font-size: 24px;
  
}
} /* <--- ВОТ ЭТА СКОБКА ЗАКРЫВАЕТ ДЕСКТОПНЫЙ БЛОК */


/* ============================================================
   .title-final — белый текст в углу (video-mode)
   ============================================================
   Создаётся динамически из JS как сиблинг .global-info__title-wrapper
   внутри .global-info. Появляется через 400мс после старта video-mode,
   когда плашки уже наполовину уехали и стали невидимыми. */
.title-final {
  position: absolute;
  right: 12px; /* совпадает с right у .controls (откуда Next-кнопка) */
  bottom: 84px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  z-index: 16;

  font-family: var(--font-main);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--color-white);
  text-transform: uppercase;

  /* Старт: scale 1.2 (визуально совпадает с плашками в момент появления, ~400мс уезда).
     Финал: scale 1 — нормальный угловой размер. */
  transform: scale(1.2);
  transform-origin: bottom right;
  opacity: 0;
  transition: opacity 300ms ease-out, transform 450ms var(--ease-out-smooth);
}

.title-final.is-visible {
  opacity: 1;
  transform: scale(1);
}

.title-final__line {
  white-space: nowrap;
  display: inline-block;
}

/* Клон бейджа «Премьера» внутри .title-final — наезжает на правый верхний угол
   белого текста (так же как оригинал наезжает на плашки).
   Шрифт и стили задаём явно, чтобы не наследовалось от .title-final. */
.title-final .global-info__badge--final {
  position: absolute;
  top: -30px;
  right: -8px;
  opacity: 1;
  pointer-events: none;
  z-index: 1;

  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: normal;
  line-height: normal;
  text-transform: none;
  color: var(--color-white);
}

@media (min-width: 768px) {
  .title-final {
    bottom: 80px;
    right: 16px;
  }
  .title-final .global-info__badge--final {
    font-size: 17px;
  }
}

@media (min-width: 1024px) {
  .title-final {
    bottom: 124px;
    right: 16px;
  }
}

/* --- СТАРТОВАЯ ТОЧКА ПОЯВЛЕНИЯ ЗАГОЛОВКА (Масштаб 120%) --- */

/* Мобилка: целевой масштаб 0.8. Значит старт (120%) = 0.8 * 1.2 = 0.96 */
.global-info__title-wrapper.is-video-mode.is-video-entering {
  transform: translateY(8px) scale(0.8); 
}

@media (min-width: 1024px) {
  /* Десктоп: целевой масштаб 0.6. Значит старт (120%) = 0.6 * 1.2 = 0.72 */
  .global-info__title-wrapper.is-video-mode.is-video-entering {
    transform: translateY(8px) scale(0.72); 
  }
}

/* ============================================================
   RICH-TEXT — сброс HTML из CMS
   ============================================================
   Назначение: бэкенд через CMS вставляет произвольный HTML
   (ссылки, списки, span-ы, div-ы, strong/em, заголовки и т.д.).
   Класс .rich-text принудительно подчиняет всё это типографике
   родительского контейнера: шрифт, размер, цвет, line-height
   наследуются от родителя — никаких синих ссылок, никаких
   "своих" шрифтов у тегов.

   Использование:
   <div class="show__about-text rich-text"> ...HTML из CMS... </div>
   или
   <div class="rich-text"> ...HTML из CMS... </div>

   Внутри .rich-text НЕЛЬЗЯ задавать абсолютные размеры шрифта —
   только наследование. Размер задаёт родитель (.show__about-text,
   .actor__bio, и т.д.). Это позволяет одному классу работать
   на любой странице без модификаторов.
   ============================================================ */

.rich-text,
.rich-text * {
  font-family: inherit;
  font-size: inherit;
  font-style: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: transparent;
}

/* Блочные обёртки — без своих отступов, без своих размеров.
   Бэкенд может прислать вложенные <div>, <section>, <article>. */
.rich-text div,
.rich-text section,
.rich-text article,
.rich-text span {
  display: block;
  margin: 0;
  padding: 0;
}

/* span — обратно в инлайн (display: block выше слишком жадный) */
.rich-text span {
  display: inline;
}

/* Параграфы — без своих margin (отступы между блоками задаёт
   родитель через flex-gap, как в .show__about-text). */
.rich-text p {
  margin: 0;
}

/* Отступы между любыми блочными элементами в rich-text.
   Без `>` — работает и для прямых детей, и для вложенных
   (CMS-редакторы могут оборачивать параграфы в <div>). */
.rich-text p + p,
.rich-text * + p,
.rich-text p + *,
.rich-text div + div,
.rich-text * + div,
.rich-text div + * {
  margin-top: 1em;
}

/* Защита от пустых обёрток <div><p>...</p></div>:
   первый ребёнок такой обёртки не должен дублировать отступ. */
.rich-text div > p:first-child,
.rich-text div > p:only-child {
  margin-top: 0;
}

/* Ссылки — наследуют цвет родителя, подчёркивание оставляем
   (это нативный UX для распознавания ссылки в тексте).
   На hover — фирменный красный. */
.rich-text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
  transition: color var(--duration-fast) ease;
}

.rich-text a:hover {
  color: var(--color-brand);
}

.rich-text a:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Жирный/курсив — единственное, чему разрешено нарушить
   "наследуй всё": это семантика, а не оформление. */
.rich-text strong,
.rich-text b {
  font-weight: var(--font-weight-bold);
}

.rich-text em,
.rich-text i {
  font-style: italic;
}

/* Списки — оставляем буллеты/цифры (это семантика списка),
   но шрифт/цвет/размер наследуются. */
.rich-text ul,
.rich-text ol {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.rich-text li {
  margin: 0.25em 0;
}

.rich-text li::marker {
  color: inherit;
}

/* Заголовки внутри rich-text — нейтрализуем дефолты браузера.
   Если бэкенд вставит <h2>, он не должен выпадать огромным
   жирным заголовком из контекста. Только bold + чуть больший
   размер через em (наследуется от родителя). */
.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6 {
  margin: 0.8em 0 0.4em;
  font-family: var(--font-accent);
  font-weight: var(--font-weight-bold);
  line-height: 1.15;
}

.rich-text h1 { font-size: 1.5em; }
.rich-text h2 { font-size: 1.35em; }
.rich-text h3 { font-size: 1.2em; }
.rich-text h4 { font-size: 1.1em; }
.rich-text h5,
.rich-text h6 { font-size: 1em; }

.rich-text > :first-child { margin-top: 0; }
.rich-text > :last-child  { margin-bottom: 0; }

/* Цитаты */
.rich-text blockquote {
  margin: 1em 0;
  padding-left: 1em;
  border-left: 2px solid var(--color-black-soft-25);
  font-style: italic;
}

/* Inline code / pre */
.rich-text code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.3em;
  background: var(--color-black-soft-04);
  border-radius: 3px;
}

.rich-text pre {
  margin: 1em 0;
  padding: 1em;
  background: var(--color-black-soft-04);
  border-radius: 4px;
  overflow-x: auto;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
  line-height: 1.4;
}

.rich-text pre code {
  padding: 0;
  background: transparent;
}

/* Горизонтальная линия */
.rich-text hr {
  margin: 1.5em 0;
  border: none;
  border-top: 1px solid var(--color-black-soft-15);
}

/* Картинки внутри текста — не вылезают за контейнер */
.rich-text img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em 0;
}

/* Таблицы — базовый адекватный вид */
.rich-text table {
  width: 100%;
  margin: 1em 0;
  border-collapse: collapse;
}

.rich-text th,
.rich-text td {
  padding: 0.5em 0.75em;
  border: 1px solid var(--color-black-soft-15);
  text-align: left;
}

.rich-text th {
  font-weight: var(--font-weight-bold);
  background: var(--color-black-soft-04);
}

/* === 0. ТЕЛЕФОНЫ (до 767px) === */
@media (max-width: 767.98px) {
  .controls__link { border-bottom-width: 1.5px; }
}