/* Keep the three homepage service cards on one clean baseline. */
.service-preview {
  position: relative;
  width: 100%;
  height: 520px;
  min-height: 520px;
  padding: 0 !important;
  flex: 0 0 520px !important;
  overflow: hidden;
  background: #e7e2db;
}

.service-preview img,
.service-featured .service-preview img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transform: none !important;
  transition: opacity .7s cubic-bezier(.4, 0, .2, 1);
  will-change: opacity;
}

.service-preview .service-preview__next {
  z-index: 1;
  opacity: 0;
}

.service-preview .service-preview__next.is-visible { opacity: 1; }

@media (min-width: 901px) {
  .services {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .service {
    display: flex;
    min-width: 0;
    flex-direction: column;
  }

  .service img,
  .service-featured img {
    width: 100%;
    height: 560px;
    object-fit: cover;
    object-position: center;
  }

  .service-preview {
    height: 560px;
    min-height: 560px;
    flex-basis: 560px !important;
  }

  .service-preview img {
    height: 100%;
  }

  .preview-hint {
    position: absolute;
    z-index: 2;
    right: 14px;
    bottom: 14px;
    padding: 8px 11px;
    background: rgba(255,253,249,.91);
    color: #26332f;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: background .2s, color .2s;
  }

  .service.previewing .preview-hint { background: #26332f; color: #fff; }
  .service.previewing .preview-hint::after { content: ' · Playing'; }

  .service > div:not(.service-preview) {
    display: flex;
    flex: 1;
    flex-direction: column;
  }

  .service > div p { min-height: 0; }
  .service > div a { margin-top: auto; align-self: flex-start; }
}

@media (max-width: 900px), (hover: none) {
  .preview-hint { display: none; }
}

@media (max-width: 560px) {
  .service-preview {
    height: 440px;
    min-height: 440px;
    flex-basis: 440px !important;
  }
}
