@charset "utf-8";

@import "global.css";

main section.company {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  scroll-snap-align: start;
  background-color: #222222;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; /* iOS에서 부드러운 스크롤링을 위해 */
}

@media only screen and (min-width: 1280px) {
  main section.company {
    height: 100vh;
  }
}

main section.company div.box-wrapper {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox에서 스크롤바 숨김 */
  -ms-overflow-style: none; /* IE/Edge에서 스크롤바 숨김 */
  position: relative;
}

/* Chrome/Safari/Opera에서 스크롤바 숨김 */
main section.company div.box-wrapper::-webkit-scrollbar {
  display: none;
}

/* 더 부드러운 스크롤링을 위한 전환 효과 */
main section.company div.box-wrapper.transitioning {
  scroll-behavior: auto !important;
}

/* 전환 중 클론 숨기기 */
main section.company div.box-wrapper.transitioning .box:first-child,
main section.company div.box-wrapper.transitioning .box:last-child {
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media only screen and (min-width: 1280px) {
  main section.company div.box-wrapper {
    height: 100%;
  }
}

main section.company div.box-wrapper div#company1 {
  background-image: url("../images/company/company-mobile-1.png");
}

@media only screen and (min-width: 1280px) {
  main section.company div.box-wrapper div#company1 {
    background-image: url("../images/company/company-desktop-1.png");
  }
}

main section.company div.box-wrapper div#company2 {
  background-image: url("../images/company/company-mobile-2.png");
}

@media only screen and (min-width: 1280px) {
  main section.company div.box-wrapper div#company2 {
    background-image: url("../images/company/company-desktop-2.png");
  }
}

main section.company div.box-wrapper div#company3 {
  background-image: url("../images/company/company-mobile-3.png");
}

@media only screen and (min-width: 1280px) {
  main section.company div.box-wrapper div#company3 {
    background-image: url("../images/company/company-desktop-3.png");
  }
}

main section.company div.box-wrapper div#company4 {
  background-image: url("../images/company/company-mobile-4.png");
}

@media only screen and (min-width: 1280px) {
  main section.company div.box-wrapper div#company4 {
    background-image: url("../images/company/company-desktop-4.png");
  }
}

main section.company div.box-wrapper div.box {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  background-size: cover;
  background-position: center;
  scroll-snap-align: start;
  position: relative;
  scroll-snap-stop: always;
}

main section.company div.box-wrapper div.box h2 {
  font-size: 30px;
  font-weight: 400;
  color: #ffffff;
}

@media only screen and (min-width: 1280px) {
  main section.company div.box-wrapper div.box h2 {
    font-size: 80px;
  }
}

main section.company div.box-wrapper div.box h1 {
  font-size: 30px;
  font-weight: 400;
  color: #ffffff;
  position: relative;
}

@media only screen and (min-width: 1280px) {
  main section.company div.box-wrapper div.box h1 {
    font-size: 130px;
    font-weight: 800;
  }
}

main section.company div.box-wrapper div.box h1 .typography {
  display: inline-block;
  position: relative;
  overflow: hidden;
  visibility: visible;
  white-space: nowrap;
}

main section.company div.box-wrapper div.box h1 .typography * {
  visibility: hidden;
}

main section.company div.box-wrapper div.box h1 .typography.animate * {
  visibility: visible;
}

main section.company div.box-wrapper div.box h1 .bracket-left,
main section.company div.box-wrapper div.box h1 .bracket-right {
  display: inline-block;
  opacity: 0;
  animation: bracket-expand 0.8s forwards;
  animation-delay: 0.5s;
  vertical-align: middle;
  font-size: 1em;
  line-height: 1;
}

main section.company div.box-wrapper div.box h1 .text-container {
  display: inline-block;
  position: relative;
  overflow: visible;
  vertical-align: middle;
  line-height: 1.2;
  vertical-align: middle;
}

main section.company div.box-wrapper div.box h1 .text-char {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  vertical-align: middle;
  font-size: 1em;
  line-height: 1;
}

