/* UX case studies: /design/ index and /design/<slug>/ pages.
   Reuses .intro, .detail__eyebrow, .detail__specs (main.css), .work__back
   (work.css) and .doc__prose / .doc__actions (doc.css). */

/* ---------- Index ---------- */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 40px 32px;
  padding: 16px 0 8px;
}
.cs-card {
  display: flex; flex-direction: column; gap: 10px;
  color: inherit; text-decoration: none;
}
.cs-card:hover { text-decoration: none; }
.cs-card__media {
  background: #efece4;
  border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow);
  margin-bottom: 6px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.cs-card__media img { width: 100%; height: 100%; object-fit: cover; }
.cs-card:hover .cs-card__media { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cs-card__title {
  font-family: var(--serif); font-weight: 500;
  font-size: 22px; line-height: 1.2; margin: 0; color: var(--ink);
}
.cs-card:hover .cs-card__title { color: var(--accent); }
.cs-card__summary { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 60ch; }

.cs-empty {
  color: var(--ink-2); font-size: 16px;
  padding: 24px 0; border-top: 1px solid var(--rule);
}
.cs-actions { margin-bottom: 72px; }

.cs-draft {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  letter-spacing: .08em;
}

/* ---------- Case study ---------- */
.cs { max-width: 820px; margin: 0 auto; padding: 32px 0 72px; }

.cs__header { margin-bottom: 36px; }
.cs__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(30px, 4.5vw, 44px); line-height: 1.1;
  margin: 8px 0 14px; letter-spacing: -.01em;
}
.cs__summary { font-size: 19px; line-height: 1.55; color: var(--ink-2); margin: 0 0 28px; }
.cs__meta { margin: 0; }
.cs__nda {
  font-size: 13px; color: var(--ink-3); margin: 14px 0 0;
  padding-left: 12px; border-left: 2px solid var(--rule);
}

.cs__section { margin: 0 0 48px; }
.cs__section h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: 24px; line-height: 1.25; margin: 0 0 14px;
}
.cs__section .doc__prose ul, .cs__section .doc__prose ol { padding-left: 1.2em; margin: 0 0 20px; }

.cs__figure { margin: 28px 0 0; }
.cs__figure img {
  width: 100%; height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  background: var(--surface);
}
.cs__figure figcaption { font-size: 13px; color: var(--ink-3); margin-top: 10px; }
.cs__figure--hero { margin: 0 0 48px; }

.cs__pager {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--rule); padding-top: 24px;
}
.cs__pager-link {
  display: flex; flex-direction: column; gap: 2px;
  color: var(--ink); font-family: var(--serif); font-size: 17px;
}
.cs__pager-link span {
  font-family: var(--sans); font-size: 11px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .14em;
}
.cs__pager-link--next { margin-left: auto; text-align: right; }

@media (max-width: 640px) {
  .cs { padding: 24px 0 48px; }
  .cs__summary { font-size: 17px; }
  .cs__section h2 { font-size: 21px; }
}

/* Comparison tables inside case-study sections. The wrapper scrolls on narrow screens. */
.cs__table { overflow-x: auto; margin: 0 0 20px; }
.cs__table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.cs__table th, .cs__table td {
  text-align: left; vertical-align: top;
  padding: 10px 12px; border-bottom: 1px solid var(--rule);
}
.cs__table thead th {
  font-size: 11px; font-weight: 600; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .1em;
}
.cs__table tbody th { font-weight: 600; white-space: nowrap; }
