/**
 * The published case study look, as a stylesheet of its own.
 *
 * Every value here is read off the live page's own generated CSS rather than judged by eye —
 * the fonts, the 48px uppercase hero, the 40px green counter, #EEF6F4 behind the client band,
 * #646A69 body text on #1D1F1E headings, the 750px measure, the 100px section rhythm and the
 * two mobile steps down for the hero.
 *
 * Divi's own generated sheet is not reused: it is written per page, keyed on module indices
 * (`.et_pb_text_3`, `.et_pb_number_counter_0`) that mean one thing on one study and another on
 * the next. Twenty studies would need twenty sheets. This states the design once, on classes
 * that say what they are.
 */

.cs-hero,
.cs-counters,
.cs-band,
.cs-body {
  font-family: "Poppins", Helvetica, Arial, Lucida, sans-serif;
  color: #646a69;
}

/**
 * The site's own container, not Divi's.
 *
 * The published page ran on Divi's `80% / max-width` row, which lands about thirty pixels
 * inside the header's container and reads as a page that does not belong to the site around
 * it. The shared header is `max-width: var(--container-max)` inside `var(--gutter-page-lg)`
 * of padding, so the gutter goes on the full-bleed section — which keeps the teal band and the
 * hero spanning the viewport — and the row matches the header's measure exactly.
 */
.cs-hero,
.cs-counters,
.cs-band,
.cs-body {
  padding-left: var(--gutter-page-lg, 48px);
  padding-right: var(--gutter-page-lg, 48px);
}

.cs-row {
  width: 100%;
  max-width: var(--container-max, 1200px);
  margin: 0 auto;
}

/* The hero: the study's art, an 80% black overlay, and the headline over both. */
.cs-hero {
  position: relative;
  padding-top: 8%;
  padding-bottom: 8%;
  background-color: #1d1f1e;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.cs-hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
}

.cs-hero-inner {
  position: relative;
  width: 100%;
  max-width: var(--container-max, 1200px);
  margin: 0 auto;
}

.cs-hero-inner > * {
  max-width: 650px;
}

.cs-hero h1 {
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  font-size: 48px;
  letter-spacing: 1px;
  line-height: 1.3em;
}

.cs-hero-lede {
  font-size: 16px;
  letter-spacing: 1px;
  line-height: 1.75em;
  color: #fff;
}

.cs-hero-lede p {
  margin: 1em 0 0;
}

/* Both buttons on the page: the ghost one over the hero, the solid one in the client band. */
.cs-button {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 25px;
  border-radius: 7px;
  border: 0;
  background-color: #149365;
  color: #fff !important;
  font-size: 16px;
  text-decoration: none;
  transition: background-color 300ms ease;
}

.cs-button:hover {
  background-color: #0c5f41;
}

.cs-button-ghost {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 15px;
}

.cs-button-ghost:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* The counter row: three cards, centred, the figure in the brand green. */
.cs-counters {
  padding-top: 100px;
  padding-bottom: 100px;
}

/**
 * Three cards whose rows line up, however long a label runs.
 *
 * "Reduction In Administrative Workload" wraps to two lines and "Faster Task Completion" does
 * not, so stacking each card on its own pushed one figure a line below its neighbours and the
 * notes further still. Each card spans the row grid instead, so label, figure and note are
 * three shared rows rather than three independent stacks.
 */
.cs-counter-row {
  display: grid;
  /* As many columns as there are cards. The ten studies imported from WordPress carry three
     counters and the ten migrated from EasyDesk carry four; a fixed three-column grid wrapped
     that fourth card onto a second row, where the subgrid rows above it do not reach and the
     figures stopped lining up. */
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 30px;
  row-gap: 0;
}

.cs-counter {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 0;
  max-width: 90%;
  margin: 0 auto;
  text-align: center;
}

/* Where subgrid is not available the cards stack as before, which is untidy but never broken. */
@supports not (grid-template-rows: subgrid) {
  .cs-counter {
    display: block;
  }
}

/* Stated in full, and scoped, so the design system's own heading and paragraph rules cannot
   reach past them: every one of these is a value off the published page. */
.cs-counters .cs-counter-label {
  margin: 0 0 15px;
  font-family: "Poppins", Helvetica, Arial, Lucida, sans-serif;
  font-weight: 500;
  color: #1d1f1e;
  font-size: 18px;
  line-height: 1.4em;
  align-self: end;
}

