/* =====================================================================
   CASE STUDY PAGES  (page-case-study.php + page-case-studies.php)
   Uses global design tokens from style.css :root.
   No em dashes anywhere.
   ===================================================================== */

.cs-page,
.cs-index-page { background: var(--light); }

/* Case study gutter: 40px desktop, 20px mobile (overrides the global 2rem) */
.cs-page .container,
.cs-index-page .container { padding-left: 40px; padding-right: 40px; }

.cs-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Shared eyebrow / headings ------------------------------------------- */
.cs-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-muted); margin: 0 0 12px;
}
.cs-eyebrow-num { color: var(--blue); margin-right: 6px; }
.cs-h2 {
  font-size: 32px; line-height: 1.2; font-weight: 700;
  color: var(--text-heading); margin: 0 0 18px; letter-spacing: -0.01em;
}
.cs-body { font-size: 16px; line-height: 1.7; color: var(--text-body); margin: 0 0 14px; }
.cs-body a { color: var(--blue); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(23,102,255,0.3); }
.cs-body a:hover { border-bottom-color: var(--blue); }
.cs-narrow { max-width: 720px; }

/* 1. HERO -------------------------------------------------------------- */
/* margin-top clears the fixed 64px navbar (+ gap) so the hero is not flush against it */
.cs-hero { background: var(--dark); padding: 32px 0; margin-top: 88px; }
.cs-hero-inner {
  display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center;
}
.cs-logo { width: 180px; height: auto; display: block; margin: 0 0 20px; }
.cs-pill {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--blue-light); background: var(--blue-bg2);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.cs-hero-h1 {
  font-size: 40px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text-light-heading); margin: 0 0 16px; max-width: 640px;
}
.cs-hero-sub { font-size: 17px; line-height: 1.6; color: var(--text-light-body); margin: 0; max-width: 560px; }
.cs-hero-img {
  width: 220px; height: 220px; object-fit: cover; border-radius: 12px; display: block;
}

/* 2. METRIC BAR -------------------------------------------------------- */
.cs-metrics { padding: 32px 0; }
.cs-metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cs-metric-card { background: #F5F8FF; border-radius: 12px; padding: 24px 26px; }
.cs-metric-num { color: var(--blue); font-size: 26px; font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; }
.cs-metric-label { color: var(--text-muted); font-size: 12px; margin-top: 6px; }

/* 3A. CHALLENGE -------------------------------------------------------- */
.cs-challenge { padding: 32px 0; }
.cs-inline-link { margin-top: 4px; }

/* 3B. WHAT WE BUILT / PLACED ------------------------------------------- */
.cs-placed { background: #FAFBFD; padding: 32px 0; }
.cs-placed-grid { display: grid; grid-template-columns: 210px 1fr; gap: 24px; align-items: start; }
.cs-placed-img { width: 190px; height: auto; border-radius: 12px; display: block; }
.cs-placed-cards { display: flex; flex-direction: column; gap: 12px; }
.cs-placed-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--light); border: 0.5px solid var(--light-border);
  border-radius: 12px; padding: 16px 18px;
}
.cs-card-icon { width: 22px; height: 22px; color: var(--blue); flex: 0 0 auto; margin-top: 1px; }
.cs-placed-card-label { font-weight: 700; font-size: 15px; color: var(--text-heading); }
.cs-placed-card-desc { font-size: 14px; color: var(--text-muted); margin-top: 2px; }

/* Tech stack pills (optional row under the cards) */
.cs-tech-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.cs-tech-pill {
  font-size: 13px; line-height: 1.2; color: var(--text-muted);
  background: var(--light); border: 0.5px solid var(--light-border);
  padding: 6px 14px; border-radius: 20px;
}

