/* Only the Case Studies page loads this stylesheet. */
.case-studies { --case-panel: #f4f4f4; --case-line: #c6c6c6; --case-link: rgb(30 86 200); --tron: rgb(44 110 235); padding-top: clamp(2rem, 4vw, 3.5rem); padding-bottom: clamp(3rem, 6vw, 6rem); }
.case-studies-intro { max-width: 60ch; margin: 0 0 clamp(2rem, 4vw, 3.5rem); font-size: 1.0625rem; font-weight: 700; line-height: 1.5; }
.case-study-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.case-study-card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: clamp(18rem, 26vw, 23.5rem); padding: 1.5rem; border: 1px solid var(--case-line); background: var(--case-panel); transition: background-color .2s ease; }
.case-study-logo { display: flex; align-items: center; justify-content: center; width: 11rem; max-width: 100%; height: 4.5rem; margin-bottom: 2.5rem; background: #e2e5ea; color: var(--muted); font-size: .875rem; }
/* A real client logo sits on navy so light and gold marks stay legible. */
.case-study-logo-image { padding: .75rem 1rem; background: var(--ink); }
.case-study-logo-image img { width: 100%; height: 100%; object-fit: contain; }
/* Dark logos on light backgrounds sit on a white tile instead. */
.case-study-logo-light { padding: .5rem; border: 1px solid var(--case-line); background: #fff; }
/* Long single-line wordmarks get more side room than stacked logos. */
.case-study-logo-wordmark { padding: .5rem 1rem; }
/* Logos with their own solid background fill the tile at their natural shape. */
.case-study-logo-full { width: auto; background: none; }
.case-study-logo-full img { width: auto; height: 100%; }
/* A property photo in place of a logo fills the same box. */
.case-study-logo-photo { overflow: hidden; border: 1px solid var(--case-line); }
.case-study-logo-photo img { width: 100%; height: 100%; object-fit: cover; }
/* Two clients split the tile, each logo on the background it was made for. */
.case-study-logo-pair { width: 15rem; border: 1px solid var(--case-line); background: #fff; }
.case-study-logo-cell { display: flex; flex: 1 1 0; align-items: center; justify-content: center; min-width: 0; height: 100%; padding: .5rem .625rem; }
.case-study-logo-dark { background: var(--ink); }
.case-study-logo-cell img { width: 100%; height: 100%; object-fit: contain; }
.case-study-title { margin: 0; font-size: clamp(1.25rem, 1.6vw, 1.5rem); font-weight: 400; line-height: 1.4; letter-spacing: -.01em; }
.case-study-link { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 2rem; color: var(--case-link); font-size: 1.0625rem; text-decoration: none; }
.case-study-link svg { flex: 0 0 auto; transition: transform .25s ease; }
/* The whole card is the link's target. */
.case-study-link::after { content: ""; position: absolute; inset: 0; }

/* Tron outline: two blue lines leave the top-left corner together. One
   draws the top edge then the right edge, the other the left edge then the
   bottom edge, and they meet at the bottom-right. Leaving reverses the order. */
.case-study-card::before, .case-study-card::after { content: ""; position: absolute; top: -1px; left: -1px; width: 0; height: 0; border: 0 solid transparent; pointer-events: none; }
.case-study-card::before { border-top-width: 2px; border-right-width: 2px; transition: height .25s ease-in, width .25s ease-out .25s, border-color 0s .5s; }
.case-study-card::after { border-bottom-width: 2px; border-left-width: 2px; transition: width .25s ease-in, height .25s ease-out .25s, border-color 0s .5s; }
.case-study-card:focus-within { background: #e8e8e8; }
.case-study-card:focus-within::before, .case-study-card:focus-within::after { width: calc(100% + 2px); height: calc(100% + 2px); border-color: var(--tron); }
.case-study-card:focus-within::before { transition: width .25s ease-in, height .25s ease-out .25s, border-color 0s; }
.case-study-card:focus-within::after { transition: height .25s ease-in, width .25s ease-out .25s, border-color 0s; }
.case-study-card:focus-within .case-study-link svg { transform: translateX(.35rem); }
.case-study-link:focus-visible { outline: none; }
@media (hover: hover) and (pointer: fine) {
  .case-study-card:hover { background: #e8e8e8; }
  .case-study-card:hover::before, .case-study-card:hover::after { width: calc(100% + 2px); height: calc(100% + 2px); border-color: var(--tron); }
  .case-study-card:hover::before { transition: width .25s ease-in, height .25s ease-out .25s, border-color 0s; }
  .case-study-card:hover::after { transition: height .25s ease-in, width .25s ease-out .25s, border-color 0s; }
  .case-study-card:hover .case-study-link svg { transform: translateX(.35rem); }
}
@media (prefers-reduced-motion: reduce) {
  .case-study-card, .case-study-card::before, .case-study-card::after, .case-study-link svg { transition: none !important; }
}
@media (min-width: 40rem) {
  .case-study-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .case-study-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 75rem) {
  .case-study-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
