/* 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-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;
}

/* Download section: each store in a ::: store-links div gets a short label
 * paragraph followed by its link (the App Store badge image or the itch.io
 * embed widget). Apple's guidelines forbid altering or animating the badge. */
.store-links p {
  margin: 0 0 .8em;
}

.store-links p:has(img, iframe), .store-links iframe {
  margin-bottom: 1.5em;
}

.store-links a {
  display: inline-block;
  line-height: 0;
}

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

article .store-links img {
  display: block;
  height: 56px;
  width: auto;
  max-width: none;
  max-height: none;
  margin: 0;
}

.store-links iframe {
  display: block;
  max-width: 100%;
  padding: 0;
  background: none;
  border-radius: 8px;
}

/* 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;
  }

  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;
  }
}
