/* Desktop header is 5rem. Reserve 180px for the current single-row statistics.
   Keep the original layout on mobile and tablet. Apply only beside statistics. */
@media (min-width: 1024px) {
  body.home #main .front-hero-container:has(+ .ethos-stats) {
    min-height: max(360px, calc(100vh - 5rem - 180px));
    min-height: max(360px, calc(100svh - 5rem - 180px));
  }
  body.home.admin-bar #main .front-hero-container:has(+ .ethos-stats) {
    min-height: max(360px, calc(100vh - 5rem - 180px - 32px));
    min-height: max(360px, calc(100svh - 5rem - 180px - 32px));
  }
}

/* Measured after layout, overriding the no-JavaScript estimate above. */
@media (min-width: 1024px) {
  body.home #main .front-hero-container.ethos-hero-measured:has(+ .ethos-stats) {
    min-height: max(360px, var(--ethos-hero-height));
  }
}

/* Center the heading within the hero, independent of viewport height. */
@media (min-width: 1024px) {
  body.home #main .front-hero-container {
    position: relative;
  }
  body.home #main .front-hero-container .hero-content-container > div {
    position: absolute;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
}
