/* Site v2 listings family: press, publications, jobs, case studies. The
   hero, rows, cells, chips, plates and paper cards come from base.css and
   layouts/listing.css; this file only lays out what is particular to these
   pages. Colours come from tokens.css. */

/* ---------- Lede: the intro under a listing hero ---------- */
/* Round 4's feature row: copy beside a plate (--figure) or beside a second
   paragraph (--text), side by side from 1024px. */
.v2-lede {
  display: grid;
  gap: var(--space-8);
}
.v2-lede__main,
.v2-lede__aside {
  display: grid;
  gap: var(--space-4);
  align-content: start;
  min-width: 0;
}
.v2-lede__prose {
  display: grid;
  gap: 1em;
  line-height: 1.65;
  color: var(--muted);
}
.v2-lede__figure {
  aspect-ratio: 16 / 10;
}
@media (min-width: 1024px) {
  .v2-lede {
    column-gap: clamp(40px, 6vw, 80px);
  }
  .v2-lede--figure {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }
  .v2-lede--figure .v2-lede__prose {
    max-width: 52ch;
  }
  .v2-lede--text {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

/* ---------- Press ---------- */
/* Phones: thumbnail beside the publication and date, the headline full width
   below; wider: thumbnail, publication over headline, date on the right. */
.v2-press__row {
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-areas:
    "media pub"
    "media meta"
    "title title";
  gap: var(--space-1) var(--space-4);
  align-items: center;
  padding-block: var(--space-5);
}
.v2-press__media {
  grid-area: media;
  display: block;
  aspect-ratio: 1686 / 546;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--paper-2);
}
.v2-press__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.v2-press__body {
  display: contents;
}
.v2-press__pub {
  grid-area: pub;
  align-self: end;
}
.v2-press__title {
  grid-area: title;
  margin-top: var(--space-3);
  text-wrap: pretty;
}
.v2-press__meta {
  grid-area: meta;
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-align: left;
  white-space: nowrap;
}
.v2-press__meta svg {
  transition: transform var(--dur) var(--ease);
}
.v2-press__row:hover .v2-press__meta svg {
  transform: translate(2px, -2px);
}
@media (min-width: 720px) {
  .v2-press__row {
    grid-template-columns: 200px minmax(0, 1fr) auto;
    grid-template-areas: "media body meta";
    column-gap: var(--col-gap);
  }
  .v2-press__body {
    grid-area: body;
    display: grid;
    gap: var(--space-1);
    min-width: 0;
  }
  .v2-press__pub,
  .v2-press__title {
    grid-area: auto;
  }
  .v2-press__title {
    margin-top: 0;
  }
  .v2-press__meta {
    align-self: center;
  }
}

/* ---------- Paper cards (publications) ---------- */
/* The shared paper_card on round 4's ringed card: publications lay them out
   on .v2-cells (ring, corners, 24px padding, 16px apart); the links sit at
   the foot, so they line up across a row. */
.v2-papers > li {
  display: flex;
  flex-direction: column;
}
.v2-papers .v2-paper {
  flex: 1 1 auto;
  grid-template-rows: auto minmax(0, 1fr);
}
.v2-papers .v2-paper__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.v2-papers .v2-paper__faces {
  align-self: flex-start;
}
.v2-papers .v2-paper__links {
  margin-top: auto;
}
.v2-paper__title {
  text-wrap: pretty;
}
/* Phones: the Paper / Code / Blog links (and the case studies' View All) get
   a 40px tap target. */
@media (max-width: 719px) {
  .v2-paper__links .v2-more,
  .v2-cs-empty .v2-more {
    min-height: 40px;
  }
}

/* ---------- Jobs ---------- */
/* One ringed card per role: title and Apply over the description on phones;
   title and Apply beside it from 1024px. */
.v2-jobs {
  display: grid;
  gap: var(--space-4);
}
.v2-job {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-6);
  border-radius: var(--r);
  background: var(--paper);
  box-shadow: var(--ring);
}
.v2-job__body {
  display: grid;
  gap: 1em;
  max-width: 68ch;
  line-height: 1.65;
  color: var(--muted);
}
.v2-job__body .v2-checks {
  line-height: 1.55;
  color: var(--ink-2);
}
.v2-job__action {
  padding-top: var(--space-1);
}
@media (min-width: 1024px) {
  .v2-job {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    grid-template-areas:
      "title body"
      "action body";
    grid-template-rows: auto 1fr;
    column-gap: clamp(40px, 6vw, 80px);
    row-gap: var(--space-4);
    padding: var(--space-8);
  }
  .v2-job__title {
    grid-area: title;
    max-width: 18ch;
  }
  .v2-job__body {
    grid-area: body;
  }
  .v2-job__action {
    grid-area: action;
    padding-top: 0;
  }
}

/* ---------- Case studies ---------- */
/* The customer logo wall: round 4's "trusted by" row, a centred label over
   the logos. Each logo's width (--logo-w, set by the template) gives every
   mark the same visual weight. */
