/* ==========================================================================
   Kloena Digital — Game & Animation Development work index

   Reuses the project-index components defined in multimedia.css — hero,
   category headers, project entries, galleries and the lightbox — and adds
   the page shell, hero crop, portrait-cover frame and a denser gallery for
   the 3D asset showcases.
   ========================================================================== */

@import url("multimedia.css");

/* 1. Page shell
   ========================================================================== */
.page-game main.game {
  display: block;
  /* main is a flex item in the page column: allow it to shrink below the
     min-content width of its children instead of overflowing the viewport. */
  min-width: 0;
  width: min(1400px, 100%);
  margin-inline: auto;
  padding: clamp(6px, 1.4vw, 18px) clamp(20px, 3vw, 44px) 0;
}

.page-game main.game > section {
  width: 100%;
  margin-inline: auto;
}

/* 2. Hero artwork
   ========================================================================== */
.page-game .mm-hero__media img {
  object-position: 54% 42%;
  filter: grayscale(0.58) brightness(0.42) saturate(1.08);
}

/* 3. Portrait covers
   Phone-format captures sit in a narrower frame so tall screenshots don't
   tower over the two-column project layout.
   ========================================================================== */
.page-game .mm-project__cover--portrait {
  width: min(400px, 100%);
  margin-inline: auto;
}

/* 3b. Nanowhite — landscape frames with a blurred fill
   The source captures are tall phone screenshots, but the Nanowhite entry is
   presented in horizontal 16:9 frames like the rest of the game index. Each
   capture is scaled down to fit entirely inside its frame (contain), and the
   side gutters are filled with a blurred, dimmed copy of the same capture so
   the frame still reads as a full-bleed thumbnail.
   ========================================================================== */
.page-game #nanowhite-dark-spot-blaster .mm-shot {
  isolation: isolate;
  background: var(--surface);
}

.page-game #nanowhite-dark-spot-blaster .mm-shot::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: -1;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(24px) brightness(0.68) saturate(1.15);
  pointer-events: none;
}

.page-game #nanowhite-dark-spot-blaster .mm-project__layout .mm-shot::before {
  background-image: url("../assets/img/game/nanowhite-dark-spot-blaster/01.jpg");
}

.page-game #nanowhite-dark-spot-blaster .mm-gallery__item:nth-child(1) .mm-shot::before {
  background-image: url("../assets/img/game/nanowhite-dark-spot-blaster/02.jpg");
}

.page-game #nanowhite-dark-spot-blaster .mm-gallery__item:nth-child(2) .mm-shot::before {
  background-image: url("../assets/img/game/nanowhite-dark-spot-blaster/03.jpg");
}

.page-game #nanowhite-dark-spot-blaster .mm-gallery__item:nth-child(3) .mm-shot::before {
  background-image: url("../assets/img/game/nanowhite-dark-spot-blaster/04.jpg");
}

.page-game #nanowhite-dark-spot-blaster .mm-gallery__item:nth-child(4) .mm-shot::before {
  background-image: url("../assets/img/game/nanowhite-dark-spot-blaster/05.jpg");
}

.page-game #nanowhite-dark-spot-blaster .mm-gallery__item:nth-child(5) .mm-shot::before {
  background-image: url("../assets/img/game/nanowhite-dark-spot-blaster/06.jpg");
}

.page-game #nanowhite-dark-spot-blaster .mm-gallery__item:nth-child(6) .mm-shot::before {
  background-image: url("../assets/img/game/nanowhite-dark-spot-blaster/07.jpg");
}

.page-game #nanowhite-dark-spot-blaster .mm-gallery__item:nth-child(7) .mm-shot::before {
  background-image: url("../assets/img/game/nanowhite-dark-spot-blaster/08.png");
}

.page-game #nanowhite-dark-spot-blaster .mm-shot img {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
}

/* 4. Dense galleries — used by the 3D asset showcases
   ========================================================================== */
.page-game .mm-gallery--dense {
  columns: 4;
}

.page-game .mm-gallery--dense .mm-shot {
  border-radius: 12px;
}

/* 5. Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .page-game .mm-gallery--dense {
    columns: 3;
  }
}

@media (max-width: 980px) {
  .page-game .mm-gallery--dense {
    columns: 2;
  }
}

@media (max-width: 720px) {
  .page-game .mm-hero__media img {
    object-position: 58% 48%;
  }

  .page-game .mm-project__cover--portrait {
    width: min(330px, 100%);
  }
}

@media (max-width: 560px) {
  /* The nav items no longer fit beside the logo: give the nav its own row
     and drop the pipe separators so no stray glyph wraps on its own. */
  .page-game .site-header {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .page-game .site-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .page-game .site-nav__list {
    gap: 4px 14px;
  }

  .page-game .site-nav__list > li + li::before {
    display: none;
  }

  .page-game .site-nav__link {
    padding: 4px 0;
    font-size: 9px;
    letter-spacing: 0.14em;
  }
}

@media (max-width: 480px) {
  .page-game .mm-gallery--dense {
    columns: 1;
  }
}
