/* ==========================================================================
   Kloena Digital — Mobile App & Web 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, portrait-cover frame and client-logo grid this page needs.
   ========================================================================== */

@import url("multimedia.css");

/* 1. Page shell
   ========================================================================== */
.page-appdev main.appdev {
  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-appdev main.appdev > section {
  width: 100%;
  margin-inline: auto;
}

/* 2. Hero artwork
   ========================================================================== */
.page-appdev .mm-hero__media img {
  object-position: 62% 56%;
  filter: grayscale(0.62) brightness(0.42) saturate(1.04);
}

/* 3. Portrait covers
   Phone and tablet captures sit in a narrower frame so tall screenshots
   don't tower over the two-column project layout.
   ========================================================================== */
.page-appdev .mm-project__cover--portrait {
  width: min(400px, 100%);
  margin-inline: auto;
}

/* 3b. Landscape app captures — Origami3D, Oscar Cycling, Lion Delivery,
   HB2U & HB4Me, Pointrack and Nanowhite
   These projects are dominated by tall phone screenshots. Every capture is
   presented in a horizontal 16:9 frame with the whole screenshot scaled down
   to fit inside it (contain), while the side gutters are filled with a
   blurred, dimmed copy of the same capture so the frame still reads as a
   full-bleed thumbnail. The blur source is mapped per image below.
   ========================================================================== */
.page-appdev .mm-project--landscape .mm-shot {
  isolation: isolate;
  background: var(--surface);
}

.page-appdev .mm-project--landscape .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-appdev .mm-project--landscape .mm-shot img {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
}

/* Origami3D */
.page-appdev #origami3d .mm-project__layout .mm-shot::before {
  background-image: url("../assets/img/appdev/origami3d/01.jpg");
}

.page-appdev #origami3d .mm-gallery__item:nth-child(1) .mm-shot::before {
  background-image: url("../assets/img/appdev/origami3d/02.jpg");
}

.page-appdev #origami3d .mm-gallery__item:nth-child(2) .mm-shot::before {
  background-image: url("../assets/img/appdev/origami3d/03.jpg");
}

.page-appdev #origami3d .mm-gallery__item:nth-child(3) .mm-shot::before {
  background-image: url("../assets/img/appdev/origami3d/04.jpg");
}

.page-appdev #origami3d .mm-gallery__item:nth-child(4) .mm-shot::before {
  background-image: url("../assets/img/appdev/origami3d/05.jpg");
}

.page-appdev #origami3d .mm-gallery__item:nth-child(5) .mm-shot::before {
  background-image: url("../assets/img/appdev/origami3d/06.jpg");
}

/* Oscar Cycling */
.page-appdev #oscar-cycling .mm-project__layout .mm-shot::before {
  background-image: url("../assets/img/appdev/oscar-cycling/01.jpg");
}

.page-appdev #oscar-cycling .mm-gallery__item:nth-child(1) .mm-shot::before {
  background-image: url("../assets/img/appdev/oscar-cycling/02.jpeg");
}

.page-appdev #oscar-cycling .mm-gallery__item:nth-child(2) .mm-shot::before {
  background-image: url("../assets/img/appdev/oscar-cycling/03.jpg");
}

.page-appdev #oscar-cycling .mm-gallery__item:nth-child(3) .mm-shot::before {
  background-image: url("../assets/img/appdev/oscar-cycling/04.jpeg");
}

/* Lion Delivery */
.page-appdev #lion-delivery .mm-project__layout .mm-shot::before {
  background-image: url("../assets/img/appdev/lion-delivery/01.jpg");
}

.page-appdev #lion-delivery .mm-gallery__item:nth-child(1) .mm-shot::before {
  background-image: url("../assets/img/appdev/lion-delivery/02.jpg");
}

.page-appdev #lion-delivery .mm-gallery__item:nth-child(2) .mm-shot::before {
  background-image: url("../assets/img/appdev/lion-delivery/03.jpg");
}

