/* Floating Video
   Every selector starts with .floating-video, and there are no
   html, body or element-level rules, so nothing here can affect Bootstrap. */

/* Outer frame: reserves the 700px slot and hides the part of the
   video that is still below it while it slides up. */
.floating-video {
  position: relative;
  width: 100%;
  height: 700px;
  overflow: hidden;
  background: #000;
}

/* Inner layer that does the slide-up (waits below, hidden) */
.floating-video__inner {
  position: absolute;
  inset: 0;
  transform: translateY(100%);
  opacity: 0;
}

.floating-video__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* fills 100% x 700px without stretching */
}

/* Optional dark overlay so the text stays readable */
.floating-video__inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.floating-video__text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  margin: 0;
  padding: 0 20px;
  width: 100%;
  text-align: center;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 4.5rem);
  line-height: 1.2;
  letter-spacing: 0.05em;

  /* hidden until the video is in place */
  opacity: 0;
}

/* The script adds this class when the section scrolls into view */
.floating-video--active .floating-video__inner {
  animation: floating-video-slide-up 3.2s ease-out forwards;
}

.floating-video--active .floating-video__text {
  animation: floating-video-fade-in 2s ease-in 3.2s forwards;
}

@keyframes floating-video-slide-up {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes floating-video-fade-in {
  to { opacity: 1; }
}
