/* The home page. Tokens and components come from the style guide; this file only arranges them.
   Bands are full width; .hp-wrap keeps the content to the site width. */
.hp {
  padding-bottom: var(--space-8);
}

.hp-wrap {
  width: 100%;
  max-width: calc(var(--width-content) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hp-section {
  padding-block: var(--space-8) 0;
}

.hp-section > h2,
.hp-head h2 {
  font-size: var(--text-h2);
}

.hp-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  align-items: baseline;
  justify-content: space-between;
}

.hp-head__link {
  font-family: var(--font-ui);
  font-weight: 600;
}

/* The gap from a section heading to its content is the same in every section: the topics, the articles, the courses */
.hp .article-index {
  margin-top: var(--space-5);
  border-top: 1px solid var(--color-ink);
}

.hp-courses .card-grid {
  margin-top: var(--space-5);
}

/* Bands */
.hp-band {
  margin-top: var(--space-8);
  padding-block: var(--space-8);
}

.hp-band--ink { background: var(--color-ink); color: var(--color-white); }
.hp-band--tint { background: var(--color-primary-tint); }

.hp-band--ink h2 { color: inherit; }

.hp-band--ink :focus-visible {
  outline-color: var(--color-focus-on-dark);
}

/* The hero sits flush under the header */
.hp-band.hp-hero {
  margin-top: 0;
  padding-block: var(--space-8);
}

.hp-hero .hero {
  max-width: 48rem;
  padding-block: 0;
}

.hp-hero h1 {
  text-wrap: balance;
}

/* Why the platform exists: heading on the left, text on the right from 48em */
.hp-why {
  display: grid;
  gap: var(--space-4) var(--space-7);
}

.hp-why__text > * + * { margin-top: var(--space-4); }
.hp-why__text > :first-child {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: 500;
  line-height: var(--leading-tight);
}

@media (min-width: 48em) {
  .hp-why { grid-template-columns: 1fr 1.4fr; align-items: start; }
}
