/* ---------------------------------------------------------
   13a. Homepage services strip — compact capability bridge
   hero → what you do → proof/projects → coda
   --------------------------------------------------------- */
.homepage-services__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .homepage-services__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .homepage-services__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
  }
}

.homepage-services__title {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  font-weight: 300;
  margin-block-end: 0.5rem;
}

.homepage-services__title a {
  color: inherit;
  text-decoration: none;
}

.homepage-services__title a:hover {
  text-decoration: underline;
}

.homepage-services__summary {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.homepage-services__footer {
  /* 2.75rem > the 2rem item gap — distinguishes the section-level CTA
     from inter-item spacing so it reads as an outcome link, not a separator. */
  margin-block-start: 2.75rem;
  display: flex;
  justify-content: flex-end;
}

.homepage-services__link {
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  text-decoration: none;
}

.homepage-services__link:hover,
.homepage-services__link:focus-visible {
  text-decoration: underline;
}

@media (min-width: 960px) {
  .homepage-services__footer {
    margin-block-start: 1.4rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .homepage-services__link {
    grid-column: 2;
    justify-self: start;
  }
}


/* ---------------------------------------------------------
   13b. Homepage coda — ruled close
   --------------------------------------------------------- */
.homepage-coda {
  background-color: var(--surface-muted);
  border-block-start: 1px solid var(--border-subtle);
  padding-block: var(--space-md);
}

.homepage-coda__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.homepage-coda__title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 300;
  line-height: 1.25;
  max-width: 42ch;
}


/* ---------------------------------------------------------
   13c. Homepage featured cards — description display
   --------------------------------------------------------- */

/* Allow 3 lines so descriptions end at a natural clause boundary
   rather than clipping mid-sentence at the 2-line default. */
.projects-grid--home .project-card__desc {
  -webkit-line-clamp: 3;
}

/* On quiet desktop cards the CTA may stay hidden at rest, but keyboard focus
   must disclose the same affordance that hover users get. */
.projects-grid--home .project-card__link:focus-visible .project-card__cta {
  opacity: 1 !important;
}

.projects-grid--home .project-card__link:focus-visible .project-card__title {
  color: var(--accent-primary) !important;
}


/* ---------------------------------------------------------
   14. Homepage desktop composition
   --------------------------------------------------------- */
@media (max-width: 639px) {
  .home .homepage-projects .section__header--inline {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.4rem;
    margin-block-end: 1.75rem;
  }

  /* h2 browser-default margin-block-end (≈0.83em) was making the gap
     above the CTA larger than the gap below it, so the CTA visually
     attached to card 1 rather than to the section title. Reset it here
     so the title + CTA read as a single grouped header unit. */
  .home .homepage-projects .section__header--inline .section__title {
    margin-block-end: 0;
  }

  .home .homepage-projects .section__header-link {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--color-text-secondary);
  }
}

@media (min-width: 960px) {
  .home .homepage-projects {
    padding-block: 5.5rem 4.75rem;
  }

  .home .homepage-projects .section__header {
    margin-block-end: 2.75rem;
  }

  .home .homepage-projects .section__footer {
    margin-block-start: 1.75rem;
  }

}
