:root {
  --u: min(2.25px, calc(100vw / 1422));
  --under: #1B1140;
  --jamb-shade: #281A57;
  --jamb-lit: #5B3594;
  --slab: #455BFF;
}

.top { position: relative; overflow: hidden; background: var(--sky-top); }
.stage { position: relative; height: min(56.25vw, max(32.5rem, calc(100vh - 7.75rem))); }
.stage-still, .stage-video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 100%; display: block; }
.stage-mark { position: absolute; inset: 0; pointer-events: none; }
.stage-mark svg { display: block; width: 100%; height: 100%; fill: #fff; }

.wall-a {
  margin-top: calc(var(--u) * -190);
  clip-path: polygon(0 calc(var(--u) * 118), 17% calc(var(--u) * 118), 17% calc(var(--u) * 80), 31% calc(var(--u) * 80),
    31% calc(var(--u) * 40), 83% calc(var(--u) * 40), 83% 0, 100% 0, 100% 100%, 0 100%);
}

.wall-a > .pitch {
  max-width: none; margin: 0 calc(var(--pad) * -1);
  padding: calc(var(--u) * 40 + 1.25rem) max(var(--pad), calc(50% + var(--pad) - 41rem)) 0 calc(34.25% + var(--pad) * .685);
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 2rem 3rem;
}
.pitch-text p { max-width: 27em; font-size: 1.375rem; line-height: 1.35; }
.pitch-text .pitch-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.1rem; }
.online { text-align: center; font-size: 1.375rem; line-height: 1.3; }
.online b { display: block; color: var(--value); font-size: 5rem; line-height: 1; }

.grass { height: 8.5rem; }
.grass.last { height: 6rem; }
.wall-b, .wall-c, .wall-d { margin-top: -2.5rem; }
.wall-b { clip-path: polygon(0 2.5rem, 12% 2.5rem, 12% 1.25rem, 46% 1.25rem, 46% 0, 71% 0, 71% 1.25rem, 100% 1.25rem, 100% 100%, 0 100%); }
.wall-c { clip-path: polygon(0 0, 27% 0, 27% 1.25rem, 64% 1.25rem, 64% 2.5rem, 88% 2.5rem, 88% 1.25rem, 100% 1.25rem, 100% 100%, 0 100%); }
.wall-d { clip-path: polygon(0 1.25rem, 19% 1.25rem, 19% 2.5rem, 38% 2.5rem, 38% 0, 80% 0, 80% 1.25rem, 100% 1.25rem, 100% 100%, 0 100%); }

.modes { padding-top: 6.5rem; }
.modes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.75rem 1.75rem; }
.mode dt { font-size: 1.625rem; line-height: 1.2; }
.mode dd { font-size: 1.125rem; text-wrap: balance; opacity: .88; }
.mode-shot { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--preview); border: .375rem solid var(--panel); margin-bottom: .8rem; }
.mode-wait { display: grid; place-items: center; }
.mode-wait img { width: 4rem; height: 4rem; opacity: .3; }

.ranked { padding-top: 7.5rem; }
.ranked-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 3rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.ranked-head .sign { margin-bottom: 0; }

