/* ═══════════════════════════════════════════════════════════════
   Case Study — project detail page styles
   ═══════════════════════════════════════════════════════════════ */

/* ───────── HERO ───────── */
.cs-hero {
  position: relative;
  padding: 180px var(--pad-page) 80px;
  background: var(--mash-dusk-blue);
  color: var(--mash-anti-flash);
  overflow: hidden;
}
.cs-hero .eyebrow { color: var(--mash-grey-blue); }
.cs-hero h1 {
  font-size: var(--fs-mega);
  letter-spacing: -0.035em;
  font-weight: 600;
  line-height: 0.9;
  margin-top: 12px;
}
.cs-hero h1 em { font-style: italic; color: var(--mash-orange); }
.cs-hero__lede {
  margin-top: 28px;
  font-size: clamp(17px, 1.6vw, 21px);
  max-width: 640px;
  color: rgba(244,244,241,.7);
  line-height: 1.5;
}
.cs-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--mash-grey-blue);
  margin-bottom: 20px;
  transition: color .25s;
}
.cs-hero__back:hover { color: var(--mash-orange); }
.cs-hero__back svg { width: 16px; height: 16px; }

/* Hero stats ribbon */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid rgba(244,244,241,.15);
}
.cs-stat {
  opacity: 0;
  transform: translateY(16px);
  animation: cs-stat-in .7s var(--ease-out) forwards;
}
.cs-stat:nth-child(2) { animation-delay: .15s; }
.cs-stat:nth-child(3) { animation-delay: .3s; }
.cs-stat:nth-child(4) { animation-delay: .45s; }
@keyframes cs-stat-in {
  to { opacity: 1; transform: none; }
}
.cs-stat__n {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: white;
}
.cs-stat__l {
  font-size: 14px;
  color: var(--mash-grey-blue);
  margin-top: 8px;
}

/* ───────── OVERVIEW ───────── */
.cs-overview {
  padding-top: 100px;
  padding-bottom: 100px;
  border-bottom: 1px solid var(--rule);
}
.cs-overview__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 80px;
  align-items: start;
}
.cs-overview h2 {
  font-size: var(--fs-h2);
  margin-bottom: 24px;
}
.cs-overview h2 em { font-style: italic; color: var(--mash-orange); }
.cs-overview__body {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.cs-overview__body p + p { margin-top: 16px; }

.cs-sidebar {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: var(--paper-plain);
}
.cs-sidebar__row {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.cs-sidebar__row:first-child { padding-top: 0; }
.cs-sidebar__row:last-child { border-bottom: 0; padding-bottom: 0; }
.cs-sidebar__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.cs-sidebar__val {
  font-size: 15px;
  font-weight: 500;
}
.cs-sidebar__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cs-sidebar__chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  background: color-mix(in srgb, var(--mash-orange) 10%, transparent);
  color: var(--mash-orange);
}

/* ───────── SECTION (reusable) ───────── */
.cs-section {
  padding-top: 100px;
  padding-bottom: 100px;
  border-bottom: 1px solid var(--rule);
}
.cs-section--dark {
  background: var(--mash-cosmo-black);
  color: var(--mash-anti-flash);
  border-bottom: 0;
}
.cs-section--dark .eyebrow { color: var(--mash-grey-blue); }
.cs-section__head {
  margin-bottom: 48px;
}
.cs-section__head h2 {
  font-size: var(--fs-h1);
  margin-top: 12px;
}
.cs-section__head h2 em { font-style: italic; color: var(--mash-orange); }
.cs-section__body {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 720px;
  margin-bottom: 48px;
}
.cs-section--dark .cs-section__body { color: rgba(244,244,241,.65); }

/* ───────── INSIGHT CARDS ───────── */
.cs-insights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cs-insight {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 32px;
  background: var(--paper-plain);
  transition: transform .3s var(--ease-out);
}
.cs-insight:hover { transform: translateY(-4px); }
.cs-insight__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  color: var(--mash-orange);
}
.cs-insight h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.cs-insight p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ───────── GALLERY ───────── */
.cs-gallery {
  display: grid;
  gap: 20px;
}
.cs-gallery--hero {
  grid-template-columns: 1fr;
}
.cs-gallery--pair {
  grid-template-columns: 1fr 1fr;
  margin-top: 20px;
}
.cs-gallery__img {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-gallery--hero .cs-gallery__img {
  aspect-ratio: 21 / 9;
}
.cs-gallery--pair .cs-gallery__img {
  aspect-ratio: 4 / 3;
}
.cs-gallery__img img {
  position: absolute;
  width: 35%;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.2));
}
.cs-gallery__caption {
  position: absolute;
  bottom: 16px;
  left: 20px;
  font-size: 12px;
  color: white;
  background: rgba(0,0,0,.4);
  padding: 6px 12px;
  border-radius: 6px;
  backdrop-filter: blur(6px);
}

