/* X897 Pendant — scroll section. Everything is scoped to .x897p */
.x897p {
  position: relative;
  width: 100%;
  background: #acb2a6;                 /* scene colour at rest; JS keeps it in sync */
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --x897p-fit: 1;
}
.x897p *, .x897p *::before, .x897p *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── static state: no JavaScript, no WebGL, or a load error ──
   the section is just the still image, at natural height */
/* the still is a tall strip (lamp centred, cord running off the top) so it
   can cover portrait screens while loading; shown static, only its
   middle square is used */
.x897p-poster { display: block; width: min(100%, 86vh); height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: center; margin: 0 auto; }

/* ── live state (class added by pendant.js once WebGL is confirmed) ──
   720vh: acts 1–3 keep their original ~500vh of travel, the
   reassemble-into-light-mode act gets the rest */
.x897p.x897p-live { height: 720vh; }
.x897p-live .x897p-sticky {
  position: sticky; top: 0; width: 100%; overflow: hidden;
  height: 100vh; height: 100svh;       /* svh: stable under mobile browser chrome */
}
.x897p-live canvas { display: block; width: 100%; height: 100%; }
.x897p-live .x897p-poster {
  position: absolute; left: 50%; top: 50%;
  height: 200%; width: auto; max-width: none; aspect-ratio: 1 / 2; object-fit: fill; margin: 0;
  transform: translate(-50%, -50%) scale(var(--x897p-fit));
  transition: opacity 1s ease; pointer-events: none; z-index: 5;
}
.x897p-ready .x897p-poster { opacity: 0; }

.x897p-ui { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.x897p-loading {
  position: absolute; left: 0; right: 0; bottom: 44px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  transition: opacity 1s ease;
}
.x897p-load-label { font-size: 10px; letter-spacing: 0.2em; color: rgba(255,255,255,0.6); text-transform: uppercase; }
.x897p-bar  { width: 110px; height: 1px; background: rgba(255,255,255,0.2); position: relative; overflow: hidden; }
.x897p-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; background: rgba(255,255,255,0.6); transition: width 0.15s ease; }
/* bottom row: name + hint left, status right, all on ONE text baseline.
   The name hangs above the hint (out of flow) so the row's baseline is the
   hint's; the hint fades once scrolling starts, the name stays. */
.x897p-foot { position: absolute; left: 44px; right: 44px; bottom: 44px; display: flex; justify-content: space-between; align-items: baseline; }
.x897p-label { position: relative; opacity: 0; transition: opacity 1.4s ease; }
.x897p-label .x897p-name { position: absolute; left: 0; bottom: 100%; margin-bottom: 5px; white-space: nowrap; font-size: 11px; letter-spacing: 0.14em; color: rgba(255,255,255,0.7); text-transform: uppercase; }
.x897p-label .x897p-sub  { font-size: 11px; letter-spacing: 0.06em; color: rgba(255,255,255,0.35); white-space: nowrap; transition: opacity 0.5s ease; }
.x897p-cue {
  position: absolute; bottom: 44px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0; transition: opacity 0.5s ease;
}
.x897p-cue .x897p-tick { width: 1px; height: 34px; background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent); animation: x897p-tick 2.2s ease-in-out infinite; }
.x897p-cue span { font-size: 9px; letter-spacing: 0.2em; color: rgba(255,255,255,0.4); text-transform: uppercase; }
@keyframes x897p-tick {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  30%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  70%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}
.x897p-status { font-size: 9px; letter-spacing: 0.18em; color: rgba(255,255,255,0.35); text-transform: uppercase; opacity: 0; transition: opacity 0.5s ease; }

@media (max-width: 640px) {
  .x897p-foot   { left: 20px; right: 20px; bottom: 26px; }
  .x897p-cue, .x897p-loading { bottom: 26px; }
  .x897p-cue span { display: none; }            /* keeps clear of the status line */
}
@media (prefers-reduced-motion: reduce) {
  .x897p-cue .x897p-tick { animation: none; }
}
