/**
 * Hero background photo.
 *
 * Shared by hero-page, hero-licence, hero-employer and hero-search. The render
 * helper finas_the_hero_photo() prints `.page-hero__photo` as the section's
 * first child only when a photo is chosen, so a hero without one is untouched
 * and needs no rule here.
 *
 * Paint order: the photo wrapper is `z-index: 0`, the band's dashed-circle
 * ornament (`.page-hero::after`) comes later in the tree at the same level, and
 * `.page-hero__inner` is `z-index: 1` in pages.css. Copy and ornament therefore
 * sit above the photo without touching pages.css.
 *
 * The wash runs along the inline axis, so it is written twice: once for
 * left-to-right and once for the Arabic build. Gradients have no logical
 * direction keyword, which is the one place AGENTS.md §1.9 cannot be met with
 * a property alone.
 */

.page-hero__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page-hero__photo-img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center;
}

.page-hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    var(--hero-wash-near) 0%,
    var(--hero-wash-mid) 45%,
    var(--hero-wash-far) 100%
  );
}

[dir="rtl"] .page-hero__photo::after {
  background: linear-gradient(
    to left,
    var(--hero-wash-near) 0%,
    var(--hero-wash-mid) 45%,
    var(--hero-wash-far) 100%
  );
}

.page-hero--navy .page-hero__photo::after {
  background: linear-gradient(
    to right,
    var(--hero-wash-navy-near) 0%,
    var(--hero-wash-navy-mid) 45%,
    var(--hero-wash-navy-far) 100%
  );
}

[dir="rtl"] .page-hero--navy .page-hero__photo::after {
  background: linear-gradient(
    to left,
    var(--hero-wash-navy-near) 0%,
    var(--hero-wash-navy-mid) 45%,
    var(--hero-wash-navy-far) 100%
  );
}

/* Below the split breakpoint (900px in pages.css) the copy runs edge to edge,
   so the wash goes even rather than thinning under the text. */
@media (max-width: 56.25em) {
  .page-hero__photo::after,
  [dir="rtl"] .page-hero__photo::after {
    background: var(--hero-wash-narrow);
  }

  .page-hero--navy .page-hero__photo::after,
  [dir="rtl"] .page-hero--navy .page-hero__photo::after {
    background: var(--hero-wash-navy-narrow);
  }
}

@media print {
  .page-hero__photo { display: none; }
}