.page-appdev #lion-delivery .mm-gallery__item:nth-child(3) .mm-shot::before {
  background-image: url("../assets/img/appdev/lion-delivery/04.jpg");
}

/* HB2U & HB4Me */
.page-appdev #hb2u-hb4me .mm-project__layout .mm-shot::before {
  background-image: url("../assets/img/appdev/hb2u-hb4me/01.png");
}

.page-appdev #hb2u-hb4me .mm-gallery__item:nth-child(1) .mm-shot::before {
  background-image: url("../assets/img/appdev/hb2u-hb4me/02.png");
}

.page-appdev #hb2u-hb4me .mm-gallery__item:nth-child(2) .mm-shot::before {
  background-image: url("../assets/img/appdev/hb2u-hb4me/03.png");
}

.page-appdev #hb2u-hb4me .mm-gallery__item:nth-child(3) .mm-shot::before {
  background-image: url("../assets/img/appdev/hb2u-hb4me/04.png");
}

/* Pointrack */
.page-appdev #pointrack .mm-project__layout .mm-shot::before {
  background-image: url("../assets/img/appdev/vehicle-tracking-system/01.jpg");
}

.page-appdev #pointrack .mm-gallery__item:nth-child(1) .mm-shot::before {
  background-image: url("../assets/img/appdev/vehicle-tracking-system/02.jpg");
}

.page-appdev #pointrack .mm-gallery__item:nth-child(2) .mm-shot::before {
  background-image: url("../assets/img/appdev/vehicle-tracking-system/03.jpg");
}

/* Nanowhite Dark Spot Blaster */
.page-appdev #nanowhite-kiosk-game .mm-project__layout .mm-shot::before {
  background-image: url("../assets/img/appdev/nanowhite-dark-spot-blaster/01.jpg");
}

.page-appdev #nanowhite-kiosk-game .mm-gallery__item:nth-child(1) .mm-shot::before {
  background-image: url("../assets/img/appdev/nanowhite-dark-spot-blaster/02.jpg");
}

.page-appdev #nanowhite-kiosk-game .mm-gallery__item:nth-child(2) .mm-shot::before {
  background-image: url("../assets/img/appdev/nanowhite-dark-spot-blaster/03.jpg");
}

.page-appdev #nanowhite-kiosk-game .mm-gallery__item:nth-child(3) .mm-shot::before {
  background-image: url("../assets/img/appdev/nanowhite-dark-spot-blaster/04.jpg");
}

.page-appdev #nanowhite-kiosk-game .mm-gallery__item:nth-child(4) .mm-shot::before {
  background-image: url("../assets/img/appdev/nanowhite-dark-spot-blaster/05.jpg");
}

.page-appdev #nanowhite-kiosk-game .mm-gallery__item:nth-child(5) .mm-shot::before {
  background-image: url("../assets/img/appdev/nanowhite-dark-spot-blaster/06.jpg");
}

.page-appdev #nanowhite-kiosk-game .mm-gallery__item:nth-child(6) .mm-shot::before {
  background-image: url("../assets/img/appdev/nanowhite-dark-spot-blaster/07.jpg");
}

.page-appdev #nanowhite-kiosk-game .mm-gallery__item:nth-child(7) .mm-shot::before {
  background-image: url("../assets/img/appdev/nanowhite-dark-spot-blaster/08.png");
}

/* 3c. N-Duo POS — vertical captures only
   The desktop screenshots (cover plus gallery items 01-02) are already
   horizontal and keep their natural proportions. Only the three tall POS app
   captures (items 03-05: 04-06.png) need the landscape frame, so the rules
   are scoped to those gallery items.
   ========================================================================== */
.page-appdev #n-duo-pos .mm-gallery__item:nth-child(3) .mm-shot,
.page-appdev #n-duo-pos .mm-gallery__item:nth-child(4) .mm-shot,
.page-appdev #n-duo-pos .mm-gallery__item:nth-child(5) .mm-shot {
  isolation: isolate;
  background: var(--surface);
}

