/*
  APPROVED CASE-STUDY CARD COLOUR CONTRACT — DO NOT EXTEND LOCALLY.

  Library build source of truth:
  layout-variant-1/theme-map.json, generated from themes.json.

  Every card must use one approved theme class below. Background, title,
  foreground, body text, rule, link and foot colours are role-bound. Agents
  must not introduce another hex, rgb, rgba, hsl, named colour or opacity-based
  text colour into a case-study section. If the source palette changes, update
  this block and rerun build_templates.py; the builder rejects palette drift.

  Shared approved card roles:
  card-title #d4af37 | card-fg #ffffff | card-body #c4cdc8
  card-rule rgba(255,255,255,.2) | card-link #f3cd29

  Approved card grounds:
  Forest #0d5630 | Olive #2b3410 | Walnut #57473a | Petrol #14403f
  Burgundy #6e1e2e | Plum #3b2440 | Slate #2b4a64

  Approved foot grounds carried by the theme contract:
  #e7efe8 | #e6dfd4 | #ffffff
*/
.case-study-showcase-05-one-two-three-four-library {
  box-sizing: border-box;
  width: 100%;
  flex: 0 0 100%;
  --case-study-showcase-05-one-two-three-four-card-title: #d4af37;
  --case-study-showcase-05-one-two-three-four-card-fg: #ffffff;
  --case-study-showcase-05-one-two-three-four-card-body: #c4cdc8;
  --case-study-showcase-05-one-two-three-four-card-rule: rgba(255,255,255,.2);
  --case-study-showcase-05-one-two-three-four-card-link: #f3cd29;
  padding-block: var(--section-padding-y);
  border-top: 1px solid var(--rule);
  background: var(--paper);
  color: var(--deep);
  font-family: var(--body);
  scroll-margin-top: 68px;
}

.case-study-showcase-05-one-two-three-four-library,
.case-study-showcase-05-one-two-three-four-library * {
  box-sizing: border-box;
}

.case-study-showcase-05-one-two-three-four-library a {
  color: inherit;
  text-decoration: none;
}

.case-study-showcase-05-one-two-three-four-library img {
  display: block;
  max-width: 100%;
}

.case-study-showcase-05-one-two-three-four-showcase__in {
  width: var(--shell);
  margin: 0 auto;
}

.case-study-showcase-05-one-two-three-four-showcase__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.case-study-showcase-05-one-two-three-four-showcase__intro {
  display: flex;
  flex: 0 1 var(--title-description-width);
  max-width: var(--title-description-width);
  flex-direction: column;
  gap: 14px;
}

