@font-face {
  font-family: "Lift Sans";
  src: url("lift-sans.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../space-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ice: #e7eef9;
  --ink: #142343;
  --muted: #455575;
  --blue: #304cce;
  --line: #aebee1;
  --font: "Space Grotesk", "Lift Sans", "PingFang SC", "Microsoft Yahei", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", "Lift Sans", monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 0;
  background:
    radial-gradient(ellipse at 72% 33%, #f7f8ff 0, transparent 55%),
    radial-gradient(ellipse at 10% 4%, #d4defa, transparent 59%),
    var(--ice);
  color: var(--ink);
  font-family: var(--font);
}
button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid #4f45d4; outline-offset: 4px; }
.airspace { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.air-line { animation: air-drift 12s ease-in-out infinite alternate; }
@keyframes air-drift { to { transform: translate(38px, -16px); } }

.deck {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template:
    "elevator intro" minmax(0, 1fr)
    "elevator controls" auto
    "elevator operator" minmax(0, .6fr)
    / minmax(0, 1.26fr) minmax(0, .74fr);
  gap: clamp(16px, 2.5vh, 24px) clamp(26px, 4.5vw, 72px);
  width: min(100%, 1440px);
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  margin: auto;
  padding: clamp(20px, 4.65vh, 61px) clamp(22px, 5.4vw, 77px);
}

.intro {
  grid-area: intro;
  align-self: end;
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 clamp(11px, 2vh, 22px);
  color: var(--muted);
  font-size: .88rem;
  font-weight: 650;
  white-space: nowrap;
}
.brand b { color: var(--ink); font-size: 1rem; font-weight: 750; letter-spacing: -.04em; }
.brand-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 6px #3857bb2b;
}
.brand-mark svg, .controls svg, .production-sign svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-separator { width: 13px; height: 1px; background: #98add3; }
h1 {
  margin: 0;
  font-size: clamp(4rem, min(8.6vw, 14.8svh), 8.3rem);
  font-weight: 900;
  line-height: .99;
  letter-spacing: -.09em;
  white-space: nowrap;
}
h1 span { display: block; }
h1 span + span { color: var(--blue); }

.destination {
  display: flex;
  align-items: center;
  gap: .43em;
  width: fit-content;
  margin: clamp(13px, 2.3vh, 25px) 0 0;
  padding: 4px 11px;
  border: 1px solid #a8bae9;
  border-radius: 7px;
  background: #dfe8ff;
  color: #314878;
  font-size: .88rem;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}
.destination strong {
  color: #293ea8;
  font-size: clamp(1.28rem, 2.3vw, 2rem);
  font-weight: 700;
  letter-spacing: -.075em;
}
.tagline {
  margin: clamp(10px, 1.8vh, 21px) 0 0;
  color: var(--muted);
  font-size: clamp(.96rem, 1.35vw, 1.17rem);
  line-height: 1.58;
}

.elevator {
  grid-area: elevator;
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #3d5685;
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 50% 18%, #3e5280, transparent 66%),
    repeating-linear-gradient(0deg, transparent 0 3px, #e1e9ff06 3px 4px),
    linear-gradient(143deg, #24385f, #14284c 45%, #101f42);
  box-shadow: 0 18px 38px #1a346245, inset 0 1px #b3c3f093;
}

.wiring { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.floor-display {
  position: absolute;
  top: clamp(5px, 1.7%, 17px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .58em;
  min-height: 43px;
  padding: 4px 12px;
  border: 1px solid #7694ce;
  border-radius: 8px;
  background: linear-gradient(155deg, #151f49, #101a3a);
  color: #d9e9ff;
  box-shadow: 0 4px 12px #0d1d42ad, inset 0 1px #aac2fa26;
  font-size: .83rem;
  font-weight: 680;
  white-space: nowrap;
}

.floor-lamp {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aafcdd;
  box-shadow: 0 0 10px #98ffe5b0;
}
.floor-caption { margin-right: .2em; }
.floor {
  min-width: 2.25em;
  color: #a4ffe2;
  font: 700 clamp(1.36rem, 3.05vw, 2.22rem) / 1 var(--mono);
  text-align: center;
  letter-spacing: -.08em;
  text-shadow: 0 0 14px #78ffd88c;
}
.elevator[data-phase="ascending"] .floor-lamp,
.elevator[data-phase="descending"] .floor-lamp { animation: lamp .45s steps(2, jump-none) infinite; }
@keyframes lamp { 50% { opacity: .35; } }

.portal {
  position: absolute;
  z-index: 1;
  inset: clamp(61px, 12.3%, 97px) clamp(13px, 7.4%, 65px) clamp(13px, 6.8%, 51px);
  display: grid;
  overflow: hidden;
  isolation: isolate;
  border: 2px solid #a8c1ee;
  border-radius: 16px 16px 6px 6px;
  background: #17284e;
  box-shadow: 0 0 0 5px #111e3e, 0 0 0 6px #8ca9e164, 0 2px 27px #182748a8;
}

.outside, .cloudscape, .mist {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.outside {
  overflow: hidden;
  background: linear-gradient(180deg, #3b6298, #c8def0 58%, #aabdd5);
}
.cloudscape { display: block; object-fit: cover; object-position: 52% 52%; }
.mist { opacity: .8; mix-blend-mode: screen; transform: scale(1.25); }
.elevator[data-phase="open"] .mist { animation: gust 3.8s linear infinite; }
@keyframes gust {
  0% { opacity: 0; transform: translateX(-27%) scale(1.28); }
  39% { opacity: .74; }
  100% { opacity: 0; transform: translateX(29%) scale(1.28); }
}
.outside::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #17275143, transparent 15% 85%, #17275143),
    linear-gradient(0deg, #11204770, transparent 26%);
  content: "";
}

.production-sign {
  position: absolute;
  z-index: 2;
  top: 25%;
  left: 61%;
  display: flex;
  align-items: center;
  gap: .55em;
  max-width: 39%;
  padding: .5em .67em;
  border: 1px solid #ddfbff;
  border-radius: 5px;
  background: #172f54ee;
  box-shadow: 0 4px 12px #24365b72, inset 0 0 9px #8dc5fb48;
  color: #f7fdff;
  transform: rotate(-7deg);
}
.production-sign svg { width: 1.43em; height: 1.43em; flex: none; color: #adf8ed; }
.production-sign strong, .production-sign span { display: block; line-height: 1.15; white-space: nowrap; }
.production-sign strong { font-size: .85em; }
.production-sign span { margin-top: 3px; color: #ccdeff; font-size: .67em; }

.door {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
  border-bottom: 2px solid #c6d7ef;
  background:
    repeating-linear-gradient(91deg, #243e640c 0 1px, transparent 1px 5px),
    linear-gradient(128deg, transparent 17%, #f3f7ff46 29%, #b5c9eb14 43%, transparent 48%),
    linear-gradient(168deg, #a3b7d4, #e3edfd 22%, #9dafcf 67%, #7e94bf);
  transition: transform .72s cubic-bezier(.72, .05, .22, .99);
}
.door::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #1d356647, transparent 28% 85%, #e8f3ff47);
  pointer-events: none;
  content: "";
}
.door-left {
  left: 0;
  border-right: 2px solid #e4f3ff;
  transform: translateX(-3%);
  box-shadow: inset -6px 0 18px #4a648e52, 3px 0 18px #17345c70;
}
.door-right {
  right: 0;
  border-left: 2px solid #ecf5ff;
  transform: translateX(3%);
  box-shadow: inset 6px 0 18px #34496d4c, -3px 0 18px #17345c70;
}

.etch { position: absolute; top: 12%; left: 0; width: 100%; height: 72%; overflow: hidden; opacity: .95; }
.elevator[data-phase="ascending"] .door,
.elevator[data-phase="descending"] .door,
.elevator[data-phase="closed"] .door { transform: translateX(0); }
.elevator[data-phase="open"] .door-left { transform: translateX(-102%); }
.elevator[data-phase="open"] .door-right { transform: translateX(102%); }

.shaft-lights {
  position: absolute;
  z-index: 4;
  inset: 0;
  border-inline: 3px solid #d4e4ff;
  border-top: 1px solid #d5e8ffb5;
  border-radius: inherit;
  box-shadow: inset 0 0 16px #526aa747;
  pointer-events: none;
}
.elevator[data-phase="open"] .shaft-lights {
  border-inline-color: #abffe2;
  box-shadow: inset 0 0 22px #63ffdc48;
}

.threshold {
  position: absolute;
  z-index: 2;
  inset: auto 8% clamp(8px, 4.5%, 36px);
  height: clamp(4px, 1.5%, 11px);
  border-top: 1px solid #d3e1ffb3;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, #6683bb38 0 5px, transparent 5px 10px), #243e67;
  box-shadow: inset 0 -2px #122241;
}

.viewport {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  align-items: end;
  justify-content: center;
  width: 100%;
  padding: 9px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.viewport:focus-visible { outline: 3px solid #7465eb; outline-offset: -5px; }
.gesture-hint {
  padding: 5px 9px;
  border: 1px solid #c8d9ffb3;
  border-radius: 6px;
  background: #14284bea;
  color: #eaf5ff;
  box-shadow: 0 2px 8px #17234659;
  font-size: .78rem;
  font-weight: 650;
  white-space: nowrap;
}

.parcel {
  --runway: 110%;
  --flight-time: 1.44s;
  position: absolute;
  z-index: 3;
  isolation: isolate;
  top: 61%;
  left: 26%;
  display: grid;
  place-items: center;
  width: max-content;
  min-height: 42px;
  max-width: 65%;
  padding: .45em .64em;
  border: 2px solid #b2caff;
  border-radius: 7px;
  background: #273f71;
  color: #edf5ff;
  box-shadow: inset 0 0 10px #fff9, 3px 6px 0 #3e81bf8c, 0 5px 22px #71d9ff8f;
  font: 700 clamp(.74rem, 1.65vw, .98rem) / 1.15 var(--mono);
  white-space: nowrap;
  opacity: 0;
}
.parcel::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: 5px;
  background:
    linear-gradient(155deg, #edfaff78 0 27%, transparent 28% 55%, #e9ffffad 56% 71%, transparent 72%),
    linear-gradient(125deg, #b8f7ff, #d9f1ff 62%, #9bccec);
  opacity: 0;
  content: "";
}
.parcel code { font: inherit; }
.elevator[data-parcel="flying"] .parcel { animation: return-to-sender var(--flight-time) cubic-bezier(.43, .03, .57, 1) both; }
.elevator[data-parcel="flying"] .parcel::before { animation: frost-over var(--flight-time) linear both; }
.elevator[data-parcel="returned"] .parcel { color: #18345b; opacity: 1; transform: translate(-9%, 48%) rotate(-10deg) scale(.9); }
.elevator[data-parcel="returned"] .parcel::before { opacity: 1; }
@keyframes frost-over { 0%, 49% { opacity: 0; } 59%, 100% { opacity: 1; } }
@keyframes return-to-sender {
  0% { color: #edf5ff; opacity: 0; transform: translate(-22%, 155%) rotate(-9deg) scale(1.15); }
  15% { opacity: 1; }
  49% { color: #edf5ff; }
  54% { opacity: .85; transform: translate(var(--runway), -105%) rotate(24deg) scale(.32); }
  59% { color: #18345b; }
  68% { opacity: 1; transform: translate(74%, -80%) rotate(34deg) scale(.46); }
  100% { color: #18345b; opacity: 1; transform: translate(-9%, 48%) rotate(-10deg) scale(.9); }
}

.controls {
  grid-area: controls;
  align-self: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 50px;
  padding: 7px 9px;
  border: 1px solid #b0bfe4;
  border-radius: 9px;
  font-size: .94rem;
  font-weight: 750;
  white-space: nowrap;
  touch-action: manipulation;
  transition: background .15s, transform .15s;
}
.controls button:active { transform: translateY(2px); }
.controls svg { width: 18px; height: 18px; flex: none; }
.controls .ride {
  border-color: #334fca;
  background: #304cce;
  color: #fff;
  box-shadow: 0 4px 0 #2339a2, 0 7px 13px #2648c52b;
}
.controls .ride:hover { background: #243dbd; }
.controls .ship { background: #f3f6ff; color: #263b72; }
.controls .ship:hover { background: #e9edff; }
.controls button[aria-disabled="true"] { cursor: progress; }

.operator {
  grid-area: operator;
  align-self: start;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 68px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4f7ffcc;
}
.operator-face { flex: none; width: 42px; height: 42px; }
.pixel-eyes { animation: blink 7s linear infinite; transform-origin: center 44%; }
@keyframes blink { 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(.18); } }
.operator-copy { min-width: 0; }
.operator h2 {
  margin: 0 0 3px;
  color: #344d92;
  font: 700 .73rem / 1.15 var(--mono);
  letter-spacing: .045em;
}
.operator h2 span { color: #4b5c82; letter-spacing: 0; }
.operator p {
  margin: 0;
  color: var(--ink);
  font-size: .91rem;
  font-weight: 640;
  line-height: 1.36;
  overflow-wrap: anywhere;
}

@media (max-width: 990px) {
  .deck { column-gap: 23px; }
  .controls button { font-size: .86rem; }
}

@media (max-width: 700px) {
  .deck {
    grid-template: "intro" auto "elevator" minmax(130px, 1fr) "controls" auto "operator" auto / minmax(0, 1fr);
    gap: clamp(7px, 1.4svh, 11px);
    min-height: 0;
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }
  .intro {
    align-self: start;
    display: grid;
    grid-template: "brand brand" auto "title destination" auto "tagline tagline" auto / minmax(0, 1fr) auto;
    align-items: end;
    gap: 4px 8px;
  }
  .brand { grid-area: brand; margin: 0 0 2px; font-size: .73rem; gap: 6px; }
  .brand b { font-size: .89rem; }
  .brand-mark { width: 21px; height: 21px; border-radius: 5px; }
  .brand-mark svg { width: 14px; height: 14px; }
  .brand-separator { width: 8px; }
  h1 { grid-area: title; font-size: clamp(2.18rem, 10.9vw, 4.4rem); letter-spacing: -.075em; }
  h1 span { display: inline; }
  .destination { grid-area: destination; margin: 0; align-self: center; padding: 4px 6px; font-size: .72rem; }
  .destination strong { font-size: 1.4rem; }
  .tagline { grid-area: tagline; margin: 0; font-size: .81rem; line-height: 1.35; }
  .tagline br { display: none; }
  .elevator { border-radius: 15px; }
  .portal {
    inset: clamp(38px, 12.3%, 67px) clamp(10px, 6.4%, 35px) clamp(12px, 6.2%, 34px);
    border-radius: 9px 9px 4px 4px;
    box-shadow: 0 0 0 3px #151e3d, 0 0 0 4px #8faee875, 0 2px 13px #151e3d72;
  }
  .threshold { inset-inline: 7.5%; bottom: clamp(5px, 3.65%, 20px); }
  .floor-display { min-height: 26px; padding: 2px 7px; font-size: .69rem; border-radius: 5px; }
  .floor-lamp { width: 5px; height: 5px; }
  .floor { font-size: 1.18rem; }
  .production-sign { font-size: .83rem; }
  .gesture-hint { padding: 4px 7px; font-size: .7rem; }
  .viewport { padding: 5px; }
  .controls { gap: 7px; padding-bottom: 3px; }
  .controls button { min-height: 42px; gap: 5px; padding: 5px; font-size: .85rem; }
  .controls svg { width: 16px; height: 16px; }
  .operator { min-height: 49px; gap: 7px; padding: 6px 7px; }
  .operator-face { width: 32px; height: 32px; }
  .operator h2 { margin-bottom: 1px; font-size: .66rem; }
  .operator p { font-size: .79rem; }
}

@media (max-width: 360px) {
  .tagline { font-size: .76rem; }
}

@media (orientation: landscape) and (max-height: 519px) and (min-width: 600px) {
  .deck {
    grid-template:
      "elevator intro" minmax(0, 1fr)
      "elevator controls" auto
      "elevator operator" auto
      / minmax(0, 1.04fr) minmax(0, .96fr);
    align-items: stretch;
    gap: 8px 15px;
    min-height: 0;
    padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .intro { display: block; align-self: end; }
  .brand { margin-bottom: 6px; }
  h1 { font-size: clamp(2.5rem, 6.8vw, 3.6rem); }
  h1 span { display: inline; }
  .destination { margin-top: 7px; }
  .tagline { margin-top: 6px; font-size: .78rem; line-height: 1.32; }
  .tagline br { display: none; }
  .elevator { border-radius: 14px; }
  .portal { top: 41px; }
  .floor-display { min-height: 28px; padding: 2px 8px; font-size: .7rem; }
  .floor { font-size: 1.25rem; }
  .controls button { min-height: 38px; }
  .operator { min-height: 48px; padding: 5px 7px; }
  .operator-face { width: 31px; height: 31px; }
  .operator h2 { font-size: .67rem; }
  .operator p { font-size: .77rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}
