/* ============================================================
   Case Study Page — editorial layout (Crescent-inspired)
   ============================================================ */

.case-study-page {
  background: var(--white);
}

.case-study-page #site-header {
  position: relative;
  z-index: 10;
}

/* ---- Rail container (dashed vertical guides) ---- */
.cs-main {
  padding-top: 120px;
}

.cs-rail {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 6%;
  position: relative;
}

.cs-rail::before,
.cs-rail::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    var(--border-mid) 0,
    var(--border-mid) 4px,
    transparent 4px,
    transparent 10px
  );
  pointer-events: none;
  opacity: 0.55;
}

.cs-rail::before { left: 6%; }
.cs-rail::after  { right: 6%; }

.cs-rail-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---- Hero ---- */
.cs-hero {
  padding: 48px 0 40px;
}

.cs-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.cs-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(32px, 4.2vw, 56px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #102445;
  margin: 0;
}

/* ---- Stat cards ---- */
.cs-stats {
  padding: 0 0 56px;
}

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

.cs-stat-card {
  border-radius: 20px;
  padding: 28px 24px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cs-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.cs-stat-card--lime {
  background: var(--lime-pale);
  border: 1px solid rgba(212, 232, 74, 0.35);
}

.cs-stat-card--cream {
  background: var(--cream);
  border: 1px solid var(--border);
}

.cs-stat-card--navy {
  background: #102445;
  border: 1px solid #102445;
}

.cs-stat-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.1;
  color: #102445;
  margin-bottom: 8px;
}

.cs-stat-card--navy .cs-stat-value {
  color: var(--cta);
}

.cs-stat-value--text {
  font-size: clamp(22px, 2.5vw, 32px);
}

.cs-stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--mid);
  margin: 0;
}

.cs-stat-card--navy .cs-stat-label {
  color: rgba(255, 255, 255, 0.65);
}

/* ---- Hero photo ---- */
.cs-photo {
  padding: 0 0 64px;
}

.cs-photo-wrap {
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(16, 36, 69, 0.12);
}

.cs-photo-wrap img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ---- Chapter sections ---- */
.cs-chapter {
  padding: 56px 0;
  border-top: 1px dotted var(--border-mid);
}

.cs-chapter-label,
.cs-chapter .cs-chapter-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.cs-h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #102445;
  margin: 0 0 20px;
}

.cs-body {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #596475;
  margin: 0 0 18px;
}

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

.cs-prose {
  max-width: 680px;
}

/* ---- Highlight callout ---- */
.cs-highlight {
  padding: 64px 0;
  background: var(--cream);
  border-top: 1px dotted var(--border-mid);
  border-bottom: 1px dotted var(--border-mid);
}

.cs-highlight-quote {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: #102445;
  margin: 0;
  padding: 0;
  border: none;
}

.cs-highlight-quote strong {
  color: var(--cta-text);
  background: var(--cta);
  padding: 0 6px;
  border-radius: 4px;
  font-weight: 800;
}

/* ---- Solution grid ---- */
.cs-chapter--solution {
  background: var(--white);
}

.cs-solution-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.cs-spec-card {
  background: #102445;
  border-radius: 20px;
  padding: 32px 28px;
  color: #fff;
}

.cs-spec-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cta);
  margin-bottom: 12px;
}

.cs-spec-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  margin: 0 0 20px;
}

.cs-spec-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.cs-spec-list li {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  padding-left: 20px;
}

.cs-spec-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cta);
}

.cs-spec-list li:last-child {
  border-bottom: none;
}

.cs-spec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  background: var(--cta);
  color: var(--cta-text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 16px;
  border-radius: 9999px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.cs-spec-btn:hover {
  background: var(--cta-hover);
  transform: translateY(-2px);
}

/* ---- Results chart ---- */
.cs-chapter--results {
  padding-bottom: 80px;
}

.cs-chart {
  margin-top: 40px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
}

.cs-chart-row {
  display: grid;
  grid-template-columns: 44px 1fr 56px;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.cs-chart-row:last-of-type {
  margin-bottom: 0;
}

.cs-chart-month {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--mid);
  text-transform: uppercase;
}

.cs-chart-bar-wrap {
  height: 28px;
  background: rgba(16, 36, 69, 0.06);
  border-radius: 8px;
  overflow: hidden;
}

.cs-chart-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--lime-mid), var(--lime));
  border-radius: 8px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.cs-chart-row--peak .cs-chart-bar {
  background: linear-gradient(90deg, var(--cta-hover), var(--cta));
}

.cs-chart-val {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #102445;
  text-align: right;
}

.cs-chart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-mid);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--mid);
}

.cs-chart-total strong {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #102445;
}

.cs-footnote {
  margin-top: 24px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  font-style: italic;
}

/* ---- Breadcrumbs (shared editorial pages) ---- */
.cs-breadcrumbs {
  padding: 8px 0 0;
}
.cs-breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--muted);
}
.cs-breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: #a0a8b4;
}
.cs-breadcrumbs a {
  color: #102445;
  text-decoration: none;
  font-weight: 500;
}
.cs-breadcrumbs a:hover { text-decoration: underline; }

/* ---- Byline ---- */
.cs-byline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}
.cs-byline-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #FFC70A;
  background: #102445;
}
.cs-byline-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #596475;
}
.cs-byline-text strong {
  color: #102445;
  font-weight: 700;
}
.cs-byline-meta {
  font-size: 13px;
  color: var(--muted);
}

/* ---- Article lists / FAQ within case-study shell ---- */
.cs-prose a {
  color: #102445;
  font-weight: 600;
  text-underline-offset: 3px;
}
.cs-prose a:hover { color: #c99700; }
.cs-list {
  margin: 0 0 20px 22px;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #596475;
}
.cs-list li { margin-bottom: 10px; }
.cs-faq {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}
.cs-faq-item {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
}
.cs-faq-item h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #102445;
  margin: 0 0 8px;
}
.cs-faq-item p {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #596475;
}

/* ---- Author card ---- */
.cs-author {
  padding: 24px 0 72px;
}
.cs-author-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  border-radius: 20px;
  background: #f8f9fa;
  border: 1px solid var(--border);
}
.cs-author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #FFC70A;
  background: #102445;
}
.cs-author-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.cs-author-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #102445;
  margin: 0 0 8px;
}
.cs-author-bio {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: #596475;
  margin: 0;
}

/* ---- CTA spacing ---- */
.case-study-page .vc-cta {
  padding-top: 0;
}

/* ---- Responsive ---- */
@media (min-width: 992px) {
  .cs-solution-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
  }
}

@media (max-width: 768px) {
  .cs-main {
    padding-top: 96px;
  }

  .cs-rail-inner {
    padding: 0 16px;
  }

  .cs-rail::before,
  .cs-rail::after {
    display: none;
  }

  .cs-hero {
    padding: 32px 0 28px;
  }

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

  .cs-stat-card {
    min-height: auto;
    padding: 22px 20px;
  }

  .cs-photo {
    padding-bottom: 48px;
  }

  .cs-photo-wrap {
    border-radius: 16px;
  }

  .cs-chapter {
    padding: 40px 0;
  }

  .cs-highlight {
    padding: 48px 0;
  }

  .cs-body {
    font-size: 16px;
  }

  .cs-chart {
    padding: 20px 16px;
  }

  .cs-chart-row {
    grid-template-columns: 36px 1fr 50px;
    gap: 8px;
  }

  .cs-chart-bar-wrap {
    height: 22px;
  }

  .cs-author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-stat-card:hover {
    transform: none;
    box-shadow: none;
  }

  .cs-chart-bar {
    transition: none;
  }
}
