/* ==========================================================================
   Magalhães Advocacia — shell.css v2  ·  "A torre"
   Shared by every page: base, primitives (BRIEF §7), topbar + HUD, elevator
   doors (loader / page transitions), tower rail, elevator panel, slabs,
   motion helpers, lamp cursor, grain + vignette, mobile dock, footer.
   Consumes assets/css/tokens.css (never redefines it). Behaviour: shell.js.

   Contents
   01  Local tokens
   02  Base · scrollbar · Lenis
   03  Pre-cover (covers the page until shell.js builds the doors)
   04  Primitives: .skip .wrap .btn .glass .eyebrow .h-display .lead
   05  Topbar · panel toggle · no-JS nav
   06  HUD (elevator display)
   07  Doors (loader + page transitions)
   08  Tower rail
   09  Elevator panel
   10  Slabs
   11  Motion helpers (split · light · odometer · scramble · tilt)
   12  Lamp cursor · grain · vignette
   13  Dock (mobile)
   14  Footer
   15  Responsive
   16  Reduced motion
   ========================================================================== */

/* ---------- 01 · Local tokens (additive; tokens.css stays untouched) ---------- */
:root {
  --z-main: 1;
  --z-fx: 35;
  --z-rail: 40;
  --z-dock: 45;
  --z-top: 50;
  --z-panel: 70;
  --z-doors: 100;
  --z-cursor: 110;
  --dock-h: 66px;
  --led: #ffb347;                         /* LED amber (dot-matrix, odometer) */
  --led-hot: #fff0cf;

  /* Brushed metal: fine vertical streaks (feTurbulence stretched along Y) */
  --brushed: repeating-linear-gradient(90deg, rgba(255, 236, 190, .07) 0 1px, rgba(0, 0, 0, .08) 1px 2px, transparent 2px 3px, rgba(255, 236, 190, .035) 3px 4px, transparent 4px 7px, rgba(0, 0, 0, .05) 7px 8px, transparent 8px 11px);
  /* Concrete: isotropic grain */
  --concrete-noise: radial-gradient(rgba(255, 255, 255, .85) .5px, transparent .8px);
  /* Film grain (light/dark speckle) */
  --grain: radial-gradient(rgba(255, 245, 225, .9) .5px, transparent .8px);
  --brass-metal: linear-gradient(180deg, #f1dba6 0%, #d3ad66 34%, #9a773a 62%, #c9a25e 100%);
}

/* ---------- 02 · Base · scrollbar · Lenis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  background: var(--bg); color-scheme: dark;
  overflow-x: clip; scroll-padding-top: calc(var(--header-h, 76px) + 16px);
  scrollbar-width: thin; scrollbar-color: rgba(201, 162, 94, .55) var(--bg);
}
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font-family: var(--f-body); font-size: var(--fs-body); line-height: 1.65;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
main { position: relative; z-index: var(--z-main); display: block; }
img, svg, video, canvas { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, address { margin: 0; }
address { font-style: normal; }
em { font-style: italic; }
section[id], [id].floor { scroll-margin-top: 0; }
[hidden] { display: none !important; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); box-shadow: inset 1px 0 0 var(--line); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #7d5f2c, #c9a25e 45%, #7d5f2c);
  border-radius: 8px; border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(90deg, #a3813f, #e0c084 45%, #a3813f); }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }
html.is-locked, html.is-locked body { overflow: hidden; }

/* ---------- 03 · Pre-cover: hides the page until shell.js has built the doors.
   Disappears by itself after 6s, so a failed script can never trap the visitor. ---------- */
html.js:not(.is-ready):not(.has-doors)::after {
  content: ""; position: fixed; inset: 0; z-index: 99; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .55), transparent 6%, transparent 94%, rgba(0, 0, 0, .55)),
    linear-gradient(90deg, #2b2113 0 50%, #251c10 50% 100%);
  animation: pre-cover-out 0s linear 6s forwards;
}
@keyframes pre-cover-out { to { opacity: 0; visibility: hidden; } }

/* ---------- 04 · Primitives ---------- */
.skip {
  position: fixed; left: 16px; top: 0; z-index: 200;
  display: inline-flex; align-items: center; min-height: 44px;
  background: var(--lamp); color: #1a1208; padding: 0 20px; border-radius: var(--radius);
  font: 600 14.5px/1.2 var(--f-body);
  transform: translateY(-160%); transition: transform var(--dur-1) var(--ease-out);
}
.skip:focus, .skip:focus-visible { transform: translateY(14px); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 1100px) { .wrap { padding-right: calc(var(--gutter) + var(--rail-w)); } }

/* Buttons: "a light turns on" — sheen sweep + warm glow, never a colour swap */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .7em;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  border: 1px solid transparent;
  font: 600 15.5px/1 var(--f-body); letter-spacing: .01em; text-align: center; white-space: nowrap;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: box-shadow .5s var(--ease-out), border-color .35s, background-color .35s, opacity .3s;
}
.btn::before {                                   /* light-sweep sheen */
  content: ""; position: absolute; inset: -2px; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 244, 220, .62) 50%, transparent 68%);
  transform: translateX(-130%); transition: transform .95s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateX(130%); }
.btn__txt { position: relative; }
.btn__ico { width: 20px; height: 20px; flex: none; }
.btn__dot {
  position: relative; width: 8px; height: 8px; border-radius: 50%; flex: none; background: currentColor;
}
.btn__dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor;
  will-change: transform, opacity; opacity: 0;
  animation: btn-ping 2.4s var(--ease-out) 3;
}
@keyframes btn-ping { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(3.2); opacity: 0; } }

.btn--lamp {
  color: #1a1208;
  background: linear-gradient(180deg, var(--lamp-2) 0%, var(--lamp) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(120, 70, 8, .25), 0 10px 26px -14px rgba(242, 182, 90, .42);
}
.btn--lamp:hover, .btn--lamp:focus-visible {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -2px 0 rgba(120, 70, 8, .25), 0 0 18px rgba(242, 182, 90, .26), 0 0 0 1px rgba(255, 212, 138, .4);
}
.btn--glass {
  color: var(--text);
  background: rgba(14, 16, 25, .74); border-color: var(--glass-edge);
  box-shadow: inset 0 1px 0 rgba(255, 240, 210, .06);
}
.btn--glass .btn__dot { color: var(--lamp); box-shadow: 0 0 7px var(--lamp); }
.btn--glass:hover, .btn--glass:focus-visible {
  border-color: rgba(242, 182, 90, .5);
  box-shadow: inset 0 1px 0 rgba(255, 240, 210, .08), 0 0 20px -4px rgba(242, 182, 90, .27), 0 0 0 1px rgba(242, 182, 90, .18);
}
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 14.5px; }
.btn:active { opacity: .92; }

/* Glass: content floats on a smoked-glass panel over the 3D world.
   Deliberately NOT blurred (backdrop-filter on big panels is what makes scrolling heavy):
   solid-ish night, a faint top light and the warm hairline. */
