/* Case Study Styles */

.cs-hero {
  padding-top: 140px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 80px;
}
.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-light);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 48px;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.cs-back:hover { color: var(--text); }
.cs-back svg { transition: transform var(--transition); flex-shrink: 0; }
.cs-back:hover svg { transform: translateX(-4px); }

.cs-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }

.cs-title {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 400;
  max-width: 800px;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.1;
}
.cs-subtitle {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-mid);
  max-width: 620px;
  line-height: 1.7;
  margin-bottom: 48px;
}

.cs-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cs-meta-item {
  padding: 18px 20px;
  border-right: 1px solid var(--border);
}
.cs-meta-item:last-child { border-right: none; }
.cs-meta-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}
.cs-meta-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 400;
  line-height: 1.4;
}

/* Hero image */
.cs-hero-image {
  width: 100%;
  aspect-ratio: 16/7;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 80px;
}
.cs-hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-hero-image-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--border) 100%);
}
.cs-hero-image-placeholder span {
  font-family: var(--font-display);
  font-size: clamp(60px, 10vw, 120px);
  color: var(--border);
  font-weight: 400;
  opacity: 0.5;
}

/* Content layout — sidebar on desktop, stacked on mobile */
.cs-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 72px;
  align-items: start;
  margin-bottom: 80px;
}
.cs-body { min-width: 0; }
.cs-sidebar { position: sticky; top: 88px; }

/* Sidebar */
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 12px;
}
.sidebar-card-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 16px;
}
.sidebar-stat { margin-bottom: 20px; }
.sidebar-stat:last-child { margin-bottom: 0; }
.sidebar-stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.sidebar-stat-label {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* On mobile: sidebar becomes a horizontal strip above body */
.cs-sidebar-mobile-strip {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 48px;
}

/* Body content */
.cs-section { margin-bottom: 56px; }
.cs-section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}
.cs-section h2 {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.2;
}
.cs-section h3 {
  font-size: 19px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 10px;
  margin-top: 32px;
}
.cs-section p {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.8;
  margin-bottom: 16px;
}
.cs-section p strong { color: var(--text); font-weight: 500; }

/* Insight list */
.cs-insights { list-style: none; margin: 20px 0; }
.cs-insights li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.6;
}
.cs-insights li:first-child { border-top: 1px solid var(--border); }
.cs-insights li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 8px;
}

/* Data callout */
.cs-callout {
  background: var(--text);
  color: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  margin: 36px 0;
}
.cs-callout h3 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 24px;
  font-family: var(--font-body);
}
.cs-callout-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 20px;
}
.cs-callout-stat-value {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 400;
  color: var(--white);
  line-height: 1;
  margin-bottom: 6px;
}
.cs-callout-stat-value.accent { color: var(--accent); }
.cs-callout-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

/* Image blocks */
.cs-image {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  margin: 36px 0;
}
.cs-image img { width: 100%; height: auto; display: block; }
.cs-image-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
}
.cs-image-placeholder span {
  font-size: 13px;
  color: var(--text-light);
  letter-spacing: 0.05em;
  text-align: center;
  padding: 16px;
}
.cs-image-caption {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 10px;
  padding: 0 4px;
}

/* Image grid 2-up */
.cs-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 36px 0;
}

/* Video */
.cs-video {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--text);
  margin: 36px 0;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-video video { width: 100%; height: 100%; object-fit: contain; display: block; }
.cs-video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.4);
  padding: 24px;
  text-align: center;
}
.cs-video-placeholder svg { opacity: 0.4; flex-shrink: 0; }
.cs-video-placeholder span { font-size: 13px; letter-spacing: 0.05em; line-height: 1.5; }

/* Reflection block */
.cs-reflection {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  padding: 28px 32px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 36px 0;
}
.cs-reflection p {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.8;
  font-style: italic;
}

/* Next/prev nav */
.cs-nav {
  border-top: 1px solid var(--border);
  padding-top: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 80px;
}
.cs-nav-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.cs-nav-item:hover { border-color: var(--text); background: var(--bg-card); }
.cs-nav-dir {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
}
.cs-nav-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
}
.cs-nav-item.next { text-align: right; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .cs-layout { grid-template-columns: 1fr; gap: 0; }
  .cs-sidebar { display: none; }
  .cs-sidebar-mobile-strip { display: grid; }
  .cs-hero { padding-top: 110px; padding-bottom: 48px; margin-bottom: 48px; }
  .cs-hero-image { margin-bottom: 48px; aspect-ratio: 16/9; }
  .cs-meta-grid { grid-template-columns: 1fr 1fr; }
  .cs-meta-item:nth-child(2) { border-right: none; }
  .cs-meta-item:nth-child(3) { border-top: 1px solid var(--border); }
  .cs-meta-item:nth-child(4) { border-top: 1px solid var(--border); border-right: none; }
}

@media (max-width: 600px) {
  .cs-back { margin-bottom: 32px; }
  .cs-subtitle { margin-bottom: 32px; }
  .cs-meta-grid { grid-template-columns: 1fr 1fr; }
  .cs-image-grid { grid-template-columns: 1fr; }
  .cs-nav { grid-template-columns: 1fr; }
  .cs-nav-item.next { text-align: left; }
  .cs-callout { padding: 24px 20px; }
  .cs-reflection { padding: 20px 24px; }
  .cs-section h3 { font-size: 17px; }
}

@media (max-width: 400px) {
  .cs-meta-grid { grid-template-columns: 1fr; }
  .cs-meta-item { border-right: none; border-bottom: 1px solid var(--border); }
  .cs-meta-item:last-child { border-bottom: none; }
}
