.news-card {
  margin: -1px 0 0 -1px;
  /* background: white; */
  color: var(--brand-color-dark);
  overflow: hidden;
}

.news-card__link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.news-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--brand-color-dark);
  overflow: clip;
  /* border: 1px solid black; */
}

.news-card__link:focus-visible .news-card__media {
  border: 1px solid black;
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transform: scale(1);
  transition: opacity 1s var(--theme-ease-signature), transform 0.6s var(--theme-ease-signature);

  @starting-style {
    opacity: 0;
  }
}

/* mix-blend-mode itself can't be transitioned/animated (discrete
   property, most browsers snap it rather than interpolate) — so the
   desaturated look lives on a separate overlay instead of the <img>
   directly. Fading this overlay's opacity out on hover reveals the
   plain-color image underneath, achieving the same visual effect via
   an animatable property. */
.news-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--brand-color-dark);
  mix-blend-mode: color;
  opacity: .25;
  transition: opacity 0.6s var(--theme-ease-signature);
}

.news-card__link:hover .news-card__media::after {
  opacity: 0;
}

.news-card__link:hover .news-card__media img {
  transform: scale(1.05);
}

.news-card__body {
  padding: calc(var(--theme-space-sm) - .5rem);
}

.news-card__title,
.news-card__excerpt {
  opacity: 1;
  transition: opacity 1s var(--theme-ease-signature) 0.2s;

  @starting-style {
    opacity: 0;
  }
}

.news-card__title {
  margin: 0 0 0.25em;
  font-size: 1.4rem;
  text-transform: uppercase;
}

.news-card__date {
  position: absolute;
  top: .2rem;
  right: .2rem;
  margin: 0;
  padding: .5em 1em;
  background: var(--theme-color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 1;
  transition: opacity 1s var(--theme-ease-signature) 0.2s;

  @starting-style {
    opacity: 0;
  }
}

/* Fixed-height (3 lines) instead of -webkit-line-clamp — line-clamp's
   -webkit-box layout doesn't support floated/absolutely-anchored
   children, which is what .news-card__more below needs to always sit
   in the same bottom-right spot regardless of how many lines the
   excerpt text itself fills. */
.news-card__excerpt {
  position: relative;
  margin: 0.5em 0 0;
  overflow: hidden;
  height: calc(1.4em * 3);
  line-height: 1.4;
  /* padding-right: 4.5em; */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  color: var(--brand-color-sand);
}
.news-card__link:hover .news-card__excerpt,
.news-card__link:focus-visible .news-card__excerpt {
  color: currentColor;
}

.news-card__more {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 0.15em 0 0.15em 0.75em;
  background: var(--brand-color-light);
  box-shadow: -0.75em 0 2.5em 1.25em var(--brand-color-light);
  white-space: nowrap;
  color: var(--theme-color-accent);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  opacity: 0;
  transition: opacity 0.3s var(--theme-ease-signature);
}

.news-card__link:hover .news-card__more,
.news-card__link:focus-visible .news-card__more {
  opacity: 1;
}

/* Featured first card — full-bleed image with title/date/excerpt
   overlaid on a bottom gradient scrim, matching .object-card's
   treatment, instead of the separate media+body layout every other
   news card uses. */

.news-card--featured {
    grid-column: span 4;
   }
.news-card--featured .news-card__link {
  position: relative;
  height: 100%;
}

.news-card--featured .news-card__media {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  height: 100%;
  width: 100%;
}

.news-card--featured .news-card__media::after {
  display: none;
}

.news-card--featured .news-card__body {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: calc(var(--theme-space-sm) - .5rem);
  background-image: linear-gradient(0deg, var(--brand-color-dark), transparent);
  color: var(--brand-color-light);
}

.news-card--featured .news-card__title {
  font-size: clamp(1.25rem, 2.5vw, 2.75rem);
}

.news-card--featured .news-card__excerpt {
  height: auto;
}

.news-card--featured .news-card__more {
  background: none;
  box-shadow: none;
}

@media (width <= 768px) {
  .news-card {
    grid-column: span 1;              /* was col-2 */
    margin-left: 0;
  }

  .news-card--featured {
    grid-column: span 1;              /* was span 4 */

    /* On desktop this card's height comes for free from stretching against
       its sibling in the same grid row (its own media/body are
       position: absolute, so it has no intrinsic height of its own). Once
       .news-grid drops to a single column it's alone in its row with
       nothing to stretch against, so without this it collapses to ~0px.
       Square, not landscape — this card leads the section, so it should
       read as at least as tall as it is wide. */
    aspect-ratio: 1 / 1;
  }
}
