/* Case studies (the Results page): every case study as a tile in the homepage's case card style. The client's
   photograph carries the headline result over a fade at its top; below it sit the client, their industry and one
   milestone, in the homepage's case rows' type. A case without a photograph shows a faint grid instead. A last tile asks
   to be next, sized so the grid closes square: the full width under three columns, the last cell under two. Each tile links to its case study (data-unavailable where that page
   doesn't exist yet). Three columns on desktop, two on narrower screens (where the last tile runs the full width), one
   on phones. */
.case-index{padding:clamp(120px,18vh,200px) 0 clamp(96px,13vh,160px)}
.case-index-readout{min-height:0;margin-top:8px}
.case-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:56px 24px;margin:40px 0 0;padding:0;list-style:none}
.case-tile{display:flex}
.case-tile-link{display:flex;flex-direction:column;width:100%;color:inherit}

/* The card: 475 x 512, as the photographs are. A photograph runs 2px past the card's edges, so the card's own corners,
   not the file's softer edge pixels, finish it. */
.case-tile-card{position:relative;aspect-ratio:475 / 512;overflow:hidden;padding:20px 24px;border-radius:4px;background:#1b1b18}
.case-tile-card img{position:absolute;inset:-2px;width:calc(100% + 4px);height:calc(100% + 4px);max-width:none;object-fit:cover;transition:transform .6s cubic-bezier(.22,1,.36,1)}
.case-tile-card::after{content:"";position:absolute;inset:0;background:linear-gradient(#0b0b0ad9,#0b0b0a80 22%,#0b0b0a00 45%);pointer-events:none}
/* The client's logo, white, at the lower left of every photograph, over a fade of its own. Each logo's width is set
   inline, so wide and compact marks carry about the same weight. */
.case-tile-card:has(.case-tile-logo)::after{background:linear-gradient(#0b0b0ad9,#0b0b0a80 22%,#0b0b0a00 45%),linear-gradient(0deg,#0b0b0ab3,#0b0b0a00 42%)}
.case-tile-card .case-tile-logo{inset:auto auto 20px 24px;z-index:2;height:auto;filter:brightness(0) invert(1);transition:none}
.case-tile-card:not(:has(img))::before{content:"";position:absolute;inset:0;background-image:linear-gradient(#ffffff12 1px,transparent 1px),linear-gradient(90deg,#ffffff12 1px,transparent 1px);background-size:32px 32px;-webkit-mask-image:linear-gradient(#000,transparent 80%);mask-image:linear-gradient(#000,transparent 80%);pointer-events:none}
/* Sized so each of a result's two lines fits on one, down to the narrowest three-column tile. */
.case-tile-headline{position:relative;z-index:1;margin:0;font-size:clamp(20px,1.85vw,28px);font-weight:500;line-height:.95;letter-spacing:-.03em;color:var(--white)}

.case-tile-meta{display:flex;justify-content:space-between;align-items:baseline;gap:16px;margin-top:20px}
.case-tile-client{display:flex;align-items:center;gap:6px;margin:0;font-size:24px;font-weight:500;line-height:1.1;letter-spacing:-.02em;color:var(--white)}
.case-tile-arrow{flex:none;width:16px;height:16px;opacity:0;transform:translateX(-4px);transition:opacity .25s,transform .25s}
.case-tile-industry,.case-tile-win{margin:0;font:500 14px/1.3 var(--mono);letter-spacing:.1em;text-transform:uppercase}
.case-tile-industry{flex:none;text-align:right;color:var(--muted)}
.case-tile-win{margin-top:8px;color:var(--body)}
.case-tile-link:is(:focus-visible) .case-tile-card img:not(.case-tile-logo){transform:scale(1.03)}@media(hover:hover){.case-tile-link:is(:hover) .case-tile-card img:not(.case-tile-logo){transform:scale(1.03)}}
.case-tile-link:is(:focus-visible) .case-tile-arrow{opacity:1;transform:none}@media(hover:hover){.case-tile-link:is(:hover) .case-tile-arrow{opacity:1;transform:none}}
.case-tile-link:focus-visible{outline:none}
.case-tile-link:focus-visible .case-tile-card{outline:1px solid var(--muted);outline-offset:3px}

/* The last tile: an invitation, lit from below in Electric as the closing horizon is. Under three columns it runs the
   full width as a band (nine cases fill three rows); under two it takes the cell beside the ninth case. */
.case-tile--next{grid-column:1/-1}
.case-next{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:280px;padding:32px;text-align:center;border:1px solid var(--line);border-radius:4px;background:radial-gradient(120% 70% at 50% 115%,#1a37d640,transparent 70%),#131311}
.case-next .eyebrow{color:var(--muted)}
.case-next-title{margin-top:12px;font-size:clamp(28px,2.4vw,36px);font-weight:500;line-height:1;letter-spacing:-.03em}
.case-next .pill{margin-top:28px}

@media(max-width:1100px){
 .case-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .case-tile--next{grid-column:auto}
 .case-next{min-height:0;align-items:flex-start;text-align:left}
}
@media(max-width:800px),(max-height:500px){
 .case-index{padding-top:96px}
 .case-grid{grid-template-columns:1fr;gap:48px;margin-top:32px}
 .case-tile-headline{font-size:24px}
 .case-next{min-height:320px;align-items:center;text-align:center}
}
@media(prefers-reduced-motion:reduce){.case-tile-card img,.case-tile-arrow{transition:none}}
