/* =====================================================================
   Proof pages on the kit: /our-work, /case-studies, /case-studies/{slug}, /testimonials
   (views: app/Views/work/*, app/Views/case-studies/*, partials/trust-badges.php). Every selector is prefixed .proof-*.
   ===================================================================== */

/* Card rows: equal heights, the figure or the tags at the foot */
.proof-cards { row-gap: var(--gutter); }
.proof-cards > .card { align-self: stretch; }
.proof-cards .card p { margin: 0; }
.proof-case .result { margin-top: auto; gap: 4px; padding: var(--s-5) 0 0; border-left: 0; border-top: 1px solid var(--line); }
.proof-case .result .result__label { margin: 0; }
.proof-case .t-stat, .proof-stats .t-stat { font-variant-numeric: proportional-nums; }
.proof-project .tags { margin-top: auto; padding-top: var(--s-4); }
.proof-project .link { margin-top: var(--s-3); }
.proof-project__photo { display: block; margin: calc(var(--card-pad) * -1) calc(var(--card-pad) * -1) var(--s-4); aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.proof-project__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Filters (case study library): tags as links, the active one in ink */
.proof-filters { display: grid; gap: var(--s-4); margin-bottom: var(--s-5); }
.proof-filters__group { display: grid; gap: var(--s-2); }
@media (min-width: 860px) { .proof-filters__group { grid-template-columns: 96px minmax(0, 1fr); align-items: center; } }
.proof-filters .t-label { margin: 0; }
a.proof-filter { text-decoration: none; transition: background-color 150ms, color 150ms; }
a.proof-filter:hover { background: var(--line); }
a.proof-filter[aria-current] { color: #fff; background: var(--ink); }
.proof-filters__count { margin: 0 0 var(--s-6); font-size: var(--t-small); }
.proof-empty { margin: 0; font-size: 17px; }
.proof-foot { margin: var(--s-7) 0 0; }

/* Quotes: two columns of cards, italic words, initials circle */
.proof-quotes { row-gap: var(--gutter); }
.proof-quotes > .card { align-self: stretch; margin: 0; gap: var(--s-6); justify-content: space-between; }
.proof-quote__text { margin: 0; }
.proof-quote__text p { margin: 0; max-width: 60ch; font: italic 400 19px/1.55 var(--font-display); letter-spacing: -0.005em; color: var(--ink); }
.proof-quote .person { align-items: flex-start; }
.proof-quote .person .link { font-size: var(--t-small); }
@media (min-width: 640px) and (max-width: 1023px) { .proof-quotes > .card.span-6 { grid-column: auto / span 6; } }
.proof-sentence { margin: var(--s-7) 0 0; max-width: 72ch; font-size: 17px; line-height: 1.6; }

/* Client list: a still, wrapped list of names separated by thin rules */
/* Client names: a ruled grid, one client per cell with a small initials mark, so the list reads name by name
   instead of as a paragraph. The list has a full frame; each cell draws its right and bottom line and overhangs by 1px,
   so lines on the outer edge disappear under the frame and a short last row still sits in a closed box. */
.proof-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); margin: 0; padding: 0; list-style: none;
    border: 1px solid var(--line); background: var(--p-bg); border-radius: 12px; overflow: hidden; }
.proof-names__item { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 16px 18px;
    border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; transition: background-color .2s ease; }
