/* Case study pages (layouts/case-study). Loaded only when .Type == "case-study". */
.case-study {
  --cs-ink: #111;
  --cs-text: #333;
  --cs-muted: #6b6b6b;
  --cs-line: #e4e4e1;
  --cs-paper: #f6f5f2;
  --cs-accent: #7A9E87; /* Library sage: main accent on light backgrounds */
  --cs-pop: #E5B43A;    /* Brighter gold: accent on black backgrounds */
  --cs-accent-soft: color-mix(in srgb, var(--cs-accent) 16%, #fff);
  --cs-head: 'Wix Madefor Display', 'Raleway', sans-serif;
  color: var(--cs-text);
  overflow-x: hidden;
}

.case-study .cs-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.case-study h1,
.case-study h2 {
  text-align: left;
  color: var(--cs-ink);
}

.case-study h2 {
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 20px;
}

.case-study p,
.case-study li {
  font-size: 19px;
  line-height: 1.75;
}

.case-study strong {
  font-weight: 700;
  color: var(--cs-ink);
}

/* Small section number marker */
.cs-num {
  display: inline-block;
  font-family: var(--cs-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cs-ink);
  padding-bottom: 6px;
  margin-bottom: 14px;
  border-bottom: 3px solid var(--cs-accent);
}

/* ---------- Hero ---------- */
.cs-hero {
  position: relative;
  background: #0b0b0b;
  color: #fff;
  padding: 110px 0 170px;
}

.cs-hero-inner {
  max-width: 1000px;
}

.cs-eyebrow {
  font-size: 14px !important;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #bdbdbd;
  margin-bottom: 28px;
}

.cs-pill {
  display: inline-block;
  background: var(--cs-pop);
  color: #000;
  padding: 6px 14px;
  border-radius: 999px;
  margin-right: 12px;
}

.case-study .cs-hero h1 {
  font-size: 64px;
  line-height: 1.06;
  letter-spacing: -1px;
  color: #fff;
  margin-bottom: 30px;
}

.cs-hl {
  color: var(--cs-pop);
}

.case-study .cs-lede {
  max-width: 760px;
  font-size: 22px;
  line-height: 1.6;
  font-weight: 400;
  color: #d6d6d6;
  margin: 0;
}

/* ---------- Stats (overlap the hero) ---------- */
.cs-stats-band {
  margin-top: -100px;
  position: relative;
  z-index: 2;
}

.cs-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cs-stat {
  background: #fff;
  border: 2px solid #000;
  border-radius: 18px;
  padding: 30px 28px;
  box-shadow: 8px 8px 0 #000;
}

.cs-stat-accent {
  background: var(--cs-pop);
}

.case-study .cs-stat-num {
  font-family: var(--cs-head);
  font-size: 54px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
  color: #000;
  margin-bottom: 12px;
}

.case-study .cs-stat-label {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #000;
  margin: 0;
}

/* ---------- Section layout ---------- */
.cs-sec {
  padding: 90px 0;
  border-bottom: 1px solid var(--cs-line);
}

.cs-wrap > .cs-sec:last-child {
  border-bottom: 0;
}

.cs-split {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 60px;
}

.cs-side {
  position: sticky;
  top: 100px;
  align-self: start;
}

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

.case-study .cs-lead {
  font-size: 25px;
  line-height: 1.55;
  color: var(--cs-ink);
  margin-bottom: 36px;
}

.cs-head {
  max-width: 760px;
  margin-bottom: 44px;
}

/* Facts grid */
.cs-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid #000;
  margin: 0;
}

.cs-facts > div {
  padding: 18px 18px 18px 0;
  border-bottom: 1px solid var(--cs-line);
}

.cs-facts dt {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cs-muted);
  margin-bottom: 6px;
}

.cs-facts dd {
  font-size: 18px;
  line-height: 1.45;
  color: var(--cs-ink);
  margin: 0;
}

/* Three needs */
.case-study .cs-needs-title {
  margin-top: 36px;
}

.cs-needs {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

.case-study .cs-needs li {
  background: var(--cs-paper);
  border-radius: 14px;
  padding: 22px 20px;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--cs-ink);
  margin: 0;
}

.cs-needs-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #000;
  color: var(--cs-pop);
  font-family: var(--cs-head);
  font-size: 16px;
  margin-bottom: 14px;
}

/* ---------- Full-width bands ---------- */
.cs-band {
  padding: 100px 0;
}

.cs-dark {
  background: #0b0b0b;
  color: #d6d6d6;
}

.cs-dark h2,
.cs-dark strong {
  color: #fff;
}

.cs-dark .cs-num {
  color: #fff;
  border-bottom-color: var(--cs-pop);
}

.cs-band-head {
  max-width: 760px;
  margin-bottom: 50px;
}

.cs-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
}

