/* Sober AF -- Awards directory (S-14): the year-grouped recipient grid
 * for the public /awards/ page body. Ported from the OLD theme
 * page-awards.php inline <style> (lines 95-179).
 *
 * The Tier-D hybrid front end does NOT enqueue the dormant `sober-af`
 * theme CSS, so this file carries every affordance the OLD inline
 * style defined. Enqueued on is_page('awards') by
 * SAF_Awards_Directory. Tokens (var(--saf-*)) resolve from tokens.css
 * (enqueued globally by the child theme). See memory:
 * tier-d-old-theme-css-not-enqueued.
 *
 * No bare `.saf-btn` here -- the page CTA button is an Elementor
 * widget on the seeded CTA band, not part of this directory markup
 * (memory: per-cpt-css-saf-btn-footer-leak).
 */

.saf-awards-directory {
  width: 100%;
}

/* Year group divider. 48px gap between successive years. */
.saf-awards-year + .saf-awards-year {
  margin-top: var(--saf-gap-6, 48px);
}

.saf-awards-year__heading {
  margin: 0 0 var(--saf-gap-4, 24px) 0;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  /* rgba on ink, not opacity -- AA-safe (memory:
   * a11y-contrast-opacity-gotcha). */
  color: rgba(28, 23, 16, 0.6);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 8px;
}

.saf-awards-grid {
  display: grid;
  /* auto-FILL (not auto-fit): keeps cards at a consistent ~280-360px
   * track regardless of how many recipients a year has. auto-fit
   * would collapse empty tracks and stretch a lone card to full
   * width -- ballooning its 1/1 photo. This is an improvement over
   * OLD page-awards.php (which used auto-fit and ballooned single
   * cards). Cards left-align in a year with fewer than the full row. */
  grid-template-columns: repeat(auto-fill, minmax(280px, 360px));
  gap: var(--saf-gap-5, 32px);
}

.saf-award-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.saf-award-card__photo {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

.saf-award-card__photo img {
  width: 100%;
  height: 100%;
  /* COVER: recipient photos are headshots; crop is the OLD intent. */
  object-fit: cover;
  display: block;
}

.saf-award-card__monogram {
  font-family: var(--saf-font-sans, inherit);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  /* Brand brick rather than OLD's near-invisible grey -- the monogram
   * reads as a deliberate portrait placeholder. Decorative
   * (aria-hidden), so no contrast requirement. Matches S-07 single. */
  color: var(--saf-brick-red, #be2727);
}

.saf-award-card__name {
  margin: 0;
  font-size: 1.25rem;
}

.saf-award-card__name a {
  text-decoration: none;
  color: inherit;
}

.saf-award-card__name a:hover {
  text-decoration: underline;
}

/* Keyboard a11y: visible focus ring on the card name + photo links
 * (improvement over OLD, which had none). */
.saf-award-card__name a:focus-visible,
.saf-award-card__photo:focus-visible {
  outline: 2px solid var(--saf-brick-red, #be2727);
  outline-offset: 2px;
}

.saf-award-card__category {
  margin: 0;
}

/* Goldenrod brand badge. #8a5c00 text on rgba(138,92,0,.12) tint
 * passes AA (memory: a11y-contrast-opacity-gotcha). */
.saf-award-card__badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(138, 92, 0, 0.12);
  color: #8a5c00;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.saf-award-card__citation {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  /* rgba on ink, not opacity:.85 -- AA-safe. */
  color: rgba(28, 23, 16, 0.85);
}

.saf-awards-empty {
  padding: 48px 24px;
  text-align: center;
  color: rgba(28, 23, 16, 0.6);
  background: rgba(0, 0, 0, 0.03);
  border-radius: 12px;
}
