/* ============================================
   MEMEHOUSE, Case Study Pages
   ============================================ */

/* Back nav */
.nav-logo-back,
.nav-back {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  padding: 8px 18px;
  background: rgba(10,10,10,0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  transition: background 0.2s;
}
.nav-logo-back:hover,
.nav-back:hover { background: rgba(10,10,10,0.9); }

/* Case study nav layout */
#nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 28px 32px;
}

/* Hero */
.cs-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 60px 40px;
}

.cs-hero-video,
.cs-hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}

.cs-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.cs-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}

.cs-title {
  font-size: clamp(52px, 9vw, 130px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 40px;
}

.cs-stats-row {
  display: flex;
  gap: 48px;
  align-items: center;
  flex-wrap: wrap;
}

.cs-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cs-stat-num {
  font-size: clamp(20px, 2.5vw, 32px);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1;
}

.cs-stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

/* Hero slideshow for image-only pages */
.cs-hero-media,
.cs-hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cs-hero-media video {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
}

.cs-hero-slideshow .slide {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.cs-hero-slideshow .slide.active { opacity: 1; }

/* Body */
.cs-body {
  background: var(--off-white);
  padding: 80px 40px;
  max-width: 900px;
  margin: 0 auto;
}

.cs-meta-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 64px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--light-gray);
}

.cs-meta-item {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid-gray);
}

.cs-content .cs-lead {
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 40px;
}

.cs-content p {
  font-size: 16px;
  line-height: 1.85;
  color: #333;
  margin-bottom: 24px;
  max-width: 720px;
}

.cs-content h2 {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--black);
  margin: 56px 0 20px;
}

/* Media grid inside article */
.cs-media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 48px 0;
}

.cs-media-grid img,
.cs-media-grid video {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: center 20%;
}

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

.cs-media-grid.full img,
.cs-media-grid.full video {
  aspect-ratio: 16/9;
}

/* Next project */
.cs-next {
  background: var(--black);
  padding: 80px 40px;
}

.cs-next-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity 0.2s;
}

.cs-next-link:hover { opacity: 0.7; }

.cs-next-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid-gray);
}

.cs-next-title {
  font-size: clamp(32px, 6vw, 80px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  color: #fff;
}

@media (max-width: 768px) {
  .cs-hero { padding: 40px 20px; }
  .cs-body { padding: 56px 20px; }
  .cs-stats-row { gap: 24px; }
  .cs-media-grid { grid-template-columns: 1fr; }
  .cs-next { padding: 56px 20px; }
}

/* ---- IOS SOUND BUTTON ---- */
.cs-sound-btn {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  color: #fff;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 8px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: border-color 0.2s, color 0.2s;
}

.cs-sound-btn.on {
  border-color: var(--green);
  color: var(--green);
}

/* ---- TAP TO UNMUTE OVERLAY ---- */
.cs-unmute-overlay {
  position: absolute;
  inset: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  pointer-events: all;
}

.cs-unmute-pill {
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  color: #fff;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  animation: pillpulse 2s ease-in-out infinite;
}

@keyframes pillpulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.04); opacity: 0.85; }
}

.cs-unmute-overlay.hidden {
  display: none;
}
