/* Layer `archive`: "More projects" as a visible grid, link from Girls Like Me to its case page.
   MOCKUP: not for release. Card typography, hover and reveal stay as the site has them. */

/* The base already defines this grid (3 columns, 2 below 1000px, 1 below 600px, the same gaps) and
   then turns it into a scrolling strip with later rules. These rules take the grid back. */
.portfolio-archive .archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 55px 38px;
  overflow: visible;
  scroll-snap-type: none;
  padding-bottom: 0;
}

.portfolio-archive .archive-grid .portfolio-tile {
  flex: none;
  scroll-snap-align: none;
  min-width: 0;
}

/* One ratio for every card; the image fills it and is cropped at the sides (the stills are wider). */
.portfolio-archive .archive-grid .tile-window {
  aspect-ratio: 16 / 9;
}

.portfolio-archive .archive-grid .media-frame img {
  object-fit: cover;
}

/* Frame 01 of As If By Magic has the car at the left of a wide still; keep its front in the card. */
.portfolio-archive .archive-grid a[href$="/work/as-if-by-magic/"] img {
  object-position: 30% 50%;
}

@media (max-width: 999px) {
  .portfolio-archive .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 38px 24px;
  }
}

@media (max-width: 599px) {
  .portfolio-archive .archive-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
  }
}

/* Featured film: the credit line and the link sit together on the right, as the credit did. */
.featured-film__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

@media (max-width: 700px) {
  .featured-film__meta {
    align-items: flex-start;
  }
}

/* The link: the style of the site's text links (underline that grows on hover), 44px tall. */
.case-link {
  position: relative;
  display: inline-block;
  min-height: 44px;
  padding-block: 12px;
  color: inherit;
  font-size: 13px;
  line-height: 20px;
  text-decoration: none;
}

.case-link:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 7px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(.18);
  transform-origin: 0;
  transition: transform var(--dur-3, .24s) var(--ease-out-quart, ease);
}

@media (hover: hover) and (pointer: fine) {
  .case-link:hover:after {
    transform: scaleX(1);
  }
}

.case-link:focus-visible:after {
  transform: scaleX(1);
  transition: none;
}

.case-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.stereo-films .case-link {
  margin-top: 0.25rem;
}
