/* The showroom: one pinned dark stage. The car stands in the middle and its details sit around it. */

.stage {
  position: relative;
  height: calc((100svh - var(--top)) * 6.80);
  background: #050D1A;
}

.stage__scene {
  --lit: 0;
  --film-w: min(1240px, 82vw, calc((100svh - var(--top)) * 1.44));
  --film-h: calc(var(--film-w) * 0.55);
  --ground: 75%;
  --film-top: calc(var(--ground) - var(--film-h) * 0.761);
  position: sticky;
  top: var(--top);
  height: calc(100svh - var(--top));
  overflow: hidden;
  background: #050D1A;
  color: var(--white);
}

/* Light on the back wall and on the floor. Both come up with the stage lights. */
.stage__scene::before,
.stage__scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stage__scene::before {
  background: radial-gradient(46% 42% at 50% 40%, rgba(24, 74, 150, 0.5), transparent 72%);
  opacity: var(--lit);
}

.stage__scene::after {
  background: radial-gradient(58% 17% at 50% 77%, rgba(52, 104, 190, 0.5), transparent 74%);
  opacity: calc(0.12 + 0.88 * var(--lit));
}

.stage__wall {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(100% - var(--film-top) - var(--film-h) * 0.27);
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 26px);
  transform: translateX(-50%);
  opacity: calc(0.08 + 0.7 * var(--lit));
  filter: drop-shadow(0 0 16px rgba(150, 195, 255, 0.5));
}

.stage__sign {
  width: auto;
  height: clamp(20px, 3.3vh, 30px);
}

.stage__sign--hm {
  height: clamp(32px, 5.4vh, 50px);
}

.stage__rule {
  width: 2px;
  height: clamp(28px, 4.6vh, 42px);
  background: rgba(255, 255, 255, 0.45);
}

.stage__beams {
  position: absolute;
  z-index: 3;
  inset: 0;
  opacity: var(--lit);
  mix-blend-mode: screen;
  pointer-events: none;
}

.stage__beams i {
  position: absolute;
  top: -6%;
  left: 50%;
  width: clamp(200px, 26vw, 420px);
  height: 86%;
  margin-left: calc(clamp(200px, 26vw, 420px) / -2);
  background: linear-gradient(to bottom, rgba(170, 205, 255, 0.34), rgba(170, 205, 255, 0.07) 62%, transparent 92%);
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
  filter: blur(22px);
  transform-origin: 50% 0;
}

.stage__beams i:nth-child(1) {
  transform: translateX(-34vw) rotate(-13deg);
}

.stage__beams i:nth-child(2) {
  opacity: 0.55;
}

.stage__beams i:nth-child(3) {
  transform: translateX(34vw) rotate(13deg);
}

.stage__film {
  position: absolute;
  z-index: 2;
  top: var(--film-top);
  left: 50%;
  width: var(--film-w);
  height: var(--film-h);
  margin-left: calc(var(--film-w) / -2);
}