.cs-counters .cs-counter-value {
  margin: 0;
  font-family: "Poppins", Helvetica, Arial, Lucida, sans-serif;
  font-weight: 400;
  color: #149365;
  font-size: 40px;
  line-height: 1.2;
}

.cs-counters .cs-counter-note {
  margin: 10px 0 0;
  font-family: "Poppins", Helvetica, Arial, Lucida, sans-serif;
  font-weight: 400;
  color: #1d1f1e;
  font-size: 14px;
  line-height: 1.5em;
  align-self: start;
}

/* The client band: the teal ground, the description beside the facts. */
.cs-band {
  padding-top: 100px;
  padding-bottom: 100px;
  background-color: #eef6f4;
}

.cs-band-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.cs-band-main {
  max-width: 750px;
  font-size: 16px;
  line-height: 2em;
}

.cs-band-main h3 {
  margin: 0 0 10px;
  font-family: "Raleway", Helvetica, Arial, Lucida, sans-serif;
  font-weight: 700;
  color: #1d1f1e;
  font-size: 23px;
  line-height: 1.4em;
}

.cs-band-main h3:not(:first-child) {
  margin-top: 30px;
}

.cs-band-main p {
  margin: 0 0 1em;
}

.cs-modules {
  margin: 0;
  padding-left: 1em;
}

.cs-modules li {
  list-style-type: circle;
  line-height: 2em;
}

.cs-fact + .cs-fact {
  margin-top: 25px;
}

.cs-fact h5 {
  margin: 0 0 4px;
  font-weight: 600;
  color: #1d1f1e;
  font-size: 18px;
}

.cs-fact p {
  margin: 0;
  color: #646a69;
  font-size: 16px;
  line-height: 1.6em;
}

/* The narrative: one measured column, a Raleway heading over Poppins prose. */
.cs-body {
  padding-top: 100px;
  padding-bottom: 100px;
}

/**
 * The narrative measure, centred.
 *
 * Divi set this column at 750px and pinned it left, which inside the site's 1200px container
 * leaves roughly 390px of nothing down the right of every section. The measure is the design
 * system's own prose width, and centring it balances what is left over.
 */
.cs-section {
  max-width: 820px;
  margin: 0 auto 40px;
}

.cs-section:last-child {
  margin-bottom: 0;
}

.cs-section h3 {
  margin: 0 0 10px;
  font-family: "Raleway", Helvetica, Arial, Lucida, sans-serif;
  font-weight: 700;
  color: #1d1f1e;
  font-size: 24px;
  line-height: 1.4em;
}

.cs-section p {
  margin: 0 0 1em;
  color: #646a69;
  font-size: 16px;
  line-height: 2em;
}

.cs-quote blockquote {
  margin: 0;
  padding-left: 20px;
  border-left: 3px solid #149365;
}

.cs-quote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-weight: 600;
  color: #1d1f1e;
}

.cs-outcomes-heading {
  margin: 20px 0 10px;
  font-family: "Raleway", Helvetica, Arial, Lucida, sans-serif;
  font-weight: 700;
  color: #1d1f1e;
  font-size: 20px;
}

/* Two columns on the published page, and the outcomes are short enough to stay that way. */
.cs-outcomes {
  margin: 0 0 1em;
  padding-left: 1em;
  columns: 2;
  column-gap: 40px;
}

.cs-outcomes li {
  list-style-type: disc;
  color: #646a69;
  font-size: 16px;
  line-height: 2em;
  break-inside: avoid;
}

@media only screen and (max-width: 980px) {
  .cs-hero,
  .cs-counters,
  .cs-band,
  .cs-body {
    padding-left: var(--gutter-page, 24px);
    padding-right: var(--gutter-page, 24px);
  }

  .cs-hero h1 {
    font-size: 36px;
  }

  .cs-counters,
  .cs-band,
  .cs-body {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .cs-band-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media only screen and (max-width: 767px) {
  .cs-hero h1 {
    font-size: 32px;
  }

  .cs-counters,
  .cs-band,
  .cs-body {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .cs-counter-row {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-rows: none;
    gap: 40px;
  }

  .cs-counter {
    display: block;
  }

  .cs-outcomes {
    columns: 1;
  }
}
