/* Work pages: the case summary, the links to each service, the contact prompt
   after the results and the project grid on /work/. scripts/build-case-locales.mjs
   copies this file to the public assets folder as work-cases.css. */

/* Case summary: client, location, services and dated results in one list. */
.case-summary {
  --summary-ink: #161616;
  --summary-muted: rgba(22, 22, 22, .6);
  --summary-line: rgba(22, 22, 22, .15);
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  color: var(--summary-ink);
}

.case-summary-title {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: normal;
}

.case-summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--summary-line);
}

.case-summary-list > div {
  min-width: 0;
  padding: 1.25rem 1rem 1.5rem 0;
  border-bottom: 1px solid var(--summary-line);
}

.case-summary-list > div:nth-child(n + 3) {
  grid-column: 1 / -1;
}

.case-summary-list dt {
  margin: 0 0 .6rem;
  color: var(--summary-muted);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.case-summary-list dd {
  margin: 0;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.case-summary-list dd p {
  max-width: 62ch;
  margin: 0;
}

.case-summary-list dd p + p {
  margin-top: .75rem;
}

.case-summary-services {
  display: grid;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-summary-services a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(22, 22, 22, .32);
  text-decoration-thickness: 1px;
  text-underline-offset: .24em;
  transition: text-decoration-color .2s, background-color .2s;
}

.case-summary-services a::after,
body.grou-framed .scope-list a::after,
.case-editorial-services li > a::after {
  content: "\00a0\2197" / "";
  font-size: .85em;
}

.case-summary-services a:hover,
.case-summary-services a:focus-visible {
  background: #e4fe55;
  text-decoration-color: currentColor;
}

.case-summary a:focus-visible,
.case-cta a:focus-visible,
body.grou-framed .scope-list a:focus-visible,
.case-editorial-services li > a:focus-visible {
  outline: 2px solid #161616;
  outline-offset: 3px;
}

@media (min-width: 64rem) {
  .case-summary-list {
    grid-template-columns: minmax(0, .75fr) minmax(0, .85fr) minmax(0, 1.25fr) minmax(0, 1.9fr);
  }

  .case-summary-list > div,
  .case-summary-list > div:nth-child(n + 3) {
    grid-column: auto;
    padding: 1.5rem 1.5rem 1.75rem;
    border-bottom: 0;
  }

  .case-summary-list > div:first-child {
    padding-left: 0;
  }

  .case-summary-list > div + div {
    border-left: 1px solid var(--summary-line);
  }
}

/* Re Náuticos: the product console overlaps the section above it, so the
   space it needs moves from the introduction to the summary. */
body.renauticos-framed .case-editorial:has(+ .case-summary) .case-editorial-inner {
  padding-bottom: clamp(1rem, 2vw, 2rem);
}

body.renauticos-framed .case-summary {
  padding-bottom: calc(clamp(2.5rem, 5vw, 4.5rem) + clamp(2rem, 5vw, 4rem));
}

/* Service chips link to the service pages. */
body.grou-framed .scope-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .65rem 1.25rem;
  border: 1px solid rgba(22, 22, 22, .2);
  border-radius: 999px;
  color: inherit;
  font-size: clamp(.875rem, 1.2vw, 1.125rem);
  line-height: 1.3;
  text-decoration: none;
  transition: background-color .2s, border-color .2s;
}

body.grou-framed .scope-list a:hover,
body.grou-framed .scope-list a:focus-visible {
  border-color: #e4fe55;
  background: #e4fe55;
}

.case-editorial-services li:has(> a) {
  padding: 0;
  transition: background-color .2s, border-color .2s;
}

.case-editorial-services li > a {
  display: inline-flex;
  align-items: center;
  padding: .65rem 1.25rem;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
}

.case-editorial-services li:has(> a:hover),
.case-editorial-services li:has(> a:focus-visible) {
  border-color: #e4fe55;
  background: #e4fe55;
}

/* Contact prompt after the results. */
.case-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem 3rem;
  padding-block: clamp(3.5rem, 8vw, 7rem);
  color: #161616;
}

body.renauticos-framed .impact + .case-cta {
  padding-top: clamp(1rem, 2vw, 2rem);
}

.case-cta-copy {
  max-width: 46rem;
}

.case-cta h2 {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 4rem);
  font-style: normal;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.045em;
  text-transform: none;
  text-wrap: balance;
}

.case-cta p {
  max-width: 44ch;
  margin: 1rem 0 0;
  color: rgba(22, 22, 22, .62);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.5;
}

.case-cta-link {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  min-height: 3.25rem;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  background: #161616;
  color: #fff;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.case-cta-link span {
  font-size: 1.4rem;
  line-height: 1;
}

.case-cta-link:hover,
.case-cta-link:focus-visible {
  background: #e4fe55;
  color: #161616;
}

@media (max-width: 40rem) {
  .case-cta-link {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-summary-services a,
  body.grou-framed .scope-list a,
  .case-editorial-services li:has(> a) {
    transition: none;
  }
}

/* /work/: with an odd number of cases, the first one spans the row so the grid stays even. */
@media (min-width: 601px) {
  .work-grid > .work-card:first-child:nth-last-child(odd) {
    grid-column: 1 / -1;
  }

  .work-grid > .work-card:first-child:nth-last-child(odd) .work-art {
    aspect-ratio: 2.1;
  }
}

/* Skip-link and in-page targets land below the sticky navigation. */
#meet-renauticos,#case-summary,#case-title{scroll-margin-top:var(--nav-height,96px)}
