@charset "UTF-8";
/* 스크린샷 확대 팝업: 여백과 이미지 최대 크기를 여기서 조절합니다. */
.detail-shot img[role=button] {
  cursor: zoom-in;
}

.detail-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 60px 20px 60px;
  border: 0;
  box-sizing: border-box;
  background: rgba(13, 12, 17, 0.94);
  color: #fff;
}

.detail-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: detail-lightbox-in 220ms ease-out;
}

.detail-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.detail-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.detail-lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: #1b1b1d;
  color: #fff;
  font-size: 30px;
  line-height: normal;
  cursor: pointer;
}

@keyframes detail-lightbox-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (max-width: 699px) {
  .detail-lightbox {
    padding: 60px 16px 60px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .detail-lightbox[open] {
    animation: none;
  }
}
/* ==========================================================================
   Project detail

   Figma 대응
   - data-project-media="mobile" : works_detail_pc_type1
   - data-project-media="device" : works_detail_pc_type2
   - 699px 이하                  : work_detail_mobile
   - 700px ~ 1024px              : home_duo_opened
   ========================================================================== */
.work-detail-page {
  margin: 0;
  overflow-x: clip;
  background: #121213;
  color: #fff;
}

.work-detail-page *,
.work-detail-page *::before,
.work-detail-page *::after {
  box-sizing: border-box;
}

.detail-content-layer {
  position: relative;
  z-index: 2;
  width: 100%;
  background: #121213;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 100px;
  width: min(1380px, 100% - 60px);
  margin: 0 auto;
  padding-top: 122px;
}

.detail-summary {
  order: -1;
}
.detail-summary__mockup {
  position: relative;
  display: grid;
  min-height: 620px;
  place-items: center;
  overflow: visible;
}
.detail-summary__mockup img {
  position: relative;
  z-index: 1;
  width: auto;
  height: var(--mockup-height, 620px);
  max-width: min(550px, 100%);
  object-fit: contain;
}
.detail-summary__shape {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(980px, 88vw);
  height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  transform: translate(-50%, -50%);
}
.detail-summary__copy {
  display: grid;
  /* 좌측은 실제 타이틀·라벨 길이에 맞춰 늘어나고,
     우측 설명은 남은 영역을 전부 사용합니다.
     좌측은 최대 45%까지만 허용해 우측을 침범하지 않게 합니다. */
  grid-template-columns: fit-content(45%) minmax(0, 1fr);
  gap: 60px;
  width: min(1240px, 100%);
  margin: 40px auto 0;
}
.detail-summary__copy > * {
  min-width: 0;
}
.detail-summary__copy h1 {
  margin: 0;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.02em;
}
.detail-summary__copy > p {
  margin: 0;
  font-size: 22px;
  line-height: 1.55;
  letter-spacing: -0.02em;
}
.detail-summary__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 30px 0 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 16px;
  font-style: italic;
  list-style: none;
}

/* 목업만 떠오르게 하고, 배경과 레이아웃은 제자리에 둡니다. */
@media (prefers-reduced-motion: no-preference) {
  .detail-summary__mockup > img {
    animation: detail-mockup-float 8s ease-in-out infinite;
  }
}
@keyframes detail-mockup-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 45px;
  align-items: center;
}

.detail-shot-row {
  display: flex;
  align-items: flex-start;
  gap: 45px;
  justify-content: center;
  width: 100%;
}

/* --------------------------------------------------------------------------
   조합형 스크린샷 행
   프로젝트마다 HTML 또는 project-detail.js에서 modifier만 선택해 재사용합니다.
   -------------------------------------------------------------------------- */
.detail-shot-row--single {
  grid-template-columns: minmax(0, 1fr);
}

.detail-shot-row--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-shot-row--large-small {
  grid-template-columns: minmax(0, 1fr) minmax(0, 600px);
}

.detail-shot-row--small-large {
  grid-template-columns: minmax(0, 600px) minmax(0, 1fr);
}

.detail-shot {
  flex: 1 1 0;
  min-width: 0;
  width: min(400px, 100%);
  max-width: 400px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  background: #0d0c11;
}
.detail-shot img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

[data-project-media=mobile] .detail-shot {
  aspect-ratio: var(--shot-ratio, auto);
}

[data-project-media=device] .detail-shot {
  width: 100%;
  max-width: none;
  aspect-ratio: var(--shot-ratio, auto);
}
[data-project-media=device] .detail-gallery {
  width: 100%;
}
[data-project-media=device] .detail-summary__mockup {
  min-height: 749px;
}
[data-project-media=device] .detail-summary__mockup img {
  width: auto;
  height: var(--mockup-height, 700px);
  max-width: min(895px, 100%);
}
[data-project-media=device] .detail-summary__shape {
  width: min(1380px, 100vw - 60px);
  height: 390px;
}

