/* One geometry for the permanent first-frame image and its video overlay.
   Keep the existing case containers; desktop uses contain, mobile fills height. */
[data-case-ring="karkar"] .media-placeholder > .case-video-poster,
[data-case-ring="karkar"] .media-placeholder > video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: contain;
}
[data-case-ring="karkar"] .case-video-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
[data-case-ring="karkar"] .media-placeholder > video { opacity: 0; }
[data-case-ring="karkar"] [data-video-frame="ready"] > video,
[data-case-ring="karkar"] .media-placeholder > video[controls] { opacity: 1; }

[data-case-ring="karkar"] .media-placeholder:has(.case-video-poster) {
  background-color: var(--video-bg-desktop);
}
@media (width < 768px) {
  [data-case-ring="karkar"] .media-placeholder:has(.case-video-poster) {
    background-color: var(--video-bg-mobile);
  }
}

/* Mobile: fill the fixed card height; only the horizontal edges may crop.
   Use identical geometry for the first-frame image and decoded video. */
@media (width < 768px) {
  [data-case-ring="karkar"] .media-placeholder > video,
  [data-case-ring="karkar"] .case-video-poster img {
    position: absolute;
    top: 0;
    left: 50%;
    right: auto;
    bottom: auto;
    width: auto;
    max-width: none;
    height: 100%;
    margin: 0;
    transform: translateX(-50%);
  }
}

/* Supplied client photography fills the existing rounded card. */
[data-case-ring="karkar"] .media-placeholder > .case-client-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
  object-position: center;
}

/* Supplied web artwork fills height without vertical crop at any viewport width. */
[data-case-ring="karkar"] .media-placeholder > .case-web-image,
[data-case-ring="karkar"] .media-placeholder > .case-height-image {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: auto;
  max-width: none;
  height: 100%;
  margin: 0;
  transform: translateX(-50%);
}

/* Mobile footer card follows the supplied artwork instead of the tall video cards. */
@media (width < 768px) {
  [data-case-ring="karkar"] .media-placeholder:has(> .case-height-image) {
    min-height: 0;
    aspect-ratio: 3556 / 2000;
  }
}
