/* ========================================================================
   levitators.art — работы висят в тёмном воздухе, ничего не стоит на земле
   ======================================================================== */

:root {
  --ink:        #080a10;   /* ночной воздух */
  --ink-soft:   #0d1119;
  --air:        #e9e6e0;   /* тёплый белый */
  --dust:       #878e9e;   /* приглушённый */
  --moon:       #a9c2d8;   /* бледное серебристо-голубое */
  --hair:       rgba(169, 194, 216, .16);
  --glow:       rgba(169, 194, 216, .22);

  --display: 'Cormorant', Georgia, 'Times New Roman', serif;
  --body: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--air);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-gated { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--moon); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--moon);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- обложка */

.gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(120% 80% at 50% 15%, #131a26 0%, var(--ink) 62%);
  transition: opacity 1.1s var(--ease), visibility 1.1s;
}

.gate.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }

.gate__inner { max-width: 40rem; text-align: center; }

.gate__eyebrow {
  margin: 0 0 3rem;
  font-size: .68rem;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--dust);
}

.gate__name {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.6rem, 8vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: .01em;
}

.gate__tagline {
  margin: 1.4rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  font-style: italic;
  color: var(--moon);
}

.gate__intro {
  margin: 2.2rem auto 0;
  max-width: 30rem;
  font-size: .95rem;
  color: var(--dust);
}

.gate__actions {
  margin-top: 3.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.gate__btn {
  appearance: none;
  cursor: pointer;
  padding: 1rem 2.4rem;
  border: 1px solid var(--moon);
  border-radius: 999px;
  background: transparent;
  color: var(--air);
  font-family: var(--body);
  font-size: .9rem;
  letter-spacing: .06em;
  transition: background .4s var(--ease), color .4s var(--ease);
}

.gate__btn:hover { background: var(--moon); color: var(--ink); }

.gate__btn-hint {
  display: block;
  margin-top: .2rem;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: lowercase;
  opacity: .65;
}

.gate__btn--quiet {
  border-color: var(--hair);
  color: var(--dust);
}
.gate__btn--quiet:hover { background: transparent; color: var(--air); border-color: var(--dust); }

.gate__langs {
  position: absolute;
  top: 1.6rem;
  right: 1.8rem;
  display: flex;
  gap: .9rem;
  font-size: .72rem;
  letter-spacing: .2em;
}
.gate__langs a { color: var(--dust); text-decoration: none; }
.gate__langs a.is-on { color: var(--air); }

/* -------------------------------------------------------------- отвес */

.plumb {
  position: fixed;
  top: 0;
  bottom: 0;
  left: clamp(.9rem, 2.6vw, 2.6rem);
  width: 1px;
  background: var(--hair);
  z-index: 40;
  opacity: 0;
  transition: opacity 1s var(--ease);
}
body.is-open .plumb { opacity: 1; }

.plumb__fill {
  position: absolute;
  top: 0;
  left: -1px;
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, transparent, var(--moon));
}

/* ---------------------------------------------------------------- панель */

.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.2rem, 4vw, 3rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity .9s var(--ease);
}
body.is-open .hud,
.hud.is-visible { opacity: 1; pointer-events: auto; }

.hud__count {
  appearance: none;
  border: none;
  background: transparent;
  padding: .3rem .1rem;
  cursor: pointer;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: .1em;
  color: var(--dust);
  transition: color .3s;
}
.hud__count:hover { color: var(--air); }
.hud__count #counter { color: var(--air); }
.hud__slash { margin: 0 .35em; opacity: .5; }

.hud__nav { display: flex; align-items: center; gap: 1.1rem; }

.hud__audio { display: flex; align-items: center; gap: .55rem; }

/* Регулятор громкости */
.hud__vol {
  appearance: none;
  width: 62px;
  height: 14px;
  background: transparent;
  cursor: pointer;
}
.hud__vol::-webkit-slider-runnable-track {
  height: 1px;
  background: var(--hair);
}
.hud__vol::-webkit-slider-thumb {
  appearance: none;
  width: 9px;
  height: 9px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--moon);
}
.hud__vol::-moz-range-track { height: 1px; background: var(--hair); }
.hud__vol::-moz-range-thumb {
  width: 9px; height: 9px; border: none; border-radius: 50%; background: var(--moon);
}
.hud__vol:disabled { opacity: .3; cursor: default; }

