/* Shared layout for individual game landing pages (/games/<name>).
 * Each game also includes its own small theme stylesheet that overrides the
 * --game-* variables below (and anything else it wants to make its own). */

html {
  --game-dark: #222;
  --game-light: #fff;
  --game-highlight: var(--accent-color);
  --game-showcase: var(--game-dark);
  --game-button-bg: var(--game-highlight);
  --game-button-fg: var(--game-dark);
  --game-title-font: inherit;
}

/* The template's featured image becomes an app icon beside the title */
article .featured-image-wrapper {
  float: left;
  width: 112px;
  height: 112px;
  max-height: none;
  margin: 12px 20px 12px 0;
  border-radius: 22%;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

article h1.title {
  font-family: var(--game-title-font);
  margin-top: 20px;
  margin-bottom: .1em;
  padding-top: 10px;
}

/* overflow:hidden keeps long titles in a column beside the icon */
article h1.title, article .subtitle {
  overflow: hidden;
}

article .subtitle {
  font-size: 120%;
  font-style: italic;
  color: var(--faint-text-color);
  margin-bottom: 1.5em;
}

article .subtitle ~ * {
  clear: left;
}

/* Store buttons: [Label](url){platform="Caption"} in a ::: store-links div */
.store-links p {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-links a, .store-links a:visited {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 170px;
  padding: 8px 20px;
  border-radius: 12px;
  background: var(--game-button-bg);
  color: var(--game-button-fg);
  font-size: 120%;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .1s, box-shadow .1s;
}

.store-links a:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}

.store-links a[data-platform]::before {
  content: attr(data-platform);
  font-size: 60%;
  font-weight: normal;
  opacity: .8;
}

.store-links a[target="_blank"]::after {
  content: none;
}

/* Screenshot strip: a row of linked images in a ::: screenshots div */
.screenshots {
  background: var(--game-showcase);
  border-radius: 12px;
  margin: 0 0 1.5em;
}

.screenshots p {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 20px;
  margin: 0;
}

.screenshots a {
  flex: 0 0 auto;
  scroll-snap-align: center;
}

article .screenshots img:not(.featured-image) {
  display: block;
  height: 420px;
  width: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 14px;
}

.screenshots.landscape img:not(.featured-image) {
  height: 270px;
  border-radius: 4px;
}

/* Feature bullets */
.features ul {
  list-style: none;
  padding-left: 0;
}

.features li {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: .3em;
}

.features li::before {
  content: "◆";
  position: absolute;
  left: 0;
  color: var(--game-highlight);
}

.footnote-links {
  color: var(--faint-text-color);
  font-size: 90%;
}

@media screen and (max-width: 700px) {
  article .featured-image-wrapper {
    width: 80px;
    height: 80px;
    margin: 8px 14px 8px 0;
  }

  article h1.title {
    margin-top: 8px;
    padding-top: 4px;
  }

  .store-links a, .store-links a:visited {
    flex: 1 1 140px;
    min-width: 0;
    padding: 6px 14px;
    font-size: 105%;
  }

  article .screenshots img:not(.featured-image) {
    height: 340px;
  }

  .screenshots.landscape img:not(.featured-image) {
    height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
