.references {
  padding: 100px 20px;
  background-color: var(--sand);
  color: var(--slate);
}

.references-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1140px;
  min-height: 927px;
  margin-inline: auto;
}

.references h2 {
  margin: 0 0 20px;
  font-size: 52px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 4.25px;
}

.references-intro {
  margin: 0 0 55px;
  padding-top: 9px;
  color: #4e5763;
  font-size: 21px;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 1.53px;
}

.reference-gallery {
  position: relative;
  overflow: hidden;
  height: 725px;
  background: #242424;
  color: #fff;
  touch-action: pan-y;
}

.reference-photo {
  position: absolute;
  inset: 0;
  margin: 0;
}

.reference-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.reference-photo::after {
  position: absolute;
  inset: 0;
  background: #00000036;
  content: "";
}

.reference-caption {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-inline: 48px;
  text-align: center;
}

.reference-caption h3 {
  margin: 0 0 29px;
  font-size: 45px;
  font-weight: 600;
  line-height: 1;
}

.reference-caption p {
  margin: 0;
  font-size: 26px;
  font-weight: 400;
  line-height: 0.5;
}

.reference-gallery button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.reference-gallery .gallery-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  transform: translateY(-50%);
}

.gallery-arrow::before {
  display: block;
  width: 15px;
  height: 15px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  border-radius: 2px;
  transform: translateX(-4px) rotate(45deg);
  content: "";
}

.gallery-arrow-previous {
  left: 2px;
}

.gallery-arrow-previous::before {
  transform: translateX(4px) rotate(-135deg);
}

.gallery-arrow-next {
  right: 2px;
}

.gallery-pagination {
  position: absolute;
  z-index: 2;
  bottom: 6px;
  left: 50%;
  display: flex;
  max-width: 100%;
  transform: translateX(-50%);
}

.gallery-pagination button {
  display: grid;
  width: 23px;
  height: 24px;
  place-items: center;
}

.gallery-pagination button::before {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgb(0 0 0 / 20%);
  content: "";
}

.gallery-pagination button[aria-current="true"]::before {
  background: #fff;
}

.reference-gallery button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

.gallery-rotation,
.gallery-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.reference-gallery .gallery-rotation:focus-visible {
  z-index: 2;
  top: 10px;
  left: 10px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  clip-path: none;
  background: #242424;
  font: inherit;
}

@media (max-width: 1024px) {
  .references {
    padding-inline: 25px;
  }

  .references h2 {
    font-size: 45px;
  }

  .references-intro {
    margin-bottom: 35px;
  }
}

@media (max-width: 767px) {
  .references {
    padding: 50px 20px;
  }

  .references-inner {
    min-height: 477px;
  }

  .references h2 {
    font-size: 37px;
    letter-spacing: 3.25px;
  }

  .references-intro {
    padding-top: 0;
  }

  .reference-gallery {
    height: 300px;
  }

  .reference-caption h3 {
    font-size: 33px;
    line-height: 0.5;
  }

  .reference-caption p {
    font-size: 22px;
    line-height: 1.1;
  }
}
