/* ----------------------------- Main Visual ----------------------------- */
.main-visual {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.dim-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 2;
}

/* 텍스트 오버레이 */
.slogan-container {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: flex-start; 
  align-items: center;
  height: 100%;
  padding: 0 1.5em 0 0;
  width: 96%;
  margin: 0 auto;
}

.slogan {
  font-size: 5.6rem;
  line-height: 1;
  color: #fff;
  letter-spacing: 1px;
  text-align: left;
  font-weight: 800;
}

.slogan-line {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

/* 순차적으로 등장 */
.slogan-line:nth-child(1) {
  animation-delay: 0.2s;
}
.slogan-line:nth-child(2) {
  animation-delay: 0.6s;
}
.slogan-line:nth-child(3) {
  animation-delay: 1s;
}
.slogan-line:nth-child(4) {
  animation-delay: 1.4s;
}

/* 애니메이션 */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ----------------------------- Work Section ----------------------------- */
.work-section-inner-1,
.work-section-inner,
.work-section-inner-2 {
  width: 96%;
  margin: 0 auto;
}

.work-section-inner-1 {
  padding: 8em 0 4em 0;
}

.work-section-inner-2 {
  padding: 4em 0 10em 0;
}

.section-title {
  font-size: 7rem;
  margin-bottom: 0.2rem;
  text-align: left;
  font-weight: 700;
}

.section-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
}

.section-title.visible span {
  animation: fadeUp 1.5s ease forwards;
}

.section-title.visible span:nth-child(1) {
  animation-delay: 0s;
}
.section-title.visible span:nth-child(2) {
  animation-delay: 0.05s;
}
.section-title.visible span:nth-child(3) {
  animation-delay: 0.1s;
}
.section-title.visible span:nth-child(4) {
  animation-delay: 0.15s;
}
.section-title.visible span:nth-child(5) {
  animation-delay: 0.2s;
}
.section-title.visible span:nth-child(6) {
  animation-delay: 0.25s;
}
.section-title.visible span:nth-child(7) {
  animation-delay: 0.3s;
}
.section-title.visible span:nth-child(8) {
  animation-delay: 0.35s;
}

/* Work Layout & Items */
.work-layout {
  display: flex;
  flex-direction: column;
}

