/* Keep the template's translucent fill, separate corner plate, and text layers. */
.tn-elem:is([data-service-card], [data-case-card])::after {
  position: absolute;
  inset: var(--card-photo-inset, 0 0 14%);
  background-image:
    var(--card-photo-gradient, linear-gradient(180deg, rgb(25 25 25 / 12%) 0%, rgb(25 25 25 / 10%) 29%, rgb(25 25 25 / 91%) 76%, #191919 100%)),
    var(--card-photo);
  background-position: center, var(--card-photo-position);
  background-repeat: no-repeat;
  background-size: 100% 100%, cover;
  content: "";
  pointer-events: none;
}

[data-service-card="language"] {
  --card-photo: url("../language-audi.webp");
  --card-photo-position: 48% 36%;
}

[data-service-card="firmware"] {
  --card-photo: url("../firmware.webp");
  --card-photo-position: 48% 38%;
}

[data-service-card="tuning"] {
  --card-photo: url("../tuning-audi.webp");
  --card-photo-position: 82% 72%;
}

[data-service-card="features"] {
  --card-photo: url("../features-audi.webp");
  --card-photo-position: 35% 37%;
}

[data-service-card="diagnostics"] {
  --card-photo: url("../diagnostics-audi.webp");
  --card-photo-position: 19% 46%;
}

[data-service-card="compatibility"] {
  --card-photo: url("../audi-studio.webp");
  --card-photo-position: 31% 58%;
}

[data-case-card] {
  --card-photo-inset: 0 0 24%;
  --card-photo-gradient: linear-gradient(180deg, rgb(25 25 25 / 94%) 0%, rgb(25 25 25 / 89%) 16%, rgb(25 25 25 / 19%) 37%, rgb(25 25 25 / 64%) 53%, #191919 84%);
}

[data-case-card="audi-a3"] {
  --card-photo: url("../works/audi-a3-3.webp");
  --card-photo-position: 63% 56%;
}

[data-case-card="audi-q7"] {
  --card-photo: url("../works/audi-q7-1.webp");
  --card-photo-position: 59% 100%;
}

[data-case-card="audi-q5l"] {
  --card-photo: url("../works/audi-q5l-1.webp");
  --card-photo-position: 53% 100%;
}

[data-case-card="audi-q2"] {
  --card-photo: url("../works/audi-q2-1.webp");
  --card-photo-position: 53% 100%;
}

/* The counter occupies the left half on desktop and the first row below 960px. */
[data-case-counter] .t396__artboard::after {
  position: absolute;
  z-index: 2;
  inset: 0 50% 0 1.67%;
  background-image:
    linear-gradient(90deg, #000 0%, transparent 9%, transparent 88%, #000 100%),
    linear-gradient(180deg, rgb(0 0 0 / 88%) 0%, rgb(0 0 0 / 77%) 17%, rgb(0 0 0 / 14%) 44%, rgb(0 0 0 / 25%) 64%, #000 100%),
    url("../audi-light-detail.webp");
  background-position: center, center, 54% 58%;
  background-repeat: no-repeat;
  background-size: 100% 100%, 100% 100%, cover;
  content: "";
  pointer-events: none;
}

@media (max-width: 959px) {
  [data-case-counter] .t396__artboard::after {
    inset: 0 3% auto;
    height: 30.5vw;
  }
}

@media (max-width: 479px) {
  [data-case-counter] .t396__artboard::after {
    height: 35vw;
  }
}
