/* CMS-driven case study layout */
.cs {
  display: block;
  background: #0a0a0a;
  color: #f5f5f5;
}

/* Hero */
.cs-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.cs-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cs-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.65) 100%);
}
.cs-hero__title {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0 5vw 6vh;
  font-family: Aeonik, sans-serif;
  font-weight: 500;
  color: #fff;
  font-size: clamp(2.5rem, 8vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: none;
}
.cs-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  margin-right: 0.25em;
}
.cs-word-inner {
  display: inline-block;
}

/* Meta bar */
.cs-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 2rem 5vw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-family: Aeonik, sans-serif;
}
.cs-meta__client {
  font-size: 1.25rem;
  font-weight: 500;
}
.cs-meta__tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.cs-chip {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35em 0.75em;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.8);
}
.cs-meta__year {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}

/* Content */
.cs-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 8vh 5vw;
  font-family: Aeonik, sans-serif;
}
.cs-summary {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 4rem;
  color: #fff;
}
.cs-content h2 {
  font-family: Aeonik, sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 3.5rem 0 1.25rem;
  line-height: 1.1;
}
.cs-content h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 500;
  margin: 2.5rem 0 1rem;
}
.cs-content p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 1.5rem;
}
.cs-content a {
  color: #6f86ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cs-content ul,
.cs-content ol {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
  padding-left: 1.25rem;
  margin: 0 0 1.5rem;
}

/* Media block */
.cs-media {
  margin: 4rem 0;
}
.cs-media--full {
  /* break out of the centred content column to full viewport width */
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 0 5vw;
}
.cs-media img,
.cs-media video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
.cs-media__caption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Stats block */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2.5rem 2rem;
  margin: 5rem 0;
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.cs-stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cs-stat__num {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.cs-stat__label {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}

/* Next project */
.cs-next {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  min-height: 45vh;
  padding: 6vh 5vw;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: #0025ff;
}
.cs-next__bg {
  position: absolute;
  inset: -20% 0;
  background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.12), transparent 60%),
    #0025ff;
  z-index: 0;
}
.cs-next__label,
.cs-next__title,
.cs-next__arrow {
  position: relative;
  z-index: 1;
  font-family: Aeonik, sans-serif;
}
.cs-next__label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}
.cs-next__title {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.cs-next__arrow {
  font-size: 1.5rem;
  transition: transform 0.4s ease;
}
.cs-next:hover .cs-next__arrow {
  transform: translateX(12px);
}

/* Signature gradient behind the hero (shows through when no media is set) */
.cs-hero {
  background-color: #000;
  background-image: radial-gradient(circle farthest-corner at -10% 0%, #88bbfd, #0025ff 47%, #000c);
}
.cs-hero--bare .cs-hero__scrim {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.35) 100%);
}

/* Multi-paragraph summary */
.cs-summary p {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 1.25rem;
}
.cs-summary p:last-child {
  margin-bottom: 0;
}

/* Text block spacing */
.cs-text {
  margin: 2.5rem 0;
}

/* YouTube embeds — responsive 16:9 */
.cs-media--video .cs-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: 4px;
  background: #000;
}
.cs-media--video .cs-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Gallery — full-bleed responsive grid (originally Webflow sliders) */
.cs-gallery {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 4rem;
  margin-bottom: 4rem;
  padding: 0 5vw;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
.cs-gallery__item {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

@media screen and (max-width: 767px) {
  .cs-hero {
    height: 80vh;
  }
  .cs-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .cs-gallery {
    grid-template-columns: 1fr 1fr;
  }
}
