/* =========================================================
   Астраханский детектив — промо-сайт
   Мобильная версия — базовая; десктоп (≥1200px) повторяет
   макет 1920px и масштабируется через --u (1u = 1px макета).
   ========================================================= */

@font-face {
  font-family: "TT2020 Local";
  src: url("../../fonts/TT2020StyleE-Regular.woff2") format("woff2"),
       url("../../fonts/TT2020StyleE-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #d2c9c1;
  --ink-2: #d0bdab;
  --red: #c92d2d;
  --red-ink: #a22628;
  --red-label: #c43234;
  --red-line: #c0221d;
  --blue: #0180f7;
  --btn-ink: #e6e0da;

  --f-sans: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --f-cond: "Roboto Condensed", "Arial Narrow", var(--f-sans);
  --f-type: "TT2020 Local", "Courier New", monospace;
  --f-ui: "Onest", var(--f-sans);
  --f-mono: "Anonymous Pro", ui-monospace, monospace;

  --pad: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-synthesis: none; }
body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video, iframe { display: block; max-width: 100%; }
p, h1, h2, h3, dl, dd, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.page { position: relative; max-width: 2560px; margin: 0 auto; overflow: hidden; }
main, .hero, .footer { position: relative; z-index: 1; }
.teaser, .gallery, .cast, .info { position: relative; }
.cast { z-index: 2; }

/* ---------- Типографика ---------- */
.h2 {
  font-family: var(--f-type);
  font-weight: 400;
  color: var(--ink);
  text-transform: uppercase;
  font-size: clamp(30px, 8vw, 40px);
  line-height: 1.17;
  letter-spacing: -0.02em;
}
.eyebrow {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.17em;
  color: var(--red-label);
  text-transform: uppercase;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 22px;
  border-radius: 13px;
  font-weight: 600; font-size: 17px; line-height: 1.17;
  transition: filter .2s, transform .2s;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn--red { background: var(--red); color: var(--btn-ink); }
.btn--blue { background: var(--blue); color: #fff; }

/* ---------- Декор (только десктоп) ---------- */
.decor { display: none; }

/* =========================================================
   ПЕРВЫЙ ЭКРАН
   ========================================================= */
.hero { --hero-gap: clamp(240px, 56svh, 560px); padding: 0 var(--pad) 48px; }
/* Мобильная схема: заголовок сверху → «окно» с фото → остальной текст */
.hero__bg { position: absolute; inset: 0 0 auto 0; height: calc(var(--hero-gap) + 200px); overflow: hidden; z-index: -1; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 63% 30%; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, #000 0%, rgba(0,0,0,.55) 14%, rgba(0,0,0,0) 32%, rgba(0,0,0,0) 62%, rgba(0,0,0,.8) 84%, #000 100%);
}
.hero__content { padding-top: 28px; }
.hero__title {
  font-family: var(--f-cond); font-weight: 700;
  font-size: clamp(38px, 10.5vw, 64px); line-height: 1.05; letter-spacing: -0.02em;
  text-transform: uppercase; color: var(--ink);
}
.hero__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: var(--hero-gap); font-size: 15px; opacity: .4; }
.hero__credits {
  display: grid; grid-template-columns: auto 1fr; gap: 8px 12px;
  margin-top: 20px; font-size: 15px; line-height: 1.5;
}
.hero__credits dt { opacity: .4; }
.hero__actions { display: grid; gap: 10px; margin-top: 28px; }
.hero__actions .btn { width: 100%; }
.hero__support { margin-top: 32px; }
.hero__support p { font-size: 15px; opacity: .46; }
.socials { display: flex; gap: 15px; margin-top: 10px; }
.social { display: block; width: 54px; height: 54px; border-radius: 13px; transition: transform .2s, background .2s; }
.social svg { width: 100%; height: 100%; }
.social:hover { background: rgba(255,255,255,.08); }
.social:not([href]) { pointer-events: none; }

/* =========================================================
   ТИЗЕР
   ========================================================= */
.teaser {
  padding: 24px 0 56px;
  background: url("../img/teaser-bg.webp") center 30% / cover no-repeat;
}
.teaser__media { position: relative; width: 100%; aspect-ratio: 1087 / 613; }
.teaser__frame { width: 100%; height: 100%; }
.teaser__slot {
  position: absolute;
  left: 12.577%; top: 19.15%; width: 74.85%; height: 62.33%;
  background: #060606 center / cover no-repeat;
  overflow: hidden;
}
.teaser__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: clamp(56px, 14.5%, 118px); aspect-ratio: 1; border-radius: 50%;
}
.teaser__play svg { width: 100%; height: 100%; }
.teaser__play-g { transition: opacity .25s; }
.teaser__play:hover .teaser__play-g,
.teaser__play:focus-visible .teaser__play-g { opacity: .55; }
.teaser__slot video, .teaser__slot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.teaser__slot.is-playing .teaser__play { display: none; }
.teaser__note {
  position: absolute; left: 0; right: 0; bottom: 10%;
  text-align: center; font-size: 14px; color: var(--ink); opacity: .7; padding: 0 12px;
}
.teaser__text { padding: 28px var(--pad) 0; }
.teaser__text .h2 { margin-top: 10px; }
.teaser__lead { margin-top: 14px; font-size: 16px; line-height: 1.5; max-width: 40em; }

/* =========================================================
   ГАЛЕРЕЯ
   ========================================================= */
.gallery { padding: 8px 0 56px; }
.gallery__title { padding: 0 var(--pad); }
.gallery__viewport { position: relative; margin-top: 16px; }
.gallery__track {
  display: flex; gap: 10px;
  padding: 10px var(--pad);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-padding: 0 var(--pad);
  scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }
.g-item {
  --h: 220px;
  position: relative; flex: 0 0 auto; height: var(--h);
  aspect-ratio: var(--ar, 3 / 2);
  scroll-snap-align: start;
  background: #111;
  transition: transform .3s ease;
}
.g-item img { width: 100%; height: 100%; object-fit: cover; opacity: .8; transition: opacity .3s; }
.g-item::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border: 2.5px solid #2c2c2c; transition: border-color .3s;
}
.g-item:hover img, .g-item:focus-visible img { opacity: 1; }
.g-item:hover::after, .g-item:focus-visible::after { border-color: var(--red-line); }
.g-item:focus-visible { outline: none; }
.gallery__empty { padding: 0 var(--pad); color: var(--ink); opacity: .5; font-size: 15px; }