.case-study-showcase-05-one-two-three-four-showcase__eyebrow {
  margin: 0;
  color: var(--deep);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.15;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.case-study-showcase-05-one-two-three-four-showcase__title {
  margin: 0;
  color: var(--deep);
  font-family: var(--display);
  font-size: var(--fs-standard-section);
  font-weight: var(--display-weight);
  line-height: var(--lh-tight);
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.case-study-showcase-05-one-two-three-four-showcase__all {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 5px;
  border-bottom: 1px solid #d4af37;
  color: var(--deep);
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.4;
}

.case-study-showcase-05-one-two-three-four-showcase__all:hover,
.case-study-showcase-05-one-two-three-four-showcase__all:focus-visible {
  color: var(--bronze);
}

.case-study-showcase-05-one-two-three-four-showcase__all-arrow {
  transition: transform .2s ease;
}

.case-study-showcase-05-one-two-three-four-showcase__all:hover .case-study-showcase-05-one-two-three-four-all-arrow,
.case-study-showcase-05-one-two-three-four-showcase__all:focus-visible .case-study-showcase-05-one-two-three-four-all-arrow {
  transform: translateX(5px);
}

.case-study-showcase-05-one-two-three-four-rows {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.case-study-showcase-05-one-two-three-four-row {
  display: grid;
  align-items: stretch;
}

.case-study-showcase-05-one-two-three-four-row--4 {
  --card-pad: 20px;
  --card-well: 220px;
  --card-kicker: 10px;
  --card-title: 18px;
  --card-kicker-gap: 8px;
  --card-title-gap: 12px;
  --card-rule-gap: 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.case-study-showcase-05-one-two-three-four-row--3 {
  --card-pad: 24px;
  --card-well: 300px;
  --card-kicker: 12px;
  --card-title: 22px;
  --card-kicker-gap: 10px;
  --card-title-gap: 16px;
  --card-rule-gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.case-study-showcase-05-one-two-three-four-row--2 {
  --card-pad: 32px;
  --card-well: 370px;
  --card-kicker: 13px;
  --card-title: 34px;
  --card-kicker-gap: 12px;
  --card-title-gap: 20px;
  --card-rule-gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
}

.case-study-showcase-05-one-two-three-four-row--1 {
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}

.case-study-showcase-05-one-two-three-four-card {
  min-width: 0;
  background: var(--case-study-showcase-05-one-two-three-four-card-bg);
  color: var(--case-study-showcase-05-one-two-three-four-card-fg);
}

.case-study-showcase-05-one-two-three-four-card--stack {
  display: flex;
  flex-direction: column;
  padding: var(--card-pad);
}

.case-study-showcase-05-one-two-three-four-theme--forest {
  --case-study-showcase-05-one-two-three-four-card-bg: #0d5630;
  --case-study-showcase-05-one-two-three-four-card-foot-bg: #e7efe8;
}

.case-study-showcase-05-one-two-three-four-theme--sage {
  --case-study-showcase-05-one-two-three-four-card-bg: #2b3410;
  --case-study-showcase-05-one-two-three-four-card-foot-bg: #e7efe8;
}

.case-study-showcase-05-one-two-three-four-theme--walnut {
  --case-study-showcase-05-one-two-three-four-card-bg: #57473a;
  --case-study-showcase-05-one-two-three-four-card-foot-bg: #e6dfd4;
}

.case-study-showcase-05-one-two-three-four-theme--petrol {
  --case-study-showcase-05-one-two-three-four-card-bg: #14403f;
  --case-study-showcase-05-one-two-three-four-card-foot-bg: #e7efe8;
}

.case-study-showcase-05-one-two-three-four-theme--burgundy {
  --case-study-showcase-05-one-two-three-four-card-bg: #6e1e2e;
  --case-study-showcase-05-one-two-three-four-card-foot-bg: #e6dfd4;
}

.case-study-showcase-05-one-two-three-four-theme--plum {
  --case-study-showcase-05-one-two-three-four-card-bg: #3b2440;
  --case-study-showcase-05-one-two-three-four-card-foot-bg: #ffffff;
}

.case-study-showcase-05-one-two-three-four-theme--slate {
  --case-study-showcase-05-one-two-three-four-card-bg: #2b4a64;
  --case-study-showcase-05-one-two-three-four-card-foot-bg: #ffffff;
}

.case-study-showcase-05-one-two-three-four-card__kicker {
  display: block;
  font-size: var(--card-kicker);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--case-study-showcase-05-one-two-three-four-card-body);
}

.case-study-showcase-05-one-two-three-four-card__art {
  display: flex;
  height: var(--card-well);
  margin-top: var(--card-kicker-gap);
  align-items: center;
  justify-content: center;
}

.case-study-showcase-05-one-two-three-four-card__art img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.case-study-showcase-05-one-two-three-four-card__title {
  display: block;
  margin-top: var(--card-title-gap);
  font-family: var(--display);
  font-size: var(--card-title);
  font-weight: 400;
  /* Approved title leading: 1.2. Never reduce below 1.15. */
  line-height: 1.2;
  color: var(--case-study-showcase-05-one-two-three-four-card-title);
  text-wrap: balance;
}

.case-study-showcase-05-one-two-three-four-card__lede {
  display: block;
  margin-top: 16px;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--case-study-showcase-05-one-two-three-four-card-body);
}

.case-study-showcase-05-one-two-three-four-card__read {
  display: block;
  margin-top: auto;
  padding-top: var(--card-rule-gap);
}

.case-study-showcase-05-one-two-three-four-card__read-label {
  display: block;
  padding-top: 16px;
  border-top: 1px solid var(--case-study-showcase-05-one-two-three-four-card-rule);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--case-study-showcase-05-one-two-three-four-card-link);
}

.case-study-showcase-05-one-two-three-four-card--row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.case-study-showcase-05-one-two-three-four-card__row-copy {
  display: block;
  min-width: 0;
  padding: 40px;
}

.case-study-showcase-05-one-two-three-four-card--row .case-study-showcase-05-one-two-three-four-card__kicker {
  --card-kicker: 13px;
}

.case-study-showcase-05-one-two-three-four-card--row .case-study-showcase-05-one-two-three-four-card__title {
  --card-title: 34px;
  --card-title-gap: 28px;
}

.case-study-showcase-05-one-two-three-four-card--row .case-study-showcase-05-one-two-three-four-card__lede {
  clear: right;
  margin-top: 28px;
}

.case-study-showcase-05-one-two-three-four-card--row .case-study-showcase-05-one-two-three-four-card__read {
  clear: both;
  padding-top: 40px;
}

.case-study-showcase-05-one-two-three-four-card__float-art {
  float: right;
  width: 280px;
  max-height: 320px;
  margin: 0 0 32px 32px;
  object-fit: contain;
}

.case-study-showcase-05-one-two-three-four-card__kpis {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--case-study-showcase-05-one-two-three-four-card-rule);
}

.case-study-showcase-05-one-two-three-four-card__kpi {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 32px;
}

.case-study-showcase-05-one-two-three-four-card__kpi + .case-study-showcase-05-one-two-three-four-card__kpi {
  border-top: 1px solid var(--case-study-showcase-05-one-two-three-four-card-rule);
}

.case-study-showcase-05-one-two-three-four-card__kpi-value {
  font-family: var(--display);
  font-size: 58px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--case-study-showcase-05-one-two-three-four-card-title);
}

