/* Sticky hero strip */
.page-hero-sticky-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--topbar-height);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  background: transparent;
}

.page-hero-sticky-strip.is-visible {
  opacity: 1;
}

.page-hero-sticky-strip--static {
  opacity: 1;
}

.page-hero-sticky-strip--static .page-hero-sticky-track,
.page-hero-sticky-strip--static .page-hero-sticky-frame {
  inset: 0;
  height: 100%;
}

.page-hero-sticky-strip--static .page-hero-sticky-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.page-hero-sticky-strip--plain {
  background: rgba(253, 253, 253, 0.72);
  backdrop-filter: blur(12px);
  opacity: 1;
  border-bottom: 1px solid rgba(228, 228, 228, 0.72);
}

.page-hero-sticky-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 14, 15, 0.46) 0%,
    rgba(12, 14, 15, 0.32) 100%
  );
  backdrop-filter: blur(7px);
  z-index: 1;
  pointer-events: none;
}

.page-hero-sticky-strip--plain::after {
  display: none;
}

.page-hero-sticky-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.page-hero-sticky-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  will-change: transform;
}

.page-hero-sticky-frame {
  width: 100%;
}

.page-hero-sticky-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* Full hero */
.page-hero-full {
  position: relative;
  z-index: 1;
  width: 100%;
  height: clamp(22rem, 60vw, 68vh);
  min-height: 22rem;
  max-height: 68rem;
  overflow: visible;
}

.page-hero-full--original {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  background: #070c0b;
}

.page-hero-visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.page-hero-full--original .page-hero-visual {
  position: relative;
  inset: auto;
}

.page-hero-media {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.page-hero-full--original .page-hero-media {
  position: relative;
  inset: auto;
  will-change: auto;
}

.page-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.page-hero-full--original .page-hero-media img {
  height: auto;
  object-fit: contain;
}

.page-hero-region {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

@media (max-width: 760px) {
  .page-hero-full:has(.rsarticlehero--with-actions) {
    height: clamp(27rem, 114vw, 34rem);
    min-height: 27rem;
  }

  .page-hero-full--original {
    height: clamp(31rem, 132vw, 40rem);
    min-height: 31rem;
    max-height: none;
  }

  .page-hero-full--original .page-hero-visual,
  .page-hero-full--original .page-hero-media {
    position: absolute;
    inset: 0;
  }

  .page-hero-full--original .page-hero-media img {
    height: 100%;
    object-fit: cover;
  }
}

/* Let long article titles determine the mobile hero height. */
@media (max-width: 760px) {
  .page-hero-full:has(.rsarticlehero) {
    height: auto;
    min-height: 31rem;
    max-height: none;
  }

  .page-hero-full:has(.rsarticlehero) .page-hero-region {
    position: relative;
    inset: auto;
  }
}

/* Keep event and learning content in flow so long copy can grow the hero. */
.page-hero-full:has(.rseventhero, .rselearninghero) {
  display: grid;
  height: auto;
  max-height: none;
}

.page-hero-full:has(.rseventhero, .rselearninghero) .page-hero-region {
  position: relative;
  inset: auto;
  display: flex;
  min-width: 0;
  grid-area: 1 / 1;
}

/* Original-size images and content share a row; the taller one sets its height. */
.page-hero-full--original:has(.rseventhero, .rselearninghero) .page-hero-visual {
  grid-area: 1 / 1;
}
