/* static/css/case-drafts.css
   The case studies (.cs): the list and each case study. Builds on
   home-drafts.css (.mb family) and custom-drafts.css (.ref-logo,
   .cb-quote, .cb-chips). */

/* ================================================================
   List — one card per case study
   ================================================================ */

.cs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

/* The first (latest) case study spans the whole row. */
.cs-cards > li:first-child {
  grid-column: 1 / -1;
}

.cs-card:hover,
.cs-card:focus-within {
  border-color: rgba(255, 165, 61, 0.45);
  transform: translateY(-2px);
}

.cs-card__cover {
  margin: 0;
  background: #f8f8f7;
}

.cs-card__cover img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.cs-card__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(26px, 3.4vw, 48px);
}

.cs-card__client {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 !important;
  font-size: 15px;
}

.cs-card__client strong {
  display: block;
  font-size: 16px;
  color: var(--text);
}

.cs-card h2 {
  margin: 0;
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.02;
}

.cs-card h2 a {
  color: inherit;
  text-decoration: none;
}

/* The title's link covers the whole card. */
.cs-card h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.cs-card h2 a:focus-visible {
  outline: none;
}

.cs-card:focus-within {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.cs-card__lead {
  margin: 0 !important;
  font-size: 17px;
  line-height: 1.6;
}

.cs-card__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.cs-card__facts li {
  padding: 16px 12px 0 0;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
}

.cs-card__facts strong {
  display: block;
  margin-bottom: 4px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 400;
  line-height: 1;
  color: var(--amber);
}

.cs-card__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-weight: 700;
  color: var(--amber);
}

.cs-card__more .hd-icon {
  width: 18px;
  height: 18px;
}

/* ================================================================
   Case study
   ================================================================ */

.cs-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.cs .mb-h1 {
  font-size: clamp(46px, 6.6vw, 92px);
}

.cs-cover {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: #f8f8f7;
  box-shadow: 0 0 0 1px rgba(255, 200, 140, 0.18), 0 40px 100px -40px rgba(255, 150, 60, 0.55);
}

.cs-cover img {
  display: block;
  width: 100%;
  height: auto;
}

.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
}

.cs-back:hover {
  color: var(--text);
}

.cs-back .hd-icon {
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
}

/* The client's words, right under the numbers */

.cs-voice {
  margin-top: 40px;
}

.cs-voice .cb-quote blockquote {
  font-size: clamp(26px, 3vw, 40px);
}

/* Story: facts on the left, the text on the right */

.cs-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: clamp(32px, 6vw, 96px);
}

.cs-facts {
  position: sticky;
  top: 112px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.cs-facts dl {
  margin: 0;
}

.cs-facts dt {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}

.cs-facts dl > div + div {
  margin-top: 18px;
}

.cs-facts dd {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--text);
}

.cs-facts a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  text-underline-offset: 3px;
}

.cs-story {
  max-width: 720px;
}

.cs-chapter + .cs-chapter {
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: clamp(48px, 6vw, 72px);
  border-top: 1px solid var(--line);
}

.cs-chapter h2 {
  margin: 0 0 20px;
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.05;
}

.cs-chapter p {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.7;
  color: #c4ccdb;
}

.cs-chapter p:last-child {
  margin-bottom: 0;
}

/* A highlighted sentence of the story */

.cs-pull {
  margin: 28px 0;
  padding: 4px 0 4px 26px;
  border-left: 2px solid var(--amber);
}

.cs-pull p {
  margin: 0 !important;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(24px, 2.4vw, 32px);
  font-style: italic;
  line-height: 1.25;
  color: var(--text) !important;
}

/* What it achieved */

.cs-results {
  display: grid;
  gap: 12px;
  margin: 24px 0 28px;
  padding: 0;
  list-style: none;
}

.cs-results li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
}

.cs-results .hd-icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--amber);
  stroke-width: 2.6;
}

/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 900px) {
  .cs-hero__grid,
  .cs-body {
    grid-template-columns: 1fr;
  }

  .cs-cover {
    max-width: 420px;
  }

  .cs-facts {
    position: static;
  }

  .cs-facts dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
  }

  .cs-facts dl > div + div {
    margin-top: 0;
  }

  .cs-facts dl > div:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .cs-card {
    grid-template-columns: 1fr;
  }

  .cs-card__cover img {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 560px) {
  .cs-card__facts {
    grid-template-columns: 1fr;
  }

  .cs-facts dl {
    grid-template-columns: 1fr;
  }

  .cs-chapter p {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-card {
    transition: none;
  }

  .cs-card:hover,
  .cs-card:focus-within {
    transform: none;
  }
}
