/* Marching-pair In flight strip (desktop). Loaded on the journey and flight-ops routes.
   Does not touch .flight-strip. --pair-card is the card-width token
   (not the site colour token --card). */

.inflight-strip {
  display: none;
  --gutter: 80px;
  --gap: 24px;
  --pair-card: clamp(270px, 26vw, 520px);
  --band: calc(100vw - (var(--gutter) * 2));
  --pair: calc((var(--pair-card) * 2) + var(--gap));
  --free: calc(var(--band) - var(--pair));
  --step: max(0px, calc(var(--free) / 3));
  --beat: 0;
}

@media (max-width: 1599px) {
  .inflight-strip {
    --gutter: 56px;
  }
}

@media (min-width: 1024px) {
  .stage.in-space .inflight-strip {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--strip-h);
    box-sizing: border-box;
    background: var(--strip);
    z-index: 12;
    pointer-events: none;
  }

  .stage.in-space .inflight-strip::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -5px;
    height: 5px;
    background: var(--ink);
  }
}

.inflight-window {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 18px;
  bottom: 18px;
}

.inflight-exit {
  position: absolute;
  left: 0;
  top: 50%;
  width: var(--free);
  margin: 0;
  padding: 0 8px 0 0;
  transform: translateY(-50%);
  font: 700 12px/1.2 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
}

.inflight-strip[data-beat="3"] .inflight-exit {
  opacity: 1;
  transition: opacity 200ms ease 280ms;
}

.inflight-pair {
  display: flex;
  align-items: stretch;
  gap: var(--gap);
  height: 100%;
  width: var(--pair);
  position: relative;
  z-index: 1;
  transform: translateX(calc(var(--step) * var(--beat)));
  transition: transform 480ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.inflight-card {
  flex: 0 0 var(--pair-card);
  width: var(--pair-card);
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  background: var(--card);
  padding: 12px 14px 14px;
  outline: none;
  box-shadow: none;
}

.inflight-card--teal {
  border-top: 3px solid var(--teal);
}

.inflight-card--amber {
  border-top: 3px solid var(--amber);
}

.inflight-card--gold {
  border-top: 3px solid var(--gold);
}

.inflight-card__label {
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 8px;
}

.inflight-card__body {
  font: 400 16px/1.45 var(--body);
  color: #c3c9d3;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .inflight-pair {
    transition: none;
  }

  .inflight-strip[data-beat="3"] .inflight-exit {
    transition: none;
  }
}

@media (max-width: 1023px) {
  .inflight-strip {
    display: none !important;
  }
}
