.case-page {
  background: #120303;
}

.case-index {
  padding: calc(var(--header-height) + 58px) 0 62px;
  background: #120303;
}

.case-index__inner {
  width: min(calc(100% - 64px), 1130px);
  margin-inline: auto;
}

.case-index__heading {
  text-align: center;
}

.case-index__heading img {
  width: 233px;
  height: 58px;
  margin: 0 auto 12px;
  object-fit: contain;
}

.case-index__heading h1 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.4;
}

.case-index__heading p {
  margin: 0;
  font-size: 15px;
}

.case-index__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 54px;
}

.case-index__item img {
  width: 100%;
  height: auto;
  aspect-ratio: 350 / 250;
  object-fit: cover;
}

.case-index__image-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 350 / 250;
  background: #382323;
}

.case-index__empty {
  margin: 54px 0 0;
  text-align: center;
}

.case-index .navigation.pagination {
  margin-top: 54px;
}

.case-index .nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.case-index .page-numbers {
  display: inline-flex;
  min-width: 36px;
  min-height: 36px;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 2px 10px;
}

.case-index .page-numbers.current,
.case-index .page-numbers:hover,
.case-index .page-numbers:focus-visible {
  background: #fff;
  color: #120303;
}

.case-more {
  margin: 40px 0 0;
  text-align: center;
}

.case-index__item h2 {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.case-index__link {
  display: block;
}

.case-index__link:hover h2,
.case-index__link:focus-visible h2 {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.case-index__link:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 5px;
}

.case-detail {
  padding: calc(var(--header-height) + 42px) 0 100px;
  background: #120303;
}

.case-detail__inner {
  width: min(calc(100% - 48px), 801px);
  margin-inline: auto;
}

.case-detail__hero,
.case-detail__machine-image {
  width: 100%;
  height: auto;
  aspect-ratio: 801 / 401;
  object-fit: cover;
}

.case-detail h1 {
  margin: 28px 0 28px;
  font-size: 30px;
  line-height: 1.5;
}

.case-detail h2 {
  margin: 0 0 18px;
  font-size: 21px;
  line-height: 1.6;
}

.case-detail__machine p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
}

.case-detail__story {
  margin-top: 34px;
}

.case-detail__story p {
  margin: 0 0 27px;
  font-size: 16px;
  line-height: 1.7;
}

.case-detail__story p:last-child {
  margin-bottom: 0;
}

.case-detail__story > * {
  max-width: 100%;
}

.case-detail__story a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.case-detail__story img {
  height: auto;
}

.case-detail__machine-image {
  margin-top: 42px;
}

.case-detail__video {
  position: relative;
  display: block;
  width: min(100%, 560px);
  aspect-ratio: 16 / 9;
  margin: 110px auto 0;
  overflow: hidden;
  background: #000;
}

.case-detail__video img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-detail__video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 68px;
  height: 48px;
  padding-left: 4px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #e62117;
  font-size: 22px;
  line-height: 1;
  transform: translate(-50%, -50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.case-detail__video:hover .case-detail__video-play,
.case-detail__video:focus-visible .case-detail__video-play {
  background: #c51b13;
  transform: translate(-50%, -50%) scale(1.06);
}

.case-detail__video:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
}

@media (max-width: 900px) {
  .case-index__grid {
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .case-index {
    padding: calc(var(--header-height) + 52px) 0 74px;
  }

  .case-index__inner {
    width: calc(100% - 36px);
  }

  .case-index__heading img {
    width: 200px;
    height: auto;
  }

  .case-index__heading h1 {
    font-size: 28px;
  }

  .case-index__heading p {
    font-size: 14px;
    text-align: left;
  }

  .case-index__grid {
    grid-template-columns: 1fr;
    gap: 38px;
    margin-top: 38px;
  }

  .case-index__item h2 {
    margin-top: 10px;
    font-size: 15px;
  }

  .case-detail {
    padding: calc(var(--header-height) + 28px) 0 76px;
  }

  .case-detail__inner {
    width: calc(100% - 36px);
  }

  .case-detail h1 {
    margin: 22px 0 28px;
    font-size: 25px;
  }

  .case-detail h2 {
    font-size: 19px;
  }

  .case-detail__machine p,
  .case-detail__story p {
    font-size: 15px;
  }

  .case-detail__story {
    margin-top: 30px;
  }

  .case-detail__story p {
    margin-bottom: 24px;
  }

  .case-detail__machine-image {
    margin-top: 34px;
  }

  .case-detail__video {
    margin-top: 66px;
  }
}
