/* Section Hero block */
.section-hero {
  --section-hero-padding: var(--four-spacer);
  position: relative;
  display: grid;
  grid-template: 1fr / 1fr;
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--section-hero-padding);
  overflow: hidden;
}

@media screen and (max-width: 767px) {
  .section-hero {
    --section-hero-padding: var(--two-spacer);
  }
}

.section-hero-background {
  position: absolute;
  inset: 0;
}

/* Front end */
.section-hero-bg {
  position: sticky;
  top: 0;
  z-index: -1;
  height: 100vh;
  margin-bottom: -100vh;
  overflow: hidden;
}

/* No block spacing above a Section Hero */
.entry-content > .section-hero-bg,
.entry-content > .section-hero {
  margin-top: 0;
}

.section-hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-hero-content {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 50rem;
}

.section-hero-content > * {
  margin: 0;
}

/* Title and subtitle */
.section-hero .section-hero-title,
.section-hero .section-hero-subtitle {
  font-family: 'Pressura Extended', sans-serif;
  font-size: clamp(2.25rem, 7.8vw, 84px);
  line-height: 1;
  letter-spacing: -1px;
}

.section-hero .section-hero-title {
  font-weight: 400;
}

.section-hero .section-hero-subtitle {
  font-weight: 700;
}

/* 'Title SVG' in place of the title text */
.section-hero-title-svg-wrap {
  position: relative;
  display: block;
  width: min(100%, 720px);
}

.section-hero-title-svg {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

/* Grain, cut to the letter shapes by masking with the same SVG */
.section-hero-title-grain {
  --section-hero-grain-opacity: 0.3;
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n' x='0' y='0' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='2.5 0 0 0 -0.75 2.5 0 0 0 -0.75 2.5 0 0 0 -0.75 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px;
  opacity: var(--section-hero-grain-opacity);
  mix-blend-mode: overlay;
  -webkit-mask: var(--section-hero-title-mask) center / contain no-repeat;
  mask: var(--section-hero-title-mask) center / contain no-repeat;
  pointer-events: none;
}

.section-hero-content.is-x-center .section-hero-title-svg-wrap { margin: 0 auto; }
.section-hero-content.is-x-right  .section-hero-title-svg-wrap { margin-left: auto; }

/* Byline under the title */
.section-hero .section-hero-byline {
  margin-top: 0.75em;
  font-family: 'Pressura Extended', sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 2.625rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.5px;
  opacity: 0.8;
}

/* Title position */
.section-hero-content.is-x-left   { justify-self: start;  text-align: left; }
.section-hero-content.is-x-center { justify-self: center; text-align: center; }
.section-hero-content.is-x-right  { justify-self: end;    text-align: right; }
.section-hero-content.is-y-top    { align-self: start; }
.section-hero-content.is-y-center { align-self: center; }
.section-hero-content.is-y-bottom { align-self: end; }

.section-hero.is-top-section .section-hero-content.is-y-top {
  margin-top: var(--site-header-height, 0px);
}
