:root {
  --bg: #000;
  --fg: #fff;
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  /* Синхронно с SECTION_SPAN в assets/js/scatter.js: раскладка расставляет фото
     в пределах такой секции, до JS высота должна быть уже такой же. */
  --section-span: 1.45;
  --screen-h: calc(100svh * var(--section-span));
  --screen-overlap: 18vh;
  --font-title: "Roboto Flex", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@font-face {
  font-family: "Roboto Flex";
  src:
    url("../RobotoFlex-VariableFont.woff2") format("woff2-variations"),
    url("../RobotoFlex-VariableFont.woff2") format("woff2"),
    url("../RobotoFlex-VariableFont.woff") format("woff");
  font-weight: 100 1000;
  font-style: normal;
  /* Под прелоадером ждём шрифт — без мигания системным. */
  font-display: block;
}

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

html {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  overflow-x: clip;
  scrollbar-gutter: stable;
  max-width: 100%;
  overflow-anchor: none;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  overflow-x: clip;
  overflow-y: visible;
  max-width: 100%;
  overflow-anchor: none;
}

html.lenis {
  height: auto;
}

html.lenis body {
  height: auto;
  overflow-y: visible;
}

body.is-loading {
  overflow: hidden;
}

.visually-hidden,
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Preloader —— */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: grid;
  place-items: center;
  pointer-events: auto;
}

.preloader[hidden] {
  display: none;
}

.preloader.is-scattering {
  pointer-events: none;
  background: transparent;
}

.preloader__stack {
  position: relative;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.preloader__stack .photo {
  margin: 0;
  height: auto;
  overflow: visible;
  will-change: transform, opacity;
  cursor: default;
  pointer-events: none;
}

.preloader__stack .photo__link {
  pointer-events: none;
  cursor: default;
}

.preloader__stack img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: unset;
  display: block;
  pointer-events: none;
  user-select: none;
}

body.is-loading .photo,
body.is-loading .photo__link {
  cursor: default;
  pointer-events: none;
}

/* Лого / связь — тот же Roboto Flex, что у заголовка, меньше и по краям */
.site-logo,
.site-contact {
  position: fixed;
  left: 50%;
  z-index: 10000;
  margin: 0;
  padding: 0;
  opacity: 0;
  color: var(--fg);
  font-family: var(--font-title);
  font-size: clamp(1.44rem, 3.3vw, 2.1rem);
  font-weight: 200;
  font-variation-settings:
    "wght" 200,
    "GRAD" 71,
    "wdth" 75,
    "XOPQ" 127,
    "YOPQ" 58,
    "XTRA" 420,
    "YTUC" 760,
    "YTLC" 511,
    "YTAS" 854,
    "YTDE" -98,
    "opsz" 51;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity, filter;
}

.site-logo {
  top: 3.2vh;
}

.site-contact {
  bottom: 3.2vh;
  top: auto;
}

a.site-logo,
a.site-contact {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  pointer-events: auto;
}

body:not(.is-loading) .site-logo,
body:not(.is-loading) .site-contact {
  pointer-events: auto;
}

body.is-loading .site-logo,
body.is-loading .site-contact,
body.is-loading a.site-logo,
body.is-loading a.site-contact {
  pointer-events: none;
  cursor: default;
}

/* Wipe при hover — тот же жест, что у смены заголовков (уход вверх / вход снизу) */
.text-wipe {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
}

.stage-title.text-wipe {
  display: grid;
}

.text-wipe__line {
  grid-area: 1 / 1;
  display: block;
  transform: translate3d(0, 0, 0);
  transition: transform 0.22s cubic-bezier(0.45, 0, 0.55, 1);
  will-change: transform;
  pointer-events: none;
}

.text-wipe__line--b {
  transform: translate3d(0, 110%, 0);
}

.text-wipe:hover .text-wipe__line--a,
.text-wipe:focus-visible .text-wipe__line--a {
  transform: translate3d(0, -110%, 0);
}

.text-wipe:hover .text-wipe__line--b,
.text-wipe:focus-visible .text-wipe__line--b {
  transform: translate3d(0, 0, 0);
}

/* 404 / contact: без прелоадера / GSAP — сразу видно и по центру */
body.error404,
body.page-template-contact,
body.page-template-contact-php,
body.page-contact {
  min-height: 100svh;
  background: var(--bg);
  overflow: hidden;
}