.case-study-showcase-05-one-two-three-four-card__kpi-label {
  font-size: 14px;
  line-height: 1.4;
  color: var(--case-study-showcase-05-one-two-three-four-card-body);
}

.case-study-showcase-05-one-two-three-four-card:focus-visible {
  outline: 3px solid var(--case-study-showcase-05-one-two-three-four-card-link);
  outline-offset: 4px;
}

@media (max-width: 1109px) {
  .case-study-showcase-05-one-two-three-four-card--row {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-study-showcase-05-one-two-three-four-card__kpis {
    border-top: 1px solid var(--case-study-showcase-05-one-two-three-four-card-rule);
    border-left: 0;
  }
}

@media (max-width: 1001px) {
  .case-study-showcase-05-one-two-three-four-row--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .case-study-showcase-05-one-two-three-four-row--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 789px) {
  .case-study-showcase-05-one-two-three-four-card__float-art {
    float: none;
    margin: 0 0 32px;
  }
}

@media (max-width: 715px) {
  .case-study-showcase-05-one-two-three-four-row--2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 699px) {
  .case-study-showcase-05-one-two-three-four-row--3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 691px) {
  .case-study-showcase-05-one-two-three-four-row--4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .case-study-showcase-05-one-two-three-four-showcase__head {
    display: block;
    margin-bottom: 48px;
  }

  .case-study-showcase-05-one-two-three-four-showcase__intro {
    max-width: 100%;
  }

  .case-study-showcase-05-one-two-three-four-showcase__all {
    min-height: 44px;
    margin-top: 20px;
  }
}

@media (max-width: 600px) {
  .case-study-showcase-05-one-two-three-four-showcase__in {
    width: var(--shell);
  }
}

@media (max-width: 507px) {
  .case-study-showcase-05-one-two-three-four-rows {
    gap: 24px;
  }

  .case-study-showcase-05-one-two-three-four-row--4,
  .case-study-showcase-05-one-two-three-four-row--3,
  .case-study-showcase-05-one-two-three-four-row--2 {
    --card-pad: 20px;
    --card-well: 220px;
    --card-kicker: 11px;
    --card-title: 22px;
    --card-kicker-gap: 10px;
    --card-title-gap: 14px;
    --card-rule-gap: 24px;
    gap: 24px;
  }

  .case-study-showcase-05-one-two-three-four-card__art {
    height: auto;
    max-height: var(--card-well);
  }

  .case-study-showcase-05-one-two-three-four-card__row-copy,
  .case-study-showcase-05-one-two-three-four-card__kpi {
    padding: 20px;
  }

  .case-study-showcase-05-one-two-three-four-card--row .case-study-showcase-05-one-two-three-four-card__title {
    --card-title: 22px;
    --card-title-gap: 16px;
  }

  .case-study-showcase-05-one-two-three-four-card--row .case-study-showcase-05-one-two-three-four-card__lede {
    margin-top: 16px;
    font-size: 16px;
  }

  .case-study-showcase-05-one-two-three-four-card--row .case-study-showcase-05-one-two-three-four-card__read {
    padding-top: 24px;
  }

  .case-study-showcase-05-one-two-three-four-card__kpi-value {
    font-size: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-study-showcase-05-one-two-three-four-showcase__all-arrow {
    transition: none;
  }
}
