/* ==========================================================================
   Income Outsource — Archive Pages (Category, Author)
   Hero band (category/author intro) + reuses .post-grid / .post-card /
   .post-pagination from homepage.css rather than duplicating them.
   All values from variables.css.
   ========================================================================== */

.archive-hero {
  /* Top padding trimmed a step (space-9 → space-7), matching page-hero's
     same fix — the gap under the sticky header read as too much. */
  padding-block: var(--space-7) var(--space-8);
  border-bottom: 1px solid var(--color-border);
}

/* A separate nested div from .container on purpose — combining a
   narrower max-width directly on the same element as .container's
   margin-inline: auto causes a second, unwanted centering pass (see
   .page-hero__inner's comment in pages.css for the full explanation). */
.archive-hero__inner {
  max-width: var(--content-measure);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.archive-hero__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--color-accent-hover);
}

.archive-hero__title {
  margin: 0;
}

.archive-hero__description {
  margin: 0;
  max-width: 60ch;
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
}

.archive-hero__description p {
  margin: 0;
}

.archive-hero__description > * + * {
  margin-top: var(--space-3);
}

.archive-hero__count {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------------
   Author hero — avatar alongside name/bio, rather than the smaller
   inline credit treatment .author-bio uses on single posts (single.css);
   this is the whole page's own hero, so it gets more visual presence.
   --------------------------------------------------------------------- */
.author-hero__inner {
  flex-direction: row;
  gap: var(--space-5);
}

.author-hero__avatar img {
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.author-hero__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}

/* Scoped to .author-hero specifically, not the shared .archive-hero__title
   itself — that class also renders category/tag names, "Search results
   for…", and 404 copy, none of which should go uppercase just because
   the author archive's name should. */
.author-hero .archive-hero__title {
  text-transform: uppercase;
}

@media (max-width: 599px) {
  .author-hero__inner {
    flex-direction: column;
  }
}

/* ---------------------------------------------------------------------
   Search hero form wrapper (search.php/404.php) — the reusable
   .search-form-custom component itself now lives in base.css, since
   plan 10's search additions to the header/footer need it on every
   template, not just archive/search/404.
   --------------------------------------------------------------------- */
.search-hero__form {
  margin-top: var(--space-2);
  width: 100%;
  max-width: 480px;
}

/* ---------------------------------------------------------------------
   404 — reuses .archive-hero for the title band, centered instead of
   the default flex-start alignment the other archive heroes use.
   --------------------------------------------------------------------- */
.error-hero .archive-hero__inner,
.error-hero.archive-hero .archive-hero__inner {
  align-items: center;
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
}

.error-hero .search-hero__form {
  margin-top: var(--space-4);
  margin-inline: auto;
}

.error-hero__code {
  font-family: var(--font-mono);
  font-size: var(--fs-h1);
  font-weight: var(--fw-medium);
  color: var(--color-accent-hover);
  letter-spacing: var(--ls-caps);
}

.error-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
