/* Case study layout — extends homepage styles */

.case-study__name {
  color: #32404f !important;
  display: block;
  text-decoration: none;
}

.case-study__name:hover {
  color: #663399 !important;
}

.case-study__page {
  margin: 0;
  max-width: none;
  padding: 0 32px 32px;
}

.case-study__grid {
  display: grid;
  gap: 0 32px;
  grid-template-columns: 1fr;
}

.case-study__sidebar {
  display: none;
}

.case-study__back {
  align-items: center;
  color: rgba(50, 64, 79, 0.584);
  display: inline-flex;
  font-family: Geist, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 300;
  gap: 8px;
  line-height: 1.4;
  margin-bottom: 32px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.case-study__back:hover {
  color: #32404f;
}

.case-study__back-icon {
  flex-shrink: 0;
  height: 20px;
  width: 20px;
}

.case-study__nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.case-study__nav-list .link-big {
  font-size: 20px;
  height: auto;
  line-height: 1.4;
  padding-bottom: 0;
}

.case-study__nav-link {
  background: none;
  border: none;
  cursor: pointer;
  display: block;
  font-weight: 300;
  padding: 0;
  text-align: left;
  width: fit-content;
}

.case-study__nav-link.is-active {
  color: #663399 !important;
}

.case-study__main {
  min-width: 0;
  padding: 48px 0 0;
}

.case-study__hero {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 96px;
}

.case-study__eyebrow {
  color: rgba(50, 64, 79, 0.584);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 20px;
  font-weight: 300;
  line-height: 32px;
  margin: 0;
}

.case-study__title {
  color: #32404f !important;
  font-family: Lora, Georgia, serif;
  font-size: 64px;
  font-weight: 400;
  line-height: 80px;
  margin: 0;
}

.case-study__meta {
  display: grid;
  gap: 32px 48px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.case-study__meta-label {
  color: #32404f;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 20px;
  font-weight: 300;
  line-height: 32px;
  margin: 0 0 4px;
}

.case-study__meta-value {
  color: rgba(50, 64, 79, 0.584);
  font-family: Geist, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 300;
  line-height: 32px;
  margin: 0;
}

.case-study__section {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 96px;
  scroll-margin-top: 48px;
}

.case-study__section-label {
  color: #32404f;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 20px;
  font-weight: 300;
  line-height: 32px;
  margin: 0;
}

.case-study__section-title {
  color: #32404f !important;
  font-family: Lora, Georgia, serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
}

.case-study__section-title--sm {
  font-size: 28px;
}

.case-study__prose {
  color: rgba(50, 64, 79, 0.584);
  font-family: Geist, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 300;
  line-height: 32px;
  margin: 0;
  max-width: none;
}

.case-study__prose strong {
  color: #32404f;
  font-weight: 400;
}

.case-study__list {
  color: rgba(50, 64, 79, 0.584);
  font-family: Geist, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 300;
  line-height: 32px;
  margin: 0;
  padding-left: 1.25em;
}

.case-study__list li {
  margin-bottom: 8px;
}

.case-study__list li strong {
  color: #32404f;
  font-weight: 400;
}

.case-study__table-wrap {
  overflow-x: auto;
  width: 100%;
}

.case-study__table {
  border-collapse: collapse;
  font-family: Geist, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 28px;
  width: 100%;
}

.case-study__table th,
.case-study__table td {
  border-bottom: 1px solid rgba(50, 64, 79, 0.1);
  color: rgba(50, 64, 79, 0.584);
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.case-study__table th {
  color: #32404f;
  font-weight: 400;
}

.case-study__figure {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.case-study__hero-figure {
  margin: 0;
}

.case-study__img-wrap {
  align-items: center;
  background-color: #e9e9ea;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  padding: 32px;
  width: 100%;
}

.case-study__img-wrap.case-study__img-wrap--promotion {
  background-color: #c7c7fb !important;
}

.case-study__img-wrap.case-study__img-wrap--in-ui-help {
  background-color: #fbd9ff !important;
}

.case-study__img-wrap.case-study__img-wrap--goals-hub {
  background-color: #d9ebff !important;
}

.case-study__img-wrap.case-study__img-wrap--gen-ai {
  background-color: #f0e7fd !important;
}

.case-study__img-wrap img {
  border-radius: 4px;
  display: block;
  height: auto;
  max-height: 480px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.case-study__figure img {
  border-radius: 8px;
  display: block;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
  width: 100%;
}

.case-study__figure img:hover {
  opacity: 0.92;
}

.case-study__figure figcaption {
  color: rgba(50, 64, 79, 0.584);
  font-family: Geist, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 300;
  line-height: 32px;
  margin: 0;
}

.case-study__placeholder {
  aspect-ratio: 16 / 9;
  background: linear-gradient(-45deg, #d4d4d4, #ebebeb, #f5f5f5, #c8c8c8, #e0e0e0);
  background-size: 400% 400%;
  border-radius: 8px;
  width: 100%;
}

.case-study__footer {
  border-top: 1px solid rgba(50, 64, 79, 0.1);
  color: rgba(50, 64, 79, 0.584);
  font-size: 20px;
  line-height: 32px;
  margin-top: 96px;
  padding-top: 32px;
}

.case-study__footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 16px;
}

.case-study__footer-links a {
  color: rgba(50, 64, 79, 0.584);
  font-family: Geist, system-ui, sans-serif;
  font-size: 20px;
  text-decoration: none;
}

.case-study__footer-links a:hover {
  color: #663399;
}

.case-study__mobile-back {
  display: inline-flex;
}

.case-study__spacer {
  display: none;
}

@media screen and (min-width: 768px) {
  .case-study__grid {
    align-items: start;
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .case-study__sidebar {
    display: block;
    padding: 48px 0;
    position: sticky;
    top: 0;
    width: 180px;
  }

  .case-study__main {
    margin-left: auto;
    margin-right: auto;
    max-width: 768px;
    padding: 48px 0;
    width: 100%;
  }

  .case-study__mobile-back {
    display: none;
  }
}

@media screen and (min-width: 1024px) {
  .case-study__grid {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .case-study__sidebar {
    width: 200px;
  }

  .case-study__main {
    max-width: 896px;
  }
}

@media screen and (max-width: 991px) {
  .case-study__title {
    font-size: 48px;
    line-height: 60px;
  }

  .case-study__meta {
    grid-template-columns: 1fr;
  }

  .case-study__section-title {
    font-size: 32px;
  }
}

@media screen and (max-width: 767px) {
  .case-study__page {
    padding: 0 16px 32px;
  }

  .case-study__main {
    padding-top: 24px;
  }

  .case-study__hero {
    gap: 24px;
    margin-bottom: 64px;
  }

  .case-study__section {
    gap: 24px;
    margin-bottom: 64px;
  }

  .case-study__title {
    font-size: 36px;
    line-height: 44px;
  }

  .case-study__eyebrow,
  .case-study__meta-label,
  .case-study__meta-value,
  .case-study__section-label,
  .case-study__prose,
  .case-study__list,
  .case-study__figure figcaption,
  .case-study__back {
    font-size: 18px;
    line-height: 28px;
  }
}

/* Lightbox */
body.lightbox-open {
  overflow: hidden;
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  inset: 0;
  position: fixed;
  z-index: 10001;
}

.lightbox__backdrop {
  background: rgba(15, 20, 26, 0.88);
  cursor: zoom-out;
  inset: 0;
  position: absolute;
}

.lightbox__panel {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  inset: 0;
  justify-content: center;
  padding: 48px 64px;
  pointer-events: none;
  position: absolute;
}

.lightbox__close,
.lightbox__nav {
  align-items: center;
  background: rgba(249, 252, 253, 0.1);
  border: none;
  border-radius: 999px;
  color: #f9fcfd;
  cursor: pointer;
  display: flex;
  height: 44px;
  justify-content: center;
  pointer-events: auto;
  position: absolute;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  width: 44px;
}

.lightbox__close:hover,
.lightbox__nav:hover:not(:disabled) {
  background: rgba(249, 252, 253, 0.2);
}

.lightbox__nav:disabled {
  cursor: default;
  opacity: 0.35;
}

.lightbox__close {
  right: 24px;
  top: 24px;
}

.lightbox__nav--prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__nav--next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__figure {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  max-height: 100%;
  max-width: min(1200px, 100%);
  pointer-events: auto;
}

.lightbox__image {
  border-radius: 8px;
  display: block;
  height: auto;
  margin: 0 auto;
  max-height: calc(100vh - 160px);
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.lightbox__caption {
  color: rgba(249, 252, 253, 0.72);
  font-family: Geist, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 300;
  line-height: 32px;
  margin: 0;
  text-align: center;
}

.lightbox__caption[hidden] {
  display: none;
}

@media screen and (max-width: 767px) {
  .lightbox__panel {
    padding: 64px 16px 24px;
  }

  .lightbox__close {
    right: 16px;
    top: 16px;
  }

  .lightbox__nav--prev {
    left: 12px;
  }

  .lightbox__nav--next {
    right: 12px;
  }

  .lightbox__caption {
    font-size: 18px;
    line-height: 28px;
  }
}
