/* Reclamation, Inc.'s page. It takes the studio page's styles.css whole and adds only what a game page needs:
   the game's logo as the headline, the video, the asset cards' row, the screenshot grid and the full-size viewer. */

.logo a { display: block; }

.game-logo { max-width: 34rem; margin-bottom: 1.25rem; }
.game-logo img { display: block; width: 100%; height: auto; }
.pitch { margin: 0 0 1rem; max-width: 40rem; font-size: 1.1875rem; color: var(--body); }
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  font-weight: 600;
  color: var(--muted);
}

/* The way back to the studio page, above the game's logo, in the kicker's lettering. */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.crumbs li {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--rule); }
.crumbs a { color: var(--link); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 0.25em; }

/* The First look video under the pitch, below its small heading in the sections' kicker lettering: a poster with a play button until it's clicked, then YouTube's player in the same
   16:9 box. */
.video { margin: 0 0 1.75rem; aspect-ratio: 16 / 9; border-radius: 0.25rem; overflow: hidden; background: var(--ink); }
.video a, .video iframe { display: block; width: 100%; height: 100%; border: 0; }
.video a { position: relative; }
.video a:focus-visible { outline: 3px solid var(--link); outline-offset: -3px; }
.video img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video .play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(3.5rem, 9vw, 5rem);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: var(--ink);
  transition: background 0.15s ease;
}
/* The triangle sits a little right of centre so it looks centred in the circle. */
.video .play::after {
  content: "";
  position: absolute;
  left: 40%;
  top: 32%;
  width: 28%;
  height: 36%;
  background: #fff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.video a:hover .play, .video a:focus-visible .play { background: var(--link); }

/* A taste of the screenshots under the pitch: one row of six, two rows of three on a narrow column, its two
   ends faded into the page. Each opens the viewer, which then steps through the whole set. */
.strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0 0 clamp(2rem, 5vh, 3rem);
  padding: 0;
  list-style: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}
.strip a { display: block; border-radius: 0.25rem; overflow: hidden; background: var(--ink); }
.strip img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: opacity 0.15s ease; }
.strip a:hover img { opacity: 0.85; }
@media (max-width: 60em) { .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* The screenshots' heading, with View All at its right end, as a store page has it. */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.view-all { flex: none; color: var(--link); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }

/* The asset cards: one row of the few marked with data-rank, three on a phone. Every card is in the list, so
   View All and the viewer's arrows step through the whole set from the row. */
.section .cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}
.section .cards li { margin: 0; }
.cards li:not([data-rank]) { display: none; }
.cards a {
  display: block;
  border-radius: 0.25rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(22, 47, 71, 0.18), 0 4px 10px rgba(22, 47, 71, 0.12);
}
.cards img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 7; transition: opacity 0.15s ease; }
.cards a:hover img { opacity: 0.85; }
@media (max-width: 40em) {
  .section .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards li[data-rank="4"], .cards li[data-rank="5"], .cards li[data-rank="6"] { display: none; }
}

/* The screenshots. Each opens full size in the viewer, or as a plain link when the script is off. */
.section .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.section .gallery li { margin: 0; }
.gallery a {
  display: block;
  border: 1px solid var(--rule);
  border-radius: 0.25rem;
  overflow: hidden;
  background: var(--ink);
}
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: opacity 0.15s ease; }
.gallery a:hover img { opacity: 0.85; }

/* The viewer: one screenshot at a time over a dark scrim, with arrows, Escape and swipe. */
.viewer {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: clamp(0.5rem, 3vw, 2.5rem);
  border: 0;
  background: transparent;
  color: #fff;
}
.viewer[open] { display: flex; align-items: center; justify-content: center; }
.viewer::backdrop { background: rgba(10, 18, 28, 0.92); }
.viewer figure { margin: 0; }
.viewer img { display: block; max-width: 100%; max-height: calc(100dvh - 7rem); width: auto; height: auto; margin: 0 auto; border-radius: 0.25rem; }
.viewer figcaption { margin-top: 0.75rem; text-align: center; color: rgba(255, 255, 255, 0.8); }
.viewer button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.viewer button:hover { background: var(--link); }
.viewer .prev { left: clamp(0.5rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); }
.viewer .next { right: clamp(0.5rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); }
.viewer .close { right: clamp(0.5rem, 2vw, 1.5rem); top: clamp(0.5rem, 2vw, 1.5rem); }

/* Tablet and phone: styles.css stacks the page, so the game's headline follows the studio logo. */
@media (max-width: 48em) {
  .crumbs { order: 2; margin-top: 1.5rem; }
  .game-logo { order: 2; }
  .pitch { order: 2; margin-top: 1rem; }
  .status { order: 2; }
  .media-head { order: 2; }
  .video { order: 2; }
  .strip { order: 2; margin-bottom: 0; }
}
@media (max-width: 40em) {
  .viewer .prev, .viewer .next { top: auto; bottom: 0.75rem; transform: none; }
  .viewer img { max-height: calc(100dvh - 9rem); }
}
@media (prefers-reduced-motion: reduce) {
  .gallery img, .strip img, .cards img, .video .play { transition: none; }
}
