/* Split scrub chapters: video half + text half, alternating */
.scrub-chapter {
  position: relative;
  height: 240vh;
  background: #140e0a;
}

.scrub-chapter__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: stretch;
  background: #140e0a;
}

.scrub-chapter__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
  width: 100%;
}

.scrub-chapter--media-right .scrub-chapter__split {
  grid-template-columns: 1fr 1fr;
}

.scrub-chapter--media-right .scrub-chapter__media {
  order: 2;
}

.scrub-chapter--media-right .scrub-chapter__copy {
  order: 1;
}

.scrub-chapter__media {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #0c0907;
}

.scrub-chapter__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.scrub-chapter.is-scrub-ready .scrub-chapter__canvas {
  opacity: 1;
}

.scrub-chapter__copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.75rem, 5vw, 4.5rem);
  background:
    radial-gradient(ellipse at 30% 40%, rgba(80, 50, 25, 0.18), transparent 55%),
    #140e0a;
  text-shadow: none;
}

.scrub-chapter--media-right .scrub-chapter__copy {
  text-align: left;
}

.scrub-chapter__ep {
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #d4af78;
  margin-bottom: 0.85rem;
}

.scrub-chapter__title {
  font-family: var(--font-display, "Cormorant Garamond", serif);
  font-weight: 500;
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  line-height: 1.05;
  margin-bottom: 0.9rem;
  color: #f7f1e8;
  max-width: 12ch;
}

.scrub-chapter__text {
  color: rgba(247, 241, 232, 0.72);
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  max-width: 34ch;
  line-height: 1.65;
}

.scrub-chapter__line {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, #d4af78, transparent);
  margin: 1.1rem 0 1.2rem;
}

.scrub-chapter__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.35rem;
  list-style: none;
  padding: 0;
}

.scrub-chapter__tags li {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(212, 175, 120, 0.85);
}

.scrub-chapter__tags li::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d4af78;
  margin-right: 0.55rem;
  vertical-align: middle;
  opacity: 0.7;
}

@media (max-width: 900px) {
  /* Mobile: natural height — video plays once when fully visible */
  .scrub-chapter {
    height: auto;
  }

  .scrub-chapter__sticky {
    position: relative;
    height: auto;
    overflow: visible;
  }

  .scrub-chapter__split,
  .scrub-chapter--media-right .scrub-chapter__split {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(42vh, 48vh) 1fr;
  }

  .scrub-chapter--media-right .scrub-chapter__media,
  .scrub-chapter--media-right .scrub-chapter__copy {
    order: initial;
  }

  .scrub-chapter__media {
    min-height: 42vh;
    height: 46vh;
  }

  .scrub-chapter__copy {
    padding: 1.75rem 1.35rem 2.5rem;
    justify-content: flex-start;
  }

  .scrub-chapter__title {
    max-width: none;
  }
}