.hud__lang {
  font-size: .7rem;
  letter-spacing: .2em;
  color: var(--dust);
  text-decoration: none;
  transition: color .3s;
}
.hud__lang:hover { color: var(--air); }
.hud__lang.is-on { color: var(--moon); }

.hud__back {
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--dust);
  text-decoration: none;
}
.hud__back:hover { color: var(--air); }

.hud__sound {
  appearance: none;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: .4rem;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.hud__wave { display: flex; align-items: flex-end; gap: 3px; height: 14px; }
.hud__wave i {
  display: block;
  width: 2px;
  height: 4px;
  background: var(--dust);
  transition: background .3s;
}
.hud__sound.is-on .hud__wave i { background: var(--moon); animation: bar 1.1s ease-in-out infinite; }
.hud__sound.is-on .hud__wave i:nth-child(2) { animation-delay: .15s; }
.hud__sound.is-on .hud__wave i:nth-child(3) { animation-delay: .3s; }
.hud__sound.is-on .hud__wave i:nth-child(4) { animation-delay: .45s; }

@keyframes bar {
  0%, 100% { height: 4px; }
  50%      { height: 14px; }
}

/* ------------------------------------------------------------- подсказка */

.cue {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 55;
  font-size: .66rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--dust);
  opacity: 0;
  transition: opacity .8s var(--ease);
}
body.is-open .cue { opacity: .8; }
body.is-moving .cue { opacity: 0; }

/* ------------------------------------------------------------------ акт */

.story { position: relative; z-index: 10; }

.act {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  padding: 0 clamp(1.5rem, 6vw, 6rem) 0 clamp(3rem, 8vw, 7rem);
  align-items: start;
}

.act__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
}

.act__frame {
  position: relative;
  margin: 0;
  max-height: 74vh;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.act.is-near .act__frame { opacity: 1; transform: translateY(0); }

/* Свечение вместо тени — работа не лежит на поверхности, а висит */
.act__frame::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -9%;
  width: 76%;
  height: 16%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--glow), transparent 72%);
  filter: blur(22px);
  pointer-events: none;
  z-index: -1;
}

/* Картина и видео лежат слоями в одной коробке, кнопка зума — прозрачным
   слоем сверху. Видео внутрь кнопки не вкладываем: это некорректная
   разметка и ломает поведение на телефонах. */
.plate__media {
  position: relative;
  display: inline-block;
  line-height: 0;
  animation: drift 11s ease-in-out infinite;
}

/* Пока идёт ролик, картина под ним не должна просвечивать по краям,
   а покачивание останавливаем — иначе видео мелко дёргается.
   Картина остаётся в потоке (только прозрачная), чтобы держать размер
   коробки и не было скачка вёрстки при появлении и в конце. */
.plate__media.is-video { animation: none; transform: none; }
.plate__media.is-video .plate__still { opacity: 0; }

.plate__still { transition: opacity .5s var(--ease); }

@keyframes drift {
  0%, 100% { transform: translateY(-5px); }
  50%      { transform: translateY(5px); }
}

.plate__still {
  max-height: 74vh;
  width: auto;
  max-width: 100%;
}

.plate__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* contain, а не cover: у ролика может быть другое соотношение сторон,
     и обрезать его по краям хуже, чем вписать — по краям видна картина. */
  object-fit: contain;
  opacity: 0;
  transition: opacity 1.1s var(--ease);
  pointer-events: none;
}
.plate__video.is-playing { opacity: 1; }
/* Своя композиционная плоскость: без этого видео заметно дрожит
   при прокрутке на части браузеров. */
.plate__video { transform: translateZ(0); backface-visibility: hidden; }

.plate {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  appearance: none;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}

/* ------------------------------------------------------ миниатюры */

.strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem;
  margin-top: 1.1rem;
  line-height: 0;
}

