/* /case-studies/ and /case-studies/<customer>/ (pages/casestudies.py): a customer wall (hairline cells, ink logos), a sector band, the one testimonial,
   and the short customer page. Units: vw on the 2400 canvas above 1100px, min(Xvw, Ypx) below. */

.cs-wall { padding: 0 0 6vw; }
.cs-wall__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); }
.cs-cell { display: flex; flex-direction: column; justify-content: space-between; gap: 1.5vw; min-height: 26vw; padding: 1.667vw; border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair); transition: background-color .4s var(--p2-out); }
.cs-cell:hover, .cs-cell:focus-visible { background: var(--stone); }
.cs-cell__top { display: flex; justify-content: space-between; align-items: baseline; gap: 1vw; }
.cs-cell__k { color: var(--quiet); min-height: 1.2em; }
.cs-cell__n, .cs-body__n { color: var(--quiet); }
.cs-cell__logo { flex: 1; display: flex; align-items: center; justify-content: center; padding: 1vw 0; }
/* C3: marks are sized by ui.logo (optical weight, --lw) times this tile's unit --lu; ink at rest comes from decorous.css (.plogo--c) */
.cs-cell__logo img.plogo { --lu: 1vw; width: calc(var(--lw, 8) * var(--lu)); height: auto; max-width: 100%; max-height: none; }
.cs-cell__foot { display: flex; flex-direction: column; gap: .5vw; padding-top: 1.1vw; border-top: 1px solid var(--hair); min-height: 8.2vw; }   /* the same height on every tile, so the logos and the rules line up across a row */
.cs-cell__p { color: var(--quiet); }
/* the wall's last tile: their one testimonial, whole and verbatim, no logo beside it */
.cs-cell--quote { margin: 0; justify-content: space-between; background: var(--stone); }
.cs-cell--quote:hover { background: var(--stone); }
.cs-cell__q { margin: 0; }
.cs-cell__q p { margin: 0; color: var(--navy); }
.cs-cell__q .cs-cell__qm.cs-cell__qm { display: block; margin: 0 0 .5vw; font-size: 4.4vw; line-height: .8; color: var(--quiet); }       /* the serif opening mark: the house serif stays in use on a page with no index numbers */
.cs-cell__who { display: flex; flex-direction: column; gap: .3vw; padding-top: 1.1vw; border-top: 1px solid var(--hair); }
.cs-cell__role { color: var(--quiet); }
.cs-cell__go { margin-top: .5vw; font-weight: 500; }
/* a customer with no page of its own: a tile, not a link (no hover wash, no link word) */
.cs-cell--static:hover { background: transparent; }
/* the wall's closing text cell: their own sentence about who they supply, in the same hairline grid */
.cs-cell--text { justify-content: flex-start; gap: 1.5vw; background: var(--stone); }
.cs-cell--text:hover { background: var(--stone); }
.cs-cell__say { color: var(--navy); max-width: 22vw; }
.cs-pic__fig { margin: 0; }
.cs-pic__cap { display: block; margin-top: 1.1vw; color: var(--quiet); }
.cs-cell .logo-text, .cs-body__logo .logo-text { font-size: 2.083vw; }

.cs-sec { padding: 4vw 0 8vw; }
.cs-sec__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9vw; }
.cs-sec__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }      /* round 3 (finding 16): four sectors, four across */
.cs-sec__p { margin: 0; display: flex; flex-direction: column; gap: 1vw; }
.cs-sec__ph { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--stone); border-radius: var(--radius); }
.cs-sec__ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cs-sec__t { margin-top: 3vw; max-width: 56vw; }

.cs-say { display: flex; flex-direction: column; align-items: center; padding: 0 0 8vw; }
.cs-say__eye { margin-bottom: 1.2vw; }

