/* Выставочный слой второго показа /presentation2 по приёмам Cognitive OS:
   лазерное сканирование кадра при входе сцены, голографическая рамка,
   дуга-комета у знака, проявление текста, кромки карточек, сияние и метеоры.
   Пауза и скрытая вкладка замораживают всё правилами motion.css
   (.exhibition[data-play-mode="paused"] *, ::before, ::after); reduced motion
   выключает слой ниже. Базовые позы невидимы или неподвижны, поэтому без
   анимации кадр остаётся законченным. */
.journey {
  --jr-holo: #9fd0ff;
  --jr-holo-rgb: 159, 208, 255;
}

/* --- Небо: лента сияния у верхней кромки и редкие метеоры. */
.jr-sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.jr-sky__aurora {
  position: absolute;
  left: -10%;
  right: -10%;
  top: -10%;
  height: 34%;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(134, 227, 203, 0.07) 35%,
    rgba(185, 166, 245, 0.11) 60%,
    transparent
  );
  filter: blur(28px);
  animation: jr-aurora 28s ease-in-out infinite alternate;
}
@keyframes jr-aurora {
  from {
    transform: translateX(-4%) skewX(-7deg);
    opacity: 0.7;
  }
  to {
    transform: translateX(4%) skewX(7deg);
    opacity: 1;
  }
}
.jr-sky__meteor {
  position: absolute;
  top: var(--y);
  left: -14%;
  width: 180px;
  height: 1px;
  opacity: 0;
  transform-origin: left center;
  transform: rotate(var(--tilt));
  background: linear-gradient(90deg, transparent, #e7dcfa 70%, #fff);
  box-shadow: 0 0 8px #ddd2ff88;
  animation: jr-meteor var(--period) linear var(--delay) infinite;
}
@keyframes jr-meteor {
  0%,
  92% {
    opacity: 0;
    transform: rotate(var(--tilt)) translateX(0);
  }
  93.5% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: rotate(var(--tilt)) translateX(128vw);
  }
}

/* --- Лазерное сканирование: каретка проходит кадр слева направо на входе
   сцены. Эстафета общего предмета (data-handoff) идёт без луча. */
.jr-scan {
  position: absolute;
  inset: 0;
  z-index: 21;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}
.jr-scan {
  animation: jr-scan-fade 1.3s ease-out 0.25s both;
}
.jr-scan__carriage {
  animation: jr-scan-run 1.3s cubic-bezier(0.3, 0, 0.2, 1) 0.25s both;
}
.journey[data-handoff] .jr-scan {
  display: none;
}
@keyframes jr-scan-fade {
  0% {
    opacity: 0;
  }
  8%,
  88% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes jr-scan-run {
  from {
    transform: translateX(-2vw);
  }
  to {
    transform: translateX(102vw);
  }
}
.jr-scan__carriage {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  transform: translateX(-2vw);
}
.jr-scan__beam {
  position: absolute;
  top: -5%;
  bottom: -5%;
  left: -1px;
  width: 2px;
  background: #fff;
  box-shadow:
    0 0 6px 2px rgba(var(--jr-holo-rgb), 0.95),
    0 0 22px 8px rgba(var(--jr-gold-rgb, 233, 194, 122), 0.5),
    0 0 70px 26px rgba(185, 166, 245, 0.25);
}
.jr-scan__beam::before,
.jr-scan__beam::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
}
.jr-scan__beam::before {
  left: -7px;
  background: #7df4ff;
  opacity: 0.8;
}
.jr-scan__beam::after {
  left: 7px;
  background: #ff79e6;
  opacity: 0.7;
}
.jr-scan__wash {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 26vw;
  mix-blend-mode: screen;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(185, 166, 245, 0.05) 45%,
    rgba(233, 194, 122, 0.18) 88%,
    rgba(255, 255, 255, 0.32)
  );
}
.jr-scan__grid {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 34vw;
  background:
    repeating-linear-gradient(90deg, rgba(var(--jr-holo-rgb), 0.2) 0 1px, transparent 1px 3.3vw),
    repeating-linear-gradient(180deg, rgba(var(--jr-holo-rgb), 0.2) 0 1px, transparent 1px 3.3vw);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000);
  mask-image: linear-gradient(90deg, transparent, #000);
}
.jr-scan__streaks {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 0;
}
.jr-scan__streaks i {
  position: absolute;
  top: var(--y);
  right: var(--off);
  width: var(--len);
  height: 1px;
  opacity: 0.6;
  background: linear-gradient(90deg, transparent, rgba(233, 194, 122, 0.9) 70%, #fff);
  box-shadow: 0 0 6px rgba(233, 194, 122, 0.6);
}

/* --- Голографическая рамка кадра: уголки дышат, развёртка идёт сверху вниз. */
.jr-hud {
  position: absolute;
  inset: calc(1.4 * var(--su));
  z-index: 3;
  pointer-events: none;
}
.jr-hud i {
  position: absolute;
  width: calc(3 * var(--su));
  height: calc(3 * var(--su));
  border: 1.5px solid rgba(var(--jr-holo-rgb), 0.55);
  animation: jr-corner 6s ease-in-out infinite;
}
.jr-hud i[data-corner="tl"] {
  left: 0;
  top: 0;
  border-right: 0;
  border-bottom: 0;
}
.jr-hud i[data-corner="tr"] {
  right: 0;
  top: 0;
  border-left: 0;
  border-bottom: 0;
  animation-delay: -1.5s;
}
.jr-hud i[data-corner="bl"] {
  left: 0;
  bottom: 0;
  border-right: 0;
  border-top: 0;
  animation-delay: -3s;
}
.jr-hud i[data-corner="br"] {
  right: 0;
  bottom: 0;
  border-left: 0;
  border-top: 0;
  animation-delay: -4.5s;
}
@keyframes jr-corner {
  50% {
    opacity: 0.45;
    transform: scale(1.12);
  }
}
.jr-hud__sweep {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 14%;
  opacity: 0.55;
  background: linear-gradient(180deg, transparent, rgba(var(--jr-holo-rgb), 0.05) 60%, rgba(var(--jr-holo-rgb), 0.12) 98%, transparent);
  animation: jr-sweep 11s linear infinite;
}
@keyframes jr-sweep {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(720%);
  }
}

