/* ─── Case study overrides ───────────────────────────────── */

body {
  overflow-x: hidden;
}


/* Avatar overrides for case study pages */
.cs-container a.avatar {
  transition: opacity 0.15s ease;
}

.cs-container a.avatar:hover {
  opacity: 0.6;
}

/* ─── Title block ────────────────────────────────────────── */

.cs-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0;
  color: #000;
  text-wrap: balance;
}

.cs-subtitle {
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0;
  color: #000;
}

.cs-subtitle a {
  color: #000;
  text-decoration: underline;
  text-underline-position: from-font;
}

/* ─── Section text blocks ────────────────────────────────── */

.cs-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-heading {
  font-size: 15px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0;
  color: #000;
  text-wrap: balance;
}

.cs-body {
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0;
  color: #000;
  text-wrap: pretty;
}

/* Standalone paragraphs between images */
.cs-container > .cs-body {
  /* already handled by container gap */
}

/* ─── Image wrappers ─────────────────────────────────────── */

.cs-img-wrap {
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 12px;
}

.cs-img-wrap img,
.cs-img-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  outline: 1px solid oklch(0 0 0 / 0.1);
  outline-offset: -1px;
  border-radius: 12px;
}

/* Full-bleed: extends 88px beyond each side of the column */
.cs-img-bleed {
  margin-left: -88px;
  width: calc(100% + 176px);
}

@media (max-width: 767px) {
  .cs-img-bleed {
    margin-left: 0;
    width: 100%;
  }
}

/* ─── Enter animation ───────────────────────────────────── */

@keyframes cs-enter {
  from {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
  }
}

.animate-enter {
  animation: cs-enter 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  animation-delay: calc(80ms * var(--stagger, 0));
}

.cs-title .word {
  display: inline-block;
  animation: cs-enter 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  animation-delay: calc(80ms * var(--stagger, 0));
}

@media (prefers-reduced-motion: reduce) {
  .animate-enter,
  .cs-title .word {
    animation: none;
  }
}

/* ─── Image lightbox ────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  /* exit */
  opacity: 0;
  transition: opacity 150ms ease-out;
}

.lightbox.is-open {
  pointer-events: auto;
  /* enter */
  opacity: 1;
  transition: opacity 200ms ease-out;
}

.lightbox-img-wrap {
  border-radius: 16px;
  box-shadow: 0px 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  max-width: min(85vw, 1185px);
  max-height: 85vh;
  line-height: 0;
  /* transform/opacity controlled by JS FLIP */
}

.lightbox-img-wrap img {
  display: block;
  max-width: min(85vw, 1185px);
  max-height: 85vh;
  width: auto;
  height: auto;
  /* override the outline from cs-img-wrap img */
  outline: none;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.6);
  /* exit */
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 100ms ease-out,
    transform 100ms ease-out,
    background 150ms ease-out;
}

.lightbox.is-open .lightbox-close {
  /* enter — trails the image */
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 200ms ease-out,
    transform 200ms ease-out,
    background 150ms ease-out;
  transition-delay: 200ms;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 1);
}

.cs-img-wrap img {
  cursor: zoom-in;
}

/* ─── Placeholder boxes ──────────────────────────────────── */

.cs-placeholder {
  width: 100%;
  background: #f4f4f5;
  border-radius: 4px;
}