.case-study .cs-cards li {
  position: relative;
  background: #1a1a1a;
  border: 1px solid #2c2c2c;
  border-radius: 16px;
  padding: 58px 26px 26px;
  font-size: 17px;
  line-height: 1.6;
  margin: 0;
  transition: border-color 0.2s, transform 0.2s;
}

.case-study .cs-cards li::before {
  content: '\201C';
  position: absolute;
  top: 14px;
  left: 24px;
  font-family: var(--cs-head);
  font-size: 56px;
  line-height: 1;
  color: var(--cs-pop);
}

.case-study .cs-cards li:hover {
  border-color: var(--cs-pop);
  transform: translateY(-3px);
}

.case-study .cs-cards strong {
  display: block;
  font-family: var(--cs-head);
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 10px;
}

.case-study .cs-cards li:first-child {
  grid-column: span 2;
  background: var(--cs-pop);
  border-color: var(--cs-pop);
  color: #000;
}

.case-study .cs-cards li:last-child {
  grid-column: span 2;
}

.case-study .cs-cards li:first-child::before {
  color: #000;
}

.case-study .cs-cards li:first-child strong {
  color: #000;
  font-size: 28px;
}

.case-study .cs-band-close {
  max-width: 760px;
  font-size: 22px;
  color: #fff;
  margin: 50px 0 0;
}

/* ---------- Approach timeline ---------- */
.cs-steps {
  list-style: none;
  position: relative;
  margin: 36px 0;
  padding-left: 44px;
}

.cs-steps::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--cs-line);
}

.case-study .cs-steps li {
  position: relative;
  margin: 0 0 30px;
}

.case-study .cs-steps li:last-child {
  margin-bottom: 0;
}

.case-study .cs-steps li::before {
  content: '';
  position: absolute;
  left: -44px;
  top: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cs-accent);
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px #000;
}

.case-study .cs-steps p {
  margin: 0;
}

.case-study .cs-steps strong {
  display: block;
  font-family: var(--cs-head);
  font-size: 22px;
  margin-bottom: 4px;
}

.case-study .cs-pull {
  font-family: var(--cs-head);
  font-size: 26px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--cs-ink);
  border-left: 6px solid var(--cs-accent);
  padding: 6px 0 6px 26px;
  margin-top: 44px;
}

/* ---------- Results chart ---------- */
.cs-chart {
  margin: 0 0 40px;
  padding: 30px;
  background: var(--cs-paper);
  border-radius: 18px;
}

.cs-chart-row {
  margin-bottom: 22px;
}

.cs-chart-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cs-muted);
  margin-bottom: 8px;
}

.cs-bar {
  display: flex;
  gap: 2px;
  height: 56px;
}

.cs-seg {
  display: flex;
  align-items: center;
  padding: 0 16px;
  min-width: 0;
  font-family: var(--cs-head);
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
  transform-origin: left;
  animation: cs-grow 0.9s ease-out both;
}

.cs-seg:first-child {
  border-radius: 4px 0 0 4px;
}

.cs-seg:last-child {
  border-radius: 0 4px 4px 0;
}

.cs-seg:only-child {
  border-radius: 4px;
}

.cs-seg-overdue {
  background: #1a1a1a;
  color: #fff;
}

.cs-seg-collected {
  background: var(--cs-accent);
  color: #000;
  animation-delay: 0.3s;
}

@keyframes cs-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .cs-seg { animation: none; }
}

.cs-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 15px;
  color: var(--cs-text);
  margin-top: 4px;
}

.cs-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cs-key {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.cs-key-overdue { background: #1a1a1a; }
.cs-key-collected { background: var(--cs-accent); }

/* Results table */
.cs-table-wrap {
  overflow-x: auto;
  margin-bottom: 32px;
}

.cs-table {
  border-collapse: collapse;
  width: 100%;
}

.cs-table th,
.cs-table td {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid var(--cs-line);
  font-size: 17px;
  line-height: 1.45;
  vertical-align: top;
}

.cs-table tr:first-child th {
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cs-muted);
  border-bottom: 2px solid #000;
}

.cs-table th {
  font-weight: 700;
  color: var(--cs-ink);
}

.cs-table .cs-after {
  background: var(--cs-accent-soft);
}

.cs-table tr:first-child .cs-after {
  background: var(--cs-accent);
  color: #000;
}

/* ---------- In the moment ---------- */
.cs-moment {
  background: var(--cs-accent);
  overflow: hidden;
}

.cs-moment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 60px;
  align-items: center;
}

.case-study .cs-moment h2 {
  font-size: 56px;
}

.case-study .cs-moment p {
  font-size: 22px;
  color: #000;
}

.cs-moment .cs-num {
  border-bottom-color: #000;
}

.cs-phone {
  justify-self: center;
  width: 100%;
  max-width: 360px;
  background: #000;
  padding: 12px;
  border-radius: 38px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  transform: rotate(3deg);
}

.cs-phone img {
  display: block;
  width: 100%;
  border-radius: 28px;
}

/* ---------- What changed ---------- */
.cs-wins {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
}

