/* ==========================================================================
   AMGB performance patch v1, additions on top of mobile-v4.css
   --------------------------------------------------------------------------
   Loaded AFTER mobile-v4.css. Author 2026-05-28 (perf regression fix).

   PROBLEMS addressed
     1. Testimonials and contact hero used inline-style CSS variables
        (`--amgb-test-hero-photo`, `--amgb-contact-hero-photo`) referencing
        the full-res JPG (391 KB and 499 KB respectively). The ::before
        pseudo-element ran `background-image: var(...)` which the browser
        cannot preload-scan and cannot serve WebP for.

     2. With the postmeta switched to a real `<picture>` element placed at
        the start of the hero section, the pseudo-element bg-image rule is
        now dead and the new <picture> needs to sit in the exact spot the
        ::before used to occupy.

   CHANGES
     - Disable `::before { background-image: ... }` on the two hero
       variants so the now-unused inline CSS-var won't render a duplicate
       (the inline style is removed from the postmeta as well; this is a
       defence-in-depth no-op).
     - New `.amgb-page__hero-bg` class: absolute-fill picture wrapper
       that sits below content (z-index: -2) at the same depth the
       ::before pseudo used. The hero ::after linen-gradient overlay
       (z-index: -1) continues to sit on top, preserving the existing
       wash look.

   Hard rules
     - Additive only; no rules from earlier files removed.
     - AU English in comments.
     - Matches the opacity / object-position previously expressed in
       the page.css ::before rules, so the visual result is identical.
   ========================================================================== */

/* 1. Neutralise the now-unused background-image on hero ::before. The
      inline CSS var is also removed from postmeta, but this keeps the
      page deterministic if some cache still serves an older copy. */
.amgb-test__hero--photo::before { background-image: none; }
.amgb-contact__hero--photo::before { background-image: none; }

/* 2. New absolute-fill hero <picture> wrapper. Behind the linen wash
      that ::after paints, in front of the section background colour. */
.amgb-page__hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  margin: 0;
  padding: 0;
  pointer-events: none;
}
.amgb-page__hero-bg img,
.amgb-page__hero-bg picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.amgb-page__hero-bg img {
  object-fit: cover;
}

/* 3. Page-specific opacity + object-position to mirror the look that
      the page.css ::before rules previously produced. */
.amgb-test__hero .amgb-page__hero-bg img {
  opacity: 0.32;
  object-position: 50% 60%;
}
.amgb-contact__hero .amgb-page__hero-bg img {
  opacity: 0.55;
  object-position: 50% 45%;
}
