:root { --room-focus: 52%; }
.entrance {
  --cream: #fff8ea;
  --honey: #ead2ac;
  --hold: 0;
  --frame-x: 52%;
  position: relative;
  isolation: isolate;
  height: 100vh;
  height: 100svh;
  min-height: 490px;
  overflow: hidden;
  background: #10150f;
  color: var(--cream);
}
.journey-reel, .journey-shade, .journey-titles { position: absolute; inset: 0; pointer-events: none; }
.journey-poster, .journey-film, .journey-mirror, .journey-replay {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--frame-x) 51%;
}
.journey-film:not([src]), .entrance[data-layer="poster"] .journey-film, .journey-mirror, .journey-replay, .entrance[data-state="idle"] .journey-film { opacity: 0; }
.entrance[data-layer="mirror"]:not([data-state="idle"]) .journey-mirror,
.entrance[data-layer="replay"]:not([data-state="idle"]) .journey-replay { opacity: 1; }
.journey-shade {
  background: linear-gradient(270deg, #0c110ed4, #0c110e93 31%, #0c110e08 69%),
    linear-gradient(0deg, #0c110ece 0, transparent 26%, transparent 75%, #0c110e87);
}
.entrance[data-stage="4"] .journey-shade {
  background: linear-gradient(0deg, #0c110e9e, transparent 23%, transparent 78%, #0c110e73);
}
.journey-invite { position: absolute; left: 48%; right: var(--gutter); top: 52%; transform: translateY(-50%); }
#invitation-title, .journey-titles p {
  margin: 0;
  font-size: clamp(42px, 5.8vw, 116px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -.061em;
}
#invitation-title { transform-origin: left center; }
#invitation-title span, #invitation-title em { display: block; }
.journey-invite em, .journey-titles em {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -.06em;
  color: var(--honey);
}
#invitation-title em { font-size: 1.06em; }
.journey-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 5px clamp(20px, 2.4vw, 38px); margin-top: clamp(26px, 4.5vh, 55px); }
.journey-hold {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  border: 0;
  padding: 0;
  background: none;
  color: var(--cream);
  text-align: start;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.journey-hold[hidden], .journey-skip[hidden], .journey-sound[hidden] { display: none; }
.journey-ring {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: clamp(52px, 4.5vw, 72px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #e9cfaa;
  color: #2d291f;
}
.journey-ring::after {
  content: '';
  position: absolute;
  inset: -3px;
  border: 1px solid var(--honey);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
@keyframes journey-invitation {
  0% { transform: scale(.98); opacity: 0; }
  15% { opacity: .85; }
  72%, 100% { transform: scale(1.34); opacity: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.motion-off) .entrance[data-state="idle"] .journey-ring::after { animation: journey-invitation 2.5s ease-out infinite; }
}
.journey-ring svg { width: 100%; height: 100%; overflow: visible; }
.ring-track { stroke: #4135274d; stroke-width: .8; }
.ring-fill { stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--hold)); transform: rotate(-90deg); transform-origin: center; }
.ring-arrow { fill: currentColor; }
.journey-hold:is(:hover,:focus-visible) .journey-ring { background: #fbdfb7; }
.journey-command-copy { display: grid; gap: 3px; }
/* Reserve the longest hint so a release cannot move the ring under the pointer. */
.journey-command-copy::before {
  content: "Удерживай, чтобы смотреть";
  grid-area: 2 / 1;
  visibility: hidden;
  font-size: 14px;
  line-height: 1.4;
}
.journey-command-copy .journey-label { grid-area: 1 / 1; }
.journey-command-copy .journey-hint { grid-area: 2 / 1; }
.journey-label { font-size: clamp(17px, 1.35vw, 22px); line-height: 1.2; letter-spacing: -.02em; }
.journey-hint { color: #eee5d6; font-size: 14px; line-height: 1.4; }
.journey-skip { display: inline-flex; align-items: center; min-height: 44px; color: #f0e9d9; font-size: 14px; text-decoration: underline; text-decoration-color: #bfbba9b3; text-underline-offset: 5px; }
.entrance :is(button,a):focus-visible { outline: 2px solid var(--honey); outline-offset: 5px; }
.journey-titles p {
  position: absolute;
  top: 77%;
  left: var(--gutter);
  right: var(--gutter);
  opacity: 0;
  transform-origin: left center;
  text-shadow: 0 2px 20px #14130e99;
  font-size: clamp(40px, 4.6vw, 94px);
}
.journey-titles .journey-final { top: 26%; text-align: center; transform-origin: center; }
.journey-progress { display: flex; position: absolute; bottom: calc(max(16px, 3svh) + 52px); left: var(--gutter); gap: 5px; width: clamp(135px,15vw,230px); opacity: 0; pointer-events: none; }
.journey-progress i { flex: 1; height: 2px; overflow: hidden; background: #f8ebd44f; }
.journey-progress i::after { content: ''; display: block; height: 100%; transform-origin: left; transform: scaleX(var(--played,0)); background: #f8ebd4; }
.journey-foot { position: absolute; bottom: max(16px, 3svh); left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #f3f1e9; font-size: 14px; }
.journey-foot a { display: inline-flex; align-items: center; min-height: 44px; }
.journey-foot a:hover { text-decoration: underline; text-underline-offset: 5px; }
.journey-foot .motion-toggle { min-height: 44px; font-size: 14px; }
.journey-settings { display: flex; align-items: center; gap: clamp(8px, 1.5vw, 26px); }
.journey-sound { width: 44px; height: 44px; display: grid; place-items: center; color: inherit; border: none; background: transparent; }
.journey-sound[aria-pressed="true"] .sound-off, .journey-sound[aria-pressed="false"] .sound-on { display: none; }
.journey-sound svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 740px) and (orientation: portrait) {
  :root { --room-focus: 57%; }
  .entrance { --frame-x: 32%; min-height: 475px; }
  .entrance[data-stage="1"] { --frame-x: 52%; }
  .entrance[data-stage="2"] { --frame-x: 68%; }
  .entrance[data-stage="3"] { --frame-x: 42%; }
  .entrance[data-stage="4"] { --frame-x: var(--room-focus); }
  .journey-invite { top: auto; bottom: 17%; left: var(--gutter); transform: none; }
  #invitation-title { font-size: clamp(36px, 10.1vw, 70px); }
  .journey-controls { margin-top: 20px; gap: 5px 22px; }
  .journey-hold { gap: 12px; }
  .journey-ring { width: 52px; }
  .journey-settings { gap: 3px; }
  .journey-titles p, .journey-titles .journey-final { top: 58%; font-size: clamp(34px, 8.5vw, 59px); text-align: left; }
  .journey-titles p em { display: block; }
  .journey-foot { bottom: max(9px, env(safe-area-inset-bottom)); }
  .journey-progress { bottom: calc(max(9px, env(safe-area-inset-bottom)) + 51px); }
  .journey-shade { background: linear-gradient(0deg, #080e0bdc, #080e0b96 35%, #10161008 66%, #10161008 84%, #0a0e0a95); }
}
@media (max-width: 500px) and (orientation: portrait) {
  .journey-controls { align-items: flex-start; flex-direction: column; gap: 2px; }
  .journey-invite { bottom: 13%; }
  .journey-skip { margin-left: 64px; }
  .journey-foot .motion-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .journey-foot .motion-toggle { width: 44px; justify-content: center; }
}
@media (max-height: 540px) and (orientation: landscape) {
  .entrance { min-height: 335px; }
  .journey-invite { top: 53%; }
  #invitation-title { font-size: clamp(34px, 9.4svh, 51px); }
  .journey-controls { margin-top: 12px; gap: 0 16px; }
  .journey-ring { width: 44px; }
  .journey-label { font-size: 16px; }
  .journey-skip { font-size: 13px; }
  .journey-titles p { top: 72%; font-size: clamp(28px, 7svh, 40px); }
  .journey-titles .journey-final { top: 28%; }
  .journey-foot { bottom: 3px; }
  .journey-progress { bottom: 48px; }
}