.glass {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 240, 210, .05), rgba(255, 240, 210, 0) 38%), rgba(14, 16, 25, .78);
  border: 1px solid var(--glass-edge); border-radius: var(--radius-2);
  box-shadow: 0 14px 32px -20px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 240, 210, .06);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .85em; flex-wrap: wrap;
  margin: 0; font-family: var(--f-mono); font-size: var(--fs-mono); font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-2);
}
.eyebrow::before { content: ""; width: 36px; height: 1px; flex: none; background: var(--brass); box-shadow: 0 0 8px rgba(201, 162, 94, .5); }
.eyebrow b { font-weight: 500; color: var(--brass-2); letter-spacing: .1em; }

.h-display {
  margin: 0; color: var(--text);
  font-family: var(--f-display); font-weight: 400; font-size: var(--fs-h2);
  line-height: 1.05; letter-spacing: -.012em; font-optical-sizing: auto; text-wrap: balance;
}
.h-display em { font-style: italic; color: var(--lamp); font-weight: 400; }

.lead { margin: 0; max-width: var(--measure); color: var(--text-2); font-size: var(--fs-lead); line-height: 1.6; }

/* ---------- 05 · Topbar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-top);
  height: var(--header-h);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 20px;
  padding-inline: var(--gutter);
  color: var(--text);
}
.topbar::before, .topbar::after {                 /* scrim over the hero · glass once scrolled */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-out);
}
.topbar::before { background: linear-gradient(180deg, rgba(10, 11, 17, .78), rgba(10, 11, 17, 0)); }
.topbar::after {
  opacity: 0; background: rgba(12, 13, 20, .7); border-bottom: 1px solid var(--glass-edge);
  box-shadow: 0 14px 30px -24px rgba(0, 0, 0, .8);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar::after { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
.topbar.is-scrolled::before { opacity: 0; }
.topbar.is-scrolled::after { opacity: 1; }

.topbar__brand { display: inline-flex; flex-direction: column; gap: 3px; min-height: 44px; justify-content: center; line-height: 1; }
.topbar__name {
  font-family: var(--f-display); font-weight: 500; font-size: clamp(22px, 2vw, 27px);
  letter-spacing: -.01em; color: var(--text); font-optical-sizing: auto;
}
.topbar__sub { font-size: 10px; letter-spacing: .14em; color: var(--muted); white-space: nowrap; }
.topbar__brand:hover .topbar__name { text-shadow: 0 0 16px rgba(242, 182, 90, .36); }

.topbar__hud { justify-self: center; min-width: 0; display: flex; justify-content: center; }
.topbar__actions { display: inline-flex; align-items: center; gap: 12px; justify-self: end; }

.topbar__panel {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 18px 0 14px;
  border-radius: 999px; border: 1px solid var(--glass-edge); background: var(--glass);
  color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color .35s, box-shadow .5s var(--ease-out);
}
.topbar__panel:hover, .topbar__panel:focus-visible, .topbar__panel[aria-expanded="true"] {
  border-color: rgba(242, 182, 90, .55); box-shadow: 0 0 26px -6px rgba(242, 182, 90, .4);
}
.topbar__panel-grid { display: grid; grid-template-columns: repeat(2, 7px); gap: 4px; }
.topbar__panel-grid i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brass);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); transition: background .3s, box-shadow .3s;
}
.topbar__panel:hover .topbar__panel-grid i, .topbar__panel[aria-expanded="true"] .topbar__panel-grid i {
  background: var(--lamp); box-shadow: 0 0 8px var(--lamp);
}
.topbar__panel:hover .topbar__panel-grid i:nth-child(2) { transition-delay: .06s; }
.topbar__panel:hover .topbar__panel-grid i:nth-child(3) { transition-delay: .12s; }
.topbar__panel:hover .topbar__panel-grid i:nth-child(4) { transition-delay: .18s; }
.topbar__panel-txt { color: var(--text-2); }

/* Hide on scroll down / show on scroll up — the HUD stays so the elevator display is always visible */
.topbar__brand, .topbar__actions { transition: transform .6s var(--ease-out), opacity .4s; }
.topbar.is-hidden::before, .topbar.is-hidden::after { transform: translateY(-101%); }
.topbar.is-hidden .topbar__brand, .topbar.is-hidden .topbar__actions { transform: translateY(-140%); opacity: 0; pointer-events: none; }
.topbar.is-hidden { pointer-events: none; }
.topbar.is-hidden .topbar__hud { pointer-events: auto; }

/* No JS: nav links visible, panel button hidden, header in normal flow */
.topbar__nojs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; }
.topbar__nojs a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--text-2); }
.topbar__nojs a:hover { color: var(--lamp); }
html.js .topbar__nojs { display: none; }
html:not(.js) .topbar__panel, html:not(.js) .topbar__hud { display: none; }
html:not(.js) .topbar__nojs { grid-column: 2; }
html:not(.js) .topbar__actions { grid-column: 3; }
html:not(.js) .topbar { position: relative; height: auto; min-height: var(--header-h); padding-block: 8px; row-gap: 4px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
html:not(.js) .topbar::before { display: none; }

/* ---------- 06 · HUD — elevator display ---------- */
.hud {
  --cell: 1.22em;
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 18px 0 14px; border-radius: 999px;
  background: rgba(8, 9, 14, .62); border: 1px solid var(--glass-edge);
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 240, 210, .05);
  font-family: var(--f-mono); color: var(--text-2); white-space: nowrap; overflow: hidden;
  opacity: 0; transform: translateY(-8px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hud { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
html.is-ready .hud, .hud.is-on { opacity: 1; transform: none; }
.hud__arrow {
  width: 11px; height: 13px; flex: none; color: var(--led); opacity: .28;
  transition: opacity .45s, transform .6s var(--ease-out), filter .45s;
}
.hud__arrow svg { display: block; width: 100%; height: 100%; }
.hud.is-moving .hud__arrow { opacity: 1; filter: drop-shadow(0 0 4px rgba(255, 179, 71, .55)); }
.hud.is-down .hud__arrow { transform: rotate(180deg); }
.hud__odo {
  display: inline-flex; gap: 1px; padding: 2px 6px; border-radius: 4px;
  font-size: 21px; font-weight: 500; line-height: 1; color: var(--led-hot);
  background: #07080c;
  box-shadow: inset 0 0 0 1px rgba(201, 162, 94, .38), inset 0 2px 7px rgba(0, 0, 0, .85), 0 0 14px -6px rgba(255, 179, 71, .35);
  text-shadow: 0 0 6px rgba(255, 179, 71, .55);
}
.hud__digit {
  position: relative; display: block; width: .66em; height: var(--cell); overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 24%, #000 76%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 24%, #000 76%, transparent 100%);
  transition: opacity .35s;
}
.hud__digit--tens.is-off { opacity: 0; }
.hud__strip { display: block; will-change: transform; }
.hud.is-fast .hud__strip { filter: blur(var(--mb, 1px)); }
.hud__strip > span { display: block; height: var(--cell); line-height: var(--cell); text-align: center; }
.hud__name {
  min-width: 20ch; font-size: var(--fs-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2);
  text-align: left; overflow: hidden; text-overflow: clip;
}
.hud__line { position: absolute; left: 14px; right: 18px; bottom: 0; height: 2px; background: var(--line); }
.hud__line i {
  position: absolute; inset: 0; background: linear-gradient(90deg, var(--brass), var(--lamp));
  transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 8px rgba(242, 182, 90, .6);
}
.hud.is-express { border-color: rgba(255, 179, 71, .45); box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .8), 0 0 30px -6px rgba(255, 179, 71, .4); }
.hud.is-express .hud__name { color: var(--lamp-2); }
.hud.is-express .hud__odo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(255, 220, 160, .16) 3px 4px);
  animation: hud-streak .35s linear infinite;
}
.hud__odo { position: relative; }
@keyframes hud-streak { to { background-position: 0 -8px; } }

