/* ==========================================================================
   IHQC temporary site: home page only (loaded after site.css)
   ========================================================================== */

/* ---------- Hero ---------- */

.hero {
  align-items: center;
  border-top: 6px solid var(--color-green);
  display: grid;
  margin: auto;
  /* 60% of the window height (20rem to 43.75rem), but grows if the text needs more room */
  min-height: clamp(20rem, 60vh, 43.75rem);
  position: relative;
  width: 100%;
}

/* Photo fills the hero and overlaps the cards' top border by 6px, as before */
.hero-image {
  height: calc(100% + 6px);
  left: 0;
  object-fit: cover;
  object-position: center center;
  opacity: 0.96;
  position: absolute;
  top: 0;
  width: 100%;
}

/* Text block: centered vertically, left edge on the shared container edge */
.hero-content {
  --gutter: 2.5rem;
  padding-block: 2rem;
  position: relative;
}

.hero-text {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  row-gap: 1.5rem;
  width: max(55%, min(100%, 26rem));
}

/* Phone sizes are the base; the desktop block below overrides them */
.hero-title {
  color: var(--color-white);
  font-size: 2.375rem; /* 38px */
  font-weight: 700;
  line-height: 2.875rem; /* 46px */
  margin: 0;
}

.hero-subtitle {
  color: var(--color-white);
  font-size: 1.375rem; /* 22px */
  font-weight: 400;
  line-height: 1.875rem; /* 30px */
  margin: 0;
}

@media (max-width: 700px) {
  .hero {
    min-height: clamp(27.5rem, 60vh, 43.75rem);
  }

  .hero-text {
    row-gap: 1.25rem;
    width: 100%;
  }
}


/* Desktop: the hero scales as one piece. Its height and the text size and width
   are all fractions of the hero's width (cqw = 1% of that width), so the text keeps
   the same proportion to the photo at every window size. Values are the 1440px design. */
@media (min-width: 701px) {
  .hero {
    aspect-ratio: 8 / 3;
    container-type: inline-size;
    min-height: 0;
  }

  .hero-content {
    padding-block: 0;
  }

  .hero-text {
    row-gap: 1.667cqw;
    width: min(100%, 44cqw);
  }

  .hero-title {
    font-size: 3.889cqw; /* 56px at 1440px */
    line-height: 4.653cqw; /* 67px at 1440px */
  }

  .hero-subtitle {
    font-size: 2.639cqw; /* 38px at 1440px, same as h2 */
    line-height: 3.542cqw; /* 51px at 1440px */
  }
}


/* ---------- Cards ---------- */

.cards-section {
  background-color: var(--color-navy);
  border-top: 6px solid var(--color-green);
  width: 100%;
}

.cards {
  --gutter: 1.25rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-block: 3.75rem;
}

.card {
  background-color: var(--color-white);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.75rem;
  text-align: center;
}

.card-title {
  color: var(--color-blue);
  font-size: 1.6875rem;
  font-style: italic;
  font-weight: 700;
  line-height: 2rem;
  margin: 0 0 1rem;
}

.card-text {
  color: var(--color-ink);
  flex: 1;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  margin: 0 0 1.75rem;
}

.card-button {
  align-self: center;
  background-color: var(--color-link);
  border: 2px solid var(--color-link);
  color: var(--color-white);
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0.625rem 1.625rem;
  text-decoration: none;
}

.card-button:hover,
.card-button:focus-visible {
  background-color: var(--color-white);
  color: var(--color-link);
}

/* Stacked cards: 520px of content (560px with side padding on phones) */
@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
    max-width: 32.5rem;
  }
}

@media (max-width: 700px) {
  .cards {
    max-width: 35rem;
  }
}