body.error404 .site-main,
body.page-template-contact .site-main,
body.page-template-contact-php .site-main,
body.page-contact .site-main {
  min-height: 100svh;
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body.error404 .site-logo,
body.error404 .site-contact,
body.page-template-contact .site-logo,
body.page-template-contact .site-contact,
body.page-template-contact-php .site-logo,
body.page-template-contact-php .site-contact,
body.page-contact .site-logo,
body.page-contact .site-contact {
  opacity: 1;
  transform: translateX(-50%);
}

body.error404 .stage-title__text,
body.page-template-contact .stage-title__text,
body.page-template-contact-php .stage-title__text,
body.page-contact .stage-title__text {
  opacity: 1;
}

/* Contact: фото по центру позади vk-заголовка */
.photo.photo--contact-hero {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(42vw, 640px);
  height: auto;
  z-index: 4000;
  margin: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  cursor: default;
  overflow: visible !important;
}

.photo.photo--contact-hero.is-wave-active {
  z-index: 4000 !important;
}

.photo.photo--contact-hero img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 1024px) {
  .photo.photo--contact-hero {
    width: min(72vw, 360px);
  }
}

/* —— Stage title —— поверх всех фото, клики проходят насквозь */
.stage-title {
  line-height: 1;
  position: fixed !important;
  z-index: 5000 !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  pointer-events: none !important;
  text-align: center;
  /* Фиксированная ширина: иначе блок прыгает по горизонтали на каждой смене. */
  width: min(96vw, 1100px);
  padding: 0 1rem;
  overflow: hidden;
  display: grid;
  place-items: center;
  mix-blend-mode: difference;
}

.stage-title,
.stage-title * {
  pointer-events: none !important;
}

/* После общего запрета кликов — включаем wipe-ссылки на 404/contact */
body.error404 .stage-title.text-wipe,
body.page-template-contact .stage-title.text-wipe,
body.page-template-contact-php .stage-title.text-wipe,
body.page-contact .stage-title.text-wipe {
  pointer-events: auto !important;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

body.error404 .stage-title.text-wipe *,
body.page-template-contact .stage-title.text-wipe *,
body.page-template-contact-php .stage-title.text-wipe *,
body.page-contact .stage-title.text-wipe * {
  pointer-events: none !important;
}

.stage-title__text {
  grid-area: 1 / 1;
  display: block;
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 7.2vw, 6.5rem);
  font-weight: 200;
  font-variation-settings:
    "wght" 200,
    "GRAD" 71,
    "wdth" 75,
    "XOPQ" 127,
    "YOPQ" 58,
    "XTRA" 420,
    "YTUC" 760,
    "YTLC" 511,
    "YTAS" 854,
    "YTDE" -98,
    "opsz" 51;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  padding: 0;
  will-change: transform, opacity;
}

/* Нижние записи: скрыты до конца интро (высота в потоке остаётся).
   Стартовое правило действует только до инициализации JS — без него
   при отключённых или упавших скриптах лента осталась бы пустой. */
html.js:not(.is-ready) .screen[data-index]:not([data-index="0"]):not(.screen--empty),
.screen--rest {
  opacity: 0;
  visibility: hidden;
}

/* —— Feed: бесшовная лента —— */
.feed {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  /* visible: волны на hover могут выходить за фото */
  overflow: visible;
  overflow-anchor: none;
}

.screen {
  position: relative;
  min-height: var(--screen-h);
  width: 100%;
  max-width: 100%;
  /* visible: иначе wave-canvas с bleed обрезается по бокам */
  overflow: visible;
  /* Нахлёст на следующую запись — без чёрных дыр между постами */
  margin-bottom: calc(var(--screen-overlap) * -1);
  padding-bottom: var(--screen-overlap);
}

.screen:last-child {
  margin-bottom: 0;
}

.screen__photos {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.photo {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: auto;
  z-index: var(--z, 1);
  margin: 0;
  overflow: visible !important;
  cursor: none;
}

.photo__link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  outline: none;
  cursor: none;
  overflow: visible !important;
}

.photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: unset;
  pointer-events: none;
  user-select: none;
}

.photo-wave {
  position: absolute !important;
  inset: auto !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  pointer-events: none !important;
  z-index: 2 !important;
  transform: none !important;
  overflow: visible !important;
}

.photo.is-wave-active {
  z-index: 80 !important;
  overflow: visible !important;
}

