/* ===== Case Studies — shared design system ===== */

.cs-eyebrow,
.cs-section-label,
.cs-detail-client-label,
.cs-ledger-label {
  font-family: "Mulish", "Source_Sans_Pro", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.cs-hero-title,
.cs-detail-tagline,
.cs-card-client,
.cs-section-title,
.cs-cta-title,
.cs-ledger-value {
  font-family: "Comfortaa", sans-serif;
}

/* ---- Index hero ---- */

.cs-hero {
  background: #000;
  padding: 7rem 0 4rem;
  text-align: center;
}

.cs-eyebrow {
  display: inline-block;
  color: #d89402;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.cs-hero-title {
  color: #fff;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.cs-hero-subtitle {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto;
}

/* ---- Card grid ---- */

.cs-grid-container {
  background: #000;
  padding-bottom: 5rem;
}

.cs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .cs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cs-card {
  display: block;
  text-decoration: none;
  border-radius: 14px;
  overflow: hidden;
  background: #0e0e10;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.35s ease, border-color 0.35s ease;
}

.cs-card:hover {
  transform: translateY(-6px);
  border-color: rgba(216, 148, 2, 0.5);
}

.cs-card-media {
  position: relative;
  aspect-ratio: 21 / 6.5;
  overflow: hidden;
}

.cs-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) saturate(1.1);
  transform: scale(1.08);
  transition: transform 0.6s ease;
}

.cs-card:hover .cs-card-media img {
  transform: scale(1.14);
}

.cs-card-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.85) 100%);
}

.cs-card-body {
  padding: 1.5rem 1.5rem 1.75rem;
}

.cs-card-stat {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.cs-card-stat-value {
  font-family: "Comfortaa", sans-serif;
  font-weight: 700;
  font-size: 1.9rem;
  color: #d89402;
  line-height: 1;
}

.cs-card-stat-label {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
}

.cs-card-client {
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.cs-card-tagline {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 1.1rem;
}

.cs-card-link {
  color: #d89402;
  font-weight: 600;
  font-size: 0.88rem;
}

.cs-card-link i {
  margin-inline-start: 0.35rem;
  transition: transform 0.25s ease;
}

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

[lang="ar"] .cs-card:hover .cs-card-link i,
html[dir="rtl"] .cs-card:hover .cs-card-link i {
  transform: translateX(-4px);
}

/* ---- Detail hero ---- */

.cs-detail-hero {
  background-size: cover;
  background-position: center;
  padding: 6rem 0 2.75rem;
  min-height: 38vh;
  display: flex;
  align-items: flex-end;
}

.cs-back-link {
  display: inline-block;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 2rem;
  transition: color 0.2s ease;
}

.cs-back-link:hover {
  color: #d89402;
}

.cs-back-link i {
  margin-inline-end: 0.4rem;
}

.cs-detail-client-label {
  display: block;
  color: #d89402;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cs-detail-tagline {
  color: #fff;
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.2;
  max-width: 880px;
  margin-bottom: 1rem;
}

.cs-detail-client-link {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  text-decoration: none;
}

.cs-detail-client-link:hover {
  color: #fff;
}

.cs-detail-client-link i {
  font-size: 0.75rem;
  margin-inline-start: 0.35rem;
}

/* ---- Metrics ledger (signature element) ---- */

.cs-ledger-wrap {
  background: #0e0e10;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cs-ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.cs-ledger-item {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
}

.cs-ledger-item:first-child {
  border-inline-start: none;
}

.cs-ledger-value {
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  color: #d89402;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 0.65rem;
}

.cs-ledger-label {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  line-height: 1.4;
}

/* ---- Narrative sections ---- */

.cs-narrative {
  background: #000;
  padding: 4.5rem 0 2rem;
}

.cs-section {
  max-width: 780px;
  margin: 0 auto 4rem;
}

.cs-section-outcome {
  margin-bottom: 3rem;
}

.cs-section-label {
  display: block;
  color: #48a0a7;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cs-section-title {
  color: #fff;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.3;
  margin-bottom: 1.1rem;
}

.cs-section-body {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.02rem;
  line-height: 1.75;
}

/* ---- Shared CTA band ---- */

.cs-cta {
  background: #0e0e10;
  padding: 4.5rem 0;
}

.cs-cta-title {
  color: #fff;
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin-bottom: 0.75rem;
}

.cs-cta-body {
  color: rgba(255, 255, 255, 0.6);
  max-width: 480px;
  margin: 0 auto 1.75rem;
}

/* ---- Responsive ---- */

@media (max-width: 767.98px) {
  .cs-ledger {
    grid-template-columns: repeat(2, 1fr);
  }

  .cs-ledger-item:nth-child(2) {
    border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
  }

  .cs-ledger-item:nth-child(odd) {
    border-inline-start: none;
  }

  .cs-detail-hero {
    padding-top: 5rem;
    min-height: 30vh;
  }
}

/* ---- Reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  .cs-card,
  .cs-card-media img,
  .cs-card-link i {
    transition: none;
  }
}

/* ---- Light theme ----
   The detail-page photo hero (.cs-detail-hero and its children) is
   intentionally left unchanged: it sits on a photo with a dark gradient
   scrim for text legibility, which reads correctly in both site themes. */

[data-bs-theme="light"] .cs-hero,
[data-bs-theme="light"] .cs-grid-container,
[data-bs-theme="light"] .cs-narrative {
  background: #fff;
}

[data-bs-theme="light"] .cs-hero-title,
[data-bs-theme="light"] .cs-card-client,
[data-bs-theme="light"] .cs-section-title,
[data-bs-theme="light"] .cs-cta-title {
  color: #16161a;
}

[data-bs-theme="light"] .cs-hero-subtitle,
[data-bs-theme="light"] .cs-card-tagline,
[data-bs-theme="light"] .cs-card-stat-label,
[data-bs-theme="light"] .cs-section-body,
[data-bs-theme="light"] .cs-cta-body {
  color: rgba(0, 0, 0, 0.62);
}

[data-bs-theme="light"] .cs-card {
  background: #f6f6f7;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-bs-theme="light"] .cs-card:hover {
  border-color: rgba(216, 148, 2, 0.6);
}

[data-bs-theme="light"] .cs-ledger-wrap,
[data-bs-theme="light"] .cs-cta {
  background: #f6f6f7;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-bs-theme="light"] .cs-ledger-item {
  border-inline-start-color: rgba(0, 0, 0, 0.08);
}

[data-bs-theme="light"] .cs-ledger-label {
  color: rgba(0, 0, 0, 0.55);
}

[data-bs-theme="light"] .cs-section-label {
  color: #2d7a80;
}

@media (max-width: 767.98px) {
  [data-bs-theme="light"] .cs-ledger-item:nth-child(2) {
    border-inline-start-color: rgba(0, 0, 0, 0.08);
  }
}