.v2-customers {
  display: grid;
  gap: var(--space-6);
}
.v2-customers .v2-head {
  justify-items: center;
  margin-bottom: 0;
  text-align: center;
}
.v2-customers .v2-head__bar {
  justify-content: center;
}
.v2-customers__logos {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.v2-cells.v2-customers__logos > li {
  min-height: 56px;
  padding: var(--space-2);
}
/* The customer logos are white artwork: invert them to ink, then treat them
   like every other logo. */
.v2-customers__logos img {
  width: calc(var(--logo-w) * 0.62);
  max-width: 100%;
  max-height: none;
  filter: invert(1) var(--logo-filter);
  opacity: 0.6;
}
@media (min-width: 720px) {
  .v2-cells.v2-customers__logos > li {
    min-height: clamp(64px, 6vw, 80px);
    padding: var(--space-4);
  }
  .v2-customers__logos img {
    width: var(--logo-w);
  }
}
@media (min-width: 1024px) {
  .v2-customers__logos {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .v2-filters.v2-cs-filters {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* One ringed card per case study: logo, title, summary and tag, then the
   problem, solution and result on filled panels, each result pinned to the
   foot of its panel so they line up across the card. */
.v2-cases {
  display: grid;
  gap: var(--space-4);
}
.v2-case {
  display: grid;
  gap: var(--space-6);
  padding: var(--space-5);
  border-radius: var(--r);
  background: var(--paper);
  box-shadow: var(--ring);
}
.v2-case__head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-areas:
    "logo tag"
    "intro intro";
  gap: var(--space-4);
  align-items: center;
}
.v2-case__logo {
  grid-area: logo;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper-2);
}
.v2-case__intro {
  grid-area: intro;
  display: grid;
  gap: var(--space-1);
}
.v2-case__summary {
  max-width: 72ch;
  color: var(--muted);
}
/* The tag: round 4's ringed chip, as a label. */
.v2-case__tag {
  grid-area: tag;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 var(--space-3);
  border-radius: var(--r-pill);
  box-shadow: var(--ring);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1.33;
  white-space: nowrap;
  color: var(--ink-2);
}
.v2-case__parts {
  display: grid;
  gap: var(--space-3);
}
.v2-case__part {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  border-radius: var(--r-sm);
  background: var(--paper-2);
}
.v2-case__label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.v2-case__label svg {
  color: var(--accent-ink);
}
.v2-case__text {
  color: var(--muted);
}
.v2-case__stat {
  margin-top: auto;
  padding-top: var(--space-3);
  color: var(--ink);
  text-wrap: pretty;
}
@media (min-width: 720px) {
  .v2-case {
    padding: var(--space-6);
  }
  .v2-case__head {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    grid-template-areas: "logo intro tag";
    gap: var(--space-5);
    align-items: start;
  }
  .v2-case__logo {
    width: 56px;
    height: 56px;
  }
  .v2-case__tag {
    margin-top: var(--space-1);
  }
  .v2-case__parts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .v2-case {
    padding: var(--space-8);
  }
}

/* No match: the empty state centred on a ringed card. */
.v2-cs-empty .v2-empty {
  justify-items: center;
  padding: var(--space-12) var(--space-6);
  border-radius: var(--r);
  box-shadow: var(--ring);
  text-align: center;
}

/* ---------- Motion (js/motion.js, base.css "Motion") ---------- */
/* Press: the thumbnail leans in on hover. Publications: a paper's card
   lifts and its figure leans in. Jobs: a role's checks draw themselves as
   its card arrives. */
.v2-press__media img {
  transition: scale 700ms var(--ease-out);
}
.v2-press__row:hover .v2-press__media img {
  scale: 1.06;
}
.v2-papers > li {
  transition:
    translate 300ms var(--ease-out),
    box-shadow 300ms var(--ease);
}
.v2-papers > li:hover {
  translate: 0 -3px;
  box-shadow:
    inset 0 0 0 1px var(--rule-strong),
    var(--shadow-float);
}
.v2-papers .v2-paper__media img {
  transition: scale 700ms var(--ease-out);
}
.v2-papers > li:hover .v2-paper__media img {
  scale: 1.04;
}
.v2-motion .v2-jobs > .v2-rv .v2-checks svg path {
  stroke-dasharray: 24;
}
.v2-motion .v2-jobs > .v2-rv.is-in .v2-checks svg path {
  animation: v2-tick 600ms var(--ease-out)
    calc(var(--v2-d, 0ms) + 400ms + var(--j, 0) * 120ms) backwards;
}
.v2-jobs .v2-checks li:nth-child(2) {
  --j: 1;
}
.v2-jobs .v2-checks li:nth-child(3) {
  --j: 2;
}
.v2-jobs .v2-checks li:nth-child(4) {
  --j: 3;
}
.v2-jobs .v2-checks li:nth-child(n + 5) {
  --j: 4;
}
