/* ==========================================================================
   Case Study Pages
   Extends style.css — same sidebar, content area, tokens, fonts
   ========================================================================== */

/* ---------- Case Study Sidebar ---------- */
.cs-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--neutral-750, #352F2F);
  margin-bottom: 32px;
  transition: color 0.15s ease;
}

.cs-back svg {
  flex-shrink: 0;
  position: relative;
  top: -0.5px;
}

.cs-back svg path {
  fill: currentColor;
}

.cs-back:hover {
  color: var(--neutral-950, #0F0A0A);
}

.cs-back:hover svg {
  animation: back-arrow-nudge 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

@keyframes back-arrow-nudge {
  0%   { transform: translateX(0); }
  30%  { transform: translateX(-6px); }
  60%  { transform: translateX(2px); }
  80%  { transform: translateX(-1px); }
  100% { transform: translateX(0); }
}

.cs-back:active {
  opacity: 0.64;
}

.cs-back-mobile {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 17px;
  font-weight: 600;
  color: var(--neutral-750, #352F2F);
  transition: color 0.15s ease;
}

.cs-back-mobile svg {
  flex-shrink: 0;
  position: relative;
  top: -0.5px;
}

.cs-back-mobile svg path {
  fill: currentColor;
}

.cs-back-mobile:hover {
  color: var(--neutral-950, #0F0A0A);
}

.cs-back-mobile:hover svg {
  animation: back-arrow-nudge 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.cs-back-mobile:active {
  opacity: 0.64;
}

/* ---------- Case Study Hero ---------- */
.cs-hero {
  padding-top: 154px;
  padding-bottom: 0;
}

.cs-hero__meta {
  display: flex;
  align-items: center;
  font-size: 17px;
  font-weight: 400;
  line-height: 21.76px;
  letter-spacing: -0.5px;
  color: var(--neutral-500);
  margin-bottom: 16px;
}

.cs-hero__role {
  color: var(--neutral-500);
}

.cs-hero__dot {
  color: var(--neutral-400);
}

.cs-hero__year {
  color: var(--neutral-500);
}

.cs-hero__title {
  font-size: clamp(48px, 7vw, 72px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -3px;
  color: var(--text);
  margin-bottom: 12px;
}

.cs-hero__title--logo {
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
}

.cs-hero__logo-link {
  display: block;
  flex-shrink: 0;
  line-height: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cs-hero__logo-link:hover {
  opacity: 0.72;
  transform: scale(1.02);
}

.cs-hero__logo {
  height: clamp(48px, 7vw, 72px);
  width: auto;
  display: block;
}

.cs-hero__year-badge {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: rgba(0, 46, 113, 0.64);
  background: rgba(209, 227, 255, 0.72);
  padding: 5.5px 10px 4px;
  box-shadow: inset 0 1px 0 0 rgba(11, 72, 158, 0.06);
  border-radius: 100px;
  white-space: nowrap;
  margin-top: 4px;
}

.cs-hero__subtitle {
  font-size: 24px;
  font-weight: 400;
  line-height: 33.6px;
  letter-spacing: -0.7px;
  color: var(--neutral-500);
  margin-bottom: 40px;
}

.cs-hero__intro {
  font-size: 24px;
  font-weight: 400;
  line-height: 33.6px;
  letter-spacing: -0.7px;
  color: var(--text-body);
  margin-bottom: 29px;
}

.cs-hero__intro p {
  margin: 0;
}

.cs-hero__contributions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Tag tooltip */
.cs-tag-tip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: #181212;
  color: #F5F0F0;
  font-family: 'UCity Pro', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.2px;
  padding: 10px 14px;
  border-radius: 10px;
  max-width: 280px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cs-tag-tip--visible {
  opacity: 1;
  transform: translateY(0);
}

.cs-hero__tag {
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: -0.3px;
  color: var(--neutral-600);
  background: var(--neutral-25);
  border-radius: 100px;
  padding: 6px 14px;
  box-shadow: inset 0 1px 0 0 rgba(24, 18, 18, 0.05);
  will-change: transform;
}

.cs-hero__tag[data-tip] {
  cursor: default;
}

/* ---------- Case Study Sections ---------- */
.cs-section {
  padding-top: 117px;
}

.cs-heading {
  font-size: 40px;
  font-weight: 600;
  line-height: 41.6px;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.cs-body {
  font-size: 20px;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: -0.5px;
  color: var(--text-body);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Intro and outcome keep 24px, full width */
.cs-hero__intro,
#outcome .cs-body {
  font-size: 24px;
  line-height: 140%;
  letter-spacing: -0.7px;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

#outcome .cs-body .cs-list li {
  font-size: 24px;
  line-height: 140%;
  letter-spacing: -0.7px;
}

#outcome .cs-heading {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.cs-body p {
  margin: 0 0 8px;
}

.cs-body p:last-child {
  margin-bottom: 0;
}

/* Challenge / Solution / Impact labels */
.cs-label {
  display: block;
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  margin-top: 32px;
}

.cs-label:first-child {
  margin-top: 0;
}

.cs-body .cs-label {
  margin-top: 32px;
}

.cs-body .cs-label:first-child {
  margin-top: 0;
}

.cs-body .cs-list {
  margin: 0;
}

.cs-body .cs-list li {
  font-size: 20px;
  line-height: 30px;
  letter-spacing: -0.5px;
}

.cs-body .cs-list + .cs-label {
  margin-top: 32px;
}

.cs-body .cs-list li strong {
  font-weight: 600;
  color: var(--text);
}

/* ---------- Body Note (scope callout) ---------- */
.cs-body--note {
  padding: 24px 28px;
  background: var(--neutral-25);
  border-radius: 16px;
  font-size: 20px;
  line-height: 30px;
  letter-spacing: -0.5px;
  color: var(--neutral-600);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.cs-body--note p {
  margin: 0;
}

/* ---------- Focus Items ---------- */
.cs-focus-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.cs-focus-item {
  padding: 18px 24px 16px;
  background: rgba(239, 246, 255, 0.8);
  border-radius: 20px;
  transition: background 0.2s ease;
}

.cs-focus-item:hover {
  background: transparent;
}

.cs-focus-item__title {
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 5px;
}

.cs-focus-list--outline .cs-focus-item {
  background: none;
  border: 1px solid rgba(232, 227, 227, 0.8);
  transition: border-color 0.2s ease;
}

.cs-focus-list--outline .cs-focus-item:hover {
  border-color: transparent;
}

.cs-focus-item .cs-list {
  gap: 4px;
}

.cs-focus-item .cs-list li {
  font-size: 20px;
  line-height: 30px;
  letter-spacing: -0.5px;
}

.cs-focus-item__desc {
  font-size: 20px;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: -0.5px;
  color: var(--text-body);
  margin: 0;
}

/* ---------- Process Steps ---------- */
.cs-process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.cs-process__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-bottom: 12px;
}

.cs-process .cs-list {
  gap: 6px;
  list-style: none;
  padding-left: 0;
}

.cs-process .cs-list li {
  font-size: 15px;
  line-height: 22px;
  color: var(--neutral-600);
}

/* ---------- Spaced List ---------- */
.cs-list--spaced {
  margin-top: 12px;
  margin-bottom: 20px;
}

/* ---------- Image Gallery Carousel ---------- */
.cs-gallery {
  position: relative;
}

.cs-gallery__main {
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(24, 18, 18, 0.05),
    0 4px 16px rgba(24, 18, 18, 0.04);
  will-change: transform;
}

.cs-gallery__main img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
}

.cs-gallery__thumbs {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  justify-content: center;
}

.cs-gallery__thumb {
  flex-shrink: 0;
  width: 80px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.cs-gallery__thumb--active {
  opacity: 1;
  border-color: #2D80FD;
}

.cs-gallery__thumb:hover {
  opacity: 0.85;
}

.cs-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Thumb row with nav arrows */
.cs-gallery__thumb-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-top: 16px;
}

.cs-gallery__thumb-row .cs-gallery__thumbs {
  margin-top: 0;
}

/* Nav arrows */
.cs-gallery__nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(232, 227, 227, 0.56);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  color: var(--neutral-700, #3F393A);
  z-index: 2;
  transition: background 0.15s ease, transform 0.15s ease;
}

.cs-gallery__nav svg path {
  fill: var(--neutral-700, #3F393A);
}

.cs-gallery__nav:hover {
  background: rgba(232, 227, 227, 0.8);
  transform: scale(1.05);
}

.cs-gallery__nav:active {
  transform: scale(1);
  opacity: 0.64;
}

/* Counter */
.cs-gallery__counter {
  display: none;
}

.cs-gallery__dots {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.cs-gallery__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neutral-100, #E2DEDE);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cs-gallery__dot--active {
  background: var(--neutral-600, #554F4F);
}

@media (max-width: 768px) {
  .cs-gallery__thumb-row {
    display: none !important;
  }

  .cs-gallery__dots {
    display: flex;
  }
}

/* ---------- Lightbox ---------- */
.cs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: default;
}

.cs-lightbox--open {
  opacity: 1;
  pointer-events: auto;
}

.cs-lightbox__img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: 90vh;
  overflow: hidden;
  cursor: zoom-in;
}

.cs-lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
}

.cs-lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.cs-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.cs-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.cs-lightbox__nav:hover { background: rgba(255, 255, 255, 0.25); }
.cs-lightbox__nav--prev { left: 20px; }
.cs-lightbox__nav--next { right: 20px; }

/* Hide old gallery items (replaced by JS) */
.cs-gallery__item {
  display: none;
}

/* ---------- Two Column (Objectives / Outcome) ---------- */
.cs-two-col {
  display: flex;
  gap: 64px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.cs-two-col__item {
  flex: 1;
}

.cs-two-col__heading {
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 16px;
}

.cs-list {
  list-style: disc;
  padding: 0 0 0 24px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-list li::marker {
  color: var(--neutral-400);
}

.cs-list li {
  font-size: 20px;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: -0.5px;
  color: var(--text-body);
}

.cs-list li strong {
  font-weight: 600;
  color: var(--text);
}

/* ---------- Case Study Images ---------- */
.cs-image {
  padding-top: 44px;
}

.cs-image__wrap {
  border-radius: 14px;
  overflow: hidden;
  background: var(--neutral-25);
  box-shadow:
    0 0 0 1px rgba(24, 18, 18, 0.05),
    0 4px 16px rgba(24, 18, 18, 0.04);
  will-change: transform;
}

.cs-image__wrap img,
.cs-image__wrap video {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Next Case Study ---------- */
.cs-next {
  padding-top: 120px;
  padding-bottom: 40px;
}

.cs-next__link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 40px;
  border-radius: 28px;
  background: var(--neutral-25);
  transition: background 0.2s ease;
}

.cs-next__link:hover {
  background: var(--neutral-50);
}

.cs-next__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-500);
  letter-spacing: -0.3px;
}

.cs-next__title {
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
  letter-spacing: -1.5px;
  color: var(--text);
}

/* ---------- Interactive Diagrams ---------- */
/* === Grid Treemap === */
.ct-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  max-width: 800px;
  margin: 0 auto;
  padding-top: 2px;
  font-family: 'UCity Pro', system-ui, sans-serif;
}

.ct-cell {
  border: 1.5px solid;
  border-radius: 12px;
  padding: 8px 10px;
  min-height: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ct-cell:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -4px rgba(24, 18, 18, 0.08);
}

.ct-cell-header {
  font-size: 15px;
  font-weight: 600;
  color: #181212;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}

.ct-cell-count {
  font-size: 12px;
  font-weight: 400;
  color: #837D7D;
  flex-shrink: 0;
}

.ct-cell-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ct-cell-list li {
  font-size: 13px;
  font-weight: 400;
  color: #3F393A;
  line-height: 1.3;
}

.ct-cell-expandable {
  font-weight: 500;
  color: #181212;
  cursor: pointer;
}

.ct-cell-arrow {
  font-size: 12px;
  color: #837D7D;
  font-weight: 400;
}

.ct-cell-sublist {
  list-style: none;
  padding: 4px 0 2px 12px;
  margin: 4px 0 0;
  border-left: 1.5px solid #CDC8C8;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  max-height: 500px;
  transition: max-height 0.3s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.2s ease;
  opacity: 1;
}

.ct-cell-sublist--collapsed {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0 0 0 12px;
}

.ct-cell-sublist li {
  font-size: 14px;
  font-weight: 400;
  color: #6B6666;
}

.ct-leaf-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 4px;
}

.ct-cell--leaf {
  padding: 6px 10px;
  min-height: 0;
  flex: 1;
}

.ct-cell--leaf .ct-cell-header {
  font-size: 13px;
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .ct-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }

  .ct-cell {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .ct-cell-header {
    font-size: 15px;
    margin-bottom: 8px;
  }

  .ct-cell-list li {
    font-size: 13px;
  }
}

/* === D3 Collapsible Tree === */
.cs-tree {
  overflow: visible;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

.cs-tree svg {
  display: block;
}

#blocksTree {
  max-width: 920px;
  margin-top: -48px;
  margin-bottom: -24px;
}

#messageTree {
  max-width: 920px;
  margin-top: -48px;
  margin-bottom: -48px;
}

.ct-link {
  fill: none;
  stroke-width: 1.2px;
}

.ct-node {
  transition: opacity 0.2s ease;
}

.ct-node text {
  pointer-events: none;
}

/* ---------- Case Study CTA Footer ---------- */
.cs-cta-footer {
  padding-top: 11px;
}

/* ---------- Outcome Cards ---------- */
.cs-outcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.cs-outcome-card {
  padding: 22px 28px 20px;
  background: none;
  border: 1px solid rgba(232, 227, 227, 0.8);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
}

.cs-outcome-card:hover {
  border-color: transparent;
}

.cs-outcome-card__metric {
  font-size: 36px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -1.5px;
  color: var(--neutral-750, #352F2F);
  margin-bottom: 6px;
}

.cs-outcome-card__label {
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 5px;
}

.cs-outcome-card__desc {
  font-size: 20px;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: -0.5px;
  color: var(--text-body);
  margin: 0;
}

/* ---------- UEQ Radar Chart ---------- */
.cs-ueq-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

@media (max-width: 1080px) and (min-width: 901px) {
  .cs-ueq-layout {
    align-items: center;
  }
  .cs-ueq-radar svg {
    transform: scale(0.9);
    transform-origin: center center;
    margin-top: 0;
    margin-bottom: 0;
  }
}

.cs-ueq-layout__text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cs-ueq-layout__text .cs-body {
  margin: 0;
}

.cs-ueq-radar {
  display: flex;
  flex-direction: column;
  align-items: center;
}


@media (max-width: 900px) {
  .cs-ueq-layout {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  #outcome .cs-ueq-layout__text .cs-body {
    font-size: 20px;
    line-height: 28px;
    letter-spacing: -0.3px;
  }
  .cs-ueq-radar svg {
    transform: none;
    margin-top: 0;
    margin-bottom: 0;
  }
  .cs-ueq-layout + .cs-outcome-grid {
    margin-top: 48px;
  }
}

@media (max-width: 600px) {
  .cs-ueq-radar svg {
    max-width: 100%;
  }
}

.cs-ueq-radar svg {
  width: 100%;
  max-width: 520px;
  height: auto;
  transform: scale(0.9);
  transform-origin: top center;
  margin-top: -24px;
  margin-bottom: -40px;
}

.ueq-poly {
  cursor: pointer;
  transition: fill 0.3s ease, stroke-width 0.3s ease, stroke-opacity 0.3s ease;
}

.ueq-poly--before:hover,
.ueq-poly--before.ueq-poly--active {
  fill: rgba(172, 165, 165, 0.4);
  stroke-width: 2.5;
}

.ueq-poly--after:hover,
.ueq-poly--after.ueq-poly--active {
  fill: rgba(45, 128, 253, 0.22);
  stroke-width: 2.5;
}

.ueq-poly:not(:hover):not(.ueq-poly--active) ~ .ueq-poly:not(:hover):not(.ueq-poly--active) {
  /* both idle — no dimming */
}

.ueq-tooltip {
  position: fixed;
  z-index: 9999;
  font-family: 'UCity Pro', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: #fff;
  background: #181212;
  padding: 6px 14px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ueq-tooltip--visible {
  opacity: 1;
}


/* ---------- Summarize Button ---------- */
.cs-summarize__btn {
  font-family: 'UCity Pro', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--neutral-700, #3F393A);
  background: rgba(232, 227, 227, 0.32);
  border: none;
  border-radius: 100px;
  box-shadow: inset 0 1.5px 0 0 rgba(15, 10, 10, 0.03);
  height: 56px;
  padding: 0 22px;
  position: relative;
  left: -8px;
  top: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.cs-summarize__btn:hover {
  background: rgba(232, 227, 227, 0.56);
  color: var(--neutral-900, #1E1919);
}

.cs-summarize__btn--loading {
  background: rgba(232, 227, 227, 0.32);
  cursor: default;
}

.cs-summarize__btn--loading .cs-summarize__text {
  background: linear-gradient(
    90deg,
    var(--neutral-400, #908A8A) 0%,
    var(--neutral-200, #CCC8C8) 40%,
    var(--neutral-400, #908A8A) 80%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: summarize-shimmer 1.5s ease-in-out infinite;
}

@keyframes summarize-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes summarize-nudge {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-7px); }
  20% { transform: translateX(5.5px); }
  30% { transform: translateX(-4.5px); }
  40% { transform: translateX(3.5px); }
  50% { transform: translateX(-2.5px); }
  60% { transform: translateX(1.8px); }
  70% { transform: translateX(-1px); }
  80% { transform: translateX(0.5px); }
  90% { transform: translateX(-0.2px); }
}

.cs-summarize__btn--nudge {
  animation: summarize-nudge 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.cs-summarize__btn--done {
  border-color: transparent;
  color: var(--neutral-400, #908A8A);
  cursor: default;
}

.cs-summarize__panel {
  position: fixed;
  bottom: 32px;
  left: var(--sidebar-width, 192px);
  margin-left: 32px;
  z-index: 200;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.cs-summarize__panel--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cs-summarize__panel-inner {
  background: #181212;
  color: #F5F0F0;
  font-family: 'UCity Pro', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: -0.2px;
  padding: 20px 24px;
  border-radius: 16px;
  max-width: 560px;
  box-shadow: 0 8px 32px rgba(24, 18, 18, 0.2);
}

.cs-summarize__panel-inner p {
  margin: 0 0 12px;
}

.cs-summarize__panel-inner p:last-child {
  margin-bottom: 0;
}

.cs-summarize__panel-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: rgba(245, 240, 240, 0.5);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s ease;
}

.cs-summarize__panel-close:hover {
  color: #F5F0F0;
}

/* ---------- Hero image breathe reveal ---------- */
.cs-image__wrap.reveal-load {
  opacity: 0;
  transform: translateY(20px) scale(0.985);
}

.cs-image__wrap.reveal-load--active {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 1s cubic-bezier(0.23, 1, 0.32, 1),
              transform 1s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---------- Staggered card reveals ---------- */
.cs-focus-item.reveal-scroll:nth-child(1) { transition-delay: 0ms; }
.cs-focus-item.reveal-scroll:nth-child(2) { transition-delay: 80ms; }
.cs-focus-item.reveal-scroll:nth-child(3) { transition-delay: 160ms; }
.cs-focus-item.reveal-scroll:nth-child(4) { transition-delay: 240ms; }

.cs-outcome-card.reveal-scroll:nth-child(1) { transition-delay: 0ms; }
.cs-outcome-card.reveal-scroll:nth-child(2) { transition-delay: 80ms; }
.cs-outcome-card.reveal-scroll:nth-child(3) { transition-delay: 160ms; }
.cs-outcome-card.reveal-scroll:nth-child(4) { transition-delay: 240ms; }

/* ---------- Case Study Responsive ---------- */
@media (max-width: 900px) {
  .cs-hero {
    padding-top: 148px;
  }

  .cs-hero__title {
    letter-spacing: -2px;
  }

  .cs-hero__subtitle {
    font-size: 20px;
    line-height: 28px;
    margin-bottom: 32px;
  }

  .cs-hero__intro {
    font-size: 22px;
    line-height: 32px;
  }

  .cs-section {
    padding-top: 84px;
  }

  .cs-heading {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -1.5px;
  }

  .cs-body {
    font-size: 22px;
    line-height: 32px;
    letter-spacing: -0.5px;
  }

  .cs-list li {
    font-size: 22px;
    line-height: 32px;
  }

  .cs-focus-item__title {
    font-size: 17px;
  }

  .cs-focus-item__desc {
    font-size: 17px;
    line-height: 27px;
  }

  .cs-process {
    grid-template-columns: repeat(2, 1fr);
  }

  .cs-two-col {
    flex-direction: column;
    gap: 40px;
  }

  .cs-gallery__item {
    border-radius: 16px;
  }

  .cs-next {
    padding-top: 80px;
  }

  .cs-next__link {
    padding: 28px;
    border-radius: 24px;
  }

  .cs-next__title {
    font-size: 24px;
    letter-spacing: -1px;
  }
}

@media (max-width: 600px) {
  .cs-hero {
    padding-top: 128px;
  }

  .cs-hero__title {
    letter-spacing: -1.5px;
  }

  .cs-hero__subtitle {
    font-size: 17px;
    margin-bottom: 24px;
  }

  .cs-hero__intro {
    font-size: 20px;
    line-height: 28px;
  }

  .cs-hero__year-badge {
    position: absolute;
    right: 0;
    top: 0;
    bottom: auto;
    margin-top: 0;
    transform: translateY(calc(-50% + 8px));
    -webkit-backdrop-filter: blur(58px);
    backdrop-filter: blur(58px);
    outline: 2px solid #fff;
  }

  .cs-hero__tag {
    font-size: 13px;
    padding: 5px 12px;
  }

  .cs-image--gallery {
    padding-top: 32px;
  }

  .cs-section {
    padding-top: 76px;
  }

  .cs-heading {
    font-size: 28px;
    line-height: 32px;
    letter-spacing: -1px;
    margin-bottom: 16px;
  }

  .cs-body {
    font-size: 20px;
    line-height: 28px;
    letter-spacing: -0.3px;
  }

  .cs-list li {
    font-size: 20px;
    line-height: 28px;
  }

  .cs-focus-item__title,
  .cs-focus-item__desc {
    font-size: 17px;
    line-height: 25px;
  }

  .cs-body--note {
    font-size: 17px;
    line-height: 25px;
  }

  .cs-process {
    grid-template-columns: 1fr;
  }

  .cs-focus-list {
    grid-template-columns: 1fr;
  }

  .cs-focus-item {
    padding: 20px 22px;
    border-radius: 14px;
  }

  .cs-focus-item .cs-list li {
    font-size: 17px;
    line-height: 25px;
    letter-spacing: -0.3px;
  }

  .cs-outcome-grid {
    grid-template-columns: 1fr;
  }

  .cs-outcome-card {
    padding: 20px 22px;
    border-radius: 14px;
  }

  .cs-outcome-card__metric {
    font-size: 30px;
  }

  .cs-outcome-card__label,
  .cs-outcome-card__desc {
    font-size: 17px;
    line-height: 25px;
  }

  .cs-image__wrap {
    border-radius: 10px;
  }

  .cs-gallery__main {
    border-radius: 10px;
  }

  .cs-gallery__item {
    border-radius: 10px;
  }

  .cs-next__link {
    padding: 24px;
    border-radius: 20px;
  }
}
