/* Phone layout only. Nothing in this file applies at laptop and desktop widths. */

@media (max-width: 760px) {
  html, body { overflow-x: clip; }

  /* Heroes keep their text, but the photograph itself is no longer cropped. */
  .home-hero__slide img,
  .hero__media > img,
  .hero__slides img,
  .process__img,
  .work-hero video,
  .featured-collection-hero > img {
    object-fit: contain;
    object-position: center center;
    transform: none;
  }
  .js .hero__slides img { animation-name: slide-full; }
  .home-hero__slide.is-active img { transform: none; }

  /* Project banners show the whole photograph at its own height. */
  .project-hero,
  .project-featured-hero,
  .project-featured-hero.project-hero,
  .project-featured-hero.is-featured {
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .project-featured-hero .project-hero__image,
  .project-featured-hero.is-featured .project-hero__image,
  .project-detail--featured:not(.is-featured) .project-featured-hero .project-hero__image,
  [data-slug="everfast-freight-forwarders"] .project-featured-hero .project-hero__image {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    object-fit: contain;
    transform: none;
  }

  /* Cards and tiles grow to the photograph instead of cutting it to a frame. */
  .project-card,
  .related .project-card,
  .featured-card,
  .featured-showcase__item.is-active .featured-card,
  .featured-showcase__item.is-next .featured-card,
  .featured-collection__card,
  .tile,
  .sector,
  .feature,
  .project-image-index__item,
  .gallery__slide,
  .step__media {
    aspect-ratio: auto;
    width: 100%;
    height: auto;
    min-height: 0;
  }
  .tile,
  .sector,
  .feature { flex-direction: column; align-items: stretch; }
  .tile__body,
  .sector__body,
  .feature__body {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
  }
  .project-card__media,
  .featured-card__media,
  .featured-collection__media {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
  }
  .project-card__media img,
  .featured-card__media img,
  .featured-collection__media img,
  .tile > img,
  .sector > img,
  .feature > img,
  .project-image-index__item img,
  .gallery__slide img,
  .step__media img,
  .project-gallery__slide img,
  .project-gallery__slide:not(.is-active) img,
  .project-gallery__slide.is-portrait img,
  .cta-band > img {
    width: 100%;
    object-fit: contain;
    object-position: center center;
    transform: none;
  }
  .project-card__media:not(:has(img.is-active)) img:first-child,
  .project-card__media img.is-active,
  .featured-card__media img,
  .featured-collection__media img,
  .tile > img,
  .sector > img,
  .feature > img,
  .project-image-index__item img,
  .step__media img,
  .cta-band > img {
    position: relative;
    inset: auto;
    height: auto;
  }
  .project-image-index__grid { grid-template-columns: minmax(0, 1fr); }
  .gallery__slide { flex-basis: 100%; }
}

@keyframes slide-full {
  0% { opacity: 0; }
  4% { opacity: 1; }
  16.67% { opacity: 1; }
  20.67% { opacity: 0; }
  100% { opacity: 0; }
}

@media (max-width: 760px) {
  .site-footer a,
  .card__action { position: relative; }
  .site-footer a::before,
  .card__action::before { content: ""; position: absolute; inset: -8px -4px; }
  .social { gap: 18px; }
  .social a { width: 24px; height: 24px; }
  .social a::before { content: ""; position: absolute; inset: -8px; }
}