.detail-gallery__statement {
  max-width: 1100px;
  margin: 20px auto;
  padding: 45px 0;
  font-size: clamp(22px, 2.45vw, 30px);
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  letter-spacing: -0.02em;
}

@media (min-width: 1195px) {
  .detail-summary__tags {
    flex-wrap: wrap;
    white-space: normal;
  }
}
/* Figma: extra_service / 다른 프로젝트 */
.detail-other-projects {
  width: calc(100% - 60px);
  max-width: 1650px;
  margin: 120px auto 0;
  padding: 55px 0;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #fff;
}
.detail-other-projects h2 {
  margin: 0 0 55px;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.02em;
}
.detail-other-projects__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.detail-other-projects__list--single {
  grid-template-columns: minmax(0, 1fr);
}

.detail-other-project {
  position: relative;
  display: grid;
  min-height: 285px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
}
.detail-other-project__visual, .detail-other-project__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.detail-other-project__visual {
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.2, 0.75, 0.25, 1);
}
.detail-other-project__shade {
  z-index: 1;
  background: rgba(13, 12, 17, 0.8);
  transition: background-color 300ms ease;
}
.detail-other-project__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}
.detail-other-project strong {
  font-size: 35px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.02em;
}
.detail-other-project__tags {
  color: rgba(255, 255, 255, 0.66);
  font-size: 16px;
  font-style: italic;
}
.detail-other-project__arrow {
  display: grid;
  width: 40px;
  height: 40px;
  margin-top: 15px;
  place-items: center;
  border: 1px solid #fff;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.detail-other-project:hover .detail-other-project__visual {
  transform: scale(1.035);
}
.detail-other-project:hover .detail-other-project__shade {
  background: rgba(13, 12, 17, 0.67);
}

/* Duo opened
   - 왼쪽 스크린샷 목록이 먼저 끝까지 스크롤됩니다.
   - 오른쪽 프로젝트 요약은 그동안 화면에 고정됩니다.
   - 왼쪽 목록의 끝에 도달하면 sticky가 자연스럽게 풀리며 오른쪽도 함께 내려갑니다. */