/* --- Знак: дуга-комета в треть окружности медленно вращается вокруг. */
.jr-lockup__mark {
  position: relative;
  display: grid;
  place-items: center;
}
.jr-lockup__arc {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #e9c27a 0 110deg, #fff 118deg 120deg, transparent 120deg 360deg);
  -webkit-mask: radial-gradient(circle, transparent 64%, #000 66%, #000 70%, transparent 72%);
  mask: radial-gradient(circle, transparent 64%, #000 66%, #000 70%, transparent 72%);
  filter: drop-shadow(0 0 4px #e9c27a99);
  animation: jr-spin 14s linear infinite;
}
@keyframes jr-spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- Текст сцены проявляется подъёмом после луча; акцент заголовка
   переливается светом. Сам текст не светится и не движется в покое. */
.journey:not([data-handoff]) .stage--entering .jr-copy > :is(h1, .jr-copy__body) {
  animation: jr-holo-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--k, 0) * 110ms + 260ms);
}
.jr-copy > :nth-child(2) {
  --k: 1;
}
.jr-copy > :nth-child(3) {
  --k: 2;
}
@keyframes jr-holo-rise {
  from {
    opacity: 0;
    transform: translateY(calc(1.2 * var(--su)));
    filter: blur(6px) brightness(1.8);
  }
  60% {
    filter: blur(0) brightness(1.2);
  }
}
/* --- Карточки жизни: голографические уголки и мягкое дыхание свечения. */
.jr-card::after {
  content: "";
  position: absolute;
  inset: calc(-0.45 * var(--su));
  pointer-events: none;
  --c: calc(1.4 * var(--su));
  --line: rgba(var(--jr-holo-rgb), 0.8);
  background:
    linear-gradient(var(--line), var(--line)) 0 0 / var(--c) 1.5px no-repeat,
    linear-gradient(var(--line), var(--line)) 0 0 / 1.5px var(--c) no-repeat,
    linear-gradient(var(--line), var(--line)) 100% 0 / var(--c) 1.5px no-repeat,
    linear-gradient(var(--line), var(--line)) 100% 0 / 1.5px var(--c) no-repeat,
    linear-gradient(var(--line), var(--line)) 0 100% / var(--c) 1.5px no-repeat,
    linear-gradient(var(--line), var(--line)) 0 100% / 1.5px var(--c) no-repeat,
    linear-gradient(var(--line), var(--line)) 100% 100% / var(--c) 1.5px no-repeat,
    linear-gradient(var(--line), var(--line)) 100% 100% / 1.5px var(--c) no-repeat;
  opacity: 0.55;
  animation: jr-corner 6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.8s);
}

/* --- Шкала сцен: у текущей метки вращается кометная дуга. */
.jr-tick[data-state="current"] {
  position: relative;
}
.jr-counter__bar i {
  box-shadow: 0 0 10px rgba(233, 194, 122, 0.55);
}

/* --- Reduced motion: слой эффектов неподвижен и не мешает чтению. */
.journey[data-reduced="true"] :is(.jr-sky, .jr-scan, .jr-hud, .jr-lockup__mark, .jr-copy, .jr-card) *,
.journey[data-reduced="true"] :is(.jr-sky, .jr-scan, .jr-hud, .jr-lockup__mark, .jr-copy, .jr-card),
.journey[data-reduced="true"] .jr-card::after {
  animation: none !important;
}
html[data-motion="reduced"] .journey :is(.jr-sky, .jr-scan, .jr-hud, .jr-lockup__mark, .jr-copy) *,
html[data-motion="reduced"] .journey .jr-scan,
html[data-motion="reduced"] .journey .jr-card::after {
  animation: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .journey :is(.jr-sky, .jr-scan, .jr-hud, .jr-lockup__mark, .jr-copy) *,
  .journey .jr-scan,
  .journey .jr-card::after {
    animation: none !important;
  }
}
@media (max-width: 760px) {
  .jr-sky__meteor,
  .jr-hud {
    display: none;
  }
}
