/* Project Overview — case study section */

.project-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px 64px;
  align-items: center;
  margin: 0 0 72px;
}

.project-overview__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-family: var(--misiom-font, "Neue Montreal", Arial, sans-serif);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #111111;
}

.project-overview__label-mark {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 8px 5px 0;
  border-color: transparent #ff5a1f transparent transparent;
}

.project-overview__label-mark--right {
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #ff5a1f;
}

.project-overview__title {
  margin: 0 0 18px;
  max-width: 34ch;
  font-family: var(--misiom-font, "Neue Montreal", Arial, sans-serif);
  font-size: clamp(28px, 2.6vw, 40px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #111111;
}

.project-overview__text {
  margin: 0 0 36px;
  max-width: 52ch;
  font-size: var(--body-font-size, 17px);
  font-weight: 400;
  line-height: var(--body-line-height, 1.65);
  color: var(--body-color, rgba(0, 0, 0, 0.72));
}

.project-overview__meta {
  margin: 0;
  padding: 0;
  max-width: 520px;
}

.project-overview__meta li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.project-overview__meta li:last-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.project-overview__meta-label {
  flex-shrink: 0;
  font-family: var(--misiom-font, "Neue Montreal", Arial, sans-serif);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: #111111;
}

.project-overview__meta-value {
  text-align: right;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.58);
}

.project-overview__media {
  min-width: 0;
}

.project-overview__media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

@media (max-width: 1199px) {
  .project-overview {
    gap: 40px 40px;
  }

  .project-overview__title {
    max-width: none;
  }
}

@media (max-width: 991px) {
  .project-overview {
    grid-template-columns: 1fr;
    gap: 36px;
    margin-bottom: 56px;
  }

  .project-overview__media {
    order: -1;
  }

  .project-overview__meta {
    max-width: none;
  }
}

@media (max-width: 575px) {
  .project-overview__meta li {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px 0;
  }

  .project-overview__meta-value {
    text-align: left;
  }
}

/* Case study gallery layout */

.case-gallery {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 0 0 72px;
}

.case-gallery__intro {
  margin: 0 0 12px;
  max-width: 72ch;
  font-size: var(--body-font-size, 17px);
  font-weight: 400;
  line-height: var(--body-line-height, 1.65);
  color: var(--body-color, rgba(0, 0, 0, 0.72));
}

.case-gallery__item {
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #f3f3f3;
}

.case-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.case-gallery__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

.case-gallery__pair .case-gallery__item {
  height: 100%;
}

.case-gallery__pair .case-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 991px) {
  .case-gallery {
    gap: 22px;
    margin-bottom: 56px;
  }

  .case-gallery__pair {
    gap: 22px;
  }

  .case-gallery__item {
    border-radius: 14px;
  }
}

@media (max-width: 767px) {
  .case-gallery {
    gap: 18px;
  }

  .case-gallery__intro {
    margin-bottom: 4px;
  }

  .case-gallery__pair {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .case-gallery__item {
    border-radius: 12px;
  }
}

/* PXGEN / case study featured image */
.portfolio-details__thumbnail {
  aspect-ratio: 16 / 9;
  max-height: 620px;
}

.portfolio-details__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Case study background video */
.case-video {
  margin: 0 0 72px;
}

.case-video__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #111111;
}

.case-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

@media (max-width: 767px) {
  .case-video {
    margin-bottom: 56px;
  }

  .case-video__frame {
    border-radius: 12px;
  }
}

.case-intro {
  margin: 0 0 48px;
}

.case-intro .case-gallery__intro {
  margin: 0;
  max-width: 72ch;
}

/* Case study problem section */

.case-problem {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 32px 48px;
  align-items: start;
  margin: 0 0 72px;
  padding: 8px 0 0;
}

