/*
 * Webdev Zimbabwe — /awards (v2026)
 * Load AFTER webdev-base.css. Primitives live there; this file adds only the
 * blocks specific to the awards page: the award cards and their filter, the
 * dark journey band, and the closing call to action.
 *
 * No award is published until the verified recognition list is supplied —
 * see the comment at the top of <main> in awards.html.
 */

/* ---------- hero ---------- */

.wd-subhero--awards {
  --wd-subhero-art: url("../img/awardshero.jpg");
}

/* Three facts under the hero buttons, split by hairlines. On the dark hero. */
.wd-herofacts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 0;
  list-style: none;
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  padding: 0;
}

.wd-herofacts li {
  display: grid;
  gap: 0.125rem;
  padding: 0 clamp(1rem, 2.5vw, 1.75rem);
}

.wd-herofacts li:first-child {
  padding-left: 0;
}

.wd-herofacts li + li {
  border-left: 1px solid rgb(255 255 255 / 22%);
}

.wd-herofacts b {
  color: var(--wd-white);
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  font-weight: 700;
}

.wd-herofacts span {
  color: var(--wd-grey-200);
  font-size: 0.8125rem;
}

@media (max-width: 575.98px) {
  .wd-herofacts li,
  .wd-herofacts li:first-child {
    border-left: 0;
    flex: 1 1 100%;
    padding: 0;
  }
}

/* ---------- filter ---------- */

.wd-awardfilter {
  background: var(--wd-white);
  border: 1px solid var(--wd-grey-200);
  border-radius: var(--wd-radius-pill, 999px);
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: center;
  margin-top: 1rem;
  padding: 0.25rem;
}

.wd-awardfilter[hidden] {
  display: none;
}

.wd-awardfilter button {
  background: transparent;
  border: 0;
  border-radius: var(--wd-radius-pill, 999px);
  color: var(--wd-grey-700);
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  min-height: 2.25rem;
  padding: 0.375rem 1.125rem;
  transition: background-color var(--wd-duration) var(--wd-ease), color var(--wd-duration) var(--wd-ease);
}

.wd-awardfilter button:hover {
  color: var(--wd-charcoal-900);
}

.wd-awardfilter button[aria-pressed="true"] {
  background: var(--wd-orange-500);
  color: var(--wd-white);
}

.wd-awardfilter button:focus-visible {
  box-shadow: var(--wd-focus);
  outline: 0;
}

/* ---------- award cards ---------- */