.work-item {
  border-radius: 0.87rem;
  overflow: hidden;
  padding: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thumbnail {
  position: relative;
  width: 100%;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thumbnail::before{
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 50%;                 /* 그라디언트 높이 (조절 가능) */
  background: linear-gradient(
              to top,
              rgba(0,0,0,0.8) 0%,
              rgba(0,0,0,0) 40%);
  pointer-events: none;        /* 클릭 영역 방해 X */
  z-index: 2;                  /* 이미지 위, 텍스트(.work-info) 아래 */
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-item:hover > a.thumbnail > .thumbnail > picture img,
a.thumbnail:hover > .thumbnail > picture img {
  transform: scale(1.05) translateY(-8px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.thumbnail > picture img {
  transition: transform 0.4s ease, box-shadow 0.3s ease;
}

/* 텍스트 오버레이 (작업 항목) */
.work-info {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 0 0 1.5em 2em;
  color: #fff;
  z-index: 3;

}

.work-title {
  margin-bottom: 0.4rem;
  font-size: 3rem;
  font-weight: 600;
}

.work-info-label{
  display: flex;
  align-items: center;
  gap: 0.5rem;        /* space between pills */
  flex-wrap: wrap;    /* allow wrapping on small screens */
}

.work-description {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 0.2rem;
  border: 1px solid #fff;
  padding: 0.4rem 1rem;
  border-radius: 30rem;
  width: auto;
}

.work-description.filled{
  background-color: #fff;
  color: #131313;      /* dark text for contrast */
  border-color: #fff;  /* keep border invisible */
  font-weight: 600;
}


/* 가로형 전체 아이템 */
.item-wide {
  width: 100%;
  aspect-ratio: 2 / 1;
}

/* 2열 배치 */
.row {
  display: flex;
  gap: 1em;
  margin-top: 1em;
}

/* 반쪽짜리 아이템 */
.item-2up {
  flex: 1;
  aspect-ratio: 3 / 2;
}


/* ----------------------------- Services Section ----------------------------- */
#services {
  padding: 0;
  overflow: hidden;
}

#services_container {
  display: flex;
  gap: 4em;
  justify-content: center;
  align-items: center;
}

.service-marquee {
  background-color: #111;
  padding: 4em 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.marquee-row {
  overflow: hidden;
  width: 100%;
  white-space: nowrap;
}

.marquee-track {
  display: inline-block;
  min-width: 200%;
  animation: marquee-left 40s linear infinite;
}

.marquee-row.marquee-right .marquee-track {
  animation: marquee-right 40s linear infinite;
}

.marquee-track span {
  display: inline-block;
  font-size: 3.2em;
  font-weight: 200;
  color: #ccc;
  opacity: 0.8;
  margin-right: 0.5em;
  position: relative;
}

.marquee-track span::after {
  content: "—";
  margin-left: 0.5em;
}

@keyframes marquee-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes marquee-right {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}


/* ----------------------------- All Projects Button ----------------------------- */
.all-projects-btn-wrapper {
  text-align: center;
  margin-top: 5em;
}

.all-projects-btn {
  display: inline-block;
  font-size: 1.4em;
  font-weight: 500;
  color: white;
  text-decoration: none;
  border: 1px solid white;
  padding: 0.8em 2.4em;
  border-radius: 999px;
  background-color: transparent;
  transition: background-color 0.4s ease, color 0.4s ease, transform 0.3s ease;
}

.all-projects-btn:hover {
  background-color: white;
  color: #131313;
  transform: translateY(6px);
}


/* ----------------------------- About Section ----------------------------- */
#about {
  padding: 8em 0 0 0;
  background-color: #111;
  text-align: left;
}

.about-inner {
  width: 96%;
  margin: 0 auto;
}


.about-text {
  font-size: 1.8em;
  line-height: 1.6;
  color: #fff;
  font-weight: 600;
}

.about-text .slogan-line {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;

}

.about-text.visible .slogan-line {
  animation: fadeInUp 0.6s ease forwards;
}

.about-text.visible .slogan-line:nth-child(1) {
  animation-delay: 0.2s;
}
.about-text.visible .slogan-line:nth-child(2) {
  animation-delay: 0.6s;
}
.about-text.visible .slogan-line:nth-child(3) {
  animation-delay: 1s;
}
.about-text.visible .slogan-line:nth-child(4) {
  animation-delay: 1.4s;
}

/* 애니메이션 */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 기본적으로 모바일 전용 요소 숨김 */
.mobile-only {
  display: none;
}


/* ----------------------------- Clients Section ----------------------------- */
#clients {
  background-color: #111;
  padding: 4em 0;
  color: white;
  text-align: center;
  width: 96%;
  margin: 0 auto;
}

.clients-title {
  font-size: 2.8em;
  font-weight: 700;
  margin-bottom: 1em;
}

.client-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.4em 3em;
  justify-items: center;
  align-items: center;
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease;
  margin-bottom: 2em;
}

.client-row.visible {
  opacity: 1;
  transform: translateY(0);
}

.client-row img {
  width: 100%;
  height: auto;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: all 1s ease;
  padding: 0.5em;
  object-fit: contain;
}

.client-row img:hover {
  opacity: 1;
  filter: grayscale(0%);
}


/* ----------------------------- Media Queries ----------------------------- */
@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }

  #about .about-inner:not(.mobile-only) {
    display: none;
  }

  .slogan-container {
    padding: 0 1em 0 0;
    width: 92%;
  }

  .client-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1em;
  }

  .work-section-inner-1 {
    padding: 8em 0 2em 0;
  }

  .work-section-inner-2 {
    padding: 4em 0 6em 0;
  }

  .slogan {
    font-size: 12vw;
  }

  .section-title {
    font-size: 12vw;
  }

  .work-title {
    font-size: 8vw;
  }

  .work-description {
    font-size: 3vw;
  }

  .all-projects-btn {
    font-size: 5vw;
  }

  .about-inner {
    width: 92%;
  }

  .about-text {
    font-size: 5.2vw;
    margin: 0 auto;
  }

  .clients-title {
    font-size: 10vw;
  }

  .marquee-track span {
    font-size: 7vw;
    margin-right: 0.3rem;
  }

  .work-item {
    margin-bottom: 1.2em;
  }

  .row {
    display: block;
    margin-top: 0;
  }

  .row > .work-item {
    margin-bottom: 1.2em;
  }

  .work-info {
    padding: 0 0 1rem 1rem;
  }

  .item-wide {
    aspect-ratio: 3 / 2;
  }

  .work-section-inner,
  .work-section-inner-1,
  .work-section-inner-2 {
    width: 92%;
  }

  #clients {
    width: 92%;
  }

  .thumbnail {
    position: relative;
    overflow: hidden;
  }
  .thumbnail::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 80%;  /* 필요에 따라 높이 조정 */
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.8) 0%,
      rgba(0, 0, 0, 0) 50%
    );
    pointer-events: none;
    z-index: 2;
  }
}
