/* ============================================
   Case study page (/{locale}/case-studies/{slug})
   ============================================ */

.cs-page {
  background: #000000;
  color: #ffffff;
  /* clip (not hidden): hidden would let the page shrink inside the flex .container */
  overflow-x: clip;
  flex-shrink: 0;
}

.cs-eyebrow {
  font-family: 'Inter', 'Satoshi', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: normal;
  color: #bfa8ff;
  text-transform: uppercase;
  white-space: pre-wrap;
  margin: 0;
}

/* ---------- Hero ---------- */

.cs-hero {
  position: relative;
  padding: 257px 0 120px;
}

.cs-hero-glow-wrapper {
  position: absolute;
  top: 32px;
  left: -30px;
  right: -30px;
  height: 1242px;
  filter: blur(10px);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

.cs-hero-glow {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cs-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1321px, 90%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 116px;
}

.cs-hero-text {
  flex: 0 1 558px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cs-hero-title {
  font-family: 'Satoshi', sans-serif;
  font-size: 40px;
  font-weight: 500;
  line-height: 50px;
  margin: 0;
  background: linear-gradient(131.6deg, #ffffff 7.1%, #999999 228.75%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cs-hero-description {
  font-family: 'Inter', 'Satoshi', sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.3;
  color: #b4b4b4;
  margin: 0;
}

.cs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 495px;
}

.cs-hero-image {
  flex: 0 1 647px;
  aspect-ratio: 647 / 708;
  border-radius: 20px;
  overflow: hidden;
}

.cs-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Metrics ---------- */

.cs-metrics {
  width: min(1240px, 90%);
  margin: 0 auto;
  padding-bottom: 86px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 16px;
}

.cs-metric {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(to top, rgba(29, 21, 41, 0) 0%, #65498f 100%);
  box-shadow: inset 0 1px 3.4px rgba(255, 255, 255, 0.25);
}

.cs-metric-value {
  font-family: 'Manrope', 'Satoshi', sans-serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 1.4;
  color: #ffffff;
  margin: 0;
}

.cs-metric-label {
  font-family: 'Manrope', 'Satoshi', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: #f8f5ff;
  margin: 0;
}

/* ---------- Content blocks ---------- */

.cs-blocks {
  width: min(1409px, 90%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 128px;
}

.cs-block {
  display: flex;
  align-items: center;
  gap: 128px;
  min-height: 577px;
  padding: 32px;
  border: 1px solid rgba(184, 184, 184, 0.3);
  border-radius: 10px;
  background: #060606;
}

.cs-block--v2 {
  flex-direction: row-reverse;
  background: linear-gradient(to bottom, #543d79 0%, #000000 100%);
}

.cs-block-image {
  flex: 0 1 623px;
  aspect-ratio: 623 / 443;
  border-radius: 10px;
  overflow: hidden;
}

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

.cs-block-text {
  flex: 0 1 528px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 64px;
}

.cs-block--no-image .cs-block-text {
  flex-basis: 100%;
}

.cs-block-body {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cs-block-title {
  font-family: 'Manrope', 'Satoshi', sans-serif;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.18;
  color: #ffffff;
  margin: 0;
}

.cs-block-description {
  font-family: 'Inter', 'Satoshi', sans-serif;
  font-size: 20px;
  line-height: normal;
  color: #ffffff;
  margin: 0;
}

.cs-block-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-family: 'Inter', 'Satoshi', sans-serif;
  font-size: 20px;
  line-height: normal;
  color: #ffffff;
}

.cs-block-points li {
  display: flex;
  gap: 18px;
}

.cs-block-points span {
  flex-shrink: 0;
}

.cs-block-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', 'Satoshi', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: normal;
  color: #bfaeff;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cs-block-cta:hover {
  opacity: 0.85;
}

.cs-block--v1 .cs-block-cta:hover svg {
  transform: translateX(4px);
}

.cs-block-cta svg {
  transition: transform 0.2s ease;
}

.cs-block--v2 .cs-block-cta {
  height: 48px;
  padding: 0 24px;
  min-width: 249px;
  border-radius: 50px;
  background: #ffffff;
  color: #000000;
}

/* ---------- Results summary ---------- */

.cs-results {
  margin-top: 128px;
  background: linear-gradient(to top, rgba(29, 21, 41, 0) 0%, #65498f 100%);
  padding: 100px 0;
}

.cs-results-inner {
  width: min(1240px, 90%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  font-family: 'Manrope', 'Satoshi', sans-serif;
  line-height: 1.4;
}

.cs-results-inner p,
.cs-results-inner h2 {
  margin: 0;
}

.cs-results-subtitle {
  font-size: 12px;
  font-weight: 700;
  color: #bfa8ff;
  text-transform: uppercase;
}

.cs-results-title {
  font-size: 48px;
  font-weight: 700;
  color: #f8f5ff;
  max-width: 640px;
}

.cs-results-description {
  font-size: 18px;
  color: #b9b0c6;
  max-width: 810px;
}

.cs-results-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 24px;
}

.cs-result {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-result-value {
  font-size: 64px;
  font-weight: 700;
  color: #bfa8ff;
}

.cs-result-label {
  font-size: 16px;
  color: #f8f5ff;
}

.cs-results-note {
  font-size: 12px;
  color: #b9b0c6;
}

/* ---------- Final CTA ---------- */

.cs-cta {
  padding-top: 128px;
}

.cs-blocks + .cs-cta,
.cs-metrics + .cs-cta {
  padding-top: 128px;
}

.cs-results + .cs-cta {
  padding-top: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 1280px) {
  .cs-hero-inner,
  .cs-block {
    gap: 56px;
  }

  .cs-block-title {
    font-size: 36px;
  }

  .cs-results-title {
    font-size: 40px;
  }
}

@media (max-width: 1024px) {
  .cs-hero {
    padding-top: 180px;
  }

  .cs-hero-title {
    font-size: 34px;
    line-height: 42px;
  }

  .cs-hero-description,
  .cs-block-description,
  .cs-block-points,
  .cs-block-cta {
    font-size: 18px;
  }

  .cs-metric-value {
    font-size: 40px;
  }

  .cs-result-value {
    font-size: 48px;
  }
}

@media (max-width: 768px) {
  .cs-eyebrow {
    font-size: 12px;
  }

  .cs-hero {
    padding: 87px 0 32px;
  }

  .cs-hero-glow-wrapper {
    top: -29px;
    height: 567px;
  }

  .cs-hero-inner {
    width: calc(100% - 58px);
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
  }

  .cs-hero-text {
    flex: none;
    gap: 24px;
  }

  .cs-hero-title {
    font-size: 24px;
    line-height: 30px;
  }

  .cs-hero-description {
    font-size: 12px;
    line-height: 20px;
  }

  /* Tags aren't shown on mobile in the design */
  .cs-tags {
    display: none;
  }

  .cs-hero-image {
    flex: none;
    width: 100%;
    aspect-ratio: 341 / 371;
  }

  .cs-metrics {
    width: calc(100% - 48px);
    grid-template-columns: 1fr;
    padding-bottom: 32px;
  }

  .cs-metric {
    min-height: 163px;
    justify-content: center;
  }

  .cs-blocks {
    width: calc(100% - 56px);
    gap: 32px;
  }

  .cs-block,
  .cs-block--v2 {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  .cs-block-image {
    flex: none;
    width: 100%;
    aspect-ratio: 345 / 245;
    border-radius: 0;
  }

  .cs-block-text {
    flex: none;
    gap: 32px;
    padding: 24px;
  }

  .cs-block-body {
    gap: 16px;
  }

  .cs-block-title {
    font-size: 24px;
    line-height: 30px;
  }

  .cs-block-description,
  .cs-block-points {
    font-size: 12px;
    line-height: 20px;
  }

  .cs-block-points {
    gap: 12px;
  }

  .cs-block-cta {
    font-size: 16px;
  }

  /* v2 on mobile: text, then the image, then the button (as in the design) */
  .cs-block--v2 {
    display: grid;
    grid-template-areas: "text" "image" "cta";
    padding: 16px 16px 24px;
    row-gap: 32px;
  }

  .cs-block--v2 .cs-block-text {
    display: contents;
  }

  .cs-block--v2 .cs-block-body {
    grid-area: text;
    padding-top: 54px;
  }

  .cs-block--v2 .cs-block-image {
    grid-area: image;
    aspect-ratio: 308 / 219;
    border-radius: 10px;
  }

  .cs-block--v2 .cs-block-cta {
    grid-area: cta;
    justify-self: start;
    min-width: 187px;
  }

  .cs-results {
    margin-top: 32px;
    padding: 48px 0;
  }

  .cs-results-inner {
    width: calc(100% - 48px);
    gap: 16px;
  }

  .cs-results-title {
    font-size: 24px;
  }

  .cs-results-description {
    font-size: 14px;
  }

  .cs-results-items {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cs-result-value {
    font-size: 40px;
  }

  .cs-cta,
  .cs-blocks + .cs-cta,
  .cs-metrics + .cs-cta {
    padding-top: 32px;
  }
}