/* ---------- 07 · Doors ---------- */
.doors {
  position: fixed; inset: 0; z-index: var(--z-doors); overflow: hidden; pointer-events: auto;
  --dur: .7s; contain: layout paint style; touch-action: none;
}
.doors.is-gone { display: none; }
.doors.is-open { pointer-events: none; }
.doors__glow {                                    /* warm light that spills through the gap */
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 22% 62% at 50% 50%, rgba(255, 226, 170, .55), rgba(242, 182, 90, .22) 45%, transparent 75%),
    linear-gradient(90deg, transparent 35%, rgba(255, 214, 150, .16) 50%, transparent 65%);
  transition: opacity calc(var(--dur) * .8) ease-out;
}
.doors.is-ding .doors__glow { opacity: .5; transition-duration: .12s; }
.doors.is-open .doors__glow { opacity: 0; transition-delay: .05s; }
.doors__leaf {
  position: absolute; top: 0; bottom: 0; width: 50%; overflow: hidden; will-change: transform;
  background:
    linear-gradient(105deg, transparent 22%, rgba(255, 232, 180, .075) 36%, transparent 50%),
    linear-gradient(180deg, #5b4627 0%, #3e2f19 30%, #2b2112 68%, #1f180d 100%);
  transition: transform var(--dur) var(--ease-door);
}
.doors__leaf::before {                            /* brushed grain */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--brushed); opacity: .55;
}
.doors__leaf::after {                             /* recessed door panel */
  content: ""; position: absolute; pointer-events: none;
  inset: clamp(18px, 9vh, 80px) clamp(8px, 4vw, 64px);
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, .45);
  box-shadow: inset 0 0 0 1px rgba(255, 226, 170, .1), inset 0 0 60px rgba(0, 0, 0, .38), 0 0 0 1px rgba(255, 226, 170, .06);
  background: linear-gradient(180deg, rgba(255, 226, 170, .035), rgba(0, 0, 0, .12));
}
.doors__leaf--l { left: 0; box-shadow: inset -1px 0 0 rgba(255, 232, 180, .32), inset -14px 0 22px -14px rgba(0, 0, 0, .75); }
.doors__leaf--r { right: 0; box-shadow: inset 1px 0 0 rgba(255, 232, 180, .32), inset 14px 0 22px -14px rgba(0, 0, 0, .75); }
.doors__leaf--l::after { right: clamp(12px, 5vw, 76px); left: clamp(8px, 4vw, 64px); }
.doors__leaf--r::after { left: clamp(12px, 5vw, 76px); right: clamp(8px, 4vw, 64px); }
.doors.is-open .doors__leaf--l { transform: translate3d(-100.5%, 0, 0); }
.doors.is-open .doors__leaf--r { transform: translate3d(100.5%, 0, 0); }

.doors__eng {                                      /* engraving straddling the seam, clipped by each leaf */
  position: absolute; top: 0; bottom: 0; width: min(94vw, 760px); z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(10px, 3vh, 30px);
  pointer-events: none; transform: translateX(-50%);
}
.doors__leaf--l .doors__eng { left: 100%; }
.doors__leaf--r .doors__eng { left: 0; }
.doors__m {
  font-family: var(--f-display); font-weight: 600; font-size: min(46vh, 44vw); line-height: .8; letter-spacing: 0;
  margin-top: 6vh;
  color: rgba(24, 16, 6, .6);
  text-shadow: 0 2px 0 rgba(255, 232, 180, .24), 0 -1px 0 rgba(0, 0, 0, .5), 0 0 28px rgba(0, 0, 0, .25);
}
.doors__plate {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; white-space: nowrap;
  font-family: var(--f-mono); font-size: clamp(10px, 1.1vw, 12.5px); font-weight: 500; letter-spacing: .26em; text-transform: uppercase; line-height: 1.2;
  color: rgba(238, 205, 146, .6);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .65), 0 1px 0 rgba(255, 236, 190, .16);
}
.doors__plate span:last-child { letter-spacing: .34em; }

