/**
 * @file
 * Hero component styles.
 */

.ep-hero {
  position: relative;
  width: 100%;
  /* Kept as a variable: the page layout offsets the sidebar by this height so
     the full-bleed hero cannot run over it. */
  min-height: var(--ep-hero-height, 60vh);
  display: flex;
  overflow: hidden;
  background: #111;
  isolation: isolate;
}

.ep-hero__media,
.ep-hero__media > *,
.ep-hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

.ep-hero__media img {
  object-fit: cover;
  object-position: center;
  display: block;
  max-width: none;
}

.ep-hero__scrim {
  position: absolute;
  inset: 0;
}

.ep-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 76rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  box-sizing: border-box;
  display: flex;
}

/* Caption, not a heading: the node title is the H1 further down the page, so
   this is set in the italic serif to read as a pull quote over the image. */
.ep-hero__caption {
  font-family: Georgia, "Charter", "Bitstream Charter", "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.15;
  color: #fff;
  margin: 0;
  font-size: clamp(2rem, 5.5vw, 4rem);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.ep-hero__text {
  margin-top: 0;
  color: #f0f0f0;
  font-size: 1.125rem;
  line-height: 1.65;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.ep-hero__caption + .ep-hero__text {
  margin-top: 1.25rem;
}

.ep-hero__text p {
  margin: 0 0 1rem;
}

.ep-hero__text p:last-child {
  margin-bottom: 0;
}

/* Overlay: heading at the bottom left over a bottom-up gradient scrim. */
.ep-hero--overlay .ep-hero__scrim {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 38%, rgba(0, 0, 0, 0) 70%);
}

.ep-hero--overlay .ep-hero__inner {
  align-items: flex-end;
}

.ep-hero--overlay .ep-hero__copy {
  flex: 1 1 auto;
  max-width: 60%;
}

/* Split: copy in the left half, vertically centred; right half stays clear. */
.ep-hero--split .ep-hero__scrim {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.62) 42%, rgba(0, 0, 0, 0.1) 68%, rgba(0, 0, 0, 0) 100%);
}

.ep-hero--split .ep-hero__inner {
  align-items: center;
}

.ep-hero--split .ep-hero__copy {
  flex: 0 0 50%;
  width: 50%;
  padding-right: 2.5rem;
  box-sizing: border-box;
}

.ep-hero--split .ep-hero__caption {
  font-size: clamp(1.875rem, 3.6vw, 3rem);
}

@media (max-width: 48rem) {
  .ep-hero {
    min-height: 52vh;
  }

  .ep-hero--split .ep-hero__copy {
    flex: 1 1 auto;
    width: 100%;
    padding-right: 0;
  }

  .ep-hero--split .ep-hero__scrim {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.3) 100%);
  }
}