.stage__film canvas {
  display: block;
  width: 100%;
  height: 100%;
  -webkit-mask-image: radial-gradient(50% 58% at 50% 56%, #000 62%, transparent 100%);
  mask-image: radial-gradient(50% 58% at 50% 56%, #000 62%, transparent 100%);
}

.stage__fog {
  position: absolute;
  z-index: 3;
  inset: 0;
  opacity: calc(0.9 * var(--lit));
  pointer-events: none;
}

.stage__fog i {
  position: absolute;
  top: calc(var(--film-top) + var(--film-h) * 0.6);
  left: -20%;
  width: 90%;
  height: calc(var(--film-h) * 0.44);
  background: radial-gradient(closest-side, rgba(150, 185, 240, 0.2), transparent);
  filter: blur(26px);
  animation: stage-fog 26s ease-in-out infinite alternate;
}

.stage__fog i:nth-child(2) {
  left: 34%;
  top: calc(var(--film-top) + var(--film-h) * 0.66);
  animation-duration: 34s;
  animation-direction: alternate-reverse;
}

@keyframes stage-fog {
  from {
    transform: translateX(-9%);
  }

  to {
    transform: translateX(13%);
  }
}

/* What is written around the car at each stop */

.acts {
  position: absolute;
  z-index: 4;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.act {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s 0.35s;
}

.act.is-live {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease 0.15s, visibility 0s;
}

.act > * {
  position: absolute;
  transform: translateY(14px);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s;
}

.act.is-live > * {
  transform: none;
  pointer-events: auto;
}

.act__lead {
  top: clamp(20px, 5.4vh, 54px);
  left: var(--inset);
  right: var(--inset);
}

.act__no {
  margin-bottom: 8px;
  color: var(--orange);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.act__name {
  font-size: clamp(40px, min(6vw, 11vh), 96px);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.95;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.act__title {
  max-width: 13ch;
  font-size: clamp(34px, min(5vw, 9.2vh), 78px);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.act__side {
  top: calc(var(--film-top) + var(--film-h) * 0.4);
  left: var(--inset);
  display: grid;
  gap: 12px;
  justify-items: start;
  width: clamp(160px, 17vw, 250px);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.45;
}

.act__kind {
  padding: 0.32em 0.8em;
  border-radius: 99px;
  background: var(--white);
  color: var(--night);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
}

.act__specs {
  top: calc(var(--film-top) + var(--film-h) * 0.36);
  right: var(--inset);
  display: grid;
  gap: clamp(10px, 2vh, 20px);
  width: clamp(150px, 15vw, 230px);
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: right;
}

.act__specs li {
  display: grid;
  justify-items: end;
  gap: 4px;
  padding-top: clamp(8px, 1.6vh, 14px);
  border-top: 2px solid rgba(255, 255, 255, 0.24);
}

.act__specs li:first-child {
  border-top-color: var(--orange);
}

.act__specs strong {
  font-size: clamp(22px, min(2.4vw, 4.6vh), 40px);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.act__specs span {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
  opacity: 0.82;
}

.act--visit .act__specs strong {
  font-size: clamp(18px, min(1.7vw, 3.4vh), 28px);
}

.act__hint {
  top: calc(var(--film-top) + var(--film-h) * 0.42);
  right: var(--inset);
  width: clamp(150px, 15vw, 230px);
  padding-top: 12px;
  border-top: 2px solid var(--orange);
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 700;
  line-height: 1.3;
  text-align: right;
}

.act__foot {
  left: var(--inset);
  bottom: clamp(70px, 11.5vh, 108px);
  display: grid;
  gap: 12px;
  justify-items: start;
  max-width: min(34ch, 30vw);
}

.act__cover {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0.8;
}

.act__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.act--intro .act__foot,
.act--visit .act__foot {
  max-width: min(520px, 46vw);
}

.stage .btn--ask {
  background: var(--white);
  color: var(--night);
}

.stage__bar {
  position: absolute;
  z-index: 5;
  left: var(--inset);
  right: var(--inset);
  bottom: clamp(12px, 2.6vh, 26px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
}

.stage__dots {
  display: flex;
  gap: 6px;
  margin: 0 auto 0 0;
  padding: 0;
  list-style: none;
}

.stage__dots button {
  min-height: 34px;
  padding: 0 12px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 99px;
  background: none;
  color: var(--white);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.stage__dots button.is-on {
  border-color: var(--white);
  background: var(--white);
  color: var(--night);
}

.stage__next {
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid var(--white);
  border-radius: 12px;
  background: none;
  color: var(--white);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.stage__next:hover {
  background: rgba(255, 255, 255, 0.14);
}

.stage__skip {
  font-size: 15px;
  font-weight: 600;
  text-underline-offset: 4px;
}

/* A window that is nearly square or taller: the car stands nearer the middle */
@media (min-width: 901px) and (max-aspect-ratio: 4/3) {
  .stage__scene {
    --ground: 64%;
  }
}

@media (max-width: 900px) {
  .stage__scene {
    --film-w: 150vw;
    --ground: 57%;
  }

  .stage__wall {
    top: 12px;
    bottom: auto;
    gap: 12px;
  }

  .stage__sign {
    height: 15px;
  }

  .stage__sign--hm {
    height: 25px;
  }

  .stage__rule {
    height: 22px;
  }

  .stage__beams i {
    width: 62vw;
    margin-left: -31vw;
  }

  .act__lead {
    top: 50px;
    left: 20px;
    right: 20px;
  }

  .act__no {
    margin-bottom: 5px;
    font-size: 12.5px;
  }

  .act__name {
    font-size: clamp(26px, 8.4vw, 36px);
  }

  .act__title {
    font-size: clamp(30px, 9vw, 40px);
  }

  .act__side {
    top: 112px;
    left: 20px;
    right: 20px;
    gap: 8px;
    width: auto;
    font-size: 15px;
  }

  .act--intro .act__side,
  .act--visit .act__side {
    top: 142px;
  }

  .act__specs {
    top: calc(var(--film-top) + var(--film-h) * 0.9);
    left: 20px;
    right: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: auto;
    text-align: left;
  }

  .act__specs li {
    justify-items: start;
    padding-top: 8px;
  }

  .act__specs li:first-child {
    border-top-color: rgba(255, 255, 255, 0.24);
  }

  .act__specs strong {
    font-size: clamp(14px, 4.4vw, 21px);
  }

  .act__specs span {
    font-size: 12px;
  }

  .act__hint {
    top: calc(var(--film-top) + var(--film-h) * 0.9);
    left: 20px;
    right: auto;
    width: auto;
    padding-top: 8px;
    font-size: 16px;
    text-align: left;
  }

  .act__foot {
    top: calc(var(--film-top) + var(--film-h) * 0.9 + 78px);
    bottom: auto;
    left: 20px;
    right: 20px;
    max-width: none;
  }

  .act__cover {
    display: none;
  }

  .act--intro .act__foot,
  .act--visit .act__foot {
    top: calc(var(--film-top) + var(--film-h) * 0.9 + 44px);
    max-width: none;
  }

  .act--visit .act__specs {
    display: none;
  }

  .act--visit .act__foot {
    top: calc(var(--film-top) + var(--film-h) * 0.9);
  }

  .stage .btn {
    min-height: 46px;
    padding: 8px 18px;
    font-size: 15px;
  }

  .stage__bar {
    left: 20px;
    right: 20px;
    bottom: 12px;
    gap: 8px 16px;
  }

  .stage__dots {
    flex: 1 0 100%;
  }

  .stage__dots button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 13px;
  }

  .stage__next {
    min-height: 44px;
    padding: 0 18px;
    font-size: 15px;
  }
}

@media (max-width: 900px) and (max-height: 700px) {
  .stage__dots {
    display: none;
  }

  .act--car .act__side p {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage__fog i {
    animation: none;
  }

  .act,
  .act > * {
    transition: none;
  }
}
