.page-case {
  background:
    radial-gradient(circle at top left, rgba(59, 106, 253, 0.12), transparent 24%),
    linear-gradient(180deg, #f5f7fb 0%, #ffffff 18%, #f7f9fc 100%);
  color: var(--color-text);
}

.page-case main {
  overflow: hidden;
}

.case-shell {
  padding: 8.75rem 0 7rem;
}

.case-hero__title {
  color: #000000;
  font-family: var(--font-display);
  font-size: 3.75rem;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.96;
  margin: 0;
  text-transform: capitalize;
}

.case-hero__subtitle {
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 1.3rem;
  line-height: 1.5;
  margin: 0.5rem 0 1.5rem;
  font-weight: 500;
}

.case-list {
  display: grid;
  gap: 1.9rem;
}

.case-study {
  align-items: stretch;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.36fr) minmax(0, 0.64fr);
}

.case-study--media-left {
  grid-template-columns: minmax(0, 0.64fr) minmax(0, 1.36fr);
}

.case-study--media-right .case-study__content {
  order: 1;
}

.case-study--media-right .case-study__media {
  order: 2;
}

.case-study__content,
.case-study__media {
  background: var(--color-surface);
  border: 1px solid rgba(18, 32, 58, 0.08);
  border-radius: 0.625rem;
  box-shadow: 0 12px 28px rgba(12, 24, 45, 0.12);
}

.case-study__content {
  min-height: 30.5rem;
  padding: 0.875rem;
}

.case-study__content-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

.case-study__title {
  color: #111111;
  display: grid;
  font-family: var(--font-display);
  font-size: 3.3rem;
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
}

.case-study__copy {
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

.case-study__summary {
  color: #222222;
  font-size: 1rem;
  line-height: 1.38;
  margin-top: 10px;
}

.case-study__tag {
  align-self: end;
  background: var(--color-primary);
  border-radius: 0.625rem;
  color: #ffffff;
  display: inline-flex;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.125rem 0.625rem 0.25rem;
}

.case-study__media {
  align-self: start;
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: hidden;
}

.case-study__media img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

@media (max-width: 75rem) {
  .case-shell {
    padding-top: 8.2rem;
  }

  .case-study {
    gap: 0.9rem;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  }

  .case-study__content {
    min-height: 27rem;
  }
}

@media (max-width: 62rem) {
  .case-shell {
    padding-bottom: 5.5rem;
    padding-top: 8rem;
  }

  .case-list {
    gap: 1.5rem;
  }

  .case-study {
    grid-template-columns: 1fr;
  }

  .case-study .case-study__media {
    align-self: stretch;
    aspect-ratio: auto;
    min-height: 21rem;
    order: 1;
  }

  .case-study .case-study__content {
    min-height: auto;
    order: 2;
  }

  .case-study__title {
    font-size: 3rem;
    font-size: clamp(2.6rem, 7vw, 3.5rem);
  }
}

@media (max-width: 46rem) {
  .page-case {
    background: #ffffff;
  }

  .case-hero__title {
    font-size: 2rem;
  }

  .case-hero__subtitle {
    font-size: 0.875rem;
  }

  .case-shell {
    padding-bottom: 4.5rem;
    padding-top: 9rem;
  }

  .case-shell .container {
    max-width: 26.75rem;
    padding-left: 0.875rem;
    padding-right: 0.875rem;
  }

  .case-list {
    gap: 1.25rem;
    justify-items: center;
  }

  .case-study {
    gap: 1.25rem;
    width: 100%;
  }

  .case-study__content,
  .case-study__media {
    width: 100%;
  }

  .case-study__content {
    background: #ffffff;
    border: 0;
    border-radius: 0.625rem;
    box-shadow: 0 0 0.9375rem rgba(0, 0, 0, 0.25);
    min-height: 33.5rem;
    padding: 1.25rem;
  }

  .case-study__content-inner {
    gap: 0;
  }

  .case-study .case-study__media {
    aspect-ratio: 400 / 393;
    background: transparent;
    border: 0;
    border-radius: 0.625rem;
    box-shadow: none;
    align-self: stretch;
    min-height: 0;
    overflow: hidden;
  }

  .case-study__media img {
    border-radius: inherit;
  }

  .case-study__title {
    color: #000000;
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.1;
    max-width: 11rem;
  }

  .case-study__copy {
    margin-top: 6rem;
  }

  .case-study__tag {
    align-self: flex-end;
    border-radius: 0.625rem;
    font-size: 1.25rem;
    line-height: 1;
    margin-bottom: 1.25rem;
    min-height: 1.6875rem;
    order: -1;
    padding: 0 0.625rem;
  }

  .case-study__summary {
    color: #000000;
    font-size: 0.875rem;
    line-height: 1.5178571429;
  }

  .case-study__title span {
    display: block;
  }

  .case-study__summary {
    width: 100%;
  }

  .case-study__tag {
    width: fit-content;
  }

  .case-study .case-study__media img {
    height: 100%;
  }
}
