/**
 * @file
 * Page header (hero) component.
 */

.hero {
  margin: 0.75rem 1rem;
  padding: var(--jh-section-padding);
  border-radius: var(--jh-radius-panel);
  background: var(--jh-wash);
}

.hero--media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  align-items: center;
}

.hero__heading {
  max-width: 22ch;
  margin: 0 0 1.25rem;
  font-size: 3.25rem;
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero--media .hero__heading {
  max-width: none;
}

.hero__heading strong {
  font-weight: 700;
}

.hero__text {
  max-width: 47.5rem;
}

.hero__text p {
  font-size: 1.1875rem;
}

.hero__text > :last-child {
  margin-bottom: 0;
}

.hero__media--photo img {
  display: block;
  width: 100%;
  height: 420px;
  border-radius: var(--jh-radius-card);
  object-fit: cover;
  object-position: center 55%;
}

/* Scoped to .hero so it outranks the global .card rules (css/components/
   surface.css), which load later. */
.hero .hero__media--card {
  align-items: center;
  margin: 0;
  padding: 3rem 1.5rem;
  text-align: center;
}

.hero__media--card img {
  display: block;
  width: 260px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 1.25rem;
}

.hero__media--card figcaption {
  font-weight: 700;
}

@media (max-width: 820px) {
  .hero {
    margin: 0.5rem;
  }

  .hero--media {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }

  .hero__heading {
    font-size: 2.25rem;
  }

  .hero__text p {
    font-size: 1.0625rem;
  }

  .hero__media--photo img {
    height: 240px;
  }
}