.case-problem__label {
  margin: 6px 0 0;
  font-family: var(--misiom-font, "Neue Montreal", Arial, sans-serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111111;
}

.case-problem__title {
  margin: 0 0 18px;
  max-width: 22ch;
  font-family: var(--misiom-font, "Neue Montreal", Arial, sans-serif);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #111111;
}

.case-problem__text {
  margin: 0 0 28px;
  max-width: 62ch;
  font-size: var(--body-font-size, 17px);
  font-weight: 400;
  line-height: var(--body-line-height, 1.65);
  color: var(--body-color, rgba(0, 0, 0, 0.72));
}

.case-problem__list {
  margin: 0;
  padding: 0;
  max-width: 68ch;
}

.case-problem__list li {
  position: relative;
  padding-left: 18px;
  margin: 0 0 14px;
  font-size: var(--body-font-size, 17px);
  font-weight: 400;
  line-height: var(--body-line-height, 1.65);
  color: var(--body-color, rgba(0, 0, 0, 0.72));
}

.case-problem__list li:last-child {
  margin-bottom: 0;
}

.case-problem__list li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #111111;
}

.case-problem__list strong {
  font-weight: 600;
  color: #111111;
}

@media (max-width: 991px) {
  .case-problem {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 24px 28px;
    margin-bottom: 56px;
  }

  .case-problem__title {
    max-width: none;
  }
}

@media (max-width: 767px) {
  .case-problem {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .case-problem__label {
    margin-top: 0;
  }
}

/* Case study process section */

.case-process {
  margin: 0 0 72px;
  padding: 48px 40px 44px;
  border-radius: 24px;
  background: #f3f3f3;
}

.case-process__label {
  margin: 0 0 18px;
  font-family: var(--misiom-font, "Neue Montreal", Arial, sans-serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111111;
}

.case-process__title {
  margin: 0 0 14px;
  max-width: 22ch;
  font-family: var(--misiom-font, "Neue Montreal", Arial, sans-serif);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #111111;
}

.case-process__text {
  margin: 0 0 36px;
  max-width: 58ch;
  font-size: var(--body-font-size, 17px);
  font-weight: 400;
  line-height: var(--body-line-height, 1.65);
  color: var(--body-color, rgba(0, 0, 0, 0.72));
}

.case-process__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.case-process__card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 28px 24px 26px;
  border-radius: 16px;
  background: #ffffff;
}

.case-process__number {
  display: block;
  margin-bottom: 28px;
  font-family: var(--misiom-font, "Neue Montreal", Arial, sans-serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #111111;
}

.case-process__card-title {
  margin: 0 0 12px;
  font-family: var(--misiom-font, "Neue Montreal", Arial, sans-serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #111111;
}

.case-process__card-text {
  margin: 0 0 22px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.62);
}

.case-process__card-list {
  margin: auto 0 0;
  padding: 0;
}

.case-process__card-list li {
  position: relative;
  padding-left: 14px;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.68);
}

.case-process__card-list li:last-child {
  margin-bottom: 0;
}

.case-process__card-list li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #111111;
}

@media (max-width: 1199px) {
  .case-process {
    padding: 40px 28px 36px;
  }

  .case-process__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 767px) {
  .case-process {
    margin-bottom: 56px;
    padding: 32px 20px 28px;
    border-radius: 18px;
  }

  .case-process__title {
    max-width: none;
  }

  .case-process__text {
    margin-bottom: 28px;
  }

  .case-process__grid {
    grid-template-columns: 1fr;
  }

  .case-process__card {
    padding: 24px 20px;
  }

  .case-process__number {
    margin-bottom: 18px;
    font-size: 24px;
  }
}

/* Case study prev / next with project names */
.portfolio-details__pagination__prev,
.portfolio-details__pagination__next {
  align-items: center;
  gap: 14px;
  max-width: min(100%, 420px);
}

.portfolio-details__pagination__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.portfolio-details__pagination__next .portfolio-details__pagination__copy {
  align-items: flex-end;
  text-align: right;
}

.portfolio-details__pagination__name {
  display: block;
  color: var(--misiom-text, #1a1a1a);
  font-family: var(--misiom-heading-font, inherit);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-details__pagination__prev:hover .portfolio-details__pagination__name,
.portfolio-details__pagination__next:hover .portfolio-details__pagination__name {
  color: var(--misiom-base, #090a0b);
}

@media (max-width: 767px) {
  .portfolio-details__pagination {
    gap: 24px;
  }

  .portfolio-details__pagination__prev,
  .portfolio-details__pagination__next {
    max-width: calc(50% - 12px);
  }

  .portfolio-details__pagination__name {
    font-size: 13px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}
