/* The full case (case-studies/building-products.html): one more page on the same system. The header, the case strip, the
   chart, the step line, Apply and the footer come from the home page's stylesheets unchanged; this file only lays out what
   is new to this page, with the same tokens, the same 12-column grid and the same spacing steps. */

/* ---------- The page head: the case's strip, its headline as the title, the lead offset right, then the facts ---------- */

/* It starts where the home page's eyebrow starts, so the first line doesn't jump between the two pages. */
.cv-head {
  padding-top: calc(clamp(7.5rem, 15vh, 8.5rem) + 1.5rem);
  padding-bottom: var(--sec);
  border-bottom: 1px solid var(--line);
}
/* The strip from the home page's case card (the case number, then the department), and the way back on the right, like the
   hero's meta row. */
.cv-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  font-size: 0.875rem;
  line-height: 1rem;
  color: var(--n600);
}
.cv-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}
.cv-back:hover {
  color: var(--ink);
}
.cv-back .icon {
  width: 0.875rem;
  height: 0.875rem;
  transition: transform 0.2s var(--ease);
}
.cv-back:hover .icon {
  transform: translateX(-2px);
}
/* On phones the two don't fit on one line, so the way back goes first, on its own line, clear of the label. */
@media (max-width: 639.98px) {
  .cv-back {
    order: -1;
    flex-basis: 100%;
    margin-bottom: 1.5rem;
  }
}
/* The title is the card's headline, so the click lands on the words that were clicked. It's set like the home page's H1:
   the result in ink, the condition muted after it. One line each from 1024px; it flows as one sentence below that. */
@media (max-width: 1023.98px) {
  .cv-title .line {
    display: inline;
  }
}
.cv-lead {
  max-width: 37rem;
  margin-top: 2rem;
}
@media (min-width: 1024px) {
  .cv-head-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
  }
  .cv-head-grid > * {
    grid-column: 1 / -1;
  }
  .cv-lead {
    grid-column: 7 / span 6;
    margin-top: 3rem;
  }
}
/* The facts, each under a hairline with a mono label, like the footer's columns. */
.cv-facts {
  display: grid;
  gap: 1.75rem 2rem;
  margin: 4rem 0 0;
}
.cv-facts > div {
  padding-top: 1.125rem;
  border-top: 1px solid var(--n200);
}
.cv-facts dd {
  margin: 0.625rem 0 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  text-wrap: pretty;
}
@media (min-width: 640px) {
  .cv-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .cv-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- The numbers: one board on the band, built like the home page's lead case ---------- */

.cv-proof {
  padding-block: var(--sec);
  background: var(--band);
  border-bottom: 1px solid var(--line);
}
.cv-board {
  border: 1px solid var(--line);
  background: var(--white);
}
/* The case card's strip: what the board compares on the left, what stayed the same on the right. */
.cv-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  min-height: 3.5rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--page);
  font-size: 0.875rem;
  line-height: 1.5rem;
  color: var(--n600);
}
.cv-bar h2 {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
}
/* One tile for each number in the headline: the number, then every week behind it. The averages sit under the brackets. */
.cv-tiles {
  display: grid;
}
.cv-tile {
  margin: 0;
  padding: 2rem 1.5rem 1.75rem;
}
.cv-tile + .cv-tile {
  border-top: 1px solid var(--line);
}
.cv-kpi {
  display: block;
}
.cv-kpi-label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--ink);
}
.cv-kpi-num {
  display: block;
  margin-top: 0.625rem;
  font-weight: 500;
  font-size: clamp(3rem, 2.25rem + 2.2vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.cv-foot {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--page);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--n600);
  text-wrap: pretty;
}
@media (min-width: 640px) {
  .cv-bar,
  .cv-foot {
    padding-inline: 2rem;
  }
  .cv-tile {
    padding: 2.5rem 2rem 2rem;
  }
}
@media (min-width: 1100px) {
  .cv-bar,
  .cv-foot {
    padding-inline: 2.5rem;
  }
  .cv-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cv-tile {
    padding: 2.75rem 2.5rem 2.25rem;
  }
  .cv-tile + .cv-tile {
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

/* ---------- The story: chapters on HALDE's services rows ----------
   The chapter on the left stays in view while you read it; the text starts on column 7, where every lead on the site starts. */

.cv-story {
  padding-block: var(--sec);
  border-bottom: 1px solid var(--line);
}
.cv-grew {
  padding-block: var(--sec);
  background: var(--band);
  border-bottom: 1px solid var(--line);
}
.cv-ch {
  display: grid;
  row-gap: 1.75rem;
}
.cv-ch + .cv-ch {
  margin-top: 4rem;
  padding-top: 4rem;
  border-top: 1px solid var(--n200);
}
.cv-ch-no {
  color: var(--accent-ink);
}
.cv-ch-title {
  margin-top: 1rem;
  font-weight: 600;
  font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2.125rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
/* A chapter opens on one line in ink at the lead size, as each column in Where we work opens on its line in ink; the
   detail follows in the body grey. */
.cv-ch-body .lead {
  max-width: none;
  color: var(--ink);
}
.cv-ch-body > * + * {
  margin-top: 1.5rem;
}
.cv-ch-body > .cv-list,
.cv-ch-body > .cv-list + * {
  margin-top: 2rem;
}
.cv-ch-body > .cv-tl {
  margin-top: 2.5rem;
}
.cv-text {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--n700);
  text-wrap: pretty;
}
/* What was built: one piece per row on hairlines, its name in ink and what it does under it. */
.cv-list {
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--n200);
}
.cv-list li {
  padding: 1.25rem 0 1.375rem;
  border-bottom: 1px solid var(--n200);
}
.cv-list h3 {
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.cv-list p {
  margin-top: 0.375rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--n700);
  text-wrap: pretty;
}
@media (min-width: 640px) {
  .cv-text,
  .cv-list h3,
  .cv-list p {
    font-size: 1.125rem;
  }
}
@media (min-width: 1024px) {
  .cv-ch {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2rem;
    align-items: start;
  }
  .cv-ch + .cv-ch {
    margin-top: 5rem;
    padding-top: 5rem;
  }
  .cv-ch-head {
    grid-column: 1 / span 5;
    position: sticky;
    top: calc(4rem + 1px + 2.5rem);
  }
  /* The text starts level with the chapter's title, not its number: the number hangs above, like every label. */
  .cv-ch-body {
    grid-column: 7 / span 6;
    padding-top: calc(2rem - 1px);
  }
}

/* ---------- How the work grew: How it works' line, run down the dates ----------
   The same line, squares and fill (options.js measures and fills it, as on the home page). Here it always runs down, one
   date per square, and what's next waits on a dashed square. */

.cv-tl .hwb-steps {
  gap: 2rem;
}
.cv-tl .hwb-step h3 {
  font-size: 1.25rem;
  line-height: 2.25rem;
  letter-spacing: -0.02em;
}
.cv-tl .hwb-body p {
  margin-top: 0;
}
@media (min-width: 900px) {
  .cv-tl .hwb-steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .cv-tl .hwb-step {
    display: grid;
  }
  .cv-tl .hwb-step .step-node {
    margin-bottom: 0;
  }
}
.cv-tl .cv-next .step-node {
  border-style: dashed;
}
.cv-tl .hwb-step.cv-next.is-active .step-node {
  border-color: var(--accent);
  background: var(--band);
  color: var(--accent-ink);
}

/* The nav marks where you are. */
.nav a[aria-current] {
  color: var(--ink);
}
