/* Carey Creative — social media case study pages (work/social-case-study.njk).
   Loads after case-study.css and shares the case study hero, headings, badges,
   closing statement and final CTA. Words typed as *italic* in the editor
   become italic accents in headings. */

.sc-head { gap: 18px; align-items: flex-start; }
.sc-head--narrow { max-width: 640px; }
.sc-copy { gap: 18px; }
.sc-copy .body-copy, .sc-head .body-copy { font-size: 15px; }
.body-copy strong { font-weight: 700; color: var(--text-primary); }
.section--dark .body-copy strong { color: var(--text-onDark); }

/* ---------- Outcome stats ---------- */
.sc-outcome { background: var(--ink-800); color: var(--text-onDark); padding-top: 72px; padding-bottom: 72px; }
.sc-outcome__inner { gap: 32px; }
.sc-stats { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 28px 32px; }
.sc-stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 10px; }
.sc-stat__value {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(38px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -.01em;
}
.sc-stat__value span { font-size: .5em; margin-left: 2px; }
.sc-stat__label { font-size: 13px; color: var(--text-onDark-muted); }
.sc-outcome__summary { margin: 0; max-width: 680px; font-size: 15px; line-height: 1.7; color: var(--text-onDark-muted); }

/* ---------- Challenge ---------- */
.sc-challenge { align-items: start; }
.sc-quote {
  margin: 12px 0 0;
  padding: 26px 32px;
  background: var(--paper);
  border-left: 3px solid var(--indigo-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.sc-quote p { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 19px; line-height: 1.5; }

/* ---------- Strategy ---------- */
.sc-strategy { gap: 48px; }
.sc-pillars {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 24px 16px;
}
.sc-pillars li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.sc-pillars__num { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--text-muted); }

.sc-published { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px 56px; align-items: center; }
.sc-published__label {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(22px, 2.2vw, 26px);
  line-height: 1.15;
  letter-spacing: -.02em;
}
.sc-counts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sc-count {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 8px;
  padding: 26px 24px 30px;
  border-radius: var(--radius-sm);
  background: var(--cream-50);
}
.sc-count dd { margin: 0; font-family: var(--font-display); font-weight: 900; font-size: 40px; line-height: 1; }
.sc-count dt { font-size: 13px; color: var(--text-secondary); }
.sc-count--dark { background: var(--ink-950); color: var(--text-onDark); }
.sc-count--dark dt { color: var(--text-onDark-muted); }

/* ---------- Proof in the feed ---------- */
.sc-feed { gap: 48px; }
/* One full-width row of posts, centred on a line. Each card keeps its media's
   own shape (placeholders without an upload stay square). js/feed-row.js
   repeats the posts and drifts the row slowly left, pausing on hover or focus;
   the arrows below give it bursts of speed. Without it, or for visitors who prefer reduced motion, the row scrolls by
   hand instead. The edges fade into the section. */
.sc-feed__row {
  --post-w: 280px;
  --post-gap: 16px;
  margin: 48px -24px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.sc-feed__row::-webkit-scrollbar { display: none; }
.sc-feed__track {
  margin: 0;
  padding: 0 24px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--post-gap);
  width: max-content;
}
.sc-feed__row.is-drifting { overflow: hidden; }
.sc-feed__row.is-drifting .sc-feed__track {
  padding: 0;
  will-change: transform;
}
/* Arrows under the row: each click speeds the drift up that way for a moment. */
.sc-feed__nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.sc-feed__nav[hidden] { display: none; }
.sc-feed__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: transparent;
  color: var(--cream-50);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}
.sc-feed__btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .4); }
.sc-feed__btn:active { background: rgba(255, 255, 255, .2); }
.sc-feed__btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.sc-feed__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sc-post {
  flex: 0 0 var(--post-w);
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--ink-800);
}
.sc-post img, .sc-post__video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}
/* Every reel tile has the same shape, whatever its video or cover image; both
   are cropped to fill it. The viewer shows the whole video. */
