/*
 * AgencyX custom theme — render each page's hero art as a banner behind the
 * documentation header.
 *
 * The per-page `--agencyx-hero` variable is set by the build's injector
 * (scripts/inject_social_meta.py) from the page's `card` @PageImage. Pages
 * without a hero leave it unset and fall back to DocC's default fill.
 *
 * This targets swift-docc-render's `.documentation-hero` by CLASS NAME (not the
 * scoped `[data-v-<hash>]` selector), so it survives renderer hash changes.
 * If a future Swift toolchain renames `.documentation-hero` / `.background-icon`,
 * this file needs updating — it is the one place that couples to render internals.
 */

/* The hero background fill lives on `.documentation-hero::before`. Replace it
 * with the page hero art under a left-weighted scrim so the left-aligned title,
 * breadcrumb, and lede stay readable while the art shows toward the right. */
.documentation-hero::before {
  background-image:
    linear-gradient(
      90deg,
      rgba(21, 18, 13, 0.95) 0%,
      rgba(21, 18, 13, 0.80) 38%,
      rgba(21, 18, 13, 0.48) 72%,
      rgba(21, 18, 13, 0.30) 100%
    ),
    var(--agencyx-hero, none) !important;
  background-size: cover !important;
  background-position: center right !important;
  background-repeat: no-repeat !important;
}

/* Give the header a little more vertical room so the art reads as a banner. */
.documentation-hero:not(.documentation-hero--disabled) .documentation-hero__content {
  padding-top: 2.2rem;
  padding-bottom: 2.2rem;
}