.door {
  position: relative; overflow: hidden;
  height: 35.5rem;
  border-style: solid; border-width: 1.5rem 1.5rem 0;
  border-color: var(--under) var(--jamb-lit) transparent var(--jamb-shade);
  background: linear-gradient(#566D96, #7089B2 62%, #9AB0CC 86%);
}
.door::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5rem;
  background: linear-gradient(#0F181C, #0F181C), url("/assets/textures/Grass.png") 0 0 / 256px 256px #D7FFFB;
  background-blend-mode: screen, multiply;
}

.ladder { position: absolute; z-index: 1; left: 3%; right: 3%; bottom: 1.75rem; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); align-items: end; }
.ladder li { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.ladder img { display: block; width: 132px; height: 132px; }
.ladder img.px64 { width: 128px; height: 128px; }
.step {
  position: relative; width: 100%;
  height: calc(4.4rem + var(--mmr) * .003rem);
  padding-top: 1.05rem;
  background: linear-gradient(#0A1030, #0A1030), url("/assets/textures/BlockNoise.png") var(--nx, 0px) var(--ny, 0px) / 1024px 1024px var(--slab);
  background-blend-mode: screen, multiply;
  image-rendering: pixelated;
}
.step::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: .5rem;
  background: linear-gradient(#22346A, #22346A), url("/assets/textures/BlockNoise.png") var(--nx, 0px) 0 / 1024px 1024px var(--slab);
  background-blend-mode: screen, multiply;
}
.rank-name { display: block; font-size: 1.125rem; line-height: 1.2; }
.step b { display: block; color: var(--value); font-size: 1.75rem; line-height: 1.15; }
.rank-bronze { --mmr: 500; --nx: -40px; --ny: -610px; }
.rank-silver { --mmr: 1100; --nx: -420px; --ny: -130px; }
.rank-gold { --mmr: 1300; --nx: -770px; --ny: -480px; }
.rank-diamond { --mmr: 1700; --nx: -250px; --ny: -860px; }
.rank-celestial { --mmr: 2200; --nx: -610px; --ny: -300px; }
.rank-vela { --mmr: 2850; --nx: -900px; --ny: -700px; }
.rank-zephyr { --mmr: 4000; --nx: -140px; --ny: -40px; }
.rank-ruby { --mmr: 6000; --nx: -530px; --ny: -520px; }

.pair { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 4rem; align-items: start; padding-top: 8.5rem; padding-bottom: 7.5rem; }
.made .figure { margin-bottom: 0; font-size: 1.625rem; line-height: 1.25; }
.made .figure b { display: block; font-size: 6.5rem; line-height: .95; margin: 0 0 0 -.3rem; }
.create .cards { gap: .75rem; }
.create .cards li { flex: 1 1 0; }
.create .card { --draw-h: 15.5rem; flex: 1 1 0; width: auto; height: 24.5rem; padding: 1.6rem 1.25rem 2.2rem; }

.dev { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4.5rem; align-items: start; padding-top: 8.5rem; padding-bottom: 7.5rem; }
.dev-lead { font-size: 1.75rem; line-height: 1.25; text-wrap: balance; max-width: 19em; }
.dev-facts { margin-top: 1.1rem; font-size: 1.125rem; opacity: .88; }
.dev-facts li + li { margin-top: .35rem; }
.dev-facts + p { margin-top: 1.6rem; }
.dev .code { margin-top: .5rem; }

.questions { padding-top: 8.5rem; }
.questions > * { max-width: 64rem; margin-left: auto; margin-right: auto; }

.trailer { width: min(73.75rem, calc(100vw - 2rem)); max-width: none; padding: 0; border: .5rem solid var(--control); background: var(--panel); color: #fff; }
.trailer:not([open]) { display: none; }
.trailer::backdrop { background: rgba(0, 0, 0, .82); }
.trailer video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.trailer form { display: flex; justify-content: flex-end; padding: .625rem; }

@media (min-width: 2400px) {
  .ladder img { width: 176px; height: 176px; }
  .ladder img.px64 { width: 192px; height: 192px; }
  .grass { background-size: auto, 1024px 1024px; }
  .door::before { background-size: auto, 512px 512px; }
}

@media (max-width: 1100px) {
  .ladder img { width: 88px; height: 88px; }
  .ladder img.px64 { width: 64px; height: 64px; }
  .door { height: 31rem; }
  .rank-name { font-size: 1rem; }
  .step b { font-size: 1.4rem; }
  .pair { grid-template-columns: minmax(0, 1fr); gap: 5rem; }
  .dev { gap: 3rem; }
}

@media (max-width: 700px) {
  .stage { height: clamp(300px, 80vw, 420px); margin-left: -76px; }
  .wall-a {
    margin-top: -40px;
    clip-path: polygon(0 28px, 30% 28px, 30% 14px, 66% 14px, 66% 0, 100% 0, 100% 100%, 0 100%);
  }
  .wall-a > .pitch { padding: 52px var(--pad) 0; }
  .pitch-text .pitch-actions { flex-direction: column; align-items: stretch; }
  .pitch-actions .btn { justify-content: center; text-align: center; }
  .online { flex-basis: 100%; }

  .grass { height: 6.5rem; }
  .wall-b, .wall-c, .wall-d { margin-top: -1.5rem; }

  .modes { padding-top: 5rem; }
  .modes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem .75rem; }
  .mode dt { font-size: 1.25rem; }
  .mode dd { font-size: 1rem; line-height: 1.3; }
  .mode-shot { border-width: .25rem; margin-bottom: .5rem; }
  .mode-wait img { width: 2.75rem; height: 2.75rem; }

  .ranked { padding-top: 5.5rem; }
  .door { height: auto; border-width: .75rem .75rem 0; padding: 1.5rem .75rem 4.5rem; }
  .door::before { height: 3.5rem; }
  .ladder { position: relative; left: auto; right: auto; bottom: auto; grid-template-columns: minmax(0, 1fr); }
  .ladder li { flex-direction: row; order: 8; }
  .ladder li:nth-child(2) { order: 7; }
  .ladder li:nth-child(3) { order: 6; }
  .ladder li:nth-child(4) { order: 5; }
  .ladder li:nth-child(5) { order: 4; }
  .ladder li:nth-child(6) { order: 3; }
  .ladder li:nth-child(7) { order: 2; }
  .ladder li:nth-child(8) { order: 1; }
  .ladder img { position: relative; z-index: 1; width: 44px; height: 44px; margin: 0 -54px 0 10px; }
  .ladder img.px64 { width: 64px; height: 64px; margin: 0 -64px 0 0; }
  .step { display: flex; align-items: center; justify-content: space-between; height: 4rem; padding: .5rem 1rem 0 4.6rem; text-align: left; }
  .rank-name { font-size: 1.25rem; }

  .pair { padding-top: 5.5rem; padding-bottom: 5rem; gap: 4rem; }
  .made .figure b { font-size: 5.25rem; }
  .create .cards { gap: .4rem; }
  .create .card { --draw-h: 7rem; height: 12.5rem; padding: .75rem .4rem 1rem; }

  .dev { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-top: 5.5rem; padding-bottom: 5rem; }
  .dev .code { margin-top: 0; }

  .questions { padding-top: 5.5rem; }
}

@media (max-width: 339px) {
  .modes-grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
}
