.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40dvh;
  overflow: hidden;
  color: var(--color-white);
  background: var(--color-bg-dark);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Blurred/darkened/scaled-up atmosphere copy, cover — cropping it is fine,
   it's just background texture, not the focal character art. This layer
   fills .hero completely at every width (unlike .hero__media-fg below), so
   the badge card (breadcrumb, H1, rating, lead, CTA) always has a rich
   full-bleed image behind it instead of the plain dark section background
   showing through wherever the letterboxed sharp copy doesn't reach. */
.hero__media-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(28px) brightness(0.5) saturate(1.15);
  transform: scale(1.15);
}

/* Sharp copy, object-fit: cover at every width — scales and crops however
   much is needed to fully cover the badge (breadcrumb/H1/rating/lead/CTA)
   with image, edge to edge. What exactly gets cropped off the source art
   is not a concern here: this is a text background, not a protected piece
   of character art, so filling the box completely wins over preserving
   every detail of the picture. */
.hero__media-fg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* --hero-shift-y: 100% = fully bottom-anchored (default). Set lower
     (e.g. 90%, 80%, 75%) via $hero_shift in hero.php to "raise" the visible
     crop — reveals more of the top of the source image and less of the
     very bottom, per page. */
  object-position: center var(--hero-shift-y, 100%);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  /* Two layers in one: a horizontal band (transparent at the true edges,
     dark in the middle) keeps the centered text column legible without
     covering the artwork at the sides, stacked over a soft top-to-bottom
     gradient for overall depth — same idea as the bonus-banner's
     full-height band, now that the text no longer sits in a boxed card. */
  background:
    linear-gradient(90deg,
      rgba(10, 2, 14, 0) 0%,
      rgba(10, 2, 14, 0.6) 32%,
      rgba(10, 2, 14, 0.6) 68%,
      rgba(10, 2, 14, 0) 100%),
    linear-gradient(180deg, rgba(23, 5, 29, 0.3) 0%, rgba(23, 5, 29, 0.7) 100%);
  z-index: 1;
}

.hero__inner {
  position: relative;
  z-index: 2;
  padding-block: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Content column — no boxed background anymore; the .hero__overlay band
   plus text-shadow below carry the legibility instead, matching the
   full-bleed reference banner style used on the bonus block. */
.hero__content {
  max-width: 34rem;
}

.hero__inner .breadcrumb__list { justify-content: center; }

.hero__title {
  color: var(--color-heading-gold);
  margin-top: 0.75rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}
.hero__lead {
  margin-top: var(--space-h2-text);
  color: var(--color-text-body);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65);
}
.hero__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 1.5rem; }

@media (min-width: 768px) {
  .hero {
    min-height: 45dvh;
    /* The ~2.8/1 "cinematic" ratio (overridable per page via --hero-ratio,
       see hero.php) now lives on .hero itself, not on .hero__media. When a
       section's own content (heading/lead/CTA stack) needs more room than
       the ratio would give it, the browser grows .hero taller to fit that
       content instead of the media block silently overflowing the
       section's bounds — aspect-ratio only sets the minimum/preferred
       height, content can still push it taller.
       Previously the media had its own independent aspect-ratio, sized
       from container width alone. Whenever a page's heading/lead was
       short enough that .hero's real (content-driven) height came out
       shorter than that independently-computed media height, the excess
       media height overflowed above .hero's top edge and .hero's own
       overflow: hidden silently clipped it — an extra, uncontrolled crop
       on top of the intentional object-fit: cover crop, which is what was
       cutting into character heads (e.g. the wolf on /login/) well beyond
       what --hero-shift-y accounted for. Giving .hero the ratio directly
       means .hero__media (inset: 0 below) always matches .hero's actual
       box exactly, so there's nothing left to overflow or get clipped. */
    aspect-ratio: var(--hero-ratio, 2.8) / 1;
  }

  .hero__media-fg {
    object-fit: cover;
    object-position: center var(--hero-shift-y, 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 100%);
  }
}

@media (min-width: 1440px) {
  .hero { min-height: 50dvh; }
}
