/* travel-games.app in the app's Pixel Arcade look, as an arcade cabinet on
   the road: a pixel road scene as the marquee, chunky buttons with a dark
   edge and a hard drop, coloured bands. Press Start 2P for headings and
   buttons, Pixelify for text, both served from this site. Phone first; one
   breakpoint at 900 px. Everything that moves stops for people who ask
   their system for less motion. */

@font-face {
  font-family: "Press Start 2P";
  src: url("assets/PressStart2P-Regular.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Pixelify";
  src: url("assets/PixelifySans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify";
  src: url("assets/PixelifySans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --night: #17123a;
  --surface: #241c55;
  --raised: #2f2670;
  --edge: #0b0824;
  --muted: #c9c3f0;
  --dots: #4a3f96;
  --steel: #8b92b8;
  --yellow: #ffd23f;
  --lime: #8cf06b;
  --cyan: #3ddcff;
  --pink: #ff4f8b;
  --orange: #ff9f5a;
  --violet: #b48cff;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --text: "Pixelify", system-ui, sans-serif;
  /* A block's pixel frame: a 3 px edge with notched corners, a hard drop. */
  --frame: 3px 0 0 0 var(--edge), -3px 0 0 0 var(--edge), 0 3px 0 0 var(--edge),
    0 -3px 0 0 var(--edge);
  --drop: 0 7px 0 0 var(--edge);
}

/* One language at a time; English until site.js knows better. */
html[lang="en"] [lang="de"],
html[lang="de"] [lang="en"] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--night);
  color: #fff;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.45;
}

h1,
h2,
h3 {
  font-family: var(--pixel);
  font-weight: 400;
  line-height: 1.35;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--cyan);
}

a:hover {
  color: var(--yellow);
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.px {
  box-shadow: var(--frame), var(--drop);
  margin: 3px 3px 7px;
}

/* Marquee lights. */
.checker {
  height: 16px;
  background: repeating-conic-gradient(var(--yellow) 0 25%, var(--edge) 0 50%) 0 0 / 16px 16px;
}

.checker.pink {
  background-image: repeating-conic-gradient(var(--pink) 0 25%, var(--edge) 0 50%);
}

/* The top bar. */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  text-align: left;
}

/* On a phone: the app icon and EN/DE on the first row, the links
   right-aligned in a menu strip below, in either language. From 600 px (a
   phone in landscape) all in one row. */
.app-icon {
  order: 1;
  display: block;
  width: 44px;
  height: 44px;
  margin: 3px;
  image-rendering: pixelated;
  box-shadow: var(--frame);
}

.links {
  order: 3;
  flex-basis: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 4px 18px;
  flex-wrap: wrap;
}

.links a {
  font-family: var(--pixel);
  font-size: 9px;
  color: var(--muted);
  text-decoration: none;
  padding: 14px 2px;
}

.links a:hover {
  color: var(--yellow);
}

.langs {
  order: 2;
  margin-left: auto;
  display: flex;
  gap: 8px;
}

@media (min-width: 600px) {
  .app-icon,
  .langs {
    order: 0;
  }
  .langs {
    margin-left: 0;
  }
  .links {
    order: 0;
    flex-basis: auto;
    margin-left: auto;
    gap: 4px 14px;
  }
}

/* Below that the links' row is a menu strip, framed like the cards. The
   margins leave room for the 3px frame. */
@media (max-width: 599px) {
  .links {
    flex-basis: calc(100% - 6px);
    margin: 3px 3px 7px;
    padding: 0 12px;
    background: var(--surface);
    box-shadow: var(--frame), var(--drop);
  }
  .links a {
    padding: 13px 2px;
  }
}

.langs button {
  font-family: var(--pixel);
  font-size: 9px;
  min-width: 44px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  color: #fff;
  background: var(--raised);
  cursor: pointer;
}

.langs button[aria-pressed="true"] {
  background: var(--cyan);
  color: var(--night);
}

/* The marquee: the night sky with the road scene below it (phone) or
   behind it (desktop). */
