/* components/editorial-hero.css — layout for sections/editorial-hero.hbs:
   a full-bleed image with the site header floating over it
   ([data-hero-overlap] in site-header.css). */

/* Full-bleed breakout of home.hbs's .post-list.container. 100vw includes
   the scrollbar; body's overflow-x: clip (02-base.css) absorbs the excess. */
.editorial-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  /* height, not min-height: fills the opening viewport; very long titles clip. */
  height: var(--editorial-hero-height);
  overflow: hidden;
}

/* The link covers the whole image. */
.editorial-hero__media {
  position: absolute;
  inset: 0;
  display: block;
}

.editorial-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scrim top (for the overlapping header) and bottom (for the text), coloured
   by the --color-hero-gradient setting. */
.editorial-hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      color-mix(in srgb, var(--color-hero-gradient) 55%, transparent),
      transparent 25%
    ),
    linear-gradient(
      to top,
      color-mix(in srgb, var(--color-hero-gradient) 70%, transparent),
      transparent 45%
    );
}

.editorial-hero__body {
  position: relative;
  width: 100%;
  max-width: var(--container-content);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block-end: var(--space-16);
  text-align: center;
  /* Admin setting; shared with the overlapping nav. */
  color: var(--color-hero-text);
}

.editorial-hero__title {
  font-family: var(--font-heading);
  font-size: var(--lead-title-mobile-size);
  line-height: var(--leading-tight);
}

/* Title, dek and byline all link to the post. */
.editorial-hero__link {
  color: inherit;
  text-decoration: none;
}

.editorial-hero__dek {
  margin-block-start: var(--space-4);
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
}

.editorial-hero__byline {
  margin-block-start: var(--space-4);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}

@media (width >= 48rem) {
  .editorial-hero__title {
    font-size: var(--text-6xl);
  }
}