.page-appdev #n-duo-pos .mm-gallery__item:nth-child(3) .mm-shot::before,
.page-appdev #n-duo-pos .mm-gallery__item:nth-child(4) .mm-shot::before,
.page-appdev #n-duo-pos .mm-gallery__item:nth-child(5) .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-appdev #n-duo-pos .mm-gallery__item:nth-child(3) .mm-shot::before {
  background-image: url("../assets/img/appdev/pos-system-for-n-duo/04.png");
}

.page-appdev #n-duo-pos .mm-gallery__item:nth-child(4) .mm-shot::before {
  background-image: url("../assets/img/appdev/pos-system-for-n-duo/05.png");
}

.page-appdev #n-duo-pos .mm-gallery__item:nth-child(5) .mm-shot::before {
  background-image: url("../assets/img/appdev/pos-system-for-n-duo/06.png");
}

.page-appdev #n-duo-pos .mm-gallery__item:nth-child(3) .mm-shot img,
.page-appdev #n-duo-pos .mm-gallery__item:nth-child(4) .mm-shot img,
.page-appdev #n-duo-pos .mm-gallery__item:nth-child(5) .mm-shot img {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
}

/* 3d. Gas Cylinder Management System — vertical captures only
   The cover and gallery items 06-08 are widescreen portal screenshots and keep
   their natural proportions. The five driver-app captures (items 01-05:
   01-04.png and 09.png) are tall phone screens, so they get the landscape
   frame with a blurred self-copy backdrop.
   ========================================================================== */
.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(1) .mm-shot,
.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(2) .mm-shot,
.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(3) .mm-shot,
.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(4) .mm-shot,
.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(5) .mm-shot {
  isolation: isolate;
  background: var(--surface);
}

.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(1) .mm-shot::before,
.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(2) .mm-shot::before,
.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(3) .mm-shot::before,
.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(4) .mm-shot::before,
.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(5) .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-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(1) .mm-shot::before {
  background-image: url("../assets/img/appdev/gas-cylinder-management-system/01.png");
}

.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(2) .mm-shot::before {
  background-image: url("../assets/img/appdev/gas-cylinder-management-system/02.png");
}

.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(3) .mm-shot::before {
  background-image: url("../assets/img/appdev/gas-cylinder-management-system/03.png");
}

.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(4) .mm-shot::before {
  background-image: url("../assets/img/appdev/gas-cylinder-management-system/04.png");
}

.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(5) .mm-shot::before {
  background-image: url("../assets/img/appdev/gas-cylinder-management-system/09.png");
}

.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(1) .mm-shot img,
.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(2) .mm-shot img,
.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(3) .mm-shot img,
.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(4) .mm-shot img,
.page-appdev #gas-cylinder-management-system .mm-gallery__item:nth-child(5) .mm-shot img {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
}

/* 4. Client logo strip — used by the "Other websites" entry
   ========================================================================== */
.ad-logos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: clamp(8px, 1vw, 14px);
  margin: clamp(18px, 2.4vw, 26px) 0 0;
  padding: 0;
  list-style: none;
}

.ad-logos li {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.ad-logos img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 46px;
  object-fit: contain;
  filter: grayscale(0.45) brightness(1.05) opacity(0.8);
  transition: filter 0.5s var(--ease);
}

.ad-logos li:hover img {
  filter: none;
  opacity: 1;
}

/* 5. Responsive
   ========================================================================== */
@media (max-width: 720px) {
  .page-appdev .mm-hero__media img {
    object-position: 58% 48%;
  }

  .page-appdev .mm-project__cover--portrait {
    width: min(330px, 100%);
  }

  .ad-logos {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .ad-logos li {
    min-height: 82px;
    padding: 14px;
  }
}

@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-appdev .site-header {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .page-appdev .site-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .page-appdev .site-nav__list {
    gap: 4px 14px;
  }

  .page-appdev .site-nav__list > li + li::before {
    display: none;
  }

  .page-appdev .site-nav__link {
    padding: 4px 0;
    font-size: 9px;
    letter-spacing: 0.14em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ad-logos img {
    transition: none;
  }
}
