:root {
  --accent: #e9a675;
  --header-color: #243d4c;
  --nav-active: #243d4c;
  --nav-ink: #fff5e9;
}
body {
  background: #d9e3dc;
  color: #243d4c;
  overflow: hidden;
}
#departure,
.vignette,
.scan-grain,
.airport-fallback,
#sky-wash {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
#departure {
  outline: 0;
}
.vignette {
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, #f0eee3b5, transparent 68%),
    linear-gradient(0deg, #dbe3d238, transparent 40%);
  transition: opacity 1s;
}
.scan-grain {
  z-index: 2;
  pointer-events: none;
  opacity: 0.023;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#sky-wash {
  background: #f5f3e8;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}
.airport-fallback {
  z-index: -1;
  background: linear-gradient(#97bdce, #e7e6cf 60%, #c4cabf 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.fallback-door {
  height: 65%;
  width: 20%;
  border: 8px solid #b5c0ba;
  background: linear-gradient(100deg, #cce0d8bb, #e9f0e0bb);
  transition: transform 2s;
  transform: scale(var(--walk-scale, 1));
}
.fallback-door.left {
  translate: calc(-1 * var(--gate-open, 0%)) 0;
}
.fallback-door.right {
  translate: var(--gate-open, 0%) 0;
}
.webgl-failed .airport-fallback {
  z-index: 0;
}
.webgl-failed #departure {
  opacity: 0;
}
.webgl-failed.in-flight .airport-fallback {
  background:
    radial-gradient(ellipse at 70% 55%, #fffcf0 0%, transparent 40%),
    linear-gradient(#78aeca, #dbe8e4);
}
.webgl-failed.in-flight .fallback-door {
  opacity: 0;
}
.intro {
  position: relative;
  z-index: 4;
  height: 100svh;
  min-height: 650px;
  padding: 125px 5% 65px;
}
.intro-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gate-ticket {
  display: flex;
  gap: 17px;
  align-items: center;
  background: #f2f0e8e8;
  border: 1px solid #233e4b66;
  padding: 12px 18px;
  box-shadow: 0 4px 25px #2b3c4020;
}
.gate-ticket > span:first-child {
  font: 10px monospace;
  letter-spacing: 0.14em;
  writing-mode: vertical-rl;
}
.gate-ticket strong {
  font: 48px/0.9 Arial;
  letter-spacing: -0.07em;
}
.gate-ticket > span:last-child {
  font: 8px/1.7 monospace;
  border-left: 1px dashed #243d4c55;
  padding-left: 18px;
}
.intro-top > .mono {
  text-align: right;
  font-size: 8px;
  line-height: 1.8;
}
.intro-copy {
  margin-top: 45px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
}
.intro-copy h1 {
  font-size: clamp(47px, 6vw, 95px);
  font-weight: 500;
  letter-spacing: 0.015em;
  line-height: 1.28;
  margin: 24px 0;
}
.intro-copy p {
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
}
.start-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 285px;
  margin-top: 30px;
  background: #243d4c;
  color: #f7f1e5;
  padding: 20px 24px;
  font-size: 13px;
}
.start-button:hover {
  background: #365d73;
}
.start-button span {
  font-size: 23px;
}
.intro-controls {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 17px;
  font-size: 8px;
  color: #4c6570;
}
.intro-controls > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
kbd {
  font: 10px monospace;
  border: 1px solid #425d6666;
  padding: 3px 5px;
  border-radius: 2px;
}
.intro-bottom {
  position: absolute;
  bottom: 70px;
  left: 5%;
  right: 5%;
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.passage-word {
  font-size: clamp(35px, 6.2vw, 98px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.065em;
  color: transparent;
  -webkit-text-stroke: 1px #26495788;
}
.passage-word > span {
  font-size: 15px;
  vertical-align: top;
  margin-left: 6px;
}
.intro-bottom > .mono {
  font-size: 8px;
  line-height: 1.8;
  text-align: right;
}
.corner-caption {
  position: fixed;
  bottom: 24px;
  left: 3.4%;
  right: 3.4%;
  z-index: 7;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.corner-caption .mono {
  font-size: 8px;
  opacity: 0.65;
}
.corner-caption .motion-toggle {
  font-size: 8px;
  padding: 6px 9px;
  background: #f2efe578;
}
.game-ui {
  position: fixed;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}
.game-ui button {
  pointer-events: auto;
}
.location {
  position: absolute;
  top: 120px;
  left: 4%;
  display: grid;
  gap: 12px;
}
.location .mono {
  font-size: 8px;
}
.location strong {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.06em;
}
.reticle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 300;
  opacity: 0.35;
}
.story-note {
  position: absolute;
  right: 5%;
  top: 38%;
  padding: 24px 26px;
  border-left: 1px solid #4c6d78;
  background: linear-gradient(90deg, #f1f1e4b8, transparent);
  max-width: 360px;
}
.story-note .mono {
  font-size: 8px;
  color: #5a737c;
}
.story-note p {
  font-size: 18px;
  line-height: 1.8;
  margin-top: 18px;
}
.game-bottom {
  position: absolute;
  bottom: 100px;
  left: 4%;
  right: 4%;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 25px;
}
.distance {
  width: 190px;
}
.distance .mono {
  font-size: 7px;
}
.distance strong {
  display: block;
  font-size: 48px;
  line-height: 1.1;
  font-weight: 300;
  letter-spacing: -0.07em;
  margin-top: 10px;
}
.distance small {
  font-size: 16px;
  margin-left: 10px;
  letter-spacing: 0;
}
.distance-track {
  height: 2px;
  background: #244c6633;
  margin-top: 15px;
}
.distance-track i {
  height: 2px;
  background: #365f73;
  display: block;
  width: 0;
}
.movement-pad {
  display: flex;
  gap: 10px;
}
.movement-pad button {
  background: #f2f0e8b8;
  border: 1px solid #243d4c66;
  width: 66px;
  height: 70px;
  font-size: 25px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.movement-pad button:active,
.movement-pad button.held {
  background: #243d4c;
  color: #f4f1e4;
}
.movement-pad button:disabled {
  opacity: 0.25;
}
.movement-pad small {
  display: block;
  font-size: 9px;
  margin-top: 4px;
}
.game-options {
  display: grid;
  gap: 8px;
}
.game-options button {
  background: #f2f0e8b8;
  border: 1px solid #243d4c66;
  font: 8px monospace;
  padding: 10px 14px;
  text-align: left;
}
.keyboard-hint {
  position: absolute;
  bottom: 66px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  white-space: nowrap;
  opacity: 0.7;
}
.skip-flight {
  position: absolute;
  bottom: 210px;
  left: 50%;
  transform: translateX(-50%);
  background: #243d4c;
  color: #f4f0e3;
  font-size: 10px;
  padding: 13px 18px;
}
.cinematic .reticle {
  display: none;
}
.in-flight .vignette {
  opacity: 0.3;
}
.in-flight .distance,
.in-flight .movement-pad {
  opacity: 0;
  pointer-events: none;
}
.in-flight .story-note {
  top: 24%;
  right: 8%;
  border-left: 0;
  background: transparent;
}
.arrival {
  position: fixed;
  inset: 0;
  z-index: 6;
  background: linear-gradient(90deg, #eaf0e6d9, transparent 78%);
  padding: 19vh 7% 90px;
  overflow-y: auto;
  animation: arrival-reveal 1.6s both;
}
.arrival[hidden] {
  display: none;
}
.arrival .sample-label {
  font-size: 9px;
}
.arrival h2 {
  font-size: clamp(40px, 6vw, 90px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.05em;
  margin: 35px 0 23px;
  position: relative;
}
.arrival > p {
  font-size: 14px;
  line-height: 2;
}
.arrival > .pill {
  margin-top: 34px;
  background: #243d4c;
  color: #f1f1e4;
  min-width: 320px;
}
.arrival-links {
  display: flex;
  gap: 24px;
  margin-top: 25px;
  font-size: 10px;
}
.arrival-links button {
  background: none;
  padding: 0;
}
.arrival-caption {
  display: block;
  margin-top: 50px;
  color: #526c77;
}
.pause-dialog {
  background: #f1efe5f0;
  color: #243d4c;
  border: 1px solid #243d4c66;
  width: min(440px, calc(100% - 40px));
  text-align: center;
  padding: 50px 30px;
  backdrop-filter: blur(20px);
}
.pause-dialog::backdrop {
  background: #203b4b70;
  backdrop-filter: blur(9px);
}
.pause-dialog h2 {
  font-size: 44px;
  font-weight: 400;
  margin: 30px 0 14px;
}
.pause-dialog p {
  font-size: 12px;
  margin-bottom: 30px;
}
.pause-dialog .pill {
  width: 100%;
  padding: 17px 24px;
}
.pause-dialog > button:last-child {
  display: block;
  background: none;
  font-size: 11px;
  margin: 25px auto 0;
}
.motion-reduced .scan-grain {
  display: none;
}
@keyframes arrival-reveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 700px) {
  .intro {
    padding: 110px 7% 50px;
    min-height: 640px;
  }
  .intro-top > .mono {
    display: none;
  }
  .gate-ticket {
    padding: 9px 12px;
    gap: 12px;
  }
  .gate-ticket strong {
    font-size: 34px;
  }
  .gate-ticket > span:last-child {
    font-size: 7px;
    padding-left: 12px;
  }
  .intro-copy {
    margin-top: 33px;
  }
  .eyebrow {
    font-size: 10px;
  }
  .intro-copy h1 {
    font-size: 12vw;
    margin: 24px 0;
  }
  .intro-copy p {
    font-size: 11px;
  }
  .start-button {
    width: 250px;
    padding: 17px 23px;
    margin-top: 25px;
  }
  .intro-controls {
    display: grid;
    gap: 9px;
  }
  .intro-bottom {
    bottom: 68px;
    left: 7%;
    right: 7%;
  }
  .passage-word {
    font-size: 11vw;
  }
  .intro-bottom > .mono {
    display: none;
  }
  .corner-caption {
    left: 6%;
    right: 6%;
    bottom: 22px;
  }
  .corner-caption .mono {
    font-size: 6px;
  }
  .location {
    top: 110px;
    left: 7%;
  }
  .location strong {
    font-size: 12px;
  }
  .story-note {
    top: auto;
    bottom: 265px;
    left: 7%;
    right: 7%;
    max-width: initial;
    padding: 15px 20px;
  }
  .story-note p {
    font-size: 15px;
    margin-top: 12px;
  }
  .game-bottom {
    left: 7%;
    right: 7%;
    bottom: 100px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .distance {
    width: 120px;
  }
  .distance .mono {
    font-size: 6px;
  }
  .distance strong {
    font-size: 40px;
  }
  .game-options {
    display: flex;
    position: absolute;
    right: 0;
    bottom: 112px;
    gap: 5px;
  }
  .game-options button {
    font-size: 7px;
    padding: 8px;
  }
  .movement-pad {
    gap: 8px;
  }
  .movement-pad button {
    width: 64px;
    height: 68px;
  }
  .keyboard-hint {
    font-size: 7px;
    bottom: 70px;
  }
  .skip-flight {
    bottom: 155px;
  }
  .cinematic .movement-pad {
    opacity: 0;
  }
  .arrival {
    padding: 38vh 7% 85px;
    background: linear-gradient(0deg, #edf0e8e6, transparent 90%);
  }
  .arrival h2 {
    font-size: 10.5vw;
    margin: 20px 0;
  }
  .arrival > p {
    font-size: 12px;
  }
  .arrival > .pill {
    min-width: 100%;
    margin-top: 25px;
  }
  .arrival-caption {
    font-size: 8px !important;
    margin-top: 30px;
  }
  .in-flight .story-note {
    top: 35%;
    left: 7%;
    right: 7%;
  }
  .vignette {
    background: linear-gradient(90deg, #f0eee3bd, #f0eee325);
  }
}
@media (max-height: 740px) and (min-width: 701px) {
  .intro {
    padding-top: 110px;
  }
  .intro-copy {
    margin-top: 22px;
  }
  .intro-copy h1 {
    font-size: 58px;
    margin: 18px 0;
  }
  .intro-copy p {
    font-size: 11px;
  }
  .start-button {
    margin-top: 20px;
    padding: 16px 24px;
  }
  .intro-bottom {
    bottom: 65px;
  }
  .passage-word {
    font-size: 45px;
  }
  .arrival {
    padding-top: 16vh;
  }
  .arrival h2 {
    font-size: 58px;
    margin: 20px 0;
  }
  .arrival-caption {
    margin-top: 28px;
  }
}
.vignette {
  background:
    linear-gradient(90deg, #f1eadb75, transparent 54%),
    linear-gradient(0deg, #142e4120, transparent 45%);
}
.intro {
  background: none;
}

.webgl-failed .fallback-door {
  display: none;
}
.arrival {
  background: linear-gradient(90deg, #eaf0e6cc, transparent 78%);
}
.intro-top > .mono {
  padding: 10px;
  background: #e9efe4a6;
}
.story-note {
  background: linear-gradient(90deg, #f5f0e2d4, transparent);
}
@media (max-width: 700px) {
  .vignette {
    background: linear-gradient(90deg, #f0eee3b0, #f0eee320);
  }
  .arrival {
    background: linear-gradient(0deg, #edf0e8ed, #edf0e866 65%, transparent);
  }
  .gate-ticket {
    max-width: 270px;
  }
}

.airport-fallback {
  display: none;
  background: #e7e8df;
  color: #243d4c;
  text-align: center;
  padding: 30px;
}
.webgl-failed .airport-fallback {
  display: grid;
  place-items: center;
  z-index: 5;
}
.airport-fallback p {
  margin: 18px 0;
  line-height: 1.8;
  font-size: 14px;
}
.airport-fallback button,
.airport-fallback a {
  display: inline-block;
  padding: 14px 22px;
  margin: 12px;
  background: #243d4c;
  color: #fff;
  font-size: 12px;
}
.webgl-failed .intro,
.webgl-failed .game-ui {
  display: none;
}
