.life {
  position: relative;
  display: flex;
  min-height: 96rem;
  overflow: hidden;
  color: var(--color-white);
  background-color: var(--color-dark);
}

/* Photos (decorative background layer)
   ========================================================================== */

.life__slides {
  position: absolute;
  inset: 0;
}

.life__slides::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(35, 37, 42, 0.6) 0%, rgba(35, 37, 42, 0) 60%),
    linear-gradient(180deg, rgba(35, 37, 42, 0.6) 0%, rgba(35, 37, 42, 0) 30%, rgba(35, 37, 42, 0) 40%, rgba(35, 37, 42, 0.9) 100%);
}

.life__bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transition: opacity 1.2s ease;
}

.life__bg.is-active {
  opacity: 1;
}

/* Content
   ========================================================================== */

.life__inner {
  display: flex;
  flex-direction: column;
  padding: 12rem 17.8rem 10rem 19.9rem;
}

.life__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4rem 6rem;
  margin-top: auto;
  padding-top: 8rem;
}

.life__content {
  min-width: 0;
  max-width: 64rem;
}

/* All captions share one grid cell, so the block keeps the height of the longest text */
.life__captions {
  display: grid;
}

.life__caption {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.life__caption.is-active {
  visibility: visible;
  opacity: 1;
}

.life__num {
  display: block;
  font-size: max(3rem, 20px);
  font-style: italic;
  line-height: 1.2333;
  color: var(--color-sand);
}

.life__caption-title {
  margin-top: 0.8rem;
  font-size: max(3.2rem, 22px);
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}

.life__caption-text {
  margin-top: 1.8rem;
  font-size: max(2rem, 14px);
  line-height: 1.3;
}

.life__nav {
  display: flex;
  gap: 1.6rem;
  margin-top: 4.8rem;
}

.life__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: max(7.2rem, 48px);
  height: max(7.2rem, 48px);
  color: var(--color-white);
  border: 2px solid currentColor;
  border-radius: 50%;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.life__arrow::before {
  content: "";
  width: max(3.2rem, 24px);
  height: max(1.07rem, 8px);
  background-color: currentColor;
  -webkit-mask: url("../../img/icons/arrow-short-white.svg") center / 100% 100% no-repeat;
  mask: url("../../img/icons/arrow-short-white.svg") center / 100% 100% no-repeat;
}

.life__arrow--prev::before {
  transform: scaleX(-1);
}

.life__arrow:hover {
  color: var(--color-dark);
  background-color: var(--color-white);
  border-color: var(--color-white);
}

.life__btn {
  flex-shrink: 0;
  padding-inline: 6rem;
}

/* Tablet & mobile
   ========================================================================== */

@media (max-width: 1279.98px) {
  .life {
    min-height: 72rem;
  }

  .life__inner {
    padding: var(--section-space) var(--gutter) 6rem;
  }

  .life__bottom {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 6rem;
  }

  .life__caption-title {
    font-size: 2.4rem;
  }

  .life__caption-text {
    margin-top: 1.2rem;
    font-size: 1.6rem;
  }

  .life__nav {
    margin-top: 3.2rem;
  }
}

@media (max-width: 767.98px) {
  .life {
    min-height: 64rem;
  }

  .life__slides::after {
    background-image:
      linear-gradient(180deg, rgba(35, 37, 42, 0.6) 0%, rgba(35, 37, 42, 0) 25%, rgba(35, 37, 42, 0) 30%, rgba(35, 37, 42, 0.92) 75%);
  }

  .life__bottom {
    align-items: stretch;
  }

  .life__caption-title {
    font-size: 2rem;
  }

  .life__caption-text {
    font-size: 1.4rem;
  }

  .life__btn {
    width: 100%;
    padding-inline: 2rem;
  }
}