.strip__item {
  appearance: none;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
  width: 74px;
  height: 56px;
  flex: none;
  opacity: .62;
  transition: opacity .35s var(--ease), border-color .35s var(--ease);
}
.strip__item:hover,
.strip__item:focus-visible { opacity: 1; border-color: var(--moon); }

.strip__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.plate__link {
  margin-top: 1.2rem;
  text-align: center;
  font-size: .72rem;
  letter-spacing: .16em;
  line-height: 1.4;
}
.plate__link a { color: var(--moon); text-decoration: none; }
.plate__link a:hover { color: var(--air); }

.single__video {
  width: 100%;
  max-width: 52rem;
  margin: 2rem auto 0;
  display: block;
  border-radius: 4px;
}

.plate__hint {
  margin-top: 1.4rem;
  text-align: center;
  font-size: .64rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--dust);
  opacity: 0;
  transition: opacity .5s;
}
.act__frame:hover .plate__hint,
.single__frame:hover .plate__hint { opacity: .75; }

.act__text {
  padding-block: 40vh 44vh;
  max-width: 34rem;
}

.act__num {
  margin: 0 0 1.6rem;
  font-family: var(--display);
  font-size: .95rem;
  letter-spacing: .3em;
  color: var(--moon);
}

.act__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.08;
}

.act__meta {
  margin: .9rem 0 0;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dust);
}

.act__story { margin-top: 2.4rem; }

.act__story p {
  margin: 0 0 1.5rem;
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.1vw, 1.42rem);
  line-height: 1.62;
  color: #d8d4cd;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.act__story p.is-lit { opacity: 1; transform: translateY(0); }

/* ----------------------------------------------------------------- кода */

.coda {
  max-width: 40rem;
  margin: 0 auto;
  padding: 22vh clamp(1.5rem, 6vw, 3rem) 26vh;
  text-align: center;
  border-top: 1px solid var(--hair);
}

.coda__title {
  margin: 0 0 2rem;
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--dust);
}

.coda__body p {
  margin: 0 0 1.3rem;
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.65;
}

.coda__contact {
  margin-top: 2.6rem;
  font-size: .85rem;
  color: var(--moon);
}

/* --------------------------------------------------------------- пустая */

.empty {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 1.5rem;
}
.empty__text { margin: 0; font-family: var(--display); font-size: 1.4rem; color: var(--dust); }
.empty__link {
  font-size: .68rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--moon);
  text-decoration: none;
}

/* ------------------------------------------------------- одна работа */

.single {
  max-width: 68rem;
  margin: 0 auto;
  padding: 7rem clamp(1.5rem, 6vw, 3rem) 8rem;
  display: grid;
  gap: 3.5rem;
}

.single__frame { position: relative; margin: 0; display: grid; justify-items: center; }
.single__frame .plate__still { max-height: 78vh; }

.single__text { max-width: 36rem; margin: 0 auto; }

.single__audio { margin-top: 2.5rem; width: 100%; }

.single .act__story p { opacity: 1; transform: none; }

/* ------------------------------------------- дополнительные изображения */

.act__more { margin: 1.6rem 0 0; font-size: .78rem; letter-spacing: .12em; }
.act__more a { color: var(--moon); text-decoration: none; }
.act__more a:hover { color: var(--air); }

.shots-view {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  margin-top: 1rem;
}

.shots-view__item { margin: 0; text-align: center; }

.plate--inline {
  position: static;
  width: auto;
  height: auto;
  display: inline-block;
  line-height: 0;
  cursor: zoom-in;
}
.plate--inline img { max-height: 70vh; width: auto; max-width: 100%; }

.shots-view__cap {
  margin-top: .9rem;
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--dust);
}

/* ------------------------------------------------------------------ 404 */

.notfound {
  min-height: 100vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 1.2rem;
}
.notfound__code { margin: 0; font-family: var(--display); font-size: 5rem; color: var(--moon); }
.notfound__text { margin: 0; color: var(--dust); }
.notfound__link { color: var(--air); font-size: .8rem; letter-spacing: .16em; }