.case-study .cs-wins li {
  grid-column: span 2;
  border: 2px solid #000;
  border-radius: 16px;
  padding: 26px;
  font-size: 17px;
  line-height: 1.6;
  margin: 0;
}

.case-study .cs-wins li:nth-child(4),
.case-study .cs-wins li:nth-child(5) {
  grid-column: span 3;
}

.cs-wins i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--cs-accent);
  color: #000;
  font-size: 20px;
  margin-bottom: 18px;
}

.case-study .cs-wins strong {
  display: block;
  font-family: var(--cs-head);
  font-size: 20px;
  margin-bottom: 6px;
}

/* ---------- Fit checklist ---------- */
.cs-fit {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px 60px;
  background: var(--cs-paper);
  border-radius: 24px;
  padding: 56px;
}

.cs-checks {
  list-style: none;
  margin: 0;
}

.case-study .cs-checks li {
  position: relative;
  padding: 14px 0 14px 46px;
  border-bottom: 1px solid var(--cs-line);
  margin: 0;
}

.case-study .cs-checks li:last-child {
  border-bottom: 0;
}

.case-study .cs-checks li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 17px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #000;
  color: var(--cs-pop);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-study .cs-fit-close {
  grid-column: 2;
  font-weight: 700;
  color: var(--cs-ink);
  margin: 10px 0 0;
}

/* ---------- CTA ---------- */
.cs-cta {
  background: #0b0b0b;
  color: #d6d6d6;
  text-align: center;
  padding: 110px 0;
  border-bottom: 1px solid #222;
}

.cs-cta .cs-wrap {
  max-width: 820px;
}

.case-study .cs-cta h2 {
  font-size: 64px;
  color: #fff;
  text-align: center;
}

.case-study .cs-cta p {
  font-size: 20px;
}

.case-study .cs-cta-btn {
  margin: 40px 0 0;
}

.cs-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--cs-pop);
  color: #000;
  font-family: var(--cs-head);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  padding: 22px 44px;
  border-radius: 999px;
  transition: transform 0.2s, background 0.2s;
}

.cs-btn:hover {
  background: #fff;
  color: #000;
  transform: translateY(-2px);
}

.cs-btn i {
  transition: transform 0.2s;
}

.cs-btn:hover i {
  transform: translateX(4px);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cs-split,
  .cs-fit,
  .cs-moment-grid {
    grid-template-columns: 1fr;
  }

  .cs-split {
    gap: 10px;
  }

  .cs-side {
    position: static;
  }

  .case-study .cs-fit-close {
    grid-column: 1;
  }

  .cs-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-study .cs-cards li:last-child {
    grid-column: span 1;
  }

  .cs-wins {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-study .cs-wins li,
  .case-study .cs-wins li:nth-child(4) {
    grid-column: span 1;
  }

  .case-study .cs-wins li:nth-child(5) {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .case-study .cs-wrap {
    padding: 0 18px;
  }

  .case-study h2 {
    font-size: 30px;
  }

  .case-study p,
  .case-study li {
    font-size: 17px;
  }

  .cs-hero {
    padding: 64px 0 130px;
  }

  .case-study .cs-hero h1 {
    font-size: 36px;
    letter-spacing: -0.5px;
  }

  .case-study .cs-lede {
    font-size: 18px;
  }

  .cs-stats-band {
    margin-top: -90px;
  }

  .cs-stats {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .cs-stat {
    padding: 22px;
    box-shadow: 5px 5px 0 #000;
  }

  .case-study .cs-stat-num {
    font-size: 42px;
  }

  .cs-sec,
  .cs-band {
    padding: 60px 0;
  }

  .case-study .cs-lead {
    font-size: 20px;
  }

  .cs-facts,
  .cs-needs,
  .cs-cards,
  .cs-wins {
    grid-template-columns: 1fr;
  }

  .case-study .cs-cards li:first-child,
  .case-study .cs-cards li:last-child,
  .case-study .cs-wins li,
  .case-study .cs-wins li:nth-child(4),
  .case-study .cs-wins li:nth-child(5) {
    grid-column: span 1;
  }

  .case-study .cs-cards li:first-child strong {
    font-size: 22px;
  }

  .case-study .cs-pull {
    font-size: 21px;
    padding-left: 18px;
  }

  .cs-chart {
    padding: 20px;
  }

  .cs-bar {
    height: 46px;
  }

  .cs-seg {
    font-size: 16px;
    padding: 0 10px;
  }

  .cs-table th,
  .cs-table td {
    font-size: 15px;
    padding: 12px 10px;
  }

  .case-study .cs-moment h2 {
    font-size: 40px;
  }

  .cs-phone {
    max-width: 300px;
    transform: rotate(2deg);
  }

  .cs-fit {
    padding: 30px 22px;
    border-radius: 18px;
  }

  .case-study .cs-cta h2 {
    font-size: 42px;
  }

  .cs-btn {
    font-size: 17px;
    padding: 18px 30px;
  }
}
