.projects {
  color-scheme: light;
  color: #000;
  background: #fff;
}

.projects__inner {
  max-width: 1920px;
  margin-inline: auto;
  padding: 43px 101px 44px 81px;
}

.projects__title {
  margin: 0 0 36px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 64px;
  font-weight: 500;
  line-height: 48px;
  letter-spacing: -0.88px;
}

.projects__intro {
  margin: -16px 0 24px;
  color: #52646a;
}

.projects__carousel {
  --project-copy-width: calc(var(--carousel-card-width, 658px) - 40px);
  --project-preview-width: var(--carousel-preview-width, 361px);
  padding-bottom: 22px;
}

.projects__viewport {
  width: calc(100% - 1px);
  overflow: hidden;
  touch-action: pan-y;
}

.projects__track {
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-card {
  position: relative;
  flex: 0 0 min(658px, 34.270833vw);
  min-width: 0;
  aspect-ratio: 658 / 520;
  overflow: hidden;
}

.project-card__link {
  position: absolute;
  inset: 0;
  display: block;
}

.project-card img {
  pointer-events: none;
  user-select: none;
}

.project-card__base {
  position: absolute;
  top: -0.7%;
  left: 0;
  width: 100%;
  height: 101.39%;
}

.project-card__photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.project-card__photo img {
  position: absolute;
  max-width: none;
}

.project-card__photo--spa img {
  top: 0;
  left: -24.21%;
  width: 148.8%;
  height: 100%;
}

.project-card__photo--ships {
  top: 2px;
  width: calc(100% + 1px);
}

.project-card__photo--ships img {
  top: -0.01%;
  left: -0.15%;
  width: 124.32%;
  height: 100.01%;
}

.project-card__caption {
  position: absolute;
  bottom: 0;
  left: 0;
}

.project-card__caption--preview {
  display: none;
}

.project-card--spa-preview.is-preview .project-card__caption--full {
  display: none;
}

.project-card--spa-preview.is-preview .project-card__caption--preview {
  display: block;
}

.project-card__copy {
  position: absolute;
  bottom: 12px;
  left: 24px;
  right: 24px;
  height: 108px;
  overflow: hidden;
  letter-spacing: -0.64px;
}

.project-card.is-preview .project-card__copy {
  right: auto;
  width: max(0px, calc(var(--project-preview-width) - 48px));
}

.project-card__title {
  position: absolute;
  top: 11px;
  display: flex;
  align-items: center;
  width: var(--project-copy-width);
  height: 36px;
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  line-height: 36px;
}

.project-card__description {
  position: absolute;
  top: 59px;
  display: flex;
  align-items: center;
  width: var(--project-copy-width);
  height: 40px;
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
}

.projects :focus-visible {
  outline-color: #2d3336;
  outline-offset: 3px;
}

@media (min-width: 1200px) {
  .projects--two-cases .project-card {
    flex-basis: calc((100% - 30px) / 2);
    height: clamp(420px, 27.083vw, 520px);
  }

  .projects--two-cases .project-card__photo img {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .projects--two-cases .project-card__caption {
    width: 100%;
    height: 132px;
  }
}

@media (max-width: 1599px) {
  .projects__inner { padding: 40px clamp(32px, 4.21875vw, 68px); }
  .projects__title { font-size: 56px; }
  .project-card__title { font-size: 22px; line-height: 30px; }
}

@media (max-width: 1199px) {
  .projects__title { font-size: 48px; line-height: 1; margin-bottom: 28px; }
  .projects__track { gap: 24px; }
  .project-card { flex-basis: calc((100% - 24px) / 2); height: 420px; aspect-ratio: auto; }
  .project-card__photo--spa img,
  .project-card__photo--ships img { top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
  .project-card__photo--spa img { object-position: center; }
  .project-card__photo--ships img { object-position: left top; }
  .project-card__title { top: 0; width: 100%; height: 48px; font-size: 20px; line-height: 24px; }
  .project-card__description { top: 48px; width: 100%; height: 60px; font-size: 14px; line-height: 20px; }
}

@media (max-width: 767px) {
  .projects__track { gap: 16px; }
  .project-card { flex-basis: 100%; }
}

@media (max-width: 639px) {
  .projects__inner { padding-inline: var(--mobile-gutter); }
  .projects__title { font-size: 40px; line-height: 1.05; letter-spacing: -0.5px; }
  .project-card__copy { left: 16px; right: 16px; }
}

@media (max-width: 359px) {
  .projects__title { font-size: 36px; }
}
