/**
 * Case study detail — Challenges, Approach, What We Built
 * Matches home-case-card colors and typography.
 */

.page--case-study .two-col {
  gap: 12px;
}

/* Challenges + Approach — match who-industry-card enter effect */
.page--case-study .col-card.challenge,
.page--case-study .col-card.solution {
  position: relative;
  border: none;
  border-radius: 14px;
  padding: 28px 32px;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 420ms ease-out, transform 420ms ease-out, background 0.25s ease;
  will-change: opacity, transform;
}

/* The Challenges — purple, hover pink (like industry cards) */
.page--case-study .col-card.challenge {
  background: #454bdd;
}

/* The Approach — pink, hover purple */
.page--case-study .col-card.solution {
  background: #fe72e8;
}

.page--case-study .col-card.challenge.is-visible,
.page--case-study .col-card.solution.is-visible {
  opacity: 1;
  transform: scale(1);
}

.page--case-study .col-card.challenge.is-visible.is-enter-done,
.page--case-study .col-card.solution.is-visible.is-enter-done {
  transition: none;
}

@media (hover: hover) and (pointer: fine) {
  .page--case-study .col-card.challenge.is-visible:hover {
    background: #fe72e8;
  }

  .page--case-study .col-card.solution.is-visible:hover {
    background: #454bdd;
  }
}

.page--case-study .col-card h3 {
  position: relative;
  z-index: 1;
  font-family: "Fraunces", serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.35;
  text-transform: none;
  margin: 0 0 1.25rem;
  text-align: center;
  transition: color 0.25s ease;
}

.page--case-study .col-card .col-list {
  position: relative;
  z-index: 1;
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0;
  text-align: left;
}

.page--case-study .col-card .col-list li {
  transition: color 0.25s ease;
}

/* Challenges — light text on purple */
.page--case-study .col-card.challenge h3 {
  color: #f8f8f8;
}

.page--case-study .col-card.challenge .col-list li {
  color: rgba(248, 248, 248, 0.92) !important;
}

.page--case-study .col-card.challenge .col-list li::marker {
  color: rgba(248, 248, 248, 0.45);
}

/* Approach — dark text on pink */
.page--case-study .col-card.solution h3 {
  color: #171c39;
}

.page--case-study .col-card.solution .col-list li {
  color: #171c39 !important;
}

.page--case-study .col-card.solution .col-list li::marker {
  color: rgba(23, 28, 57, 0.35);
}

@media (hover: hover) and (pointer: fine) {
  /* Challenges hover pink — dark text */
  .page--case-study .col-card.challenge.is-visible:hover h3,
  .page--case-study .col-card.challenge.is-visible:hover .col-list li {
    color: #171c39 !important;
  }

  .page--case-study .col-card.challenge.is-visible:hover .col-list li::marker {
    color: rgba(23, 28, 57, 0.35);
  }

  /* Approach hover purple — light text */
  .page--case-study .col-card.solution.is-visible:hover h3 {
    color: #f8f8f8;
  }

  .page--case-study .col-card.solution.is-visible:hover .col-list li {
    color: rgba(248, 248, 248, 0.92) !important;
  }

  .page--case-study .col-card.solution.is-visible:hover .col-list li::marker {
    color: rgba(248, 248, 248, 0.45);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page--case-study .col-card.challenge,
  .page--case-study .col-card.solution,
  .page--case-study .built-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.page--case-study .built-grid {
  gap: 12px;
}

/* What We Built — same scroll enter as Challenges / Approach */
.page--case-study .built-card {
  position: relative;
  border: none;
  border-radius: 16px;
  padding: 28px;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 420ms ease-out, transform 420ms ease-out;
  will-change: opacity, transform;
}

.page--case-study .built-card.is-visible {
  opacity: 1;
  transform: scale(1);
}

.page--case-study .built-card.is-visible.is-enter-done {
  transition: transform 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .page--case-study .built-card.is-visible.is-enter-done:hover {
    transform: translateY(-4px);
  }
}

/* Cycle case-study palette: purple · pink · lime · cyan */
.page--case-study .built-grid .built-card:nth-child(4n + 1) {
  background: #454bdd;
}

.page--case-study .built-grid .built-card:nth-child(4n + 2) {
  background: #fe72e8;
}

.page--case-study .built-grid .built-card:nth-child(4n + 3) {
  background: #d8e950;
}

.page--case-study .built-grid .built-card:nth-child(4n + 4) {
  background: #04f4f1;
}

.page--case-study .built-grid .built-card:nth-child(4n + 1) h4,
.page--case-study .built-grid .built-card:nth-child(4n + 1) p {
  color: rgba(255, 255, 255, 0.92) !important;
}

.page--case-study .built-grid .built-card:nth-child(4n + 1) h4 {
  color: #ffffff !important;
}

.page--case-study .built-grid .built-card:nth-child(4n + 2) h4,
.page--case-study .built-grid .built-card:nth-child(4n + 2) p,
.page--case-study .built-grid .built-card:nth-child(4n + 3) h4,
.page--case-study .built-grid .built-card:nth-child(4n + 3) p,
.page--case-study .built-grid .built-card:nth-child(4n + 4) h4,
.page--case-study .built-grid .built-card:nth-child(4n + 4) p {
  color: #171c39 !important;
}

.page--case-study .built-card h4 {
  font-family: "Fraunces", serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
}

.page--case-study .built-card p {
  font-size: 15px !important;
  line-height: 1.65 !important;
  margin: 0;
}

.page--case-study .built-icon {
  margin-bottom: 0.75rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .page--case-study .col-card {
    padding: 24px 22px;
  }

  .page--case-study .built-card {
    padding: 24px 22px;
  }
}
