@charset "utf-8";

.back {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.img01 video {
  position: relative;
  max-width: 100%;
  height: 1500px;
  object-position: top;
}
.img01 video source {
  position: absolute;
  top: 0;
  width: 100%;
  height: 1200px;
}
.textBox {
  position: absolute;
  top: 25%;
  transform: translateY(-25%);
  color: #fff;
  text-align: center;
}
.textBox h2 {
  font-size: 4.5rem;
  margin-bottom: 1.25rem;
}
.textBox p {
  font-size: 1.31rem;
  font-weight: 500;
  line-height: 1.6;
  opacity: 0.8;
}

.img01,
.img02,
.img03 {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100%;
}

/* 오버레이와 h3는 그대로 */
.img02::after,
.img03::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--black50);
  opacity: 0;
  transition: opacity 1s ease;
}
.img02.active::after,
.img03.active::after {
  opacity: 1;
}
.img02 h3,
.img03 h3 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
  font-size: 2.25rem;
  line-height: 1.4;
  text-align: center;
  color: #fff;
  opacity: 0;
  transition: all 1s ease;
}
.img02 h3 {
  width: 46.87rem;
  word-break: keep-all;
}
.img02.active h3,
.img03.active h3 {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* ==========노트북 반응형============= */
@media screen and (max-width: 1023px) {
  .img01 video {
    height: 100vh;
  }
  .img01 video source {
    height: 100%;
    object-fit: cover;
  }
  .textBox {
    top: 50%;
    transform: translateY(-50%);
  }
  .textBox h2 {
    font-size: 3.5rem;
    margin-bottom: 0.93rem;
  }
  .textBox p {
    font-size: 1.25rem;
    line-height: 1.5;
  }

  .img01,
  .img02,
  .img03 {
    height: 100vh;
    overflow: hidden;
  }
  .back video,
  .back img {
    height: 100%;
    object-fit: cover;
  }

  /* 오버레이와 h3는 그대로 */
  .img02::after,
  .img03::after {
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
  }
  .img02 h3,
  .img03 h3 {
    width: 100%;
    font-size: 2rem;
    z-index: 10;
  }
  .img02 h3 {
    width: 40.43rem;
  }
}
/* ==========태블릿 반응형============= */
@media screen and (max-width: 860px) {
  .textBox h2 {
    font-size: 3.93rem;
  }
  .textBox p {
    font-size: 1.43rem;
  }
  .img02 h3,
  .img03 h3 {
    font-size: 2.25rem;
  }
  .img02 h3 {
    width: 32.5rem;
  }
}
/* ==========모바일 반응형============= */
@media screen and (max-width: 540px) {
  .textBox h2 {
    font-size: 4rem;
  }
  .textBox p {
    width: 23.12rem;
    font-size: 1.56rem;
    word-break: keep-all;
  }
  .img02 h3,
  .img03 h3 {
    width: 30.31rem;
    font-size: 2.62rem;
  }
  .img02 h3 {
    width: 32.5rem;
  }
}