.arrow { display: none; color: var(--ink); opacity: .5; transition: opacity .2s; }
.arrow:hover, .arrow:focus-visible { opacity: 1; }
.arrow svg { width: 100%; height: 100%; }
.arrow--prev svg { transform: scaleX(-1); }
.arrow[hidden] { display: none !important; }

/* =========================================================
   РЕЖИССЕРЫ И АКТЕРЫ
   ========================================================= */
.cast {
  padding: 8px 0 40px;
  background: url("../img/cast-bg.webp") center / cover no-repeat;
}
.cast__title { padding: 0 var(--pad); position: relative; z-index: 2; }
.cast__scroller {
  margin-top: 8px;
  overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-x: contain;
  cursor: grab;
  scrollbar-width: thin; scrollbar-color: rgba(210,201,193,.35) transparent;
  -webkit-overflow-scrolling: touch;
}
.cast__scroller.is-dragging { cursor: grabbing; }
.cast__scroller::-webkit-scrollbar { height: 6px; }
.cast__scroller::-webkit-scrollbar-thumb { background: rgba(210,201,193,.35); border-radius: 3px; }
.cast__board { height: 600px; width: auto; max-width: none; margin: -95px 0 -70px; user-select: none; -webkit-user-drag: none; }
.cast__hint {
  display: flex; align-items: center; gap: 10px;
  padding: 10px var(--pad) 0; font-family: var(--f-type); font-size: 14px; color: var(--ink); opacity: .5;
}

/* =========================================================
   ИНФОРМАЦИЯ (лист бумаги)
   ========================================================= */
.info { padding: 24px 12px 40px; }
.info__paper { display: none; }
.info__cols {
  display: grid; gap: 40px;
  padding: 56px 26px 64px;
  color: #000;
  background:
    radial-gradient(120% 80% at 50% 50%, rgba(0,0,0,0) 60%, rgba(70,45,20,.28) 100%),
    url("../img/paper-texture.jpg") center / cover no-repeat,
    #c9b49c;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.info__h {
  font-family: var(--f-type); font-weight: 400;
  font-size: 28px; line-height: .95; letter-spacing: .02em;
  text-transform: uppercase; color: var(--red-ink);
}
.facts { display: grid; gap: 22px; margin-top: 20px; font-size: 16px; line-height: 1.17; }
.facts dt { opacity: .45; }
.facts dd { margin-top: 5px; }
.facts dd.long { line-height: 1.5; }
.facts--grid { grid-template-columns: 1fr 1fr; column-gap: 16px; }
.facts--grid .span { grid-column: 1 / -1; }

