/* Shared photographic finish. Keep the documentary source files intact. */
:root {
  --media-finish: contrast(1.08) saturate(1.06) brightness(1.015);
}

.media-visual {
  filter: var(--media-finish);
}

/* Replace the old faded and monochrome treatments with the shared grade. */
.explorer-image img.media-visual,
.editorial-card img.media-visual,
.editorial-card:nth-child(2) img.media-visual {
  opacity: 1;
  filter: var(--media-finish);
}

:is(.opening-film, .product-feature, .product-card, .announcement-media,
    .hero-visual, .domain-hero, .inline-film, .explorer-image, .editorial-card) {
  isolation: isolate;
  border-radius: 2px;
}

/* A restrained highlight and fine edge give the media a clean surface. */
:is(.opening-film, .product-feature, .product-card, .announcement-media,
    .hero-visual, .domain-hero, .inline-film, .explorer-image, .editorial-card)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(145deg, #ffffff0d, transparent 34%, transparent 76%, #c3d7e703);
  box-shadow: inset 0 1px 0 #ffffff24, inset 0 0 0 1px #ffffff0d;
  pointer-events: none;
}

/* Preserve clear midtones while shading the caption areas. */
.product-feature::after,
.product-card::after,
.announcement-media::after {
  z-index: 1;
  background: linear-gradient(180deg, #03070a05 0%, transparent 38%, #03070a66 62%, #03070ace 100%);
  pointer-events: none;
}

.domain-hero::after {
  z-index: 1;
  pointer-events: none;
}

.opening-film::after {
  background: linear-gradient(90deg, #020508aa 0%, #02050870 48%, #0205080d 80%),
    linear-gradient(0deg, #02050880, transparent 50%);
}

.editorial-card,
.editorial-card:nth-child(2) {
  background: #0b0e10;
  color: #fff;
}

.editorial-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, #03070aab 0%, #03070a38 45%, #03070aab 100%);
  pointer-events: none;
}

.explorer-image::after {
  z-index: 1;
  pointer-events: none;
}

.overlay-label,
.play-large {
  z-index: 2;
}

.feature-caption,
.announcement-text,
.domain-hero-copy,
.editorial-card > :not(img),
.overlay-label {
  text-shadow: 0 1px 12px #0006;
}

/* Mobile cards display their descriptions without hover. */
@media (max-width: 600px) {
  .product-feature::after,
  .product-card::after {
    background: linear-gradient(180deg, transparent 15%, #03070a99 45%, #03070ade 100%);
  }
}

@media (forced-colors: active) {
  .media-visual,
  .explorer-image img.media-visual,
  .editorial-card img.media-visual,
  .editorial-card:nth-child(2) img.media-visual {
    filter: none;
  }

  :is(.opening-film, .product-feature, .product-card, .announcement-media,
      .hero-visual, .domain-hero, .inline-film, .explorer-image, .editorial-card)::before {
    display: none;
  }
}