.sc-post .sc-post__video { aspect-ratio: 17 / 25; object-fit: cover; }
.sc-post .asset-slot { width: 100%; aspect-ratio: 1 / 1; height: auto; padding-top: 44px; border-radius: 0; border-color: var(--ink-600); background: var(--ink-800); color: var(--text-onDark-muted); }
.sc-post__platform {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(11, 11, 9, .72);
  color: var(--cream-50);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
}
/* Carousel posts: Instagram's stacked-squares icon and the slide count. */
.sc-post__carousel {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: rgba(11, 11, 9, .72);
  color: var(--cream-50);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
}
.sc-post__carousel svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Carousel tiles fade through their slides (js/feed-carousel.js), stacked
   over the cover so the tile keeps the cover's shape. */
.sc-post__deck { position: absolute; inset: 0; }
.sc-post .sc-post__deck img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .9s ease;
}
.sc-post .sc-post__deck img.is-up { opacity: 1; }
.sc-post__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 5px;
}
.sc-post__dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  box-shadow: 0 0 3px rgba(11, 11, 9, .4);
  transition: background-color .3s ease;
}
.sc-post__dots i.is-up { background: var(--cream-50); }
/* Reels: a play button over the still cover; they play in the viewer. */
.sc-post__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(11, 11, 9, .6);
  border: 1px solid rgba(255, 255, 255, .3);
  color: var(--cream-50);
  transform: translate(-50%, -50%);
  transition: background-color .2s ease, transform .2s ease;
  pointer-events: none;
}
.sc-post__play svg { width: 24px; height: 24px; margin-left: 3px; fill: currentColor; }
.sc-post:hover .sc-post__play { background: rgba(11, 11, 9, .8); transform: translate(-50%, -50%) scale(1.06); }
.sc-post__open {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  transition: background-color .2s ease;
}
.sc-post__open:hover { background: rgba(11, 11, 9, .12); }
.sc-post__open:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -4px; border-radius: var(--radius-md); }

/* Full-size viewer opened from the feed (js/feed-lightbox.js). */
.sc-lightbox-open { overflow: hidden; }
.sc-lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cream-50);
}
.sc-lightbox::backdrop { background: rgba(11, 11, 9, .92); }
.sc-lightbox__stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 80px;
  box-sizing: border-box;
}
.sc-lightbox__media {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--ink-800);
}
/* A carousel in the viewer: a row of slides that snaps one at a time (swipe,
   trackpad or the arrows), with dots beneath. */
.sc-lightbox__carousel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sc-lightbox__track {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.sc-lightbox__track::-webkit-scrollbar { display: none; }
.sc-lightbox__slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.sc-lightbox__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.sc-lightbox__dot {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.sc-lightbox__dot::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  margin: auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
  transition: background-color .2s ease, transform .2s ease;
}
.sc-lightbox__dot[aria-current="true"]::before { background: var(--cream-50); transform: scale(1.2); }
.sc-lightbox__dot:focus-visible { outline: 2px solid var(--focus-ring); border-radius: 50%; }
.sc-lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: rgba(11, 11, 9, .6);
  color: var(--cream-50);
  cursor: pointer;
  transition: background-color .2s ease;
}
.sc-lightbox__btn:hover { background: rgba(255, 255, 255, .16); }
.sc-lightbox__btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.sc-lightbox__btn[hidden] { display: none; }
.sc-lightbox__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sc-lightbox__close { top: 12px; right: 12px; }
.sc-lightbox__prev, .sc-lightbox__next { top: 50%; transform: translateY(-50%); }
.sc-lightbox__prev { left: 16px; }
.sc-lightbox__next { right: 16px; }
.sc-lightbox__count {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--text-onDark-muted);
  pointer-events: none; /* sits over the arrows on phones; let taps through */
}

/* ---------- Performance by channel ---------- */
.sc-channels { gap: 56px; }
.sc-channels__head { align-items: start; }
.sc-channels__title { font-size: clamp(36px, 4.6vw, 60px); line-height: 1.05; }
.sc-channels__intro { margin: 0; padding-top: 40px; font-size: 17px; line-height: 1.75; color: var(--text-secondary); }