/* =========================================================
   ФУТЕР
   ========================================================= */
.footer {
  display: flex; flex-direction: column; gap: 24px;
  padding: 24px var(--pad) calc(32px + env(safe-area-inset-bottom));
}
.footer__legal { font-size: 14px; line-height: 1.5; opacity: .4; }
.footer__studio { display: flex; align-items: center; gap: 14px; opacity: .4; }
.footer__studio svg { width: 44px; height: 44px; flex: none; }
.footer__studio p { font-family: var(--f-mono); font-size: 15px; line-height: 1.16; }

/* =========================================================
   ПОПАП ВЫБОРА СЕАНСА
   ========================================================= */
.modal {
  width: min(708px, calc(100vw - 24px));
  max-width: none; max-height: calc(100dvh - 24px);
  margin: auto; padding: 0; border: 0;
  background: transparent; color: #fff;
  overflow: visible;
}
.modal::backdrop { background: rgba(0,0,0,.44); backdrop-filter: blur(6.5px); -webkit-backdrop-filter: blur(6.5px); }
.modal[open] { animation: modal-in .28s cubic-bezier(.2,.8,.2,1); }
.modal[open]::backdrop { animation: fade-in .28s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }

.modal__box {
  position: relative;
  padding: 44px 22px 26px;
  border-radius: 26px;
  background: rgba(14,14,14,.93);
  backdrop-filter: blur(3.5px);
  max-height: calc(100dvh - 24px); overflow: auto;
}
.modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(87,87,87,.3); color: rgba(255,255,255,.45);
  transition: color .2s, background .2s;
}
.modal__close:hover { color: #fff; background: rgba(87,87,87,.55); }
.modal__title {
  font-family: var(--f-cond); font-weight: 700;
  font-size: clamp(28px, 8vw, 50px); line-height: .95; letter-spacing: .01em;
  text-transform: uppercase; color: var(--ink);
  padding-right: 40px;
}
.modal__body { display: grid; gap: 20px; margin-top: 22px; font-family: var(--f-ui); }
.field__label {
  font-family: var(--f-ui); font-weight: 700; font-size: 13.5px; line-height: 1;
  letter-spacing: .12em; text-transform: uppercase; opacity: .36;
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 9px; }
.chip {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 64px; padding: 11.5px 16.5px;
  border: 1.5px solid rgba(255,255,255,.2); border-radius: 14px;
  font-family: var(--f-ui); font-size: 18px; line-height: 1.017; letter-spacing: -.03em;
  transition: background .2s, border-color .2s;
}
.chip__day { font-weight: 600; }
.chip__date { font-weight: 400; }
.chip:hover { border-color: rgba(255,255,255,.5); }
.chip[aria-checked="true"] { background: var(--red); border-color: var(--red); }
.chips--time .chip[aria-checked="true"] { font-weight: 700; }
.chips__hint { font-size: 15px; opacity: .45; padding: 12px 0; }

.btn-book {
  display: flex; align-items: center; justify-content: center;
  height: 63px; border-radius: 14px;
  background: var(--red); color: #fff;
  font-family: var(--f-ui); font-weight: 700; font-size: 18px; letter-spacing: -.03em;
  transition: filter .2s, opacity .2s;
}
.btn-book:hover { filter: brightness(1.12); }
.btn-book[aria-disabled="true"] { opacity: .35; cursor: not-allowed; filter: none; }
.modal__empty { margin-top: 20px; font-family: var(--f-ui); font-size: 17px; opacity: .7; }

/* =========================================================
   ПРОСМОТР ФОТО
   ========================================================= */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(0,0,0,.94); color: #fff;
}
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; animation: fade-in .25s ease; }
.lightbox::backdrop { background: rgba(0,0,0,.6); }
.lightbox__figure { grid-column: 2; display: grid; place-items: center; height: 100dvh; padding: 56px 0 40px; min-width: 0; }
.lightbox__img { max-width: 100%; max-height: calc(100dvh - 110px); object-fit: contain; user-select: none; touch-action: pan-y; }
.lightbox__count { margin-top: 12px; font-family: var(--f-type); font-size: 14px; color: var(--ink); opacity: .6; }
.lightbox__close { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; display: grid; place-items: center; z-index: 2; opacity: .7; }
.lightbox__nav { width: 48px; height: 96px; display: grid; place-items: center; opacity: .6; }
.lightbox__close:hover, .lightbox__nav:hover { opacity: 1; }
.lightbox__nav--prev { grid-column: 1; }
.lightbox__nav--next { grid-column: 3; }

