.works-page {
  padding: calc(var(--header-h) + 80px) 0 6rem 111px;
  overflow-x: hidden;
}

.works-section {
  margin-bottom: 4.5rem;
}

.works-section:last-child {
  margin-bottom: 0;
}

.works-section__head {
  margin-bottom: 1rem;
}

.works-section__head h2 {
  font-size: 1.125rem;
  text-transform: lowercase;
  font-weight: 400;
  line-height: 1.2;
}

.works-section__head span {
  display: block;
  font-size: 0.875rem;
  opacity: 0.7;
  margin-top: 0.35rem;
  line-height: 1.2;
}

.works-scroll {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 24px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: auto;
  scrollbar-width: none;
  padding-bottom: 1rem;
  cursor: default;
  touch-action: pan-y;
}

.works-scroll::-webkit-scrollbar {
  display: none;
}

.works-scroll.is-dragging {
  cursor: grabbing;
}

.works-scroll__item {
  flex: 0 0 auto;
  border-radius: 2px;
  transition: transform 0.28s var(--ease);
  transform-origin: center bottom;
  will-change: transform;
}

.works-scroll__item img {
  display: block;
  height: 433px;
  width: auto;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
}

.works-scroll--h5 .works-scroll__item img {
  height: 499px;
}

.works-scroll--h5 .works-scroll__item img.works-scroll__item--h5-wide {
  width: 229px !important;
  height: 498px !important;
  max-width: none !important;
  object-fit: cover;
}

@media (min-width: 1025px) {
  .works-scroll__item {
    position: relative;
    transition: top 0.28s var(--ease);
    top: 0;
  }

  .works-scroll__item:hover {
    top: -5px;
  }
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(21, 20, 15, 0.92);
  align-items: center;
  justify-content: center;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--bg);
  font-size: 2rem;
  min-width: 44px;
  min-height: 44px;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bg);
  font-size: 2rem;
  min-width: 44px;
  min-height: 44px;
}

.lightbox__nav--prev {
  left: 1rem;
}

.lightbox__nav--next {
  right: 1rem;
}

@media (max-width: 1024px) {
  .works-page {
    padding: calc(var(--header-h) + 48px) 0 4rem 1.5rem;
  }

  .works-scroll__item img,
  .works-scroll--h5 .works-scroll__item img {
    height: 320px;
  }
}

@media (max-width: 767px) {
  .works-scroll__item img,
  .works-scroll--h5 .works-scroll__item img {
    height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .works-scroll__item {
    transition: none;
  }
}