.proof-names__item:hover { background: var(--p-surface); }
.proof-names__mark { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px;
    background: var(--p-surface); border: 1px solid var(--line); color: var(--ink-2, #3d3833);
    font: 600 12px/1 var(--font-display); letter-spacing: .02em; }
.proof-names__name { font: 500 16px/1.3 var(--font-display); letter-spacing: -0.005em; color: var(--ink); text-align: left; }
@media (max-width: 639px) {
    .proof-names { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .proof-names__item { gap: 10px; min-height: 60px; padding: 12px; }
    .proof-names__mark { width: 30px; height: 30px; font-size: 11px; }
    .proof-names__name { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .proof-names__item { transition: none; } }
.proof-logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s-5); margin: 0 0 var(--s-7); padding: 0; list-style: none; }
.proof-logos li { display: grid; place-items: center; height: 88px; padding: var(--s-4); background: var(--card, #fff); border: 1px solid var(--line); border-radius: var(--r-lg); }
.proof-logos__img { max-width: 100%; max-height: 48px; width: auto; height: auto; object-fit: contain; }

/* Trust badges (shown only when published) */
.proof-badges__list { margin: 0; padding: 0; list-style: none; row-gap: var(--gutter); }
.proof-badge p { margin: 0; }
.proof-badge__img { max-height: 56px; width: auto; margin-bottom: var(--s-3); }

/* Case study detail: reading layout */
.proof-story .prose > h2:first-child { margin-top: 0; }
.proof-figure { margin: var(--s-6) 0 0; }
.proof-figure img { display: block; width: 100%; height: auto; border-radius: var(--r-lg); }
.proof-figure figcaption { margin-top: var(--s-2); font-size: var(--t-small); }
.proof-aside { display: grid; gap: var(--s-7); align-content: start; margin-top: var(--s-7); }
@media (min-width: 1024px) { .proof-aside { margin-top: 0; position: sticky; top: calc(var(--nav-h, 72px) + var(--s-6)); } }
.proof-aside__block { display: grid; gap: var(--s-3); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.proof-aside h3 { margin: 0; }
.proof-links { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }

.proof-stats { display: grid; gap: 0; margin: 0 0 var(--s-7); grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line-strong); }
@media (min-width: 640px) { .proof-stats { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.proof-stats__item { display: flex; flex-direction: column-reverse; gap: 4px; padding: var(--s-5) var(--s-5) var(--s-5) 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .proof-stats__item { border-bottom: 0; } .proof-stats__item + .proof-stats__item { padding-left: var(--s-5); border-left: 1px solid var(--line); } }
.proof-stats dd { margin: 0; }
.proof-stats dt { margin: 0; color: var(--muted); }
.proof-lines { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; max-width: 760px; }
.proof-lines li { position: relative; padding: var(--s-3) 0 var(--s-3) 28px; border-bottom: 1px solid var(--line); font-size: 17px; }
.proof-lines li::before { content: ""; position: absolute; left: 2px; top: calc(var(--s-3) + .45em); width: 12px; height: 6px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); }
.proof-results .quote-line { margin-top: var(--s-8); }

/* ---------- Case study library: the first screen's board (the newest project's diagram above every project) ---------- */
.proof-board { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 !important; overflow: hidden; margin: 0; }
.proof-board__visual { display: block; padding: 12px 12px 0; }
.proof-board__visual .panel--diagram { width: 100%; min-width: 0; height: clamp(320px, 25vw, 360px); overflow: hidden; padding: 16px; }
.proof-board__list { margin: 0; padding: 8px 0 8px; list-style: none; }
.proof-board__list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 10px 20px; color: inherit; text-decoration: none; border-left: 2px solid transparent; }
.proof-board__list li + li a { border-top: 1px solid var(--line); }
.proof-board__list a:hover .proof-board__t b { color: var(--red-ink); }
.proof-board__list li.is-on a { border-left-color: var(--p-ink); background: var(--p-surface); }
.proof-board__t { display: grid; gap: 1px; min-width: 0; }
.proof-board__t b { font-weight: 600; font-size: 15px; line-height: 1.3; }
.proof-board__t .muted, .proof-board__m .muted { font-size: 13px; line-height: 1.3; }
.proof-board__m { display: grid; justify-items: end; text-align: right; gap: 1px; max-width: 150px; }
.proof-board__m b { font: 600 18px/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: proportional-nums; }
@media (max-width: 479px) { .proof-board__list a { padding: 10px 14px; } .proof-board__m { max-width: 110px; } }

/* ---------- Case study page: the diagram on the first screen, results as large figures ---------- */
.proof-hero { margin: 0; display: grid; gap: var(--s-2); }
.proof-hero .panel--diagram { width: 100%; min-width: 0; height: clamp(360px, 30vw, 420px); overflow: hidden; padding: 20px; }
.proof-hero figcaption { font-size: var(--t-small); }
.proof-results__grid { align-items: start; row-gap: var(--s-7); }
.proof-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); margin: 0; }
.proof-figures.span-12 { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
@media (max-width: 639px) { .proof-figures, .proof-figures.span-12 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .proof-figures.span-12 .proof-figures__item:first-child:nth-last-child(odd) { grid-column: 1 / -1; } .proof-figures__item { padding: var(--s-5); } .proof-figures dd { font-size: 36px; } }
.proof-figures__item { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: var(--s-2); padding: var(--s-6); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.proof-figures__item:first-child:nth-last-child(odd):not(:only-child) { grid-column: 1 / -1; }
.proof-figures.span-12 .proof-figures__item { grid-column: auto; }
.proof-figures dd { margin: 0; font-size: clamp(40px, 4.4vw, 64px); line-height: 1; }
.proof-figures dt { margin: 0; color: var(--muted); font-size: 15px; }
.proof-results__h { margin: 0 0 var(--s-3); }
.proof-results .proof-lines { max-width: none; border-top: 1px solid var(--line); }
.proof-results__quotes { margin-top: var(--s-8); }
.proof-facts { margin: 0; display: grid; gap: 0; }
.proof-facts > div { display: grid; grid-template-columns: 96px 1fr; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.proof-facts > div:last-child { border-bottom: 0; }
.proof-facts dt, .proof-facts dd { margin: 0; }
.proof-facts dd { font-weight: 500; }
.proof-figures__item:only-child { grid-column: 1 / -1; }

/* ---------- Our work: the first screen's mosaic of four projects (one of each picture shape) ---------- */
.proof-mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.proof-mosaic--3 > :first-child { grid-column: 1 / -1; }
.proof-mosaic__item { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; }
.proof-mosaic__item .panel--diagram { width: 100%; height: clamp(180px, 16vw, 230px); min-width: 0; overflow: hidden; padding: 12px; }
.proof-mosaic__item figcaption { display: grid; gap: 0; font-size: 13px; line-height: 1.35; }
.proof-mosaic__item figcaption b { font-weight: 600; font-size: 14px; }
@media (max-width: 479px) { .proof-mosaic { gap: 12px; } .proof-mosaic__item .panel--diagram { padding: 8px; } }
.masthead__visual :is(.proof-mosaic, .proof-hero, .proof-board) .dg img { object-fit: contain; border-radius: 0; }

/* Testimonials: the first quote on the first screen */
.proof-lead-quote { height: auto; }
.proof-lead-quote blockquote p { font-size: clamp(20px, 1.8vw, 24px); }
.proof-lead-quote .quote-card__mark { fill: var(--p-ink); }   /* the view's one red is the main button */
/* an odd last quote takes the full row: words left, the person right, so the row is used */
@media (min-width: 1024px) {
  .proof-quotes > .card.span-12 { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); column-gap: var(--gutter); align-items: end; }
  .proof-quotes > .card.span-12 .proof-quote__text p { max-width: none; }
}
@media (max-width: 639px) { .proof-mosaic { grid-template-columns: minmax(0, 1fr); } .proof-mosaic > :nth-child(n+3) { display: none; } .proof-mosaic--3 > :first-child { grid-column: auto; } }
