/* ============ CASE STUDIES ============ */
.case-studies { padding-top: 60px; }
.cs-list { display: flex; flex-direction: column; gap: 40px; max-width: 1240px; margin: 0 auto; text-align: left; }
.cs-card {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 0;
  background: var(--grad-dark); border: 1px solid var(--border); border-radius: 28px; overflow: hidden;
}
.cs-card.cs-flip .cs-media { order: 2; }

.cs-media {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1.6fr 1fr;
  gap: 6px; padding: 6px; min-height: 560px;
}
.cs-img { position: relative; overflow: hidden; border-radius: 22px; background: var(--s3); }
.cs-img-main { grid-column: 1 / -1; }
.cs-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.cs-card:hover .cs-img img { transform: scale(1.04); }
.cs-chaplin .cs-img-main img { object-position: center 20%; }
.cs-logo-badge {
  position: absolute; top: 22px; left: 22px; z-index: 2;
  padding: 12px 18px; border-radius: 14px;
  background: rgba(0,0,0,0.62); border: 1px solid var(--border-strong);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.cs-logo-badge img { height: 26px; width: auto; }
.cs-blakes .cs-logo-badge img { height: 36px; }
.cs-chaplin .cs-logo-badge img { height: 20px; }

.cs-body { padding: 48px 48px 44px; display: flex; flex-direction: column; }
.cs-meta { display: flex; justify-content: space-between; align-items: center; }
.cs-cat {
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold);
  padding: 6px 14px; border: 1px solid rgba(255,215,0,0.25); border-radius: 999px; background: rgba(255,215,0,0.04);
}
.cs-num { font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }
.cs-name { font-size: clamp(28px, 3.2vw, 40px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin-top: 22px; }
.cs-head { font-size: 17px; font-weight: 500; color: var(--white); margin-top: 10px; }
.cs-desc { font-size: 14.5px; line-height: 1.65; color: var(--muted-strong); margin-top: 12px; }
.cs-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.cs-tags span { font-size: 12px; color: var(--muted-strong); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); }

.cs-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 28px; }
.cs-stat { padding: 16px 14px; border-radius: 16px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); }
.cs-stat strong {
  display: block; font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; letter-spacing: -0.03em; line-height: 1;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.cs-stat span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.3; }

.cs-chart { margin: 24px 0 0; padding: 22px 22px 18px; border-radius: 18px; background: rgba(0,0,0,0.45); border: 1px solid var(--border); }
.cs-chart figcaption { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.cs-chart-title { font-size: 13px; font-weight: 600; }
.cs-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.cs-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cs-legend i.lg-after { margin-left: 10px; background: var(--gold); }
.cs-legend i.lg-before { background: #4A4A4A; }

.cs-row + .cs-row { margin-top: 14px; }
.cs-row-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted-strong); margin-bottom: 6px; }
.cs-row-label em { font-style: normal; font-weight: 600; color: var(--gold); }
.cs-bars { display: flex; flex-direction: column; gap: 4px; padding-right: 36px; }
.cs-bar {
  position: relative; height: 12px; border-radius: 4px; width: 0;
  transition: width 1.2s var(--ease) 0.3s;
}
.cs-bar-before { background: #4A4A4A; }
.cs-bar-after { background: var(--grad-cta); transition-delay: 0.5s; }
.cs-bar span {
  position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  font-size: 10.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.cs-bar-after span { color: var(--white); font-weight: 600; }
.cs-card.in .cs-bar { width: var(--w); }

.cs-roas-track { position: relative; height: 12px; border-radius: 4px; background: rgba(255,255,255,0.06); margin-bottom: 18px; }
.cs-roas-fill { height: 100%; width: 0; border-radius: 4px; background: var(--grad-cta); transition: width 1.2s var(--ease) 0.7s; }
.cs-card.in .cs-roas-fill { width: var(--w); }
.cs-roas-tick { position: absolute; top: 18px; left: 25%; transform: translateX(-50%); font-size: 10px; color: var(--muted); }
.cs-roas-tick::before { content: ''; position: absolute; left: 50%; top: -18px; width: 1px; height: 12px; background: rgba(0,0,0,0.6); }
.cs-roas-tick.t2 { left: 50%; } .cs-roas-tick.t3 { left: 75%; } .cs-roas-tick.t4 { left: 100%; transform: translateX(-100%); }
.cs-roas-tick.t4::before { left: auto; right: 0; }

@media (max-width: 1000px) {
  .cs-card { grid-template-columns: 1fr; }
  .cs-card.cs-flip .cs-media { order: 0; }
  .cs-media { min-height: 0; grid-template-rows: 320px 180px; }
  .cs-body { padding: 36px 28px 32px; }
}
@media (max-width: 560px) {
  .cs-list { gap: 28px; }
  .cs-card { border-radius: 22px; }
  .cs-media { grid-template-rows: 240px 130px; }
  .cs-img { border-radius: 16px; }
  .cs-logo-badge { top: 16px; left: 16px; padding: 10px 14px; }
  .cs-body { padding: 28px 20px 24px; }
  .cs-stats { grid-template-columns: repeat(2, 1fr); }
  .cs-chart { padding: 18px 16px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-bar, .cs-roas-fill { transition: none; }
}

/* Deliverables list (used instead of stats when there are no figures) */
.cs-deliver { margin-top: 28px; padding: 22px; border-radius: 18px; background: rgba(0,0,0,0.45); border: 1px solid var(--border); }
.cs-deliver ul { list-style: none; margin-top: 16px; display: flex; flex-direction: column; gap: 16px; }
.cs-deliver li { display: flex; gap: 14px; align-items: flex-start; }
.cs-check { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #000; background: var(--grad-cta); }
.cs-check svg { width: 13px; height: 13px; }
.cs-deliver strong { display: block; font-size: 14.5px; font-weight: 600; }
.cs-deliver p { font-size: 13.5px; line-height: 1.55; color: var(--muted-strong); margin-top: 4px; }

@media (max-width: 560px) {
  .cs-deliver { padding: 18px 16px; }
}

/* Text-only case study (no media panel) */
.cs-card.cs-text-only { grid-template-columns: 1fr; }
.cs-text-only .cs-body { padding: 48px 56px 44px; }
.cs-text-only .cs-deliver ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1000px) {
  .cs-text-only .cs-body { padding: 36px 28px 32px; }
  .cs-text-only .cs-deliver ul { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 560px) { .cs-text-only .cs-body { padding: 28px 20px 24px; } }
.cs-brand-row { display: flex; align-items: center; gap: 28px; margin-top: 24px; }
.cs-brand-row .cs-name { margin-top: 0; }
.cs-inline-logo {
  flex: none; display: grid; place-items: center; width: 168px; height: 136px; border-radius: 20px;
  background: rgba(0,0,0,0.55); border: 1px solid var(--border-strong);
}
.cs-inline-logo img { width: 124px; height: auto; }
@media (max-width: 560px) {
  .cs-brand-row { flex-direction: column; align-items: flex-start; gap: 20px; }
  .cs-inline-logo { width: 136px; height: 112px; border-radius: 16px; }
  .cs-inline-logo img { width: 100px; }
}