.marq {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.marq .wrap {
  padding-top: 14px;
  padding-bottom: 26px;
}

.mark {
  margin-top: 34px;
  font-size: 30px;
  color: var(--yellow);
  text-shadow: 5px 5px 0 var(--pink), 10px 10px 0 var(--edge);
}

.sub {
  max-width: 30ch;
  margin: 22px auto 0;
  font-size: 20px;
}

.press {
  margin-top: 28px;
  font-family: var(--pixel);
  font-size: 11px;
  color: var(--pink);
}

.go {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 460px;
  min-height: 76px;
  margin: 16px auto 10px;
  padding: 0 12px;
  font-family: var(--pixel);
  font-size: 18px;
  color: var(--night);
  background: var(--lime);
  text-decoration: none;
  box-shadow: 4px 0 0 0 var(--edge), -4px 0 0 0 var(--edge), 0 4px 0 0 var(--edge),
    0 -4px 0 0 var(--edge), 0 10px 0 0 var(--edge);
}

.go:hover {
  color: var(--night);
  background: #a6f78b;
}

.go:active {
  transform: translateY(6px);
  box-shadow: 4px 0 0 0 var(--edge), -4px 0 0 0 var(--edge), 0 4px 0 0 var(--edge),
    0 -4px 0 0 var(--edge);
}

.meta {
  margin-top: 18px;
  font-family: var(--pixel);
  font-size: 9px;
  line-height: 2;
  color: var(--muted);
}

.meta b {
  font-weight: 400;
  color: var(--yellow);
}

.scene {
  display: block;
  width: 100%;
  height: 240px;
}

/* On a phone the whole scene would leave the bus tiny under a lot of empty
   sky: show only its middle (from the bus to the sun) and the lower half,
   by drawing it wider than the screen. */
.marq .scene {
  width: 194%;
  height: 224px;
  margin-left: -60%;
}

/* The disclaimer page's strip is a band around the bus (its viewBox), as
   tall as needed to keep the bus whole from phones to wide screens. */
.scene.strip {
  height: clamp(120px, 16vw, 360px);
}

/* Bands. */
.band {
  border-top: 6px solid var(--edge);
  padding: 40px 0 48px;
}

.band h2 {
  margin-bottom: 24px;
  font-size: 18px;
  text-align: center;
}

.band h2 span {
  display: inline-block;
  padding: 10px 14px;
  background: var(--night);
}

.games-band {
  background: var(--pink);
}

.install-band {
  background: var(--cyan);
}

.settings-band {
  background: var(--yellow);
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cab {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 170px;
  padding: 12px;
  background: var(--night);
}

.cab .ic {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cab img {
  display: block;
  width: 48px;
  height: 48px;
}

.cab h3 {
  font-size: 10px;
  overflow-wrap: break-word;
  hyphens: manual;
}

.cab p {
  flex: 1;
  font-size: 15px;
  line-height: 1.25;
  color: var(--muted);
}

.cab .pl {
  align-self: flex-start;
  padding: 4px 6px;
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--night);
}

.stages {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stage {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--night);
}

.post {
  flex: none;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dia {
  width: 42px;
  height: 42px;
  margin: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px var(--edge);
}

.dia span {
  transform: rotate(-45deg);
  font-family: var(--pixel);
  font-size: 14px;
  color: var(--night);
}

.pole {
  width: 6px;
  height: 20px;
  background: var(--steel);
  box-shadow: 0 0 0 2px var(--edge);
}

.stage .lv {
  display: block;
  margin-bottom: 8px;
  font-family: var(--pixel);
  font-size: 9px;
  color: var(--yellow);
}

.settings {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 18px;
  background: var(--night);
  font-family: var(--pixel);
  font-size: 11px;
  line-height: 2.4;
}

.settings ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.settings li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.settings .dots {
  flex: 1;
  border-bottom: 3px dotted var(--dots);
  transform: translateY(-6px);
}

.settings .on {
  color: var(--lime);
}

.settings .off {
  color: var(--pink);
}

.settings .num {
  color: var(--cyan);
}

.settings .more {
  margin-top: 14px;
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.4;
  text-align: right;
}

.settings .more a {
  display: inline-block;
  padding: 10px 0;
}

/* The road at the bottom, with a bus driving along it. */
.road {
  position: relative;
  height: 40px;
  overflow: hidden;
  background: var(--edge);
}

.road::before {
  content: "";
  position: absolute;
  left: 0;
  right: -48px;
  top: 18px;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 24px, transparent 24px 48px);
}

.road .bus {
  position: absolute;
  bottom: 6px;
  left: 0;
  width: 72px;
  height: 36px;
  transform: translateX(-80px);
}

footer {
  padding: 26px 0 34px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

footer p {
  margin-bottom: 8px;
}

footer .over {
  font-family: var(--pixel);
  font-size: 10px;
  color: var(--yellow);
}

.small {
  font-size: 12px;
}

.hash {
  word-break: break-all;
}

/* The disclaimer page. */
.page-head {
  text-align: center;
}

.page-head .wrap {
  padding-top: 14px;
  padding-bottom: 24px;
}

.page-head .mark {
  font-size: 18px;
  text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 var(--edge);
}

/* A tablet is wide enough for the whole road scene. */
@media (min-width: 600px) {
  .marq .scene {
    width: 100%;
    height: 300px;
    margin-left: 0;
  }
}

.legal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.card {
  padding: 20px 20px 10px;
  background: var(--night);
}

.card h2 {
  margin-bottom: 14px;
  font-size: 12px;
  text-align: left;
}

.card p,
.card li {
  margin-bottom: 10px;
}

.card ul {
  margin: 0;
  padding-left: 20px;
}

.card li::marker {
  color: var(--yellow);
}

.back-row {
  margin-top: 30px;
  text-align: center;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  font-family: var(--pixel);
  font-size: 10px;
  color: var(--night);
  background: var(--yellow);
  text-decoration: none;
}

.back:hover {
  color: var(--night);
}

.back:active {
  transform: translateY(4px);
  box-shadow: var(--frame);
}

.back img {
  width: 24px;
  height: 24px;
}

/* The disclaimer page's top bar: a smaller BACK. */
.small-back {
  min-height: 40px;
  gap: 8px;
  padding: 0 12px;
  font-size: 9px;
}

.small-back img {
  width: 18px;
  height: 18px;
}

.fonts a {
  color: var(--cyan);
}

/* Motion, only for people who haven't asked their system for less. */
@media (prefers-reduced-motion: no-preference) {
  .checker {
    animation: chase 0.8s steps(2) infinite;
  }
  .checker.pink {
    animation-direction: reverse;
  }
  .press {
    animation: blink 1.1s steps(1) infinite;
  }
  .scene .dashes {
    animation: drive 0.5s linear infinite;
  }
  .scene .bus {
    animation: bob 0.36s steps(1) infinite;
  }
  .scene .tw1 {
    animation: blink 2.2s steps(1) infinite;
  }
  .scene .tw2 {
    animation: blink 2.2s steps(1) 1.1s infinite;
  }
  .road::before {
    animation: drive2 0.5s linear infinite;
  }
  .road .bus {
    animation: cross 14s linear infinite;
  }
  .cab {
    transition: transform 120ms steps(2);
  }
  .cab:hover {
    transform: translateY(-4px);
  }
}

@keyframes chase {
  to {
    background-position: 16px 0;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes drive {
  to {
    transform: translateX(-24px);
  }
}

@keyframes drive2 {
  to {
    transform: translateX(-48px);
  }
}

@keyframes bob {
  50% {
    transform: translateY(-1px);
  }
}

@keyframes cross {
  from {
    transform: translateX(-80px);
  }
  to {
    transform: translateX(100vw);
  }
}

@media (min-width: 900px) {
  .wrap {
    padding: 0 40px;
  }
  .marq {
    /* The scene fills the width, so its mountains rise by a quarter of the
       width: grow with it, so they stay below the download button. */
    min-height: calc(500px + 25vw);
  }
  .marq .scene {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin-left: 0;
  }
  .marq .wrap {
    padding-bottom: 0;
  }
  .mark {
    margin-top: 40px;
    font-size: 64px;
    text-shadow: 7px 7px 0 var(--pink), 14px 14px 0 var(--edge);
  }
  .page-head .mark {
    font-size: 30px;
    text-shadow: 5px 5px 0 var(--pink), 10px 10px 0 var(--edge);
  }
  .sub {
    font-size: 24px;
  }
  .band h2 {
    font-size: 22px;
  }
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
  .stages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
  .stage {
    flex-direction: column;
    align-items: flex-start;
  }
  .legal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}
