/* Case studies — index + detail pages */

/* ---------- Index hero ---------- */
.cs-hero { padding: 48px 0 24px; }
.cs-hero .eyebrow { margin-bottom: 20px; }
.cs-hero h1 {
  font-size: clamp(48px, 6.2vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: var(--adio-weight-medium);
  margin-bottom: 20px;
}
.cs-hero .lede { max-width: none; font-size: 18px; line-height: 1.55; color: var(--adio-fg-2); margin: 0; }
.cs-hero h1 em { font-style: normal; color: var(--adio-fg-3); }
.cs-hero .cs-meta {
  display: flex; gap: 24px; flex-wrap: wrap;
  font-family: var(--adio-font-mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--adio-fg-3);
  padding-top: 20px; border-top: 1px solid var(--adio-hairline);
  max-width: 720px;
}

/* ---------- Index grid ---------- */
.cs-section { padding: 8px 0 48px; }
.cs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--adio-hairline);
  border-left: 1px solid var(--adio-hairline);
}
@media (max-width: 1100px) { .cs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .cs-grid { grid-template-columns: 1fr; } }

.cs-card {
  display: flex; flex-direction: column; gap: 16px;
  padding: 28px;
  border-right: 1px solid var(--adio-hairline);
  border-bottom: 1px solid var(--adio-hairline);
  background: var(--adio-white);
  color: var(--adio-fg-1);
  transition: background var(--adio-dur-base) var(--adio-ease);
  min-height: 320px;
  position: relative;
}
.cs-card:hover { background: var(--adio-linen); }
.cs-card:nth-child(6n+1):hover { background: #dfe2ec; }
.cs-card:nth-child(6n+2):hover { background: #f4e5d8; }
.cs-card:nth-child(6n+3):hover { background: #f3f0ed; }
.cs-card:nth-child(6n+4):hover { background: #f3f0ed; }
.cs-card:nth-child(6n+5):hover { background: #dfe2ec; }
.cs-card:nth-child(6n+6):hover { background: #f4e5d8; }
.cs-card-top { display: flex; justify-content: space-between; align-items: baseline; }
.cs-num { font-family: var(--adio-font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--adio-fg-3); }
.cs-cat { font-family: var(--adio-font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--adio-fg-3); }
.ag-card-body { margin: 0; font-size: 14px; color: var(--adio-fg-2); line-height: 1.55; }
.cs-card-title {
  font-size: 22px; line-height: 1.15; letter-spacing: -0.015em;
  font-weight: var(--adio-weight-medium);
  margin-top: -4px;
}
.cs-card-metrics {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--adio-hairline);
}
.cs-card-metrics .k { font-family: var(--adio-font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--adio-fg-3); }
.cs-card-metrics .v { font-size: 15px; font-weight: var(--adio-weight-medium); margin-top: 4px; letter-spacing: -0.005em; }
.cs-card-more {
  font-family: var(--adio-font-mono); font-size: 12px;
  color: var(--adio-fg-2);
  display: flex; align-items: center; gap: 8px;
}
.cs-card:hover .cs-card-more { color: var(--adio-fg-1); }
.cs-card-more .arrow { transition: transform var(--adio-dur-base) var(--adio-ease); }
.cs-card:hover .cs-card-more .arrow { transform: translateX(4px); }

/* ---------- Detail hero ---------- */
.csd-hero { padding: 48px 0 40px; border-bottom: 1px solid var(--adio-hairline); }
.csd-back {
  font-family: var(--adio-font-mono); font-size: 12px;
  color: var(--adio-fg-3); display: inline-block; margin-bottom: 32px;
}
.csd-back:hover { color: var(--adio-fg-1); }

.csd-hero-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: end;
}
@media (max-width: 900px) { .csd-hero-grid { grid-template-columns: 1fr; gap: 32px; } }

.csd-meta {
  display: flex; gap: 16px; align-items: center;
  font-family: var(--adio-font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--adio-fg-3);
  margin-bottom: 20px;
}
.csd-meta .mono { color: var(--adio-fg-1); }

.csd-hero h1 {
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.028em;
  font-weight: var(--adio-weight-medium);
  margin-bottom: 16px;
}
.csd-hero .lede { font-size: 18px; color: var(--adio-fg-2); }

.csd-metrics {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-top: 1px solid var(--adio-hairline);
  border-left: 1px solid var(--adio-hairline);
}
.csd-metrics > div {
  padding: 20px 24px;
  border-right: 1px solid var(--adio-hairline);
  border-bottom: 1px solid var(--adio-hairline);
}
.csd-metrics .k { font-family: var(--adio-font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--adio-fg-3); }
.csd-metrics .v { font-size: 20px; font-weight: var(--adio-weight-medium); margin-top: 6px; letter-spacing: -0.01em; }

/* ---------- Detail body ---------- */
.csd-body { padding: 56px 0 32px; }
.csd-sections {
  display: grid; grid-template-columns: 180px 1fr; gap: 48px;
  max-width: 980px;
}
@media (max-width: 820px) { .csd-sections { grid-template-columns: 1fr; gap: 8px; } }

.csd-sec { display: contents; }
@media (max-width: 820px) { .csd-sec { display: block; margin-bottom: 32px; } }

.csd-sec-label {
  font-family: var(--adio-font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--adio-fg-3);
  padding-top: 6px;
  border-top: 1px solid var(--adio-hairline);
}
.csd-sec-body {
  font-size: 17px; line-height: 1.65; color: var(--adio-fg-1);
  padding-top: 6px; padding-bottom: 32px;
  border-top: 1px solid var(--adio-hairline);
  max-width: 62ch;
}
@media (max-width: 820px) {
  .csd-sec-label { border-top: 1px solid var(--adio-hairline); padding-top: 12px; margin-top: 16px; }
  .csd-sec-body  { border-top: 0; padding-top: 8px; padding-bottom: 8px; }
}
.csd-refer { font-family: var(--adio-font-mono); font-size: 13px; color: var(--adio-fg-1); border-bottom: 1px solid var(--adio-border); padding-bottom: 2px; }
.csd-refer:hover { color: var(--adio-fg-2); }

/* ---------- Prev/next ---------- */
.csd-nav { border-top: 1px solid var(--adio-hairline); border-bottom: 1px solid var(--adio-hairline); }
.csd-nav .container { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; }
.csd-nav-item {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px 32px;
  color: var(--adio-fg-1);
  transition: background var(--adio-dur-base) var(--adio-ease);
}
.csd-nav-item + .csd-nav-item { border-left: 1px solid var(--adio-hairline); }
.csd-nav-item.right { text-align: right; align-items: flex-end; }
.csd-nav-item:hover { background: var(--adio-linen); }
.csd-nav-item:first-child:hover { background: #dfe2ec; }
.csd-nav-item.right:hover { background: #f4e5d8; }
.csd-nav-item .dir { font-family: var(--adio-font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--adio-fg-3); }
.csd-nav-item .tit { font-size: 16px; font-weight: var(--adio-weight-medium); letter-spacing: -0.005em; }

/* ---------- CTA bands ---------- */
.cta-band-light { background: var(--adio-sand); padding: 48px 0; border-top: 1px solid var(--adio-hairline); }
.cta-band-light h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.02em; font-weight: var(--adio-weight-medium); margin-bottom: 12px; }
.cta-band-light p { color: var(--adio-fg-2); max-width: 52ch; font-size: 17px; }

.cta-inner {
  display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: end;
}
@media (max-width: 820px) { .cta-inner { grid-template-columns: 1fr; } }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
