/* Three real screens share a single project cover. No device frames or autoplay. */
.mobile-reel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(3px, .8vw, 12px);
  width: 100%;
  min-width: 0;
  line-height: 0;
}
.mobile-reel .shot-cell {
  display: block;
  min-width: 0;
}
.mobile-reel .shot-cell > img,
.mobile-case-shots .shot-open > img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
  object-fit: contain !important;
}
.project-thumb:has(.mobile-reel),
.solutions-mobile-reel:has(.mobile-reel) {
  height: auto !important;
  aspect-ratio: auto !important;
  max-height: none !important;
  padding: clamp(4px, 1vw, 14px) !important;
}
.solutions-mobile-reel figcaption {
  margin-block-start: .75rem;
}
.mobile-case-shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.65rem, 2vw, 2.1rem);
  align-items: start;
}
.mobile-case-shots .shot-detail {
  min-width: 0;
  margin: 0;
}
@media (min-width: 641px) and (max-width: 980px) {
  .mobile-case-shots[data-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 981px) {
  .mobile-case-shots[data-count="4"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.mobile-gallery-nav {
  display: none;
}
.shot-open {
  width: 100%;
  min-height: 44px;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}
.shot-open:focus-visible,
.gallery-expanded button:focus-visible {
  outline: 3px solid var(--focus, #f2c230);
  outline-offset: 3px;
}
.mobile-case-shots figcaption {
  display: flex;
  gap: .65em;
  align-items: baseline;
  margin-block-start: .65rem;
  font: inherit;
  overflow-wrap: anywhere;
}
.mobile-case-shots figcaption span {
  flex: none;
  font-family: var(--mono, monospace);
  font-size: .74em;
}
.gallery-expanded {
  max-width: min(94vw, 48rem);
  max-height: 92vh;
  max-height: 92dvh;
  margin: auto;
  padding: clamp(.75rem, 2vw, 1.5rem);
  background: #12162b;
  color: #ede6d8;
  border: 1px solid #9b9aa0;
  overflow: auto;
}
.gallery-expanded::backdrop {
  background: rgb(9 12 22 / .86);
}
.gallery-expanded[data-inline] {
  position: relative;
  inset: auto;
  width: min(100%, 46rem);
  max-width: 100%;
  max-height: none;
  margin: 1rem auto 0;
}
.gallery-expanded[data-inline] figure img {
  max-height: 740px;
}
.gallery-expanded .gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
}
.gallery-expanded button {
  min-width: 44px;
  flex-shrink: 0;
  min-height: 44px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: .25rem .55rem;
}
.gallery-expanded [data-shot-count] {
  font-family: var(--mono, monospace);
  white-space: nowrap;
}
.gallery-expanded figure {
  margin: .7rem 0 0;
  text-align: center;
}
.gallery-expanded figure img {
  display: block;
  width: auto;
  height: auto;
  max-height: min(67vh, 60rem);
  max-height: min(67dvh, 60rem);
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
}
.gallery-expanded figcaption {
  margin: .5rem 0 0;
  font: inherit;
  color: inherit;
}
@media (min-width: 641px) {
  .mobile-reel {
    max-width: 49rem;
    margin-inline: auto;
  }
  .project-thumb:has(.mobile-reel),
  .solutions-mobile-reel:has(.mobile-reel) {
    max-width: min(100%, 52rem) !important;
    margin-inline: auto;
  }
  .mobile-case-shots {
    max-width: 50rem;
    margin-inline: auto;
  }
  .mobile-case-shots[data-count="4"] {
    max-width: 66rem;
  }
  .mobile-reel .shot-cell > img,
  .mobile-case-shots .shot-open > img {
    width: auto !important;
    max-width: 100% !important;
    max-height: clamp(350px, 34vw, 460px) !important;
    margin-inline: auto !important;
  }
}
@media (max-width: 640px) {
  .mobile-gallery-nav:not([hidden]) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-block-end: .65rem;
  }
  .mobile-gallery-nav button {
    min-height: 44px;
    min-width: 44px;
    background: transparent;
    color: inherit;
    padding: .4rem .55rem;
    border: 1px solid currentColor;
    font: inherit;
  }
  .mobile-gallery-nav button:disabled {
    opacity: .52;
  }
  .mobile-gallery-nav output {
    font: inherit;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .mobile-case-shots {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: .85rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }
  .mobile-case-shots .shot-detail {
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .mobile-case-shots .shot-open > img {
    margin-inline: auto !important;
    width: min(100%, 390px) !important;
  }
  .mobile-case-shots figcaption {
    order: -1;
    margin: 0 0 .35rem;
    font-size: .95rem;
    line-height: 1.4;
    padding: .25rem 0;
  }
}
/* CosmoGato uses equal portrait mats; each unaltered capture is contained. */
.mobile-reel[data-gallery-project="cosmogato"] .shot-cell {
  aspect-ratio: 390 / 844;
  overflow: hidden;
  background: #080610;
}
.mobile-case-gallery[data-gallery-project="cosmogato"] .shot-open {
  aspect-ratio: 390 / 844;
  background: #080610;
  overflow: hidden;
}
.mobile-reel[data-gallery-project="cosmogato"] .shot-cell > img,
.mobile-case-gallery[data-gallery-project="cosmogato"] .shot-open > img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}
/* Keep the three Club views flush on the dark cyber home, up to a readable size. */
.cyber .showcase-grid .project-thumb:has(.mobile-reel[data-gallery-project="clubperfumes"]) {
  width: min(100%, 792px) !important;
  max-width: min(100%, 792px) !important;
  margin-inline: 0 !important;
  padding: clamp(4px, .5vw, 7px) !important;
  background: #0a090e !important;
  border: 0 !important;
}
.cyber .showcase-grid .mobile-reel[data-gallery-project="clubperfumes"] {
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: clamp(4px, .5vw, 8px);
  margin: 0;
}
.cyber .showcase-grid .mobile-reel[data-gallery-project="clubperfumes"] .shot-cell > img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 550px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}

/* Dream Home: a compact interface sequence, then the project imagery. */
.mobile-case-gallery[data-gallery-project="dream-home"] {
  padding-block: clamp(2rem, 5vw, 4rem);
}
.mobile-case-gallery[data-gallery-project="dream-home"] .section-head {
  display: block;
  margin-block-end: 1.5rem;
  padding: 0;
  border: 0;
}
.mobile-case-gallery[data-gallery-project="dream-home"] .section-head::before,
.dreamhome-gallery .section-head::before {
  content: none;
}
.mobile-case-gallery[data-gallery-project="dream-home"] .section-head h2,
.dreamhome-gallery .section-head h2 {
  font-size: clamp(2rem, 3.5vw, 3.5rem);
}
.mobile-case-gallery[data-gallery-project="dream-home"] .section-head p {
  margin-block-start: 1rem;
  font-size: .9rem;
  line-height: 1.5;
}
.mobile-case-gallery[data-gallery-project="dream-home"] .mobile-case-shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: clamp(.5rem, 2vw, 1.5rem);
  width: 100%;
  max-width: 46rem;
  overflow: visible;
  margin: 0;
}
.mobile-case-gallery[data-gallery-project="dream-home"] .shot-detail {
  display: block;
}
.mobile-case-gallery[data-gallery-project="dream-home"] .shot-open > img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
}
.mobile-case-gallery[data-gallery-project="dream-home"] figcaption {
  display: block;
  margin: .75rem 0 0;
  padding: 0;
  font: 550 clamp(.7rem, 1.2vw, .9rem)/1.4 var(--sans, sans-serif);
  overflow-wrap: normal;
}
.mobile-case-gallery[data-gallery-project="dream-home"] figcaption span,
.mobile-case-gallery[data-gallery-project="dream-home"] .mobile-gallery-nav {
  display: none;
}
.dreamhome-gallery {
  padding-block: clamp(2rem, 5vw, 4rem);
}
.dreamhome-gallery .section-head {
  display: block;
  margin-block-end: 1.5rem;
  padding: 0;
  border: 0;
}
.dreamhome-gallery .dream-plates {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
}
.dreamhome-gallery .dream-scenes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.75rem, 2vw, 2rem);
  align-items: start;
}
.dreamhome-gallery .dream-scenes-explore {
  grid-template-columns: minmax(0, 1.82fr) minmax(0, .94fr);
}
.dreamhome-gallery .dream-scenes-plans {
  grid-template-columns: minmax(0, 1.69fr) minmax(0, .66fr);
}
.dreamhome-gallery .dream-frame {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  grid-column: auto;
}
.dreamhome-gallery .dream-frame .shot-open > img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
}
.dreamhome-gallery .dream-frame figcaption {
  margin: .65rem 0 0;
  padding: 0;
  font: 550 clamp(.75rem, 1.3vw, .95rem)/1.4 var(--sans, sans-serif);
}
@media (min-width: 981px) {
  .mobile-case-gallery[data-gallery-project="dream-home"] {
    display: grid;
    grid-template-columns: minmax(0, .75fr) minmax(0, 2fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 6rem);
  }
  .mobile-case-gallery[data-gallery-project="dream-home"] .section-head {
    margin: 0;
  }
}
@media (max-width: 640px) {
  .dreamhome-gallery .dream-scenes {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .dreamhome-gallery .dream-futura-unit-floor .shot-open > img {
    width: auto !important;
    max-height: 32rem !important;
    margin-inline: auto !important;
  }
}
