.home-pathways {
  --stack-peek: var(--al-stack-peek);
  --entry-nav-top: 5.75rem;
}

.home-pathways > .container {
  max-width: calc(var(--al-content-wide) + 2 * var(--al-gutter));
}

.home-pathways-heading {
  text-align: center;
}

.home-pathways-heading > p {
  margin: var(--al-space-intro) auto 0;
  color: var(--swatch--charcoal);
}

.home-pathway-index {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto clamp(1.5rem, 3vw, 2.5rem);
  padding: .3rem;
  border-radius: 999px;
  background: var(--swatch--white);
  box-shadow: 0 .35rem 1.25rem rgb(54 45 33 / .06);
}

.home-pathway-index a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: .35rem clamp(.6rem, 1.65vw, 1.45rem);
  border-radius: 999px;
  color: var(--swatch--charcoal);
  font: 400 clamp(.94rem, 1.2vw, 1.05rem)/1.35 Haffer, sans-serif;
  text-align: center;
  text-decoration: none;
}

.home-pathway-index a:is(:hover, :focus-visible) {
  background: var(--swatch--beige);
  color: var(--swatch--charcoal);
}

.home-pathways-grid {
  display: flow-root;
  isolation: isolate;
}

.home-pathway-anchor,
.home-pathway {
  --card-order: 0;
  --stack-top: calc(var(--entry-nav-top) + 4.25rem + var(--card-order) * var(--stack-peek));
}

.home-pathway-anchor {
  scroll-margin-top: 5.75rem;
}

.home-pathway-anchor:not(:first-child) {
  margin-block-start: var(--al-stack-gap);
}

.home-pathways .home-pathway {
  --drawing-scale: 136%;
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: clip;
  background: var(--swatch--white);
  border-radius: clamp(.875rem, 1.55vw, 1.4rem);
}

.home-pathway:nth-of-type(2) {
  --drawing-scale: 172%;
  background: #f7f4f1;
  background: color-mix(in srgb, var(--swatch--white), var(--swatch--beige));
}

.home-pathway:nth-of-type(3) {
  --drawing-scale: 221%;
  background: var(--swatch--beige);
}

.home-pathway-anchor:nth-of-type(2),
.home-pathway:nth-of-type(2) {
  --card-order: 1;
}

.home-pathway-anchor:nth-of-type(3),
.home-pathway:nth-of-type(3) {
  --card-order: 2;
}

/* A covered card must come forward when a keyboard user returns to its link. */
.home-pathway:has(:focus-visible) {
  z-index: 4;
}

.home-pathway-layout {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  min-height: clamp(23rem, 31vw, 28rem);
  padding: clamp(1.8rem, 3.4vw, 3.5rem) clamp(2rem, 5vw, 5rem);
  color: #262626;
}

.home-pathway-illustration {
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(100%, clamp(12rem, 22.5vw, 19.5rem));
  aspect-ratio: 1;
  position: relative;
}

/* Equalise the painted drawings across the differently padded 900px originals. */
.home-pathway-illustration img {
  position: absolute;
  display: block;
  width: var(--drawing-scale);
  height: auto;
  max-width: none;
  pointer-events: none;
}

.home-pathway-content {
  display: grid;
  justify-items: start;
  gap: .95rem;
  min-width: 0;
}

.home-pathway-content h3 {
  margin: 0;
  font: 400 clamp(2.1rem, 3.9vw, 4.25rem)/1.03 'Value Serif', Georgia, serif;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.home-pathway-content > p {
  max-width: 43ch;
  margin: 0;
  font: 300 clamp(1.05rem, 1.35vw, 1.275rem)/1.5 Haffer, sans-serif;
  text-wrap: pretty;
}

.home-pathway-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.125rem;
  min-height: 40px;
  margin-top: .35rem;
  padding: .5rem 1.1rem;
  border-radius: 100px;
  background: var(--swatch--teal);
  color: var(--swatch--white);
  font: 400 clamp(.9375rem, 1.10727vw, 1rem)/1.25 'Value Serif', Georgia, serif;
  text-decoration: none;
}

.home-pathway-cta .icon-button-arrow {
  flex: none;
  width: .875rem;
  height: .65625rem;
}

.home-pathway-links {
  display: flex;
  flex-flow: row wrap;
  justify-self: stretch;
  align-items: start;
  gap: .55rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-pathway-cta.home-pathway-cta--secondary {
  gap: .6em;
  min-height: 34px;
  margin: 0;
  padding: .45em .85em;
  border: 1px solid var(--swatch--teal);
  background: transparent;
  color: var(--swatch--teal);
  font-size: var(--al-type-caption);
}

.home-pathway-links .icon-button-arrow {
  flex: none;
  width: .8em;
  height: .6em;
}

@media (pointer: coarse), (max-width: 42rem) {
  .home-pathway-cta,
  .home-pathway-cta.home-pathway-cta--secondary {
    min-height: 44px;
  }
}

.home-pathways a:focus-visible {
  outline: 2px solid var(--swatch--teal);
  outline-offset: 3px;
}

.home-pathway:focus-visible { outline: none; }
.home-pathway:focus-visible h3 {
  text-decoration: underline;
  text-decoration-color: var(--swatch--teal);
  text-decoration-thickness: .04em;
  text-underline-offset: .14em;
}

@media (min-width: 56rem) and (min-height: 46rem) and (prefers-reduced-motion: no-preference) {
  .home-pathways {
    --stack-runout: min(var(--al-space-section), calc(2 * var(--stack-peek) + .65rem));
  }

  .home-pathways > .container {
    padding-bottom: calc(var(--al-space-section) - var(--stack-runout));
  }

  .home-pathway-index {
    position: sticky;
    top: var(--entry-nav-top);
    z-index: 6;
  }

  .home-pathways-grid {
    padding-bottom: var(--stack-runout);
  }

  .home-pathways .home-pathway {
    position: sticky;
    top: var(--stack-top);
  }

  .home-pathway-anchor { scroll-margin-top: var(--stack-top); }
}

@media (max-width: 42rem) {
  .home-pathway-index {
    flex-wrap: nowrap;
    width: 100%;
    border-radius: 1.55rem;
  }

  .home-pathway-index a {
    flex: 1;
    min-width: 0;
    padding-inline: .3rem;
    font-size: clamp(.8rem, 3.55vw, .98rem);
  }

  .home-pathway-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
    min-height: 0;
    padding: 1.5rem clamp(1.35rem, 6vw, 2.5rem) 1.9rem;
  }

  .home-pathway-illustration {
    width: min(100%, clamp(9rem, 43vw, 13rem));
  }

  .home-pathway-content {
    gap: .8rem;
  }
}
