/* ==========================================================================
   archive-download-hub.css — Download archive hub view (page 1 only)
   Hub = 3-card preview per cluster with "see all" link. Full list is
   available via ?cluster={key} or paginated pages.
   Loaded only on the download post-type archive page 1 via inc/setup.php.
   Designer spec 2026-06-06.
   ========================================================================== */

/* Section wrapper — one per cluster in hub mode.
   Gold-border separator between sections mirrors the services page rhythm. */
.download-hub-section {
  padding-block-start: clamp(3rem, 5vw, 4.5rem);
}
.download-hub-section + .download-hub-section {
  border-top: 2px solid var(--color-gold);
}

/* Eyebrow chip above each cluster heading — uppercase label, gold ink. */
.download-hub-section__eyebrow {
  margin: 0 0 0.75rem;
  font-family: Sora, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold-text);
}

/* Lede copy — tighter max-width so long sentences don't run to the card edge. */
.download-hub-section .download-listing-group__lede {
  max-width: 60ch;
}

/* Hub card grid — 3-col at desktop, narrower at tablet/mobile. */
.download-listing--hub {
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.25rem);
  margin-block-start: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* In hub preview cards hide the meta strip, CTA button, thumbnail, and repo link.
   Keep only icon + body — space is too tight for the full card treatment. */
.download-listing--hub .download-listing__meta,
.download-listing--hub .download-listing__btn,
.download-listing--hub .download-listing__thumb,
.download-listing--hub .download-listing__repo-link {
  display: none;
}

/* When the thumbnail is hidden in hub mode, reset the row shifts from
   archive-download.css so icon and body land at row 1, not row 2. */
.download-listing--hub .download-listing__row--has-thumb .download-listing__icon { grid-row: 1; }
.download-listing--hub .download-listing__row--has-thumb .download-listing__body { grid-row: 1; }

/* Clip description to 2 lines in preview cards (was 3 in full-list rows). */
.download-listing--hub .download-listing__desc {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* "See all N [type] →" underline-grow link below each hub cluster. */
.download-hub-section__see-all {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-block-start: 1.5rem;
  font-family: Manrope, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-accent);
  text-decoration: none;
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size 200ms ease;
}
.download-hub-section__see-all:hover,
.download-hub-section__see-all:focus-visible {
  background-size: 100% 1px;
}
.download-hub-section__see-all:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}

@media (max-width: 960px) {
  .download-listing--hub {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .download-listing--hub {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .download-hub-section__see-all {
    transition: none;
    background-size: 100% 1px;
  }
}