/* =========================================================
   ПЛАНШЕТ
   ========================================================= */
@media (min-width: 640px) {
  :root { --pad: 40px; }
  .hero__actions { display: flex; flex-wrap: wrap; gap: 13px; }
  .hero__actions .btn { width: auto; }
  .hero__credits { max-width: 620px; }
  .g-item { --h: 276px; }
  .cast__board { height: 720px; margin: -115px 0 -85px; }
  .info { padding: 40px var(--pad) 56px; }
  .info__cols { padding: 72px 56px 80px; grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .info__col--wide { grid-column: 1 / -1; grid-row: 2; }
  .facts--grid { grid-template-columns: 1fr 1fr; }
  .footer { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .modal__box { padding: 56px 40px 40px; border-radius: 33px; }
  .modal__title { font-size: 44px; white-space: nowrap; }
  .chip { padding: 13px 18px; }
}

/* =========================================================
   ДЕСКТОП — точное повторение макета 1920
   ========================================================= */
@media (min-width: 1200px) {
  :root { --u: calc(min(100vw, 2560px) / 1920); }

  .decor { display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none; }
  .decor img { position: absolute; left: 0; width: 100%; height: auto; }
  .decor__teaser-bg { top: calc(var(--u) * 1172); }
  .decor__cast-bg { top: calc(var(--u) * 2333); }

  .h2 { font-size: calc(var(--u) * 54.8); letter-spacing: calc(var(--u) * -1.1); }
  .eyebrow { font-size: max(12px, calc(var(--u) * 15.64)); letter-spacing: calc(var(--u) * 2.66); }

  /* --- первый экран --- */
  .hero { height: calc(var(--u) * 890); padding: 0; }
  .hero__bg { inset: 0 0 auto 0; height: calc(var(--u) * 1081); min-height: 0; }
  .hero__bg img { object-position: center; }
  .hero__bg::after { background: linear-gradient(to bottom, rgba(0,0,0,0) 72%, #000 100%); }
  .hero__bg::before {
    content: ""; position: absolute; z-index: 1; top: 0;
    left: calc(var(--u) * -108.3); width: calc(var(--u) * 926.2); height: calc(var(--u) * 803);
    background: linear-gradient(to left, rgba(0,0,0,0) 0%, #000 63.94%);
  }
  .hero__content { position: relative; padding: calc(var(--u) * 190) 0 0 calc(var(--u) * 137.4); }
  .hero__title { font-size: calc(var(--u) * 82.62); line-height: 1.17; letter-spacing: calc(var(--u) * -1.65); white-space: nowrap; }
  .hero__meta { margin-top: calc(var(--u) * 38); gap: calc(var(--u) * 23); font-size: max(13px, calc(var(--u) * 20.3)); line-height: 1.17; }
  .hero__credits {
    margin-top: calc(var(--u) * 41.5);
    grid-template-columns: calc(var(--u) * 114.3) calc(var(--u) * 451.6);
    gap: calc(var(--u) * 12) 0;
    font-size: max(13px, calc(var(--u) * 20.3)); line-height: 1.17;
    max-width: none;
  }
  .hero__credits dd:last-of-type { font-size: max(13px, calc(var(--u) * 19.96)); line-height: 1.5; }
  .hero__actions { margin-top: calc(var(--u) * 68); gap: calc(var(--u) * 13); }
  .btn { min-height: calc(var(--u) * 52.7); padding: 0 calc(var(--u) * 21.7); border-radius: calc(var(--u) * 13); font-size: max(13px, calc(var(--u) * 20)); }
  .hero__support { margin-top: calc(var(--u) * 53); }
  .hero__support p { font-size: max(13px, calc(var(--u) * 19.96)); line-height: 1.5; }
  .socials { margin-top: calc(var(--u) * 10); gap: calc(var(--u) * 15); }
  .social { width: calc(var(--u) * 53.94); height: calc(var(--u) * 53.94); border-radius: calc(var(--u) * 13); }

  /* --- тизер --- */
  .teaser { height: calc(var(--u) * 612); padding: 0; background: none; }
  .teaser__media { position: absolute; left: 0; top: 0; width: calc(var(--u) * 1087); }
  .teaser__text { position: absolute; left: calc(var(--u) * 1164.7); top: calc(var(--u) * 97.7); width: calc(var(--u) * 650); padding: 0; }
  .teaser__text .h2 { margin-top: calc(var(--u) * 14); }
  .teaser__lead { margin-top: calc(var(--u) * 12); font-size: max(15px, calc(var(--u) * 24.54)); }
  .teaser__note { font-size: max(13px, calc(var(--u) * 18)); }

  /* --- галерея --- */
  .gallery { height: calc(var(--u) * 538); padding: calc(var(--u) * 75) 0 0; }
  .gallery__title { padding: 0 0 0 calc(var(--u) * 140.5); }
  .gallery__viewport { margin-top: calc(var(--u) * 3); }
  .gallery__track {
    margin-left: calc(var(--u) * 130.5); width: calc(var(--u) * 1540);
    gap: calc(var(--u) * 14); padding: calc(var(--u) * 10);
    scroll-padding: 0 calc(var(--u) * 10);
  }
  .g-item { --h: calc(var(--u) * 276.4); }
  .g-item::after { border-width: calc(var(--u) * 2.46); }
  .g-item:hover, .g-item:focus-visible { transform: scale(1.067); z-index: 2; }
  .arrow { display: block; position: absolute; width: calc(var(--u) * 44.75); height: calc(var(--u) * 44.75); top: calc(var(--u) * 143.7); }
  .arrow--next { left: calc(var(--u) * 1683.4); }
  .arrow--prev { left: calc(var(--u) * 70); }
  .gallery__empty { padding-left: calc(var(--u) * 140.5); }

  /* --- актеры --- */
  .cast { height: calc(var(--u) * 908); padding: 0; background: none; }
  .cast__title { position: absolute; left: calc(var(--u) * 141.6); top: calc(var(--u) * 43.4); padding: 0; pointer-events: none; }
  .cast__scroller { position: absolute; left: 0; right: 0; top: calc(var(--u) * -50); margin: 0; padding-bottom: 8px; }
  .cast__board { height: calc(var(--u) * 1000); margin: 0; }
  .cast__hint { position: absolute; right: calc(var(--u) * 137.4); top: calc(var(--u) * 900); padding: 0; font-size: max(12px, calc(var(--u) * 15)); }

  /* --- информация --- */
  .info { height: calc(var(--u) * 1352); padding: 0; }
  .info__paper { display: block; position: absolute; left: 0; top: calc(var(--u) * -56); width: 100%; height: auto; }
  .info__cols {
    position: absolute; inset: calc(var(--u) * 185) 0 auto 0;
    display: block; padding: 0; background: none; box-shadow: none; border-radius: 0;
  }
  .info__col { position: absolute; top: 0; }
  .info__col:nth-child(1) { left: calc(var(--u) * 274.2); width: calc(var(--u) * 360); }
  .info__col--wide { left: calc(var(--u) * 669.8); width: calc(var(--u) * 540); }
  .info__col:nth-child(3) { left: calc(var(--u) * 1230.7); width: calc(var(--u) * 420); }
  .info__h { font-size: calc(var(--u) * 42.07); line-height: .89; letter-spacing: calc(var(--u) * .84); white-space: nowrap; }
  .facts { margin-top: calc(var(--u) * 22); gap: calc(var(--u) * 32.2); font-size: max(12px, calc(var(--u) * 18.67)); }
  .facts dt { opacity: .4; }
  .facts dd { margin-top: calc(var(--u) * 4.5); }
  .facts--grid { grid-template-columns: calc(var(--u) * 251) calc(var(--u) * 289); column-gap: 0; }
  .facts dd.long { width: calc(var(--u) * 447.7); }

  /* --- футер --- */
  .footer { height: calc(var(--u) * 168); padding: calc(var(--u) * 50) calc(var(--u) * 137.4) 0; flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .footer__legal { font-size: max(12px, calc(var(--u) * 15.64)); line-height: 1.47; }
  .footer__studio { gap: calc(var(--u) * 15); align-items: flex-start; }
  .footer__studio svg { width: calc(var(--u) * 53.94); height: calc(var(--u) * 53.94); }
  .footer__studio p { font-size: max(12px, calc(var(--u) * 16)); padding-top: calc(var(--u) * 8); width: calc(var(--u) * 227); }
  .cast__hint { display: none; }
   .footer__studio:hover { opacity: .8; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
