/* ==========================================================================
   Hero slider
   ========================================================================== */

.hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slider__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slider__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slider__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Muted tone and film grain for photos that do not have it baked in (home slider, article hero). */
.hero-slider__slide--tone img,
.hero__media--tone img {
  filter: saturate(0.7) contrast(0.92) brightness(0.9);
}

.hero-slider__slide--tone::before,
.hero-slider__slide--tone::after,
.hero__media--tone::before,
.hero__media--tone::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1; /* The filtered img paints as a layer, so lift the overlays above it. */
  pointer-events: none;
}

/* Darker band at the top keeps the header (search, language, menu) readable. */
.hero-slider__slide--tone::before,
.hero__media--tone::before {
  background: linear-gradient(
    to bottom,
    rgb(45 48 53 / 0.8) 0%,
    rgb(45 48 53 / 0.5) 18%,
    rgb(45 48 53 / 0.38) 35%,
    rgb(45 48 53 / 0.38) 100%
  );
}

.hero-slider__slide--tone::after,
.hero__media--tone::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.25;
  mix-blend-mode: overlay;
}