.wd-awards__grid {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

/* `.wd-page .wd-card` sets padding and display; the art band runs edge to edge. */
.wd-page .wd-award {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.wd-page .wd-award[hidden] {
  display: none;
}

.wd-award__art {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, #fff6ee 0%, #fde6d2 100%);
  display: flex;
  justify-content: center;
}

/*
 * The picture is the certificate. CONTAINED, not cropped: a certificate is a
 * document, and cropping one hides the very lines that identify it. The tile
 * keeps a fixed ratio so cards in a row stay level.
 *
 * height !important for the usual reason: custom.css forces li img to 42px
 * above 768px, and these cards are list items.
 */
.wd-award__art img {
  display: block;
  height: 100% !important;
  object-fit: contain;
  padding: 0.75rem;
  width: 100%;
}

.wd-award__art svg {
  height: 72%;
  width: auto;
}

.wd-award__body {
  display: grid;
  gap: 0.25rem;
  justify-items: start;
  padding: clamp(1.125rem, 2vw, 1.5rem);
}

.wd-award__year {
  background: var(--wd-orange-050);
  border-radius: var(--wd-radius-pill, 999px);
  color: var(--wd-orange-700);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
  padding: 0.25rem 0.75rem;
}

.wd-award h3 {
  font-size: 1.125rem;
  margin: 0;
}

/* The result as awarded: Winner, Platinum Winner, 1st Runner Up. */
.wd-award__result {
  background: var(--wd-success-050);
  border-radius: var(--wd-radius-sm);
  color: var(--wd-success-800);
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 0.625rem 0 0;
  padding: 0.3125rem 0.625rem;
}

.wd-award__org {
  color: var(--wd-grey-500);
  font-size: 0.9375rem;
  margin: 0;
}

/* A span until a real source exists; becomes an <a> with the same class. */
.wd-award__link {
  align-items: center;
  color: var(--wd-orange-700);
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 600;
  gap: 0.375rem;
  margin-top: 0.75rem;
}

a.wd-award__link:hover,
a.wd-award__link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.wd-awards__empty,
.wd-awards__note {
  color: var(--wd-grey-500);
  font-size: 0.875rem;
  margin: clamp(1.25rem, 2vw, 1.75rem) 0 0;
  text-align: center;
}

/* ---------- journey band ---------- */

.wd-journey {
  background: var(--wd-charcoal-900);
  border-radius: var(--wd-card-radius);
  color: var(--wd-white);
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem) 1.5rem;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  padding: clamp(1.75rem, 4vw, 3rem);
}

.wd-journey h2 {
  color: var(--wd-white);
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  margin: 0.5rem 0 0;
}

.wd-journey__art {
  align-self: start;
  display: block;
  width: clamp(4.5rem, 9vw, 7rem);
}

.wd-journey__art img {
  display: block;
  height: auto;
  width: 100%;
}

/* A rail through four dots; each stop is a column. */
.wd-journey__list {
  counter-reset: none;
  display: grid;
  gap: 1.5rem;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.wd-journey__list::before {
  background: var(--wd-orange-500);
  content: "";
  height: 2px;
  left: 0.5rem;
  position: absolute;
  right: 0;
  top: 0.4375rem;
}

.wd-journey__list li {
  display: grid;
  gap: 0.25rem;
  padding-top: 1.75rem;
  position: relative;
}

.wd-journey__list li::before {
  background: var(--wd-charcoal-900);
  border: 3px solid var(--wd-orange-500);
  border-radius: 50%;
  content: "";
  height: 1rem;
  left: 0;
  position: absolute;
  top: 0;
  width: 1rem;
}

.wd-journey__list b {
  font-size: 1.0625rem;
}

.wd-journey__list span {
  color: var(--wd-grey-200);
  font-size: 0.9375rem;
}

/* ---------- closing call to action ---------- */

/* The artwork's own ground (#fdeddf, sampled), so the image sits seamlessly on the panel. */
.wd-awardscta {
  align-items: center;
  background: #fdeddf;
  border-radius: var(--wd-card-radius);
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.55fr);
  padding: clamp(1.75rem, 4vw, 3rem);
}

.wd-awardscta h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  margin: 0;
}

.wd-awardscta .wd-body {
  margin: 0.5rem 0 0;
}

.wd-awardscta__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 1.5rem;
}

.wd-awardscta__link {
  color: var(--wd-charcoal-900);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.wd-awardscta__link:hover,
.wd-awardscta__link:focus-visible {
  color: var(--wd-orange-700);
}

/*
 * The artwork's ground is shaded, not flat, so its rectangle showed against
 * the panel. A narrow feather on all four edges hides it; the full canvas is
 * used (not a tight crop) so the artwork itself sits clear of the feather.
 */
.wd-awardscta__art img {
  display: block;
  height: auto;
  margin-left: auto;
  -webkit-mask-composite: source-in;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 9%, #000 91%, transparent),
    linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
  mask-composite: intersect;
  mask-image:
    linear-gradient(to right, transparent, #000 9%, #000 91%, transparent),
    linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
  max-width: 26rem;
  width: 100%;
}

/* ---------- responsive ---------- */

/* Two per row on four tracks, so an odd last card centres instead of hanging left. */
@media (max-width: 991.98px) {
  .wd-awards__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .wd-award {
    grid-column: auto / span 2;
  }

  .wd-award:last-child:nth-child(odd) {
    grid-column: 2 / span 2;
  }

  .wd-journey__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2rem;
  }

  /* One rail per row reads wrong once the stops wrap; each dot stands alone. */
  .wd-journey__list::before {
    display: none;
  }

  .wd-awardscta {
    grid-template-columns: minmax(0, 1fr);
  }

  .wd-awardscta__art img {
    margin-left: 0;
    max-width: 20rem;
  }
}

@media (max-width: 575.98px) {
  .wd-awards__grid,
  .wd-journey__list {
    grid-template-columns: minmax(0, 1fr);
  }

  .wd-award,
  .wd-award:last-child:nth-child(odd) {
    grid-column: auto;
  }
}