/* one customer */
.cs-body { padding: 1vw 0 6vw; }
.cs-body__grid { display: grid; grid-template-columns: 30vw minmax(0, 1fr); gap: 6vw; align-items: start; }
.cs-body__logo { position: relative; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; padding: 3vw; background: var(--stone); border: 1px solid var(--hair); border-radius: var(--radius); }
.cs-body__logo img.plogo { --lu: 1.5vw; width: calc(var(--lw, 8) * var(--lu)); height: auto; max-width: 100%; max-height: 100%; }
.cs-body__n { position: absolute; top: 1.3vw; left: 1.5vw; }
.cs-kv { margin: 0; border-top: 1px solid var(--hair); }
.cs-kv__r { display: grid; grid-template-columns: 12vw minmax(0, 1fr); gap: 2vw; padding: 1.4vw 0; border-bottom: 1px solid var(--hair); }
.cs-kv dt, .cs-kv dd { margin: 0; }
.cs-kv dd { max-width: 40vw; }
.cs-pic { padding: 0 5vw 6vw; }
.cs-pic__f { aspect-ratio: 21 / 8; overflow: hidden; background: var(--stone); }
.cs-pic__f img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cs-how { padding: 0 0 6vw; }
.cs-how__q { color: var(--quiet); }
.cs-more { padding-top: 2vw; }

@media (max-width: 1100px) {
  .cs-wall { padding-bottom: min(12vw, 47px); }
  .cs-wall__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-cell { min-height: min(70vw, 276px); gap: min(3vw, 12px); padding: min(4.4vw, 17px); }
  .cs-cell__logo { padding: min(2vw, 8px) 0; }
  .cs-cell__logo img.plogo { --lu: min(2.7vw, 10.5px); max-width: 100%; max-height: none; }
  .cs-body__logo img.plogo { --lu: min(4.6vw, 18px); }
  .cs-cell__foot { gap: min(1.4vw, 5px); padding-top: min(3vw, 12px); min-height: min(31vw, 122px); }
  .cs-cell__who { gap: min(1.2vw, 5px); padding-top: min(3vw, 12px); }
  .cs-cell__q .cs-cell__qm.cs-cell__qm { font-size: min(12vw, 47px); margin-bottom: min(1.6vw, 6px); }
  .cs-cell--text { gap: min(3vw, 12px); }
  .cs-cell__say { max-width: none; font-size: min(3.7vw, 14.6px); line-height: 1.35; }
  .cs-pic__cap { margin-top: min(3vw, 12px); }
  .cs-cell__go { margin-top: min(1.6vw, 6px); }
  .cs-cell .logo-text, .cs-body__logo .logo-text { font-size: min(5.5vw, 21px); }
  .cs-sec { padding: min(8vw, 31px) 0 min(16vw, 63px); }
  .cs-sec__grid, .cs-sec__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: min(6vw, 24px); }
  .cs-sec__p { gap: min(3vw, 12px); }
  .cs-sec__t { margin-top: min(8vw, 31px); max-width: none; }
  .cs-say { padding-bottom: min(16vw, 63px); }
  .cs-say__eye { margin-bottom: min(3vw, 12px); }
  .cs-body { padding-bottom: min(12vw, 47px); }
  .cs-body__grid { grid-template-columns: 1fr; gap: min(8vw, 31px); }
  .cs-body__logo { padding: min(8vw, 31px); }
  .cs-body__n { top: min(4vw, 16px); left: min(4.4vw, 17px); }
  .cs-kv__r { grid-template-columns: 1fr; gap: min(2vw, 8px); padding: min(4vw, 16px) 0; }
  .cs-kv dd { max-width: none; }
  .cs-pic { padding: 0 var(--pad-x) min(12vw, 47px); }
  .cs-pic__f { aspect-ratio: 3 / 2; }
  .cs-how { padding-bottom: min(12vw, 47px); }
}
@media (max-width: 600px) { .cs-sec__grid, .cs-sec__grid--4 { grid-template-columns: 1fr; } }      /* a phone: one sector per row */