/* The car is moving: each passing floor's light slips by the seam and glances off the brass */
.doors__pass {
  position: absolute; top: 0; bottom: 0; left: 50%; z-index: 1; width: min(40vw, 460px); transform: translateX(-50%);
  overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .3s ease-out;
  -webkit-mask-image: radial-gradient(ellipse 50% 62% at 50% 50%, #000 0, rgba(0, 0, 0, .4) 38%, transparent 72%);
  mask-image: radial-gradient(ellipse 50% 62% at 50% 50%, #000 0, rgba(0, 0, 0, .4) 38%, transparent 72%);
}
.doors__pass i {
  position: absolute; left: 0; right: 0; top: -240px; bottom: -240px; will-change: transform;
  background: repeating-linear-gradient(180deg, transparent 0 148px, rgba(255, 214, 150, .14) 168px, rgba(255, 238, 205, .34) 178px, rgba(255, 214, 150, .1) 190px, transparent 204px 240px);
}
.doors.is-travel .doors__pass { opacity: 1; }
.doors.is-travel .doors__pass i { animation: door-pass .24s linear infinite; }
.doors.is-travel-down .doors__pass i { animation-direction: reverse; }
@keyframes door-pass { from { transform: translate3d(0, -240px, 0); } to { transform: translate3d(0, 0, 0); } }
.doors.is-travel:not(.is-ding) .doors__seam { opacity: .3; transform: scaleY(1); }

.doors__seam {                                     /* the light line in the seam */
  position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, transparent 0, #fff3d4 14%, #ffd48a 50%, #fff3d4 86%, transparent 100%);
  box-shadow: 0 0 22px 5px rgba(255, 200, 120, .75), 0 0 80px 18px rgba(242, 182, 90, .3);
  opacity: 0; transform: scaleY(.2); transition: opacity .14s linear, transform .28s var(--ease-out);
}
.doors.is-ding .doors__seam { opacity: 1; transform: scaleY(1); }
.doors.is-open .doors__seam { opacity: 0; transform: scaleY(1) scaleX(7); transition: opacity calc(var(--dur) * .55) ease-in, transform calc(var(--dur) * .55) ease-out; }

.doors__led {                                      /* floor indicator above the doors */
  position: absolute; z-index: 3; top: clamp(20px, 8vh, 84px); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: clamp(10px, 1.6vh, 16px) clamp(16px, 2vw, 26px) clamp(9px, 1.4vh, 13px);
  border-radius: 8px; background: #0a0804;
  border: 1px solid rgba(201, 162, 94, .5);
  box-shadow: 0 0 0 4px #1d1609, 0 0 0 5px rgba(255, 232, 180, .2), inset 0 0 22px rgba(0, 0, 0, .9), 0 22px 40px -12px rgba(0, 0, 0, .8);
  transition: opacity .3s;
}
.doors.is-open .doors__led { opacity: 0; }
.doors__arrow { display: block; width: 18px; height: 14px; color: var(--led); filter: drop-shadow(0 0 6px rgba(255, 179, 71, .9)); transition: transform .4s var(--ease-out), opacity .3s; }
.doors__arrow svg { display: block; width: 100%; height: 100%; }
.doors__arrow.is-down { transform: rotate(180deg); }
.doors__arrow.is-blink { animation: led-blink .7s steps(2, jump-none) infinite; }
@keyframes led-blink { 0% { opacity: 1; } 100% { opacity: .25; } }
.doors__digits { display: flex; gap: clamp(8px, 1.4vw, 16px); }
.led { --dot: clamp(6px, 1.05vw, 10px); display: grid; grid-template-columns: repeat(5, var(--dot)); gap: calc(var(--dot) * .42); }
.led i {
  width: var(--dot); height: var(--dot); border-radius: 50%; background: #26190a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5);
  transition: background .1s, box-shadow .1s;
}
.led i.on {
  background: radial-gradient(circle at 36% 30%, var(--led-hot), #ffc468 52%, #e68a1f 100%);
  box-shadow: 0 0 5px rgba(255, 170, 60, .95), 0 0 13px rgba(255, 140, 30, .5);
}
.doors__name { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: rgba(255, 190, 110, .8); white-space: nowrap; }

/* Reduced motion / no sliding: doors fade */
.doors--fade { transition: opacity var(--dur) linear; }
.doors--fade.is-open { opacity: 0; }
.doors--fade .doors__leaf { transition: none; }
.doors--fade.is-open .doors__leaf--l, .doors--fade.is-open .doors__leaf--r { transform: none; }
.doors--fade .doors__seam, .doors--fade .doors__glow { display: none; }

/* ---------- 08 · Tower rail ---------- */
.rail {
  position: fixed; right: clamp(8px, 1.1vw, 22px); top: 50%; z-index: var(--z-rail);
  display: none; transform: translateY(-50%); opacity: 0; transition: opacity 1s .3s;
}
html.is-ready .rail { opacity: 1; }
@media (min-width: 1100px) { .rail { display: block; } }
.rail__inner { --rh: clamp(380px, 66vh, 660px); --tw: calc(var(--rh) / 10); position: relative; width: calc(var(--tw) + 36px); height: var(--rh); }
.rail__inner::before {                              /* a soft pool of night behind the rail: legible over the lit tower */
  content: ""; position: absolute; inset: -44px -16px -34px -14px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 58% 54% at 62% 52%, rgba(7, 8, 13, .66), rgba(7, 8, 13, .32) 56%, transparent 80%);
}
.rail__tower { position: absolute; right: 0; top: 0; width: var(--tw); height: 100%; overflow: visible; pointer-events: none; }
.rail__tower .t-body { fill: url(#rail-body); stroke: rgba(240, 232, 217, .3); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rail__tower .t-line { stroke: rgba(240, 232, 217, .075); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rail__tower .t-mull { stroke: rgba(240, 232, 217, .1); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rail__tower .t-crown { fill: rgba(240, 232, 217, .06); stroke: rgba(224, 192, 132, .8); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.rail__tower .t-mast { stroke: rgba(224, 192, 132, .85); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rail__tower .t-base { fill: rgba(224, 192, 132, .3); stroke: rgba(224, 192, 132, .7); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rail__beacon {
  position: absolute; top: calc(var(--rh) * .004); right: calc(var(--tw) / 2 - 3px); width: 6px; height: 6px; border-radius: 50%;
  background: #ff6a4a; box-shadow: 0 0 10px 2px rgba(255, 90, 60, .75); will-change: opacity; animation: beacon 2.2s ease-in-out 6; pointer-events: none;
}
@keyframes beacon { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.rail__fill {
  position: absolute; right: calc(var(--tw) / 2 - 1px); width: 2px; pointer-events: none;
  top: calc(106 / 640 * 100%); height: calc((616 - 106) / 640 * 100%);
  background: linear-gradient(180deg, var(--lamp), rgba(201, 162, 94, .35));
  transform-origin: 50% 100%; transform: scaleY(0); opacity: .8; border-radius: 2px;
  box-shadow: 0 0 10px rgba(242, 182, 90, .45);
}
.rail__car {
  position: absolute; right: calc(var(--tw) / 2 - 6px); top: 0; width: 12px; height: 18px; margin-top: -9px; pointer-events: none;
  border-radius: 3px; background: linear-gradient(180deg, var(--lamp-2), var(--lamp));
  box-shadow: 0 0 0 1px rgba(255, 244, 220, .5), 0 0 10px 2px rgba(255, 190, 90, .6), 0 0 28px 6px rgba(242, 182, 90, .2);
  will-change: transform;
}
.rail__car::before { content: ""; position: absolute; inset: 3px 4px; border-radius: 1px; background: #fff8e8; opacity: .85; }
.rail__list { position: absolute; inset: 0; }
.rail__list li { position: absolute; left: 0; right: 0; top: calc(var(--y) * 100%); height: 0; }
.rail__tick {
  position: absolute; right: 0; top: -12px; width: 100%; height: 24px;
  display: flex; align-items: center; justify-content: flex-end; color: var(--muted);
  -webkit-tap-highlight-color: transparent;
}
.rail__tick:focus-visible { outline-offset: -2px; }
.rail__num {
  width: 30px; margin-right: 6px; text-align: right;
  font: 500 11px/1 var(--f-mono); letter-spacing: .06em; color: var(--text-2);
  transition: color .3s, text-shadow .3s;
}
.rail__bar {
  flex: none; width: calc(var(--tw) * .74); margin-right: calc(var(--tw) * .13); height: 2px; border-radius: 2px;
  background: var(--brass); opacity: .5; transition: opacity .3s, width .4s var(--ease-out), background .3s, box-shadow .4s, height .3s;
}
.rail__tick.is-passed .rail__bar { opacity: .85; }
.rail__tick:hover .rail__bar, .rail__tick:focus-visible .rail__bar { opacity: 1; background: var(--lamp-2); box-shadow: 0 0 8px rgba(242, 182, 90, .55); width: calc(var(--tw) * .96); margin-right: calc(var(--tw) * .02); }
.rail__tick:hover .rail__num, .rail__tick:focus-visible .rail__num { color: var(--lamp-2); }
.rail__tick[aria-current] .rail__bar { opacity: 1; height: 3px; background: var(--lamp); box-shadow: 0 0 7px rgba(242, 182, 90, .6), 0 0 16px rgba(242, 182, 90, .3); }
.rail__tick[aria-current] .rail__num { color: var(--lamp); text-shadow: 0 0 9px rgba(242, 182, 90, .8); }
.rail__label {
  position: absolute; right: calc(100% + 6px); top: 50%; z-index: 2; pointer-events: none;
  padding: 6px 12px; border-radius: 4px; white-space: nowrap;
  font: 500 var(--fs-mono)/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text);
  background: rgba(12, 13, 20, .88); border: 1px solid var(--glass-edge);
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, .8), 0 0 18px -6px rgba(242, 182, 90, .35);
  opacity: 0; transform: translate(10px, -50%); transition: opacity .25s, transform .4s var(--ease-out);
}
.rail__label b { color: var(--lamp); font-weight: 500; margin-right: .6em; }
.rail__tick:hover .rail__label, .rail__tick:focus-visible .rail__label { opacity: 1; transform: translate(0, -50%); }

/* ---------- 09 · Elevator panel ---------- */
.panel {
  position: fixed; inset: 0; z-index: var(--z-panel); visibility: hidden; pointer-events: none;
  --ox: 100%; --oy: 0px;
  clip-path: circle(0px at var(--ox) var(--oy));
  transition: clip-path .4s var(--ease-io), visibility 0s linear .4s;
}
.panel.is-open { visibility: visible; pointer-events: auto; clip-path: circle(160vmax at var(--ox) var(--oy)); transition: clip-path .6s var(--ease-io), visibility 0s; }
.panel.is-warm { visibility: visible; opacity: .004; clip-path: none; transition: none; }
.panel.is-warm .panel__face, .panel.is-warm .pbtn, .panel.is-warm .panel__contact { opacity: .004; transform: none; transition: none; }
.panel__backdrop { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(26, 21, 14, .9), rgba(5, 6, 11, .95) 70%); }
.panel__scroll {
  position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(12px, 3vh, 36px) 16px clamp(24px, 5vh, 56px);
}
.panel__face {
  position: relative; width: min(1000px, 100%); margin-block: auto;
  padding: clamp(22px, 4vw, 48px) clamp(18px, 4vw, 52px) clamp(22px, 3.4vw, 40px);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 244, 220, .07), transparent 14%),
    linear-gradient(180deg, #2a2b33 0%, #1c1d24 55%, #17181e 100%);
  border: 1px solid rgba(255, 236, 190, .2);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 244, 220, .22), inset 0 0 0 4px #121318, inset 0 0 0 5px rgba(255, 236, 190, .1);
  opacity: 0; transform: translateY(46px) scale(.97);
  transition: opacity .35s ease-out, transform .6s var(--ease-out);
}
.panel.is-open .panel__face { opacity: 1; transform: none; transition-delay: .1s; }
.panel__face::before {                              /* brushed finish */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background-image: var(--brushed); opacity: .2;
}
.panel__screw {
  position: absolute; width: 11px; height: 11px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #f1dba6, #8f6e34 70%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 244, 220, .2);
}
.panel__screw::after { content: ""; position: absolute; left: 2px; right: 2px; top: 50%; height: 1.5px; margin-top: -.75px; background: rgba(40, 26, 8, .75); transform: rotate(var(--r, 35deg)); }
.panel__screw--tl { top: 14px; left: 14px; } .panel__screw--tr { top: 14px; right: 14px; --r: -20deg; }
.panel__screw--bl { bottom: 14px; left: 14px; --r: 70deg; } .panel__screw--br { bottom: 14px; right: 14px; --r: 10deg; }
.panel__head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: clamp(20px, 3vw, 34px); padding-inline: 8px; }
.panel__title {
  margin: 10px 0 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(30px, 4.4vw, 52px); line-height: 1; letter-spacing: -.01em; color: var(--text);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .6), 0 -1px 0 rgba(255, 244, 220, .12);
}
.panel__title em { color: var(--lamp); }
.panel__sub { margin-top: 10px; max-width: 46ch; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.panel__close {
  position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #f6e4b4, #c9a25e 48%, #7d5f2c 100%);
  box-shadow: 0 0 0 4px #121318, 0 0 0 5px rgba(255, 236, 190, .28), 0 8px 18px rgba(0, 0, 0, .5);
  transition: box-shadow .4s var(--ease-out), transform .4s var(--ease-out);
}
.panel__close::before, .panel__close::after { content: ""; position: absolute; left: 14px; right: 14px; top: 50%; height: 2px; margin-top: -1px; background: #2a1d0b; border-radius: 1px; box-shadow: 0 1px 0 rgba(255, 244, 220, .35); transform: rotate(45deg); }
.panel__close::after { transform: rotate(-45deg); }
.panel__close:hover, .panel__close:focus-visible { box-shadow: 0 0 0 4px #121318, 0 0 0 5px var(--lamp), 0 0 28px rgba(242, 182, 90, .7); transform: rotate(90deg); }

.panel__grid { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 34px) clamp(8px, 1.6vw, 22px); }
.pbtn {
  --i: 0;
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 4px 2px 6px;
  opacity: 0; transform: translateY(18px) scale(.9);
  transition: opacity .35s ease-out, transform .5s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.panel.is-open .pbtn { opacity: 1; transform: none; transition-delay: calc(.18s + var(--i) * .028s); }
.pbtn__ring {
  position: relative; display: grid; place-items: center; width: clamp(60px, 7vw, 76px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, #f8e7b8 0%, #d6b06a 38%, #9b7838 72%, #6e5226 100%);
  box-shadow:
    0 0 0 4px #101116, 0 0 0 5.5px rgba(255, 236, 190, .26),
    inset 0 -4px 8px rgba(70, 46, 10, .55), inset 0 3px 5px rgba(255, 248, 225, .7),
    0 10px 20px -4px rgba(0, 0, 0, .7);
  transition: box-shadow .45s var(--ease-out), background .45s, transform .25s var(--ease-out);
}
.pbtn__num {
  font-family: var(--f-display); font-weight: 600; font-size: clamp(21px, 2.4vw, 27px); line-height: 1; letter-spacing: 0;
  font-variant-numeric: lining-nums; color: #2c1f0a; text-shadow: 0 1px 0 rgba(255, 244, 220, .55), 0 -1px 0 rgba(60, 38, 8, .35);
  transition: color .4s, text-shadow .4s;
}
.pbtn__name { font-size: 14px; line-height: 1.3; color: var(--text-2); max-width: 15ch; transition: color .3s; }
.pbtn:hover .pbtn__ring, .pbtn:focus-visible .pbtn__ring {
  box-shadow: 0 0 0 4px #101116, 0 0 0 5.5px rgba(242, 182, 90, .75), 0 0 26px 2px rgba(242, 182, 90, .55),
    inset 0 -4px 8px rgba(70, 46, 10, .55), inset 0 3px 5px rgba(255, 248, 225, .7), 0 10px 20px -4px rgba(0, 0, 0, .7);
}
.pbtn:hover .pbtn__name, .pbtn:focus-visible .pbtn__name { color: var(--text); }
.pbtn:active .pbtn__ring { transform: scale(.94); }
.pbtn:focus-visible { outline: none; }
.pbtn:focus-visible .pbtn__ring { outline: 2px solid var(--lamp); outline-offset: 7px; }
.pbtn.is-current .pbtn__ring, .pbtn.is-pressed .pbtn__ring {
  background: radial-gradient(circle at 36% 28%, #4a3718 0%, #2d210d 55%, #1b1306 100%);
  box-shadow: 0 0 0 4px #101116, 0 0 0 5.5px var(--lamp), 0 0 22px 3px rgba(242, 182, 90, .5), 0 0 44px 4px rgba(242, 182, 90, .14),
    inset 0 0 14px rgba(255, 190, 90, .45), inset 0 3px 5px rgba(0, 0, 0, .6);
}
.pbtn.is-current .pbtn__num, .pbtn.is-pressed .pbtn__num { color: var(--lamp-2); text-shadow: 0 0 12px rgba(255, 190, 90, .95), 0 0 3px rgba(255, 212, 138, 1); }
.pbtn.is-current .pbtn__name, .pbtn.is-pressed .pbtn__name { color: var(--lamp-2); }
.pbtn__you { display: none; margin-top: -4px; font: 500 10px/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--lamp); }
.pbtn.is-current .pbtn__you { display: block; }

.panel__contact {
  position: relative; display: grid; grid-template-columns: auto auto 1fr; gap: 14px 20px; align-items: center;
  margin-top: clamp(24px, 3.4vw, 40px); padding: 22px 8px 0; border-top: 1px solid rgba(255, 236, 190, .14);
  opacity: 0; transform: translateY(14px); transition: opacity .5s ease-out, transform .7s var(--ease-out);
}
.panel.is-open .panel__contact { opacity: 1; transform: none; transition-delay: .45s; }
.panel__addr { font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.panel__addr strong { display: block; font: 500 var(--fs-mono)/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brass-2); margin-bottom: 4px; }

/* ---------- 10 · Slabs — the concrete between floors ---------- */
.slab { position: relative; z-index: 2; height: clamp(56px, 8vh, 72px); overflow: hidden; contain: layout paint; }
.slab__body {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 11px),
    linear-gradient(180deg, rgba(0, 0, 0, .46) 0, transparent 22%, transparent 78%, rgba(0, 0, 0, .55) 100%),
    linear-gradient(180deg, #292a31 0%, #1f2026 100%);
}
.slab__body::before { content: ""; position: absolute; inset: 0; background-image: var(--concrete-noise); background-size: 6px 6px; opacity: .05; }
.slab__edge { position: absolute; left: 0; right: 0; height: 3px; pointer-events: none; }
.slab__edge--t { top: 0; background: linear-gradient(180deg, rgba(190, 200, 224, .5) 0, rgba(190, 200, 224, .5) 1px, rgba(0, 0, 0, .55) 1px, rgba(0, 0, 0, 0) 100%); box-shadow: 0 1px 0 rgba(0, 0, 0, .5); }
.slab__edge--b { bottom: 0; height: 4px; background: linear-gradient(0deg, rgba(150, 160, 186, .32) 0, rgba(150, 160, 186, .32) 1px, rgba(0, 0, 0, .6) 1px, rgba(0, 0, 0, 0) 100%); }
.slab__num {
  position: absolute; left: clamp(8px, 3vw, 56px); top: 50%; margin-top: -.5em; z-index: 1;
  font-family: var(--f-display); font-weight: 700; font-size: clamp(84px, 13vh, 112px); line-height: 1; letter-spacing: -.03em;
  font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1;
  color: rgba(6, 7, 11, .5);
  text-shadow: 0 2px 1px rgba(214, 222, 244, .09), 0 -2px 2px rgba(0, 0, 0, .6);
  user-select: none;
}
.slab__plate {
  position: absolute; z-index: 2; right: calc(var(--gutter) + var(--rail-w) * .7); top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 5px; border-radius: 3px; white-space: nowrap;
  color: var(--brass-2); font-size: 11px; letter-spacing: .2em;
  background: linear-gradient(180deg, #17181e, #101116); border: 1px solid rgba(201, 162, 94, .45);
  box-shadow: inset 0 1px 0 rgba(255, 244, 220, .1), 0 6px 14px -4px rgba(0, 0, 0, .7);
}
.slab__plate::before, .slab__plate::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--brass); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5); }
.slab__light {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  width: 60%; left: 20%;
  background: radial-gradient(ellipse 50% 100% at 50% 50%, rgba(255, 214, 150, .34), rgba(242, 182, 90, .13) 42%, transparent 72%);
}
/* Express shaft: 27 → 46 */
.slab--express { height: 28vh; }
.slab--express .slab__body { background: linear-gradient(180deg, #14151a 0%, #1b1c22 40%, #14151a 100%); }
.slab--express .slab__body::before { opacity: .1; }
.slab--express .slab__num { left: 50%; margin-left: 0; transform: translateX(-50%); font-size: 30vh; color: rgba(6, 7, 11, .62); }
.slab__shaft { position: absolute; inset: 0; pointer-events: none; }
.slab__rail { position: absolute; top: 0; bottom: 0; width: 12px; background: linear-gradient(90deg, #22242c, #5a6070 38%, #2c2f39 62%, #1a1b21); box-shadow: 0 0 0 1px rgba(0, 0, 0, .55); }
.slab__rail--l { left: clamp(20px, 16%, 280px); } .slab__rail--r { right: clamp(20px, 16%, 280px); }
.slab__cable { position: absolute; top: 0; bottom: 0; width: 2px; background: linear-gradient(90deg, rgba(0, 0, 0, .6), rgba(176, 184, 206, .58), rgba(0, 0, 0, .6)); }
.slab__streak { position: absolute; top: -400px; bottom: 0; width: 2px; will-change: transform; }
.slab__streak { --sb: linear-gradient(180deg, transparent 0, rgba(255, 226, 170, 0) 20%, rgba(255, 226, 170, .85) 42%, rgba(255, 226, 170, 0) 50%); }
.slab__streak::before { content: ""; position: absolute; inset: 0; background: var(--sb) 0 0 / 2px var(--p, 320px) repeat-y; }
.slab__streak::after { content: ""; position: absolute; inset: 0 -3px; background: var(--sb) 0 0 / 8px var(--p, 320px) repeat-y; opacity: .22; }
.slab__streak--a { --p: 340px; } .slab__streak--b { --p: 270px; } .slab__streak--c { --p: 430px; }
.slab--express .slab__plate { top: auto; bottom: 10%; right: 50%; transform: translateX(50%); }

/* ---------- 11 · Motion helpers ---------- */
.sp-m { display: inline-block; vertical-align: top; overflow: hidden; padding: .06em .08em .2em; margin: -.06em -.08em -.2em; }
.sp-i { display: inline-block; transform-origin: 0 100%; }
.lt-w { display: inline; color: rgba(240, 232, 217, .45); transition: color .38s ease-out; }
.lt-w.is-lit { color: var(--text); }
em .lt-w.is-lit { color: var(--lamp); text-shadow: 0 0 12px rgba(242, 182, 90, .32); }
.scr { display: contents; }
.odo { display: inline-flex; align-items: flex-start; height: 1.24em; margin-block: -.12em; line-height: 1.24; overflow: hidden; vertical-align: baseline; font-variant-numeric: lining-nums tabular-nums; }
.odo__col { display: block; height: 1.24em; overflow: hidden; }
.odo__strip { display: block; will-change: transform; }
.odo__strip > span { display: block; height: 1.24em; line-height: 1.24; }
.odo__sep { display: block; height: 1.24em; line-height: 1.24; }
.tilt-sheen {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; opacity: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 236, 200, .2), rgba(255, 214, 150, .06) 38%, transparent 62%);
  transition: opacity .5s;
}
[data-tilt].is-tilting .tilt-sheen { opacity: 1; }
[data-tilt].is-tilting { will-change: transform; }

/* ---------- 12 · Cursor (scales of justice) · grain · vignette ---------- */
.scale-cur { display: none; position: fixed; left: 0; top: 0; width: 24px; height: 24px; z-index: var(--z-cursor); pointer-events: none; will-change: transform; opacity: 0; transition: opacity .18s; }
html.has-cursor .scale-cur { display: block; }
html.cursor-on .scale-cur { opacity: 1; }
.scale-cur.is-off { opacity: 0 !important; transition: none; }
.scale-cur__s {
  width: 24px; height: 24px; transform-origin: 12px 3.2px; color: var(--lamp);
  filter: drop-shadow(0 0 1px rgba(5, 6, 10, .85)) drop-shadow(0 0 3px rgba(242, 182, 90, .3));
  transition: transform .16s var(--ease-out), color .16s;
}
.scale-cur svg { display: block; width: 24px; height: 24px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.scale-cur .sc-b { transform-origin: 12px 4.6px; transform: rotate(var(--r, 0deg)); }
.scale-cur .sc-p--l { transform-origin: 3.5px 4.6px; transform: rotate(calc(var(--r, 0deg) * -1)); }
.scale-cur .sc-p--r { transform-origin: 20.5px 4.6px; transform: rotate(calc(var(--r, 0deg) * -1)); }
.scale-cur.is-link .scale-cur__s { transform: scale(1.25); color: var(--lamp-2); }
.scale-cur.is-down .scale-cur__s { transform: translateY(2px) scale(.92); }
.scale-cur.is-link.is-down .scale-cur__s { transform: translateY(2px) scale(1.15); }
.scale-cur.is-on-lamp .scale-cur__s { color: #1a1208; filter: drop-shadow(0 0 1px rgba(255, 238, 200, .9)); }
/* data-cursor="Label": a small lamp-lit tag riding beside the scales */
.scale-cur__label {
  position: absolute; left: 27px; top: 17px; padding: 5px 9px 4px; border-radius: 3px; white-space: nowrap;
  font: 500 10.5px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase;
  color: #1a1208; background: linear-gradient(180deg, var(--lamp-2), var(--lamp));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 18px -8px rgba(0, 0, 0, .8), 0 0 16px -2px rgba(242, 182, 90, .35);
  opacity: 0; transform: translate3d(-8px, 0, 0) scale(.86); transform-origin: 0 50%;
  transition: opacity .18s ease-out, transform .4s var(--ease-out);
}
.scale-cur.has-label .scale-cur__label { opacity: 1; transform: none; }
.scale-cur.is-flip .scale-cur__label { left: auto; right: 27px; transform-origin: 100% 50%; }
.scale-cur.is-flip:not(.has-label) .scale-cur__label { transform: translate3d(8px, 0, 0) scale(.86); }
.scale-cur.is-on-lamp .scale-cur__label { color: var(--lamp-2); background: #15110a; box-shadow: inset 0 0 0 1px rgba(242, 182, 90, .55), 0 8px 18px -8px rgba(0, 0, 0, .8); }
/* the lamp: warm light carried with the pointer, stronger over glass */
.lamp {
  position: absolute; left: 0; top: 0; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%;
  pointer-events: none; opacity: 0; will-change: transform; transform: translate3d(-600px, -600px, 0);
  background: radial-gradient(circle closest-side, rgba(255, 208, 140, .085), rgba(242, 182, 90, .035) 46%, transparent 100%);
  transition: opacity .7s ease-out;
}
html.cursor-on .lamp { opacity: .5; }
html.cursor-on .lamp.is-glass { opacity: 1; }
html.panel-open .lamp, html.is-riding .lamp { opacity: 0; }
/* the native cursor is hidden only while the custom one is active (class added by JS) */
html.has-cursor, html.has-cursor *, html.has-cursor *::before, html.has-cursor *::after { cursor: none !important; }
html.has-cursor input, html.has-cursor textarea, html.has-cursor [contenteditable="true"] { cursor: text !important; }
html.has-cursor select { cursor: pointer !important; }
html.has-cursor input[type="checkbox"], html.has-cursor input[type="radio"], html.has-cursor input[type="button"], html.has-cursor input[type="submit"], html.has-cursor input[type="range"] { cursor: none !important; }

.fx { position: fixed; inset: 0; z-index: var(--z-fx); pointer-events: none; overflow: hidden; }
.fx__vig { position: absolute; inset: 0; background: radial-gradient(ellipse 125% 105% at 50% 45%, transparent 60%, rgba(2, 3, 7, .26) 100%); }
.fx__grain { position: absolute; inset: 0; background-image: var(--grain); background-size: 5px 5px; opacity: .025; }

/* ---------- 13 · Dock (mobile) ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-dock); display: none; gap: 10px;
  padding: 18px var(--gutter) max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent 0, rgba(8, 9, 14, .88) 46%);
  transform: translateY(110%); visibility: hidden;
  transition: transform .6s var(--ease-out), visibility 0s linear .6s;
}
.dock.is-on { transform: none; visibility: visible; transition: transform .6s var(--ease-out), visibility 0s; }
.dock .btn { flex: 1 1 0; min-height: 48px; padding: 0 14px; font-size: 15px; box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .7); }
.dock .btn--lamp { flex-grow: 1.5; }

/* Arrival plate (≤900px): drops under the HUD with the floor's name, since the HUD shows only the number there */
.arrive { display: none; }
@media (max-width: 900px) {
  .arrive {
    position: fixed; z-index: calc(var(--z-top) - 1); top: calc(var(--header-h) - 4px); right: var(--gutter);
    display: inline-flex; align-items: center; gap: 10px; max-width: calc(100vw - 2 * var(--gutter));
    padding: 6px 13px 6px 6px; border-radius: 4px; pointer-events: none;
    font: 500 10.5px/1.1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text); white-space: nowrap;
    background: linear-gradient(180deg, #1c1d23, #121318); border: 1px solid rgba(201, 162, 94, .5);
    box-shadow: inset 0 1px 0 rgba(255, 244, 220, .1), 0 14px 28px -12px rgba(0, 0, 0, .85), 0 0 24px -8px rgba(242, 182, 90, .4);
    opacity: 0; visibility: hidden; transform: translate3d(0, -12px, 0) scaleY(.5); transform-origin: 50% 0;
    transition: opacity .3s ease-in, transform .45s var(--ease-out), visibility 0s linear .45s;
  }
  .arrive.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease-out, transform .6s var(--ease-out), visibility 0s; }
  .arrive__num {
    min-width: 2.4em; padding: 4px 6px 3px; border-radius: 3px; text-align: center;
    font-weight: 500; letter-spacing: .06em; color: var(--led-hot); background: #07080c;
    text-shadow: 0 0 6px rgba(255, 179, 71, .6); box-shadow: inset 0 0 0 1px rgba(201, 162, 94, .38);
  }
  .arrive__name { overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- 14 · Footer ---------- */
.foot {
  position: relative; z-index: 3;
  padding: clamp(40px, 5vw, 72px) var(--gutter) clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--glass-edge);
  background: linear-gradient(180deg, rgba(10, 11, 17, .6), rgba(5, 6, 11, .94) 45%);
  color: var(--text-2);
}
@media (min-width: 1100px) { .foot { padding-right: calc(var(--gutter) + var(--rail-w)); } }
.foot > * { max-width: var(--maxw); margin-inline: auto; }
.foot__grid { display: grid; grid-template-columns: 1fr; gap: 34px; }
.foot__brand { display: flex; flex-direction: column; gap: 8px; }
.foot__name { font-family: var(--f-display); font-weight: 500; font-size: clamp(34px, 5vw, 58px); line-height: 1; letter-spacing: -.012em; color: var(--text); }
.foot__brand .mono { color: var(--muted); }
.foot__addr { font-size: 16px; line-height: 1.65; color: var(--text-2); }
.foot__links { display: flex; flex-direction: column; gap: 2px; }
.foot__links a {
  display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; color: var(--text);
  background: linear-gradient(var(--lamp), var(--lamp)) 0 calc(100% - 9px) / 0 1px no-repeat;
  transition: background-size .5s var(--ease-out), color .3s, text-shadow .4s;
}
.foot__links a:hover, .foot__links a:focus-visible { background-size: 100% 1px; color: var(--lamp-2); text-shadow: 0 0 12px rgba(242, 182, 90, .3); }
.foot__legal { margin-top: clamp(24px, 3vw, 36px); padding-top: 18px; border-top: 1px solid var(--line); max-width: 78ch; margin-left: auto; margin-right: auto; font-size: 14px; line-height: 1.65; color: var(--text-2); }
.foot__legal, .foot__base { width: 100%; }
.foot__base { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--muted); }
.foot__base a { display: inline-flex; align-items: center; gap: .6em; min-height: 44px; color: var(--text-2); transition: color .3s, text-shadow .3s; }
.foot__base a:hover, .foot__base a:focus-visible { color: var(--lamp-2); text-shadow: 0 0 16px rgba(242, 182, 90, .45); }
.foot__legal { max-width: var(--maxw); }
@media (min-width: 860px) {
  .foot__grid { grid-template-columns: 1.3fr 1fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: start; }
}

/* ---------- 15 · Responsive ---------- */
@media (max-width: 1099px) {
  .slab__plate { right: var(--gutter); }
}
@media (max-width: 900px) {
  .hud__name { display: none; }
  .hud { padding-right: 14px; }
  .topbar__sub { display: none; }
}
@media (max-width: 768px) {
  html { scroll-padding-bottom: 96px; }
  :root { --header-h: 64px; }
  .topbar { column-gap: 12px; }
  .topbar__actions .btn { display: none; }                 /* the dock carries WhatsApp on mobile */
  .topbar__hud { justify-self: end; }
  .topbar__panel { padding: 0 14px 0 12px; }
  .dock { display: flex; }
  html.has-dock .foot { padding-bottom: calc(24px + var(--dock-h) + env(safe-area-inset-bottom)); }
  .slab { height: 44px; }
  .slab--express { height: 28vh; }
  .slab__num { font-size: 66px; left: 8px; }
  .slab--express .slab__num { font-size: 30vh; }
  .slab__plate { font-size: 9.5px; letter-spacing: .14em; padding: 4px 10px 3px; }
  .slab__plate::before, .slab__plate::after { display: none; }
  .panel__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .pbtn { flex-direction: row; text-align: left; gap: 14px; padding: 6px 8px 6px 6px; min-height: 64px; }
  .pbtn__ring { width: 54px; flex: none; }
  .pbtn__num { font-size: 20px; }
  .pbtn__name { font-size: 14px; max-width: none; }
  .pbtn__you { display: none !important; }
  .panel__contact { grid-template-columns: 1fr; }
  .panel__contact .btn { width: 100%; }
  .doors__m { margin-top: 3vh; }
}
@media (max-width: 480px) {
  .doors__plate { letter-spacing: .16em; }
  .topbar__panel-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topbar__panel { padding: 0 14px; }
  .hud { gap: 9px; padding: 0 12px 0 10px; }
  .hud__odo { font-size: 19px; }
  .panel__head { padding-inline: 0; }
  .panel__title { font-size: 30px; }
}
@media (max-width: 360px) {
  .topbar__name { font-size: 21px; }
  .pbtn__name { font-size: 13px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .doors__m { font-size: 38vh; margin-top: 0; }
  .doors__led { top: 12px; transform: translateX(-50%) scale(.8); transform-origin: 50% 0; }
}

/* ---------- 16 · Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn__dot::after, .rail__beacon, .doors__arrow.is-blink, .hud.is-express .hud__odo::after, .doors__pass i { animation: none; }
  .doors__pass { display: none; }
  .scale-cur__label, .arrive, .arrive.is-on { transition: opacity .15s linear, visibility 0s; transform: none; }
  .lamp { transition: none; }
  .btn::before { transition: none; }
  .scale-cur__s { transition: none; }
  .btn:hover::before { transform: translateX(130%); }
  .panel { transition-duration: .01s; clip-path: none; opacity: 0; }
  .panel.is-open { opacity: 1; transition: opacity .25s linear, visibility 0s; clip-path: none; }
  .panel__face, .pbtn, .panel__contact { transform: none; transition: opacity .25s linear; }
  .topbar::before, .topbar::after, .topbar__brand, .topbar__actions { transition-duration: .01s; }
  .hud { transform: none; }
  .dock { transition-duration: .01s; }
}
