/* Hero V1: full-height primary panel, text left and illustration right, with
   the same gradient spines as Page Header V3 in the top-right and bottom-left
   corners. The section clips them at its rounded bottom corners. */

.forge-hero-v1 {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Fill the viewport up to 825px; taller content still pushes it out. */
  min-height: min(100vh, 825px);
  min-height: min(100svh, 825px);
}

.forge-hero-v1 > .forge-hero-v1__grid {
  position: relative;
  z-index: 1;
  width: 100%;
}

.forge-hero-v1__image img {
  display: block;
  width: 100%;
  height: auto;
  /* The panel height (100vh capped at 825px) less its top and bottom padding.
     162px is twice the 2xl spacing step at desktop; written out because the
     W3C validator cannot type var() inside calc(). */
  max-height: min(calc(100vh - 162px), 663px);
  object-fit: contain;
}

.forge-hero-v1 .wp-block-button,
.forge-hero-v1 .wp-block-buttons {
  width: 100%;
}

@media (min-width: 576px) {
  .forge-hero-v1 .wp-block-button {
    width: max-content;
  }
}

/* Spines, as on Page Header V3. */
.forge-hero-v1::before,
.forge-hero-v1::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: contain;
}

.forge-hero-v1::before {
  top: 0;
  right: 0;
  width: min(703px, 49vw);
  aspect-ratio: 703 / 506;
  background-image: url("../decorations/page-header-spine-right.svg");
  background-position: top right;
}

.forge-hero-v1::after {
  bottom: 0;
  left: 0;
  width: min(687px, 48vw);
  aspect-ratio: 687 / 522;
  background-image: url("../decorations/page-header-spine-left.svg");
  background-position: bottom left;
}

@media (max-width: 1023px) {
  /* Stacked. The fixed header sits over the top of the panel, so the text
     starts below it. */
  .forge-hero-v1 {
    padding-top: calc(var(--wp--preset--spacing--2-xl) + 80px) !important;
  }

  .forge-hero-v1__image img {
    max-height: 60vh;
  }
}

@media (max-width: 767px) {
  .forge-hero-v1::before {
    width: 78vw;
  }

  .forge-hero-v1::after {
    width: 76vw;
  }
}
