.hero {
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to));
  color: var(--hero-text);
  padding: 96px 0 88px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  max-width: 16ch;
}

.hero .lead {
  font-size: 1.2rem;
  max-width: 63ch;
  margin-top: 20px;
  opacity: .9;
}

.hero .lead p {
  margin: 0 0 .8em;
}

.cta {
  display: inline-block;
  margin-top: 28px;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  background: var(--highlight);
  color: var(--accent-text);
}

/* Splash image behind the banner, under a tint in the theme's hero colours. */
.hero.has-splash {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 140px 0 128px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero.has-splash::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg,
    color-mix(in srgb, var(--hero-from) 88%, transparent) 0%,
    color-mix(in srgb, var(--hero-from) 70%, transparent) 45%,
    color-mix(in srgb, var(--hero-to) 25%, transparent) 100%);
}

@media (max-width: 640px) {
  .hero {
    padding: 64px 0 56px;
  }

  .hero.has-splash {
    padding: 88px 0 72px;
  }

  .hero.has-splash::before {
    background: color-mix(in srgb, var(--hero-from) 78%, transparent);
  }
}

/* Banner video: over the splash image (its poster), under the tint. The tint
 * is a little lighter than over a photo, so the motion shows through. */
.hero.has-video::before {
  background: linear-gradient(100deg,
    color-mix(in srgb, var(--hero-from) 82%, transparent) 0%,
    color-mix(in srgb, var(--hero-from) 58%, transparent) 45%,
    color-mix(in srgb, var(--hero-to) 15%, transparent) 100%);
}

.hero-video {
  pointer-events: none;
}

/* Less motion asked for: the still splash image only. */
@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero.has-video::before {
    background: color-mix(in srgb, var(--hero-from) 70%, transparent);
  }
}