/* Тюнер: не поднимать карточку на первый слой при hover */
html.no-hover-front .photo.is-wave-active {
  z-index: var(--z, 1) !important;
}

.photo.is-wave-active > .photo__link {
  overflow: visible !important;
}

.photo.is-wave-active > .photo__link > img,
.photo.is-wave-active > img {
  opacity: 0 !important;
}

.photo--layout-hidden {
  display: none !important;
}

/* Стеклянный круг вместо курсора-лупы (в DOM заранее, без лага на первом hover) */
.photo-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 52px;
  height: 52px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 4px 18px rgba(0, 0, 0, 0.28);
  /* blur прогреваем при boot; на первом hover уже в GPU-кэше */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  z-index: 10050;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(-100px, -100px, 0) scale(1);
  will-change: transform, opacity;
  contain: strict;
}

.photo-cursor.is-warming {
  visibility: visible;
  opacity: 0.01;
  transform: translate3d(-80px, -80px, 0) scale(1);
}

.photo-cursor.is-visible {
  visibility: visible;
  opacity: 1;
}

@media (hover: none), (pointer: coarse) {
  .photo,
  .photo__link {
    cursor: pointer;
  }

  .photo-cursor {
    display: none !important;
  }
}

/* Fancybox: лого/заголовок скрыты; фото по центру; свои thumbs слева */
html.fancybox-open .site-logo,
html.fancybox-open .site-contact,
html.fancybox-open .stage-title,
html.fancybox-open .gc-tuner,
html.fancybox-open .photo-cursor,
html.fancybox-open .photo-wave {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.fancybox__caption,
.fancybox__footer,
.fancybox__thumbs {
  display: none !important;
}

/* Фон галереи — как у сайта (#000). Закрытие гасит весь контейнер из JS (~0.12s). */
.fancybox__container {
  --fancybox-bg: var(--bg) !important;
  background: var(--bg) !important;
  --f-transition-duration: 0.25s;
  --f-interface-enter-duration: 0.25s;
  --f-backdrop-enter-duration: 0.25s;
  --f-interface-exit-duration: 0.01s;
  --f-backdrop-exit-duration: 0.01s;
}

.fancybox__backdrop {
  background: var(--bg) !important;
}

.fancybox__container .f-fadeIn {
  animation-duration: 0.25s !important;
  animation-delay: 0s !important;
}

/* На закрытии отключаем штатные послойные fade — иначе фон отстаёт */
.fancybox__container.is-animated[aria-hidden="true"] .fancybox__backdrop,
.fancybox__container.is-animated[aria-hidden="true"] .fancybox__toolbar,
.fancybox__container.is-animated[aria-hidden="true"] .fancybox__nav,
.fancybox__container.is-animated[aria-hidden="true"] .fancybox__footer,
.fancybox__container.is-animated[aria-hidden="true"] .f-fadeOut,
.fancybox__container.is-animated[aria-hidden="true"] .f-fadeFastOut {
  animation: none !important;
}

/* Карусель на весь экран — фото строго по центру */
.fancybox__container .fancybox__carousel {
  padding: 0 !important;
}

.fancybox__slide.has-image {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.fancybox__slide.has-image > .fancybox__content {
  margin: auto !important;
  max-height: 90vh !important;
  max-width: 100% !important;
}

.fancybox__slide.has-image > .fancybox__content img,
.fancybox__slide.has-image .fancybox__image {
  max-height: 90vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Своя фиксированная колонка миниатюр (вне Fancybox) */
.gc-lightbox-thumbs {
  position: fixed !important;
  left: 16px !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  z-index: 100000 !important;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: 76px !important;
  max-width: 76px !important;
  max-height: 88vh !important;
  margin: 0 !important;
  padding: 8px 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border: 0 !important;
  pointer-events: auto !important;
  opacity: 1;
  transition: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.gc-lightbox-thumbs.is-hiding {
  display: none !important;
}

.gc-lightbox-thumbs__item {
  appearance: none !important;
  flex: 0 0 auto !important;
  display: block !important;
  width: 68px !important;
  height: 90px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  overflow: hidden !important;
  background: transparent !important;
  opacity: 0.45 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  transform: none !important;
  transition: opacity 0.15s ease;
}

.gc-lightbox-thumbs__item:hover,
.gc-lightbox-thumbs__item:focus,
.gc-lightbox-thumbs__item:focus-visible {
  opacity: 0.9 !important;
  outline: none !important;
  box-shadow: none !important;
}

.gc-lightbox-thumbs__item.is-active {
  opacity: 1 !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.gc-lightbox-thumbs__item img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  pointer-events: none !important;
  transform: none !important;
}

@media (max-width: 767px) {
  .gc-lightbox-thumbs {
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 12px !important;
    transform: none !important;
    flex-direction: row !important;
    width: 100% !important;
    max-width: none !important;
    max-height: 84px !important;
    padding: 0 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    justify-content: flex-start !important;
  }

  .gc-lightbox-thumbs__item {
    width: 52px !important;
    height: 70px !important;
  }
}

.feed-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  opacity: 0.5;
  font-family: system-ui, sans-serif;
}

/* —— Live tuner (как Designhead / скрин) —— */
.gc-tuner {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 10000;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.3;
  color: #fff;
  pointer-events: auto;
}

.gc-tuner__show,
.gc-tuner__hide,
.gc-tuner__reset {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font: inherit;
  cursor: pointer;
  pointer-events: auto;
}

.gc-tuner__show {
  padding: 8px 12px;
  backdrop-filter: blur(8px);
}

.gc-tuner__hide {
  padding: 2px 8px;
  border-color: rgba(255, 255, 255, 0.2);
  background: transparent;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
}

.gc-tuner__hide:hover {
  opacity: 1;
}

.gc-tuner__panel {
  width: min(240px, calc(100vw - 24px));
  max-height: calc(100svh - 24px);
  overflow-y: auto;
  padding: 10px 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.gc-tuner__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.gc-tuner__head .gc-tuner__title {
  margin: 0;
}

.gc-tuner__title {
  margin: 10px 0 8px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}

.gc-tuner__row {
  display: block;
  margin: 0 0 8px;
}

.gc-tuner__label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.gc-tuner input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: #fff;
  cursor: pointer;
}

.gc-tuner__check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  cursor: pointer;
}

.gc-tuner__check input {
  margin: 0;
  width: 14px;
  height: 14px;
  accent-color: #fff;
  cursor: pointer;
}

.gc-tuner__reset {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  background: transparent;
  color: inherit;
}

.gc-tuner__reset + .gc-tuner__reset {
  margin-top: 6px;
}

.gc-tuner__reset:hover {
  background: rgba(255, 255, 255, 0.1);
}

.gc-tuner__hint {
  margin: 8px 0 0;
  opacity: 0.65;
  font-size: 10px;
  line-height: 1.35;
}

/* —— Edit layout: drag / resize / rotate —— */
html.is_edit_layout .photo,
.screen.is_edit_layout .photo {
  cursor: grab;
}

html.is_edit_layout .photo.is_dragging,
.screen.is_edit_layout .photo.is_dragging {
  cursor: grabbing;
  z-index: 60 !important;
}

html.is_edit_layout .photo.is_selected,
.screen.is_edit_layout .photo.is_selected {
  outline: 1px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

html.is_edit_layout .stage-title,
html.is_edit_layout .site-logo,
html.is_edit_layout .site-contact {
  pointer-events: none;
}

.dead_rebel_transform {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.dead_rebel_handle {
  position: absolute;
  box-sizing: border-box;
  pointer-events: auto;
}

.dead_rebel_handle_resize {
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border: 1.5px solid #fff;
  background: #111;
  border-radius: 1px;
  z-index: 2;
}

.dead_rebel_handle_nw.dead_rebel_handle_resize {
  left: 0;
  top: 0;
  cursor: nwse-resize;
}

.dead_rebel_handle_ne.dead_rebel_handle_resize {
  left: 100%;
  top: 0;
  cursor: nesw-resize;
}

.dead_rebel_handle_sw.dead_rebel_handle_resize {
  left: 0;
  top: 100%;
  cursor: nesw-resize;
}

.dead_rebel_handle_se.dead_rebel_handle_resize {
  left: 100%;
  top: 100%;
  cursor: nwse-resize;
}

.dead_rebel_handle_rotate {
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: transparent;
  cursor: grab;
  z-index: 1;
}

.dead_rebel_handle_rotate:hover {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.dead_rebel_handle_nw.dead_rebel_handle_rotate {
  left: -10px;
  top: -10px;
  cursor: alias;
}

.dead_rebel_handle_ne.dead_rebel_handle_rotate {
  left: calc(100% + 10px);
  top: -10px;
  cursor: alias;
}

.dead_rebel_handle_sw.dead_rebel_handle_rotate {
  left: -10px;
  top: calc(100% + 10px);
  cursor: alias;
}

.dead_rebel_handle_se.dead_rebel_handle_rotate {
  left: calc(100% + 10px);
  top: calc(100% + 10px);
  cursor: alias;
}

.dead_rebel_handle_rotate:active {
  cursor: grabbing;
}

.make {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 10020;
  padding: 10px;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 300;
  font-variation-settings:
    "wght" 300,
    "GRAD" 30,
    "wdth" 120,
    "opsz" 16;
  line-height: 1.3;
  color: rgb(88, 88, 88);
  text-decoration-line: underline;
  text-decoration-color: currentColor;
  cursor: pointer;
  /* Скрыт до анимации бренда (как лого) — на прелоадере не видно */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  text-decoration: none;
}

.make:hover {
  opacity: 1;
}

body.is-loading .make {
  pointer-events: none !important;
}

/* 404 / contact — без прелоадера ленты */
body.error404 .make,
body.page-template-contact .make,
body.page-template-contact-php .make,
body.page-contact .make,
html:not(.js) .make {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1024px) {
  :root {
    --screen-overlap: 14vh;
  }

  .photo--mobile-hide {
    display: none;
  }

  .stage-title {
    width: min(78vw, 520px);
  }
}

/* —— Mobile feed slider (<900): 1 фото + 20% следующего —— */
html.is-mobile-slider .photo--mobile-hide {
  display: block;
}

html.is-mobile-slider .screen {
  min-height: 0;
  height: auto;
  margin-bottom: 60px;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  overflow: visible;
}

/* Шапка (ID 54) на адаптиве не показываем — только в прелоадере */
html.is-mobile-slider .screen[data-post-id="54"],
html.is-mobile-slider .screen[data-index="0"] {
  display: none !important;
  margin-bottom: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

html.is-mobile-slider .screen:last-child {
  margin-bottom: 0;
}

html.is-mobile-slider .screen__photos {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  width: 100%;
  height: auto;
  min-height: 0;
}

html.is-mobile-slider .screen-swiper {
  width: 100%;
  padding: 0 5vw;
  overflow: visible;
}

html.is-mobile-slider .screen-swiper .swiper-wrapper {
  align-items: center;
}

html.is-mobile-slider .screen-swiper .swiper-slide {
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

html.is-mobile-slider .screen-swiper .photo {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  z-index: 1;
  margin: 0;
  overflow: visible !important;
}

html.is-mobile-slider .screen-swiper .photo img {
  width: 100%;
  height: auto;
  display: block;
}

html.is-mobile-slider .stage-title {
  width: min(92vw, 1100px);
}

/* —— Adaptive UI (<900): тюнер скрыт, заголовок ×2 + перенос, .make под Связь/Галерея —— */
@media (max-width: 899px) {
  .gc-tuner {
    display: none !important;
  }

  .stage-title {
    width: min(92vw, 1100px);
    max-width: 92vw;
    padding: 0 0.6rem;
    /* hidden обязателен: иначе второй слой text-wipe виден как «дубль» */
    overflow: hidden;
  }

  .stage-title.text-wipe {
    overflow: hidden;
  }

  .stage-title__text {
    /* Крупнее десктопа, с переносом (в т.ч. длинные URL без пробелов) */
    font-size: clamp(3.2rem, 11vw, 7rem);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: none;
    max-width: 100%;
    width: 100%;
    line-height: 0.95;
    text-align: center;
    box-sizing: border-box;
  }

  /* Контакт: длинный vk.ru/... — чуть плотнее, чтобы уверенно влезал */
  body.page-template-contact .stage-title__text,
  body.page-template-contact-php .stage-title__text,
  body.page-contact .stage-title__text {
    font-size: clamp(2.4rem, 9.5vw, 5.5rem);
    letter-spacing: 0;
  }

  /* Связь / Галерея выше, .make ниже по центру */
  .site-contact {
    bottom: 11vh;
  }

  .make {
    left: 50%;
    right: auto;
    bottom: 2.4vh;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-logo,
  .site-contact,
  .stage-title__text,
  .photo,
  .text-wipe__line {
    transition: none !important;
  }
}
