/* Call elevator button. One pill of soft brushed aluminium (.lift__body, moved only by GSAP) on pure white: a light
   metal base with a fine horizontal brush, a 1px edge that catches the light on top, a layered shadow on the floor and
   a soft light under the pointer. On the left a small tile with the two lift doors in steel and a lit cabin behind
   them; in the middle the words; on the right the floor display with the call arrow, two rolling digit slots and a
   thin track where a short line runs down while the lift moves. The thin rings (.lift__ring) are the chime. */
:root {
  --page: #ffffff;             /* the page */
  --metal-hi: #fdfdfe;         /* the top of the aluminium, where it catches the light */
  --metal-lo: #e6e8ed;         /* the bottom of the aluminium */
  --edge: rgba(22, 26, 36, 0.1); /* the 1px edge */
  --ink: #15181e;              /* the words and the digits */
  --muted: #6c727d;            /* the small words */
  --steel-hi: #f1f3f6;         /* the doors, top */
  --steel-lo: #c6ccd5;         /* the doors, bottom */
  --accent: #2f5bff;           /* the one accent: the arrow, the moving floor, the chime, the cabin light */
  --cabin: #e9efff;            /* the light inside the cabin */
  --focus: #2f5bff;            /* the keyboard focus ring */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px 0;
}

.lift {
  position: relative;
  width: min(88vw, 332px);
  height: 60px;
}

/* the soft shadow on the floor: it tightens when pressed */
.lift__shadow {
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: -10px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20, 28, 52, 0.2), rgba(20, 28, 52, 0));
  filter: blur(6px);
  pointer-events: none;
}

/* the chime: a thin pill outline that opens out from the button and fades */
.lift__ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  opacity: 0;
  pointer-events: none;
}

.lift__btn {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lift__btn:focus {
  outline: none;
}

.lift__btn:focus-visible .lift__body {
  box-shadow:
    0 0 0 2px var(--page),
    0 0 0 4px var(--focus),
    0 1px 1px rgba(16, 22, 38, 0.06),
    0 6px 16px -6px rgba(16, 22, 38, 0.2);
}

.lift__body {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--edge),
    0 1px 1px rgba(16, 22, 38, 0.06),
    0 3px 6px -2px rgba(16, 22, 38, 0.08),
    0 12px 26px -12px rgba(16, 22, 38, 0.28);
  will-change: transform;
}

.lift__metal {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--metal-hi) 0%, #f3f4f7 46%, var(--metal-lo) 100%);
}

/* the 1px top edge of light, and a darker lip at the bottom */
.lift__metal::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(16, 22, 38, 0.07);
}

/* the fine horizontal brush of the aluminium */
.lift__brush {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0 1px, rgba(120, 128, 142, 0.05) 1px 2px, rgba(255, 255, 255, 0) 2px 3px);
  mix-blend-mode: soft-light;
}

/* the soft light under the pointer */
.lift__shine {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(150px 70px at var(--mx, 50%) var(--my, 0px), rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
  pointer-events: none;
}

/* the light from the open cabin spilling on the metal */
.lift__spill {
  position: absolute;
  left: -30px;
  top: -20px;
  width: 170px;
  height: 100px;
  opacity: 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent);
  pointer-events: none;
}

.lift__row {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 8px 16px 8px 9px;
  gap: 12px;
}

/* the little lift doors */
.lift__doors {
  position: relative;
  flex: none;
  width: 40px;
  height: 44px;
  border-radius: 13px;
  overflow: hidden;
  background: #b8bfca;
  box-shadow: inset 0 1px 2px rgba(16, 22, 38, 0.28), 0 1px 0 rgba(255, 255, 255, 0.9);
}

.lift__cabin {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #ffffff, var(--cabin) 60%, color-mix(in srgb, var(--accent) 26%, var(--cabin)));
}

.lift__cabin-light {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 3px;
  height: 2px;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 0 6px 1px color-mix(in srgb, var(--accent) 55%, #ffffff);
}

.lift__cabin-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 22%, #d9dfec), color-mix(in srgb, var(--accent) 34%, #c9d1e3));
}

.lift__door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  will-change: transform;
}

.lift__door--l {
  left: 0;
}

.lift__door--r {
  right: 0;
}

.lift__door-face {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--steel-hi), #dde1e7 55%, var(--steel-lo));
}

/* the seam in the middle, a light edge on one side and a dark one on the other */
.lift__door--l .lift__door-face {
  box-shadow: inset -1px 0 0 rgba(16, 22, 38, 0.22), inset 1px 0 0 rgba(255, 255, 255, 0.6);
}

.lift__door--r .lift__door-face {
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.8), inset -1px 0 0 rgba(16, 22, 38, 0.08);
}

/* a faint vertical brush on the door steel */
.lift__door-face::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.6) 0 1px, rgba(110, 118, 132, 0.08) 1px 2px);
}

.lift__frame {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(16, 22, 38, 0.12), inset 0 2px 3px -1px rgba(16, 22, 38, 0.25);
  pointer-events: none;
}

/* the words */
.lift__words {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.lift__stack {
  display: grid;
  overflow: hidden;
  padding: 0 2px;
  margin: 0 -2px;
}

.lift__stack > * {
  grid-area: 1 / 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lift__label {
  font-size: 15.5px;
  line-height: 20px;
  font-weight: 640;
  letter-spacing: -0.012em;
  color: var(--ink);
  font-variation-settings: 'wdth' var(--w, 100);
}

.lift__sub {
  font-size: 12px;
  line-height: 16px;
  font-weight: 480;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* the floor display */
.lift__display {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding-left: 12px;
}

.lift__display::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(180deg, rgba(16, 22, 38, 0), rgba(16, 22, 38, 0.14), rgba(16, 22, 38, 0));
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.9);
}

.lift__arrow {
  display: block;
  width: 14px;
  height: 16px;
  will-change: transform;
}

.lift__arrow svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.lift__arrow path {
  fill: none;
  stroke: #9aa0aa;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lift__digits {
  display: flex;
  justify-content: flex-end;
  min-width: 30px;
  font-size: 24px;
  line-height: 30px;
  font-weight: 620;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.lift__slot {
  position: relative;
  display: block;
  width: 0.62em;
  height: 30px;
  overflow: hidden;
}

.lift__ch {
  position: absolute;
  inset: 0;
  text-align: center;
  will-change: transform;
}

/* the track where a short line runs down while the lift moves */
.lift__track {
  position: relative;
  display: block;
  width: 2px;
  height: 22px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(16, 22, 38, 0.08);
}

.lift__run {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
}

@media (max-width: 360px) {
  .lift__row {
    gap: 10px;
    padding-right: 13px;
  }

  .lift__label {
    font-size: 14.5px;
  }

  .lift__sub {
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lift__body,
  .lift__door,
  .lift__ch {
    will-change: auto;
  }
}