main section.company div.box-wrapper div.box h1 .text-char:nth-child(1) {
  animation: text-appear 0.5s forwards;
  animation-delay: 1.3s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(2) {
  animation: text-appear 0.5s forwards;
  animation-delay: 1.35s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(3) {
  animation: text-appear 0.5s forwards;
  animation-delay: 1.4s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(4) {
  animation: text-appear 0.5s forwards;
  animation-delay: 1.45s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(5) {
  animation: text-appear 0.5s forwards;
  animation-delay: 1.5s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(6) {
  animation: text-appear 0.5s forwards;
  animation-delay: 1.55s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(7) {
  animation: text-appear 0.5s forwards;
  animation-delay: 1.6s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(8) {
  animation: text-appear 0.5s forwards;
  animation-delay: 1.65s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(9) {
  animation: text-appear 0.5s forwards;
  animation-delay: 1.7s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(10) {
  animation: text-appear 0.5s forwards;
  animation-delay: 1.75s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(11) {
  animation: text-appear 0.5s forwards;
  animation-delay: 1.8s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(12) {
  animation: text-appear 0.5s forwards;
  animation-delay: 1.85s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(13) {
  animation: text-appear 0.5s forwards;
  animation-delay: 1.9s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(14) {
  animation: text-appear 0.5s forwards;
  animation-delay: 1.95s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(15) {
  animation: text-appear 0.5s forwards;
  animation-delay: 2s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(16) {
  animation: text-appear 0.5s forwards;
  animation-delay: 2.05s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(17) {
  animation: text-appear 0.5s forwards;
  animation-delay: 2.1s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(18) {
  animation: text-appear 0.5s forwards;
  animation-delay: 2.15s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(19) {
  animation: text-appear 0.5s forwards;
  animation-delay: 2.2s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(20) {
  animation: text-appear 0.5s forwards;
  animation-delay: 2.25s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(21) {
  animation: text-appear 0.5s forwards;
  animation-delay: 2.3s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(22) {
  animation: text-appear 0.5s forwards;
  animation-delay: 2.35s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(23) {
  animation: text-appear 0.5s forwards;
  animation-delay: 2.4s;
}
main section.company div.box-wrapper div.box h1 .text-char:nth-child(24) {
  animation: text-appear 0.5s forwards;
  animation-delay: 2.45s;
}

@keyframes bracket-expand {
  0% {
    transform: translateX(50%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

main section.company div.box-wrapper div.box h1 .bracket-left {
  animation-name: bracket-expand-left;
}

main section.company div.box-wrapper div.box h1 .bracket-right {
  animation-name: bracket-expand-right;
}

@keyframes bracket-expand-left {
  0% {
    transform: translateX(50px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes bracket-expand-right {
  0% {
    transform: translateX(-50px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes text-appear {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

main section.company div.box-wrapper div.box h3 {
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
}

@media only screen and (min-width: 1280px) {
  main section.company div.box-wrapper div.box h3 {
    font-size: 40px;
  }
}

main section .scroll-down {
  position: fixed;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

@media only screen and (min-width: 1280px) {
  main section .scroll-down {
    gap: 20px;
  }
}

main section .scroll-down p {
  font-size: 8px;
  font-weight: bold;
  color: #ffffff;
}

@media only screen and (min-width: 1280px) {
  main section .scroll-down p {
    font-size: 18px;
  }
}

main section .scroll-down .scroll-line {
  width: 2px;
  height: 35px;
  background: linear-gradient(to bottom, #ffffff, #010101);
  position: relative;
  overflow: hidden;
}

@media only screen and (min-width: 1280px) {
  main section .scroll-down .scroll-line {
    height: 50px;
  }
}

main section .scroll-down .scroll-line::after {
  content: "";
  position: absolute;
  top: -180px;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.8),
    rgba(1, 1, 1, 0.8)
  );
  animation: scrollLineAnimation 1.5s ease-in-out infinite;
}

@keyframes scrollLineAnimation {
  0% {
    transform: translateY(0);
    opacity: 0.8;
  }
  100% {
    transform: translateY(360px);
    opacity: 0;
  }
}