@media (min-width: 700px) and (max-width: 1194px) {
  .detail-layout {
    grid-template-columns: 50% 50%;
    gap: 0;
    width: 100%;
    padding-top: 122px;
  }
  .detail-gallery {
    grid-column: 1;
    gap: 55px;
    padding: 0 40px;
  }
  .detail-shot-row {
    flex-direction: column;
    gap: 55px;
  }
  .detail-shot-row > .detail-shot {
    flex: none;
    max-width: 100%;
  }
  .detail-shot {
    width: 100%;
    border-radius: 8px;
  }
  .detail-gallery__statement {
    margin: 0;
    padding: 45px 0;
    font-size: 20px;
    text-align: left;
  }
  .detail-summary {
    position: sticky;
    top: 122px;
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    order: 0;
    min-width: 0;
    /* 화면 높이가 낮아도 우측 설명의 마지막 줄까지 볼 수 있게 합니다.
       내용이 화면보다 길 때만 이 컬럼 안에서 세로 스크롤이 생깁니다. */
    max-height: calc(100svh - 152px);
    overflow-x: hidden;
    overflow-y: auto;
    /* 우측 정보가 끝난 뒤 문서 스크롤로 자연스럽게 이어지도록 auto를 사용합니다. */
    overscroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .detail-summary::-webkit-scrollbar {
    display: none;
  }
  .detail-summary.is-scrollable::before, .detail-summary.is-scrollable::after {
    content: "";
    display: block;
    position: sticky;
    z-index: 2;
    height: 48px;
    pointer-events: none;
  }
  .detail-summary.is-scrollable::before {
    top: 0;
    margin-bottom: -48px;
    background: linear-gradient(to bottom, #121213, transparent);
  }
  .detail-summary.is-scrollable::after {
    bottom: 0;
    margin-top: -48px;
    background: linear-gradient(to top, #121213, transparent);
    box-shadow: 0 24px 0 #121213;
  }
  .detail-summary.is-at-scroll-top::before, .detail-summary.is-at-scroll-bottom::after {
    visibility: hidden;
  }
  /* PC type2의 72vw 규칙보다 우선하도록 data 속성을 함께 적습니다. */
  [data-project-media] .detail-summary__mockup {
    min-height: 400px;
    padding-block: 20px;
  }
  [data-project-media] .detail-summary__mockup img {
    width: auto;
    height: var(--mockup-height-compact, 360px);
    max-width: 100%;
    object-fit: contain;
  }
  [data-project-media] .detail-summary__shape {
    width: calc(100% - 30px);
    height: 150px;
  }
  .detail-summary__copy {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: auto;
    margin: 30px 55px 0;
  }
  .detail-summary__copy h1 {
    font-size: 30px;
  }
  .detail-summary__copy > p {
    font-size: 16px;
    line-height: 1.4;
  }
  .detail-summary__tags {
    margin-top: 15px;
    font-size: 14px;
  }
  .detail-other-projects {
    width: calc(100% - 40px);
    margin-top: 60px;
    padding: 55px 0;
  }
  .detail-other-projects h2 {
    margin-bottom: 55px;
    font-size: 35px;
  }
  .detail-other-projects__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .detail-other-project {
    min-height: 267px;
  }
  .detail-other-project strong {
    font-size: 30px;
  }
}
/* Duo처럼 가로는 넓지만 높이가 낮은 화면
   이미지와 글자 크기는 줄이지 않고, 우측 패널의 가용 높이만 제한합니다.
   넘치는 내용은 위의 순차 스크롤 로직으로 먼저 보여줍니다. */
@media (min-width: 700px) and (max-width: 1194px) and (max-height: 760px) {
  .detail-summary {
    top: 92px;
    /* 최초 위치 122px + 하단 안전 여백 20px을 제외한 실제 가용 높이 */
    max-height: calc(100svh - 142px);
    padding-bottom: 20px;
  }
}
@media (min-width: 700px) and (max-width: 1194px) {
  [data-tablet-layout=stacked] .detail-layout {
    display: flex;
    flex-direction: column;
    gap: 70px;
    width: calc(100% - 40px);
  }
  [data-tablet-layout=stacked] .detail-summary {
    position: static;
    order: -1;
    align-self: stretch;
    max-height: none;
    padding-bottom: 0;
    overflow: visible;
  }
  [data-tablet-layout=stacked] .detail-summary__copy {
    margin-inline: 0;
  }
  [data-tablet-layout=stacked] .detail-gallery {
    width: 100%;
    padding-inline: 0;
  }
}
/* 모바일 상세: Figma work_detail_mobile처럼 모든 콘텐츠를 한 줄로 표시 */
@media (max-width: 699px) {
  .detail-layout {
    display: flex;
    flex-direction: column;
    gap: 70px;
    width: 100%;
    max-width: 100%;
    padding: 110px 20px 0;
  }
  .detail-summary {
    order: -1;
  }
  [data-project-media] .detail-summary__mockup {
    min-height: 0;
    padding: 20px 0;
  }
  [data-project-media] .detail-summary__mockup img {
    height: var(--mockup-height-mobile, 340px);
    max-width: 100%;
  }
  [data-project-media] .detail-summary__shape {
    width: 100%;
    height: 150px;
  }
  .detail-summary__copy {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
  }
  .detail-summary__copy h1 {
    font-size: 30px;
  }
  .detail-summary__copy > p {
    font-size: 16px;
    line-height: 1.4;
  }
  .detail-summary__tags {
    margin-top: 15px;
    font-size: 14px;
  }
  .detail-gallery {
    gap: 30px;
    padding: 0 20px;
  }
  .detail-shot-row {
    flex-direction: column;
    gap: 30px;
  }
  .detail-shot-row > .detail-shot {
    flex: none;
  }
  .detail-shot {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
  }
  .detail-shot img {
    object-fit: contain;
  }
  .detail-gallery__statement {
    margin: 0;
    padding: 45px 0;
    font-size: 20px;
    text-align: left;
  }
  .detail-other-projects {
    width: calc(100% - 40px);
    margin: 70px auto 0;
    padding: 55px 0;
  }
  .detail-other-projects h2 {
    margin-bottom: 40px;
    font-size: 32px;
  }
  .detail-other-projects__list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .detail-other-project {
    min-height: 267px;
  }
  .detail-other-project strong {
    font-size: 30px;
  }
}
.detail-summary__mockup[hidden],
.detail-summary__copy > p[hidden] {
  display: none;
}

.detail-shot[data-shot-ratio=auto] img {
  height: auto;
}

.detail-shot[data-shot-ratio=fixed] img {
  height: 100%;
}

[data-project-media] .detail-shot[data-shot-width=custom] {
  flex: none;
  width: min(100%, var(--shot-max-width));
  max-width: min(100%, var(--shot-max-width));
}

.detail-other-projects[hidden] {
  display: none;
}

.class-page .detail-summary__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  text-align: center;
}
.class-page .detail-summary__copy .detail-summary__tags {
  justify-content: center;
}