/* ───────── BAR CHART (horizontal) ───────── */
.cs-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 60px;
}
.cs-bar-chart__title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.cs-bar {
  display: grid;
  grid-template-columns: 90px 1fr 60px;
  gap: 16px;
  align-items: center;
}
.cs-bar__label {
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}
.cs-bar__track {
  height: 32px;
  background: rgba(255,255,255,.08);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.cs-section:not(.cs-section--dark) .cs-bar__track {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.cs-bar__fill {
  height: 100%;
  border-radius: 6px;
  background: var(--mash-orange);
  width: 0;
  transition: width 1.2s var(--ease-out);
}
.reveal.in .cs-bar__fill { width: var(--val); }
.reveal.in .cs-bar:nth-child(2) .cs-bar__fill { transition-delay: .1s; }
.reveal.in .cs-bar:nth-child(3) .cs-bar__fill { transition-delay: .2s; }
.reveal.in .cs-bar:nth-child(4) .cs-bar__fill { transition-delay: .3s; }
.reveal.in .cs-bar:nth-child(5) .cs-bar__fill { transition-delay: .4s; }
.reveal.in .cs-bar:nth-child(6) .cs-bar__fill { transition-delay: .5s; }
.cs-bar__fill--accent { background: var(--mash-teal); }
.cs-bar__val {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity .4s .6s;
}
.reveal.in .cs-bar__val { opacity: 1; }

/* ───────── METRICS ROW ───────── */
.cs-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}
.cs-metric {
  padding: 28px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  text-align: center;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.reveal.in .cs-metric { opacity: 1; transform: none; }
.reveal.in .cs-metric:nth-child(2) { transition-delay: .1s; }
.reveal.in .cs-metric:nth-child(3) { transition-delay: .2s; }
.reveal.in .cs-metric:nth-child(4) { transition-delay: .3s; }
.cs-section:not(.cs-section--dark) .cs-metric {
  border-color: var(--rule);
  background: var(--paper-plain);
}
.cs-metric__n {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}
.cs-metric__l {
  font-size: 13px;
  color: var(--mash-grey-blue);
  margin-top: 8px;
}
.cs-section:not(.cs-section--dark) .cs-metric__l { color: var(--ink-soft); }

/* ───────── WEEK CHART (vertical bars) ───────── */
.cs-week-chart {
  margin-top: 20px;
}
.cs-week-chart__title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 20px;
}
.cs-week-chart__bars {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  align-items: end;
  height: 200px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  position: relative;
}
.cs-section:not(.cs-section--dark) .cs-week-chart__bars {
  border-bottom-color: var(--rule);
}
.cs-week-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}
.cs-week-bar__col {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: var(--mash-orange);
  height: 0;
  min-height: 0;
  transition: height 1s var(--ease-out);
  position: relative;
}
.reveal.in .cs-week-bar__col { height: var(--h); min-height: 8px; }
.reveal.in .cs-week-bar:nth-child(2) .cs-week-bar__col { transition-delay: .08s; }
.reveal.in .cs-week-bar:nth-child(3) .cs-week-bar__col { transition-delay: .16s; }
.reveal.in .cs-week-bar:nth-child(4) .cs-week-bar__col { transition-delay: .24s; }
.reveal.in .cs-week-bar:nth-child(5) .cs-week-bar__col { transition-delay: .32s; }
.reveal.in .cs-week-bar:nth-child(6) .cs-week-bar__col { transition-delay: .40s; }
.reveal.in .cs-week-bar:nth-child(7) .cs-week-bar__col { transition-delay: .48s; }
.reveal.in .cs-week-bar:nth-child(8) .cs-week-bar__col { transition-delay: .56s; }
.cs-week-bar__col--alt { background: var(--mash-teal); }
.cs-week-bar__val {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity .4s var(--ease-out);
}
.reveal.in .cs-week-bar__val { opacity: 1; transition-delay: .8s; }
.cs-week-chart__labels {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.cs-week-chart__labels span {
  text-align: center;
  font-size: 12px;
  color: var(--mash-grey-blue);
}

/* ───────── SOCIAL POSTS ───────── */
.cs-social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}
.cs-social-post {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,.04);
  transition: transform .3s var(--ease-out);
}
.cs-section:not(.cs-section--dark) .cs-social-post {
  border-color: var(--rule);
  background: var(--paper-plain);
}
.cs-social-post {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.reveal.in .cs-social-post { opacity: 1; transform: none; }
.reveal.in .cs-social-post:nth-child(2) { transition-delay: .15s; }
.reveal.in .cs-social-post:nth-child(3) { transition-delay: .3s; }
.cs-social-post:hover { transform: translateY(-4px); }
.cs-social-post__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
}
.cs-social-post__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
  color: white;
}
.cs-social-post__icon--ig { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.cs-social-post__icon--yt { background: #FF0000; }
.cs-social-post__icon--tw { background: #000000; }
.cs-social-post__acct {
  font-size: 13px;
  font-weight: 600;
}
.cs-social-post__handle {
  font-size: 12px;
  color: var(--mash-grey-blue);
}
.cs-social-post__media {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cs-social-post__media img {
  width: 40%;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.2));
}
.cs-social-post__body {
  padding: 16px;
}
.cs-social-post__caption {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255,255,255,.7);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cs-section:not(.cs-section--dark) .cs-social-post__caption { color: var(--ink-soft); }
.cs-social-post__eng {
  display: flex;
  gap: 20px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  color: var(--mash-grey-blue);
}
.cs-section:not(.cs-section--dark) .cs-social-post__eng { border-top-color: var(--rule); }
.cs-social-post__eng strong {
  color: white;
  font-weight: 600;
  margin-right: 4px;
}
.cs-section:not(.cs-section--dark) .cs-social-post__eng strong { color: var(--ink); }

/* Channel breakdown */
.cs-channels {
  margin-top: 20px;
}
.cs-channels__title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 20px;
}
.cs-channel {
  display: grid;
  grid-template-columns: 100px 1fr 50px;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
}
.cs-channel__name {
  font-size: 14px;
  font-weight: 500;
}
.cs-channel__track {
  height: 10px;
  background: rgba(255,255,255,.08);
  border-radius: 5px;
  overflow: hidden;
}
.cs-section:not(.cs-section--dark) .cs-channel__track {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.cs-channel__fill {
  height: 100%;
  border-radius: 5px;
  width: 0;
  transition: width 1s var(--ease-out);
}
.reveal.in .cs-channel__fill { width: var(--val); }
.reveal.in .cs-channel:nth-child(2) .cs-channel__fill { transition-delay: .1s; }
.reveal.in .cs-channel:nth-child(3) .cs-channel__fill { transition-delay: .2s; }
.reveal.in .cs-channel:nth-child(4) .cs-channel__fill { transition-delay: .3s; }
.reveal.in .cs-channel:nth-child(5) .cs-channel__fill { transition-delay: .4s; }
.reveal.in .cs-channel:nth-child(6) .cs-channel__fill { transition-delay: .5s; }
.cs-channel__fill--ig { background: #e6683c; }
.cs-channel__fill--yt { background: #FF0000; }
.cs-channel__fill--tw { background: #1DA1F2; }
.cs-channel__fill--tk { background: #000000; }
.cs-channel__fill--ooh { background: var(--mash-teal); }
.cs-channel__pct {
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ───────── QUOTE ───────── */
.cs-quote {
  position: relative;
  padding: 60px 0;
}
.cs-quote__mark {
  font-family: var(--font-display);
  font-size: 120px;
  line-height: 0.6;
  color: var(--mash-orange);
  opacity: .3;
  position: absolute;
  top: 40px;
  left: -10px;
}
.cs-quote blockquote {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 500;
  max-width: 800px;
  margin: 0;
  padding-left: 40px;
  border-left: 3px solid var(--mash-orange);
}
.cs-quote__cite {
  margin-top: 24px;
  padding-left: 40px;
  font-size: 15px;
}
.cs-quote__name {
  font-weight: 600;
}
.cs-quote__role {
  color: var(--ink-soft);
  margin-top: 2px;
}

/* ───────── PAGER ───────── */
.cs-pager {
  padding: 48px 0;
  border-top: 1px solid var(--rule);
}
.cs-pager__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cs-pager__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.cs-pager__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.5vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: color .25s;
}
.cs-pager a:hover .cs-pager__title { color: var(--mash-orange); }
.cs-pager__arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .25s, border-color .25s;
}
.cs-pager a:hover .cs-pager__arrow {
  background: var(--mash-orange);
  border-color: var(--mash-orange);
  color: white;
}
.cs-pager__arrow svg { width: 20px; height: 20px; }

/* ───────── RESPONSIVE ───────── */
@media (max-width: 900px) {
  .cs-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .cs-overview__grid { grid-template-columns: 1fr; gap: 40px; }
  .cs-insights { grid-template-columns: 1fr; }
  .cs-gallery--pair { grid-template-columns: 1fr; }
  .cs-metrics { grid-template-columns: repeat(2, 1fr); }
  .cs-social-grid { grid-template-columns: 1fr; }
  .cs-week-chart__bars { height: 150px; }
}
@media (max-width: 640px) {
  .cs-stats { grid-template-columns: 1fr 1fr; }
  .cs-metrics { grid-template-columns: 1fr 1fr; }
  .cs-bar { grid-template-columns: 70px 1fr 50px; }
}
