/* v1.245 LIFT-1 — lift doors between pages (see includes/lift_transition.php).
   Closed doors: brushed dark-teal steel with a thin orange seam of light; a
   floor display above the seam. Doors close in ~0.32 s on the way out and
   part in ~0.55 s on arrival. Nothing shows unless a ride is in progress. */
.lift-doors { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; visibility: hidden; }
.lift-door {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 7px),
    linear-gradient(90deg, #0b252b 0%, #12363e 45%, #0e2d34 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .35);
  will-change: transform;
}
.lift-door--l { left: 0; transform: translateX(-101%); border-right: 1px solid rgba(246, 152, 16, .55); }
.lift-door--r { right: 0; transform: translateX(101%); border-left: 1px solid rgba(246, 152, 16, .55); }
.lift-door--l::after, .lift-door--r::after { /* the kick plate and a handle line, so it reads as a lift door */
  content: ""; position: absolute; left: 12%; right: 12%; bottom: 7%; height: 2px; background: rgba(255, 255, 255, .08);
}
.lift-display {
  position: absolute; left: 50%; top: 14%; transform: translate(-50%, -8px); opacity: 0;
  display: grid; justify-items: center; gap: 6px; text-align: center;
  padding: 12px 18px 10px; min-width: 116px; border-radius: 12px;
  background: #071b20; box-shadow: 0 0 0 1px rgba(246, 152, 16, .28), 0 12px 40px rgba(0, 0, 0, .45), inset 0 0 18px rgba(246, 152, 16, .12);
  transition: opacity .18s ease, transform .25s ease;
}
.lift-dir { font: 700 .8rem/1 ui-monospace, Consolas, monospace; color: #F69810; opacity: .85; }
.lift-num { font: 700 2.6rem/1 ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .04em; color: #F69810; text-shadow: 0 0 14px rgba(246, 152, 16, .55); font-variant-numeric: tabular-nums; }
.lift-to { max-width: 240px; font: 500 .74rem/1.3 var(--font-body, system-ui, sans-serif); color: #cfe3e6; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lift-to:empty { display: none; }

/* leaving: the doors close */
html.lift-close .lift-doors { visibility: visible; pointer-events: auto; cursor: progress; }
html.lift-close .lift-door { transform: translateX(0); transition: transform .32s cubic-bezier(.65, 0, .35, 1); }
html.lift-close .lift-display { opacity: 1; transform: translate(-50%, 0); transition-delay: .16s; }

/* arriving: the doors start shut (before first paint) … */
html.lift-arrive .lift-doors { visibility: visible; }
html.lift-arrive .lift-door { transform: translateX(0); }
html.lift-arrive .lift-display { opacity: 1; transform: translate(-50%, 0); }
/* … and part once the page is ready (or after 2.5 s on their own, whatever happens) */
html.lift-arrive.lift-open .lift-door--l { transform: translateX(-101%); transition: transform .55s cubic-bezier(.65, 0, .35, 1) .12s; }
html.lift-arrive.lift-open .lift-door--r { transform: translateX(101%); transition: transform .55s cubic-bezier(.65, 0, .35, 1) .12s; }
html.lift-arrive.lift-open .lift-display { opacity: 0; transform: translate(-50%, -6px); transition: opacity .2s ease .1s, transform .2s ease .1s; }
html.lift-arrive:not(.lift-open) .lift-door--l { animation: liftSafetyL .55s cubic-bezier(.65, 0, .35, 1) 2.5s forwards; }
html.lift-arrive:not(.lift-open) .lift-door--r { animation: liftSafetyR .55s cubic-bezier(.65, 0, .35, 1) 2.5s forwards; }
html.lift-arrive:not(.lift-open) .lift-display { animation: liftSafetyD .2s ease 2.5s forwards; }
@keyframes liftSafetyL { to { transform: translateX(-101%); } }
@keyframes liftSafetyR { to { transform: translateX(101%); } }
@keyframes liftSafetyD { to { opacity: 0; } }
/* the ding: the display flashes as the lift arrives */
html.lift-ding .lift-num { animation: liftDing .45s ease-out; }
@keyframes liftDing { 0% { transform: scale(1); } 35% { transform: scale(1.14); text-shadow: 0 0 24px rgba(246, 152, 16, .95); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) { .lift-doors { display: none !important; } }
@media print { .lift-doors { display: none !important; } }
