/* Single-Expertise hero — full-bleed photo + colour overlay that sweeps up (bottom→top) on load,
   then runs off the top on scroll while the heading hides and the breadcrumb persists.
   Motion lives in expertise-hero.js; the text reveal is owned by text-reveal.js.
   Baseline (no JS / reduced motion) shows the rested state: overlay band + visible text. */
.xp-hero {
  position: relative;
  min-height: 100vh;
  overflow: clip;
  isolation: isolate;
  color: var(--color-white);
  --xp-overlay: var(--color-water);
}
/* Per-post overlay tint (ACF "Hero overlay colour"). Mirrors the hero_about token set. */
.xp-hero--overlay-clay    { --xp-overlay: var(--color-clay); }
.xp-hero--overlay-water   { --xp-overlay: var(--color-water); }
.xp-hero--overlay-land    { --xp-overlay: var(--color-land); }
.xp-hero--overlay-steel   { --xp-overlay: var(--color-steel); }
.xp-hero--overlay-skyline { --xp-overlay: var(--color-skyline-2); }

.xp-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.xp-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
}
/* Static darkening overlay on the photo (#000 0% → 40%). */
.xp-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.4) 100%
  );
  pointer-events: none;
}

/* Colour band — anchored to the bottom, covering the lower ~58% of the hero. expertise-hero.js
   sweeps it up from below on load and runs it off the top on scroll. Gradient top edge so it
   melts into the photo rather than cutting a hard line. */
.xp-hero__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  z-index: -1;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--xp-overlay) 80%, transparent) 55%,
    transparent 55%
  );
  will-change: transform, opacity;
}

.xp-hero__inner {
  position: relative;
  min-height: 100vh;
  align-content: stretch;
  padding-block: var(--section-pad);
}
/* Title anchored top, sub-heading dropped to the bottom (above the breadcrumb). */
.xp-hero__content {
  grid-column: 1 / 7;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-xl);
  margin: 0;
  padding-block-end: var(--sp-2xl);
}
.xp-hero__title {
  margin-top: var(--sp-xl);
  font-size: var(--text-h2);
  line-height: var(--lh-tight);
  color: var(--color-white);
}
.xp-hero__sub {
  margin: 0;
  /* max-width: 26ch; */
  font-family: var(--font-display);
  font-size: var(--text-h3);
  line-height: var(--lh-quote);
  color: var(--color-white);
}

/* Breadcrumb — pinned bottom-left on the grid content edge. The one element that survives the
   scroll exit (z-index keeps it above the overlay). */
.xp-hero__breadcrumb {
  position: absolute;
  left: var(--container-pad);
  bottom: var(--sp-xl);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: var(--text-h7);
  color: var(--color-white);
}
.xp-hero__breadcrumb a {
  color: var(--color-white);
  opacity: 0.85;
}
.xp-hero__breadcrumb a:hover {
  opacity: 1;
  text-decoration: none;
}
.xp-hero__breadcrumb .ph {
  font-size: 0.85em;
  opacity: 0.7;
}

@media (max-width: 900px) {
  .xp-hero__content {
    grid-column: 1 / -1;
  }
  .xp-hero__sub {
    font-size: var(--text-h5);
  }
}

/* Reduced motion / no JS: rest the overlay in place and keep the text visible. */
@media (prefers-reduced-motion: reduce) {
  .xp-hero__overlay {
    transform: none !important;
    opacity: 1 !important;
  }
}