/* ----------------------------------------------- стрелки перехода */

.steps {
  position: fixed;
  right: clamp(.9rem, 2.6vw, 2.2rem);
  bottom: clamp(1.2rem, 4vh, 2.6rem);
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .8s var(--ease);
}
body.is-open .steps { opacity: 1; pointer-events: auto; }

.steps__btn {
  appearance: none;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--hair);
  border-radius: 50%;
  background: rgba(8, 10, 16, .6);
  backdrop-filter: blur(6px);
  color: var(--dust);
  font-size: .95rem;
  line-height: 1;
  transition: color .3s, border-color .3s;
}
.steps__btn:hover:not(:disabled) { color: var(--air); border-color: var(--moon); }
.steps__btn:disabled { opacity: .25; cursor: default; }

/* -------------------------------------------------------- оглавление */

.index {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .2rem;
  padding: 4rem 1.5rem;
  background: rgba(6, 8, 13, .96);
  overflow-y: auto;
}
.index[hidden] { display: none; }

.index__title {
  margin: 0 0 2rem;
  font-size: .66rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--dust);
}

.index__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .2rem;
  width: min(34rem, 100%);
}

.index__list button {
  appearance: none;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  padding: .7rem .6rem;
  border: none;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--air);
  text-align: left;
  transition: border-color .3s, color .3s;
}
.index__list button:hover { border-bottom-color: var(--hair); color: var(--moon); }

.index__num {
  font-family: var(--display);
  font-size: .82rem;
  letter-spacing: .16em;
  color: var(--dust);
  flex: none;
}

.index__name {
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1.25;
}

.index__close {
  appearance: none;
  cursor: pointer;
  margin-top: 2.4rem;
  padding: .6rem 1.6rem;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: transparent;
  color: var(--air);
  font-family: var(--body);
  font-size: .74rem;
  letter-spacing: .14em;
}
.index__close:hover { border-color: var(--moon); }

/* ------------------------------------------------------------- подвал */

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2.4rem clamp(1.5rem, 6vw, 4rem);
  border-top: 1px solid var(--hair);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dust);
}

.foot__admin { color: var(--dust); text-decoration: none; transition: color .3s; }
.foot__admin:hover { color: var(--moon); }

/* ----------------------------------------------------------------- лупа */

.lens {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 5, 9, .97);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.lens[hidden] { display: none; }
.lens.is-dragging { cursor: grabbing; }

/* Положение картинки считает только скрипт — никакого CSS-центрирования,
   иначе сдвиги складываются и картинка уезжает от центра. */
.lens__img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  transform-origin: 0 0;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.lens__hint {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: .64rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dust);
  pointer-events: none;
}

.lens__close {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  appearance: none;
  cursor: pointer;
  padding: .6rem 1.4rem;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: transparent;
  color: var(--air);
  font-family: var(--body);
  font-size: .74rem;
  letter-spacing: .14em;
}
.lens__close:hover { border-color: var(--moon); }

/* -------------------------------------------------------------- телефон */

@media (max-width: 860px) {
  body { font-size: 16px; }

  .act {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 1.4rem 0 2.6rem;
  }

  .act__stage {
    height: 62vh;
    top: 3.5rem;
  }

  .act__frame, .plate__still { max-height: 56vh; }

  .act__text { padding-block: 3rem 22vh; max-width: none; }

  .act__story p { font-size: 1.1rem; }

  .plate__hint { opacity: .6; }

  .strip { gap: .4rem; margin-top: .8rem; }
  .strip__item { width: 56px; height: 42px; opacity: .8; }

  .single { padding-top: 5rem; }

  .hud { padding: 1rem 1.1rem; }
  .hud__nav { gap: .8rem; }
  .hud__vol { width: 44px; }

  .steps__btn { width: 2.2rem; height: 2.2rem; }

  .index__name { font-size: 1.15rem; }
}

/* --------------------------------------------------- меньше движения */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plate { animation: none; }
  .hud__sound.is-on .hud__wave i { animation: none; height: 9px; }
  .act__frame,
  .act__story p {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