/* Role cards: odd cards are light/indigo, even cards dark/orange. */
.sc-roles { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 24px 40px; }
.sc-role {
  --role-bg: var(--paper);
  --role-fg: var(--ink-950);
  --role-accent: var(--indigo-500);
  --role-soft: var(--indigo-300);
  --role-tag-bg: var(--indigo-100);
  --role-tag-fg: var(--indigo-500);
  --role-track: var(--oat-100);
  --role-rule: var(--border-subtle);
  --role-muted: var(--ink-600);
  display: flex;
  flex-direction: column;
  padding: 64px 68px 68px;
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--role-accent);
  border-radius: 20px;
  background: var(--role-bg);
  color: var(--role-fg);
  box-shadow: 0 24px 48px -28px rgba(11, 11, 9, .22);
}
.sc-role--dark {
  --role-bg: var(--ink-950);
  --role-fg: var(--cream-50);
  --role-accent: var(--orange-500);
  --role-soft: #a0693a;
  --role-tag-bg: var(--orange-500);
  --role-tag-fg: var(--ink-950);
  --role-track: #2a2a26;
  --role-rule: var(--border-onDark);
  --role-muted: var(--text-onDark-muted);
  border-color: var(--ink-950);
  border-top-color: var(--orange-500);
}
.sc-role__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sc-role__channel { margin: 0; font-family: var(--font-body); font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.sc-role__tag {
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  background: var(--role-tag-bg);
  color: var(--role-tag-fg);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.sc-role__headline {
  margin: 40px 0 0;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--role-rule);
  font-family: var(--font-display);
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.01em;
}
.sc-role__metrics { margin: 36px 0 0; display: flex; flex-direction: column; gap: 28px; }
.sc-metric { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 14px 16px; }
.sc-metric dd { margin: 0; }
.sc-metric__label { font-size: 16px; font-weight: 500; }
.sc-metric__tag { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--role-muted); }
.sc-metric--primary .sc-metric__tag { color: var(--role-accent); }
.sc-metric__bar { grid-column: 1 / -1; height: 10px; border-radius: var(--radius-pill); background: var(--role-track); overflow: hidden; }
.sc-metric__bar span { display: block; height: 100%; border-radius: inherit; background: var(--role-soft); }
.sc-metric--primary .sc-metric__bar span { background: var(--role-accent); }

/* ---------- Why it worked ---------- */
.sc-why { background: linear-gradient(90deg, #b6a3de 0%, #d6b6c8 50%, #f2d2b4 85%, #f6dcc4 100%); }
.sc-why__inner { gap: 40px; }
.sc-why .h2 { color: var(--ink-950); }
.sc-why__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 24px 48px; }
.sc-why__card { padding: 28px 32px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .55); }
.sc-why__card .body-copy { font-size: 15px; color: var(--ink-800); }

/* ---------- What this proves ---------- */
.sc-proves { align-items: start; }
.sc-questions { margin: 4px 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sc-questions li { font-family: var(--font-display); font-style: italic; font-size: 19px; color: var(--orange-500); }
.sc-proves__closing { font-size: 14px !important; }

/* ---------- Takeaway ---------- */
.sc-footnote { margin: 12px 0 0; padding-top: 18px; border-top: 1px solid var(--border-subtle); font-size: 12px; line-height: 1.6; color: var(--text-muted); }

@media (max-width: 860px) {
  .sc-channels__intro { padding-top: 0; }
  .sc-role { padding: 40px 32px 44px; }
  .sc-published { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .sc-feed__row { --post-w: 190px; --post-gap: 10px; }
  .sc-post { border-radius: var(--radius-sm); }
  .sc-post__platform { top: 6px; left: 6px; padding: 3px 7px; font-size: 9px; }
  .sc-post__carousel { top: 6px; right: 6px; padding: 3px 7px; gap: 3px; font-size: 9px; }
  .sc-post__carousel svg { width: 11px; height: 11px; }
  .sc-post__dots { bottom: 6px; gap: 4px; }
  .sc-post__dots i { width: 5px; height: 5px; }
  .sc-post__play { width: 38px; height: 38px; }
  .sc-post__play svg { width: 17px; height: 17px; margin-left: 2px; }
  .sc-post .asset-slot { padding: 28px 8px 8px; gap: 4px; }
  .sc-post .asset-slot__tag { font-size: 9px; }
  .sc-post .asset-slot__desc { font-size: 11px; line-height: 1.35; }
  .sc-lightbox__stage { padding: 64px 12px 56px; }
  .sc-lightbox__prev, .sc-lightbox__next { top: auto; bottom: 8px; transform: none; }
  .sc-stats { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .sc-stat__value { font-size: 34px; }
  .sc-quote { padding: 20px 22px; }
}