/* 4. RESULTS ----------------------------------------------------------- */
.cs-results { padding: 32px 0; }
.cs-results-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.cs-result-card { background: #E6FAF3; color: #0F6E56; border-radius: 12px; padding: 26px 28px; }
.cs-result-num { font-size: 34px; font-weight: 500; line-height: 1.05; letter-spacing: -0.01em; }
.cs-result-label { font-size: 14px; margin-top: 8px; color: #0F6E56; opacity: 0.85; }

/* Client quote (optional block, renders only when a study defines quote_text) */
.cs-quote {
  border-left: 2px solid var(--blue); background: #F9FBFF;
  border-radius: 0 12px 12px 0; padding: 20px 24px; margin: 0 0 24px;
}
.cs-quote-text { font-size: 17px; line-height: 1.65; color: var(--text-heading); font-style: italic; margin: 0 0 10px; }
.cs-quote-attr { font-size: 14px; color: var(--text-muted); }

.cs-timeline {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  background: #FAFBFD; border: 1px solid var(--light-border);
  border-radius: 12px; padding: 24px 26px; margin-bottom: 28px;
}
.cs-timeline-day { display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: 0.04em; margin-bottom: 8px; }
.cs-tone-blue { color: var(--blue); }
.cs-tone-mint { color: #0F6E56; }
.cs-timeline-text { font-size: 14px; line-height: 1.55; color: var(--text-body); margin: 0; }

.cs-cta {
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
  background: var(--dark); border-radius: 12px; padding: 28px 32px;
}
.cs-cta-logo { width: 130px; height: auto; display: block; }
.cs-cta-h { font-size: 20px; font-weight: 700; color: var(--text-light-heading); margin: 0 0 4px; }
.cs-cta-sub { font-size: 15px; color: var(--text-light-muted); margin: 0; }
.cs-cta-btn { white-space: nowrap; }

/* INDEX PAGE ----------------------------------------------------------- */
.cs-index-hero { background: var(--dark); padding: 32px 0; margin-top: 88px; }
.cs-index-h1 { font-size: 44px; line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; color: var(--text-light-heading); margin: 0 0 14px; }
.cs-index-sub { font-size: 18px; color: var(--text-light-body); margin: 0; max-width: 620px; }
.cs-index-hero .cs-eyebrow { color: var(--blue-light); }
.cs-index-list { padding: 32px 0; }
.cs-index-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cs-index-card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--light); border: 1px solid var(--light-border);
  border-radius: 16px; overflow: hidden; transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
.cs-index-card picture { display: block; }
/* fixed height so every cover renders at the same size, whatever the source aspect ratio */
.cs-index-card-cover { width: 100%; height: 170px; object-fit: cover; display: block; }
.cs-index-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.cs-index-card:hover { border-color: var(--blue); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.cs-index-card-kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; }
.cs-index-card-title { font-size: 22px; font-weight: 700; color: var(--text-heading); margin-bottom: 10px; }
.cs-index-card-excerpt { font-size: 15px; line-height: 1.6; color: var(--text-body); margin-bottom: 20px; }
.cs-index-card-foot { margin-top: auto; }
.cs-index-card-stat { display: inline-block; font-size: 13px; font-weight: 600; color: #0F6E56; background: #E6FAF3; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.cs-index-card-arrow { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--blue); }
.cs-index-card-arrow svg { width: 15px; height: 15px; }

/* RESPONSIVE ----------------------------------------------------------- */
@media (max-width: 900px) {
  .cs-hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .cs-hero-right { order: -1; }
  .cs-hero-h1 { font-size: 32px; }
  .cs-placed-grid { grid-template-columns: 1fr; gap: 20px; }
  .cs-placed-img { width: 100%; max-width: 260px; }
  .cs-index-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-cta { grid-template-columns: 1fr; gap: 18px; text-align: left; justify-items: start; }
}

@media (max-width: 600px) {
  .cs-page .container,
  .cs-index-page .container { padding-left: 20px; padding-right: 20px; }
  .cs-hero, .cs-metrics, .cs-challenge, .cs-placed,
  .cs-results, .cs-index-hero, .cs-index-list { padding-top: 24px; padding-bottom: 24px; }
  .cs-hero-h1 { font-size: 28px; }
  .cs-metrics-grid { grid-template-columns: 1fr; }
  .cs-h2 { font-size: 26px; }
  .cs-results-cards { grid-template-columns: 1fr; }
  .cs-timeline { grid-template-columns: 1fr; gap: 16px; }
  .cs-index-grid { grid-template-columns: 1fr; }
  .cs-index-h1 { font-size: 32px; }
  .cs-cta-btn { width: 100%; text-align: center; justify-content: center; }
}
