/* ==========================================================================
   Home page (proposal 3.4). Loaded only by src/pages/index.njk (front matter pageCss: index).
   Uses the tokens and components in main.css; everything here is layout for this one page.
   ========================================================================== */

/* ---------- Hero: text and buttons first, the courts photo beside them from 60em ---------- */

.home-hero {
  padding-block: 2rem 3rem;
}

.home-hero__inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.home-hero h1 {
  margin-bottom: 0.25em;
}

.home-hero__tagline {
  margin-bottom: 0.75rem;
  font-family: var(--font-head);
  font-size: 1.3em;
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
}

.home-hero__summary {
  margin-bottom: 0;
}

/* Two big buttons of equal height; side by side where they fit, full width on phones. */
.home-hero__buttons {
  align-items: stretch;
  margin-block: 1.75rem;
}

.home-hero__buttons .btn {
  flex: 1 1 15rem;
  padding-inline: 1.25rem;
}

/* A little less ceiling, a little more court. */
.home-hero__photo img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: 50% 75%;
}

.home-hero__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-hero__links > li + li {
  margin-top: 0.375rem;
}

@media (min-width: 60em) {
  .home-hero {
    padding-block: 3.5rem 4.5rem;
  }
  .home-hero__inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 3rem;
  }
}

/* ---------- Section intros ---------- */

.home-section-head {
  max-width: var(--measure);
  margin-bottom: 2rem;
}

.home-section-head > :last-child {
  margin-bottom: 0;
}

/* ---------- At a glance ---------- */

.home-glance__list {
  margin-bottom: 1.5rem;
  font-size: 1.05em;
}

/* Two columns while the list is full width (below the 60em split), one beside the photo. */
@media (min-width: 40em) and (max-width: 59.99em) {
  .home-glance__list {
    columns: 2;
    column-gap: 2.5rem;
  }
  .home-glance__list > li {
    break-inside: avoid;
  }
}

/* ---------- Membership ---------- */

.home-rates-note {
  max-width: var(--measure);
}

/* ---------- Lessons & clinics: placeholder pro cards ---------- */

/* Two cards side by side only when each has room for the photo beside its text. */
.home-pros {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr));
}

.pro-card__photo {
  min-height: 5rem;
  padding: 0.75rem;
}

.pro-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.75rem;
}

.pro-card__body > * {
  margin: 0;
}

@media (min-width: 36em) {
  .pro-card {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr);
    align-items: stretch;
    gap: 1.25rem;
  }
  .pro-card__photo {
    align-self: start;
    aspect-ratio: 3 / 4;
    min-height: 0;
  }
}

.home-juniors {
  max-width: var(--measure);
}

/* ---------- One line for members ---------- */

.home-members {
  padding-block: 1.5rem;
  background: var(--green-tint);
  border-block: 2px solid var(--green);
}

.home-members p {
  margin: 0;
  font-size: 1.1em;
}

/* ---------- Since 1967, and visit us ---------- */

.home-story > p,
.home-visit > p {
  max-width: var(--measure);
}

.home-visit__address {
  margin-bottom: 0.5rem;
  font-size: 1.15em;
  font-weight: 700;
}

.home-visit__list {
  margin-bottom: 1rem;
}

@media print {
  .home-members {
    background: none;
  }
}
