/* =================================== */
/* 1. Global & Base Styles             */
/* =================================== */
:root {
  --page-w: 100%;
  --pad: 40px;
  --line: #e6e6e6;
  --text: #0e0e0e;
  --muted: #6e6e6e;
  --header-h: 76px;
  --pad-mobile: 24px; 
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  display: none;
}

body {
  font-family: Pretendard, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Noto Sans KR', sans-serif;
  color: var(--text);
  background: #fff;
}

a {
  text-decoration: none;
  color: inherit;
}


/* =================================== */
/* 2. Layout                           */
/* =================================== */
.page {
  max-width: var(--page-w);
  margin: 0 auto;
  background: #0e0e0e;
}

/* =================================== */
/* 3. Header                           */
/* =================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 999;
  transform: translateZ(0);
}

.header-inner {
  height: 100%;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header .logo {
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}

/* CONTACT와 VIEW MORE 링크 스타일 통합 */
.header a.contact { 
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  height: 38px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.08);
  transition: all 0.25s ease;
}
.slider-head .right
{font-size: 16px;
  color:#b7b7b7;}

.header a.contact:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}


/* =================================== */
/* 4. Intro Overlay                    */
/* =================================== */
.intro {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 999999; 
  pointer-events: none;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f9f9f9;
  overflow: hidden;
}

.intro-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: clamp(24px, 6vw, 80px);
  text-align: center;
  overflow: hidden;
}

.intro-logo {
  font-size: clamp(24px, 3.5vw, 46px);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.05;
  white-space: nowrap;
  color: #f9f9f9;
}

/* =================================== */
/* 5. Main Content (Hero, About, Slider) */
/* =================================== */
.hero {
  width: min(1920px, 100%);   
  aspect-ratio: 1920 / 700; 
  overflow: hidden;
  background: url(./assets/images/hero_pc.png);
  background-size: cover;
}

/* =================================== */





.about-grid {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 56px 40px 56px 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: #0e0e0e;
  color: #fff;
}

.about-left .title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.about-right .smallcaps {
  font-size:clamp(1.05rem, 0.9vw + 0.6rem, 1.15rem);
  line-height: 1.5;
  letter-spacing: 0.08em;
  font-weight: 400;
  color: #b7b7b7;
}





.about-right .body-kr {
  font-size: clamp(1.05rem, 0.9vw + 0.6rem, 1.05rem);
  line-height: 1.6;
  color: #b7b7b7;
}

.slider {
  overflow: hidden;
  max-width: 100% !important;
  height: auto;
}

.slider .track .slide {
  overflow: hidden;
  width: 420px;
  cursor: pointer;
  margin-right: 24px; 
}

.slider .track { 
  display: flex !important;
  width: max-content !important;
  
  padding: 0 var(--pad);
  will-change: transform;
}

.slider-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px;
  padding-top: 30px;
  border-top: 1px solid #2a2a2a;
  color: #fff;
}

.slider-head .left {
  font-size: 32px;
  font-weight: 600;
}

/* 🚨 수정된 부분: 간격 설정을 마진으로 변경하여 안정성 확보 */
/* .slide 부분도 혹시 모르니 다시 확인 */
.slide {
  cursor: pointer;
  margin-right: 16px;
}

.slide .card {
  margin: 0;
  display: block;
}

.slide .card img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 0px;
  display: block;
}

.slide .card .sep {
  height: 0px;
  background: #0e0e0e;
  margin: 14px 0;
}

.slide .card .cap {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .02em;
  color: #fff;
}


/* =================================== */
/* 6. Work Modal (Slider Included)     */
/* =================================== */
.work-modal {
  position: fixed;
  top: 0; 
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  visibility: hidden;
  /* 🚨 이 줄을 삭제하거나 주석 처리하여 초기 display를 none으로 가정합니다. */
  /* display: flex;  */
  display: none; /* JS가 컨트롤하기 쉽도록 초기값을 none으로 설정 */
  align-items: center; 
  justify-content: center; 
  
}

.work-modal[aria-hidden="false"] {
  visibility: visible;
}

.work-overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  cursor: pointer;
  /* 🚨 버벅임 개선: 애니메이션 대상에 GPU 가속 명시 */
  will-change: opacity; 
}

/* ✅ 모달 자체 크기 동적 변경 */
.work-sheet {
  position: fixed; 
  /* min(880px, 90vw)에서 min(800px, 90vw)로 변경 */
  width: min(800px, 90vw); 
  /* ✅ height: auto; 로 변경하여 내용에 따라 높이가 늘어나도록 설정 */
  height: 100%; 
  /* ✅ 모달의 최대 높이를 화면 높이에 맞게 설정. 내용이 많으면 스크롤 발생 */
  max-height: calc(100vh - var(--header-h) - 40px); 

  min-width: 320px; 
  min-height: 280px; /* 최소 높이 유지 */

  z-index: 9999;
  background: #e6e6e6;
  color: #0e0e0e; 
  display: flex;
  flex-direction: column;
  /* overflow: hidden; -> body에서 스크롤을 관리하므로 hidden 유지 */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); 
  /* 🚨 버벅임 개선: 애니메이션 대상에 GPU 가속 명시 */
  will-change: transform, opacity; 
}

.work-sheet-body, .work-sheet {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.work-sheet-body::-webkit-scrollbar,
.work-sheet::-webkit-scrollbar {
  display: none;
}

.work-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 0px 18px;
  background: #e5e5e5;
}

.work-title {
  font-size: 16px;
  letter-spacing: .09em;
  font-weight: 600;
  text-transform: uppercase;
  color: #e5e5e5;
  margin: 0;
}

.work-close {
  /* 슬라이더(position: relative)를 기준으로 위치를 잡습니다. */
  position: absolute; 
  top: 16px;          /* 위쪽에서 16px */
  right: 16px;        /* 오른쪽에서 16px */
  z-index: 11;        /* 슬라이드 이미지보다 위에 표시되도록 */
  /* --- 나머지 스타일 --- */
  font-size: 22px;
  width: 34px;
  height: 34px;
  background: rgba(0, 0, 0, 0.2); /* 잘 보이도록 호버 효과를 살짝 수정했습니다 */
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}

.work-close:hover {
  background: rgba(255, 255, 255, 0.2); /* 잘 보이도록 호버 효과를 살짝 수정했습니다 */
}

/* ✅ 모달 본문 높이 동적 변경 및 스크롤 관리 */
.work-sheet-body {
  /* ❌ flex: 1; 제거: 내용만큼만 높이를 가지도록 함 */
  /* flex: 1; */
  display: flex;
  flex-direction: column; 
  align-items: flex-start;
  /* ✅ 내용이 많아 max-height를 초과할 경우 스크롤 허용 */
  overflow-y: auto; 
  overflow-x: hidden; 
  color: #0e0e0e;
  /* ✅ body 아래쪽에 패딩 추가 (스크롤 시 여유 공간) */
  padding: 0 0 0px 0;
  /* 🚨 버벅임 개선: Flex 계산 안정화를 위한 필수 설정 */
  min-height: 0; 
}

/* ✅ work-callout 줄바꿈 및 높이 자동 조절 */
.work-callout {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .02em;
  padding-bottom: 8px;
  text-align: left;
  margin-top: 4px;
  margin-left: 20px;
  margin-bottom: 15px;
  
  /* ✅ 줄바꿈을 반영하고 공백을 유지하도록 추가 */
  white-space: pre-wrap; /* \n(줄바꿈)을 유지하고, 긴 단어는 줄바꿈 */
  word-break: break-word; /* 컨테이너를 넘어가는 긴 단어 강제 줄바꿈 */
}

/* --- Modal Slider Specific Styles --- */
.work-media {
  width: 100%;
  display: block; 
  margin: 0; 
  flex-grow: 1; 
  min-height: 180px; 
  /* 수정: 최대 높이를 600px로 설정 */
  max-height: 600px;
}

.modal-slider {
  position: relative; /* 이 속성이 매우 중요합니다! */
  width: 100%;
  height: 100%; 
  overflow: hidden;
}

.modal-track {
    display: flex;
    max-width: 100%;  
    max-height: 100%; 
    will-change: transform;
}

.modal-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
}

.work-media img,
.work-media video {
  width: 100%;
  height: 100%; 
  max-width: 100%;  
  max-height: 100%; 
  object-fit: contain; 
  display: block;
  border-radius: 0; 
  min-height: auto; 
  max-height: none; 
}

.work-product-text {
  font-size: 24px; 
  font-weight: 800; 
  color: #333; 
  margin: 0px 0px 1px 20px; 
  letter-spacing: 0.05em; 
  text-transform: uppercase; 
  text-align: left; 
  width: 100%;
  margin-top: 18px;
}


/* =================================== */
/* 7. Footer                           */
/* =================================== */
.footer {
  padding: 34px var(--pad) 40px;
  margin-top: 64px;
  border-top: 1px solid #2a2a2a;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.footer-grid h4 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: .6px;
  color: #fff;
  font-weight: 800;
}

.footer-grid h4 a img {
  width: 26px;
  vertical-align: middle;
}

.footer-grid a {
  font-size: 13px;
  line-height: 1.6;
  color: #a0a0a0;
  font-weight: 400;
}

/* =================================== */
/* 8. Responsive Design                */
/* =================================== */

@media (max-width: 1200px) {
  .about-grid {
    padding: 48px 28px 48px 28px;
  }

}

@media (max-width: 960px) {
  :root {
    --pad: 30px;
  }
  .footer {
    margin-top: 40px;
}
}

@media (max-width: 800px) {
  
}

@media (max-width: 640px) {
  :root {
    --pad: var(--pad-mobile); 
  }
  .header a.contact { 
   height: 34px;
  }
  .work-close{
    width:30px;
    height: 30px;
  }
  .modal-prev,
  .modal-next {
    width: 28px !important;
    height: 28px !important;
  }

  /* ✅ 모바일: 높이 동적 변경 */
  .work-sheet {
    width: 100%; 
    height: 100%; /* auto로 변경 */
    max-height: 80vh; /* 최대 높이 설정 */
  }
  .work-media{
    flex-grow:0;
  }
  .work-callout{
    margin-bottom: 15px;
  }

}

@media (max-width: 480px) {
  :root {
      --pad: 16px; 
  }
  /* ✅ 모바일: 높이 동적 변경 */
  .work-sheet {
    width: clamp(280px, 100vw, 480px); 
    height: auto; /* auto로 변경 */
    max-height: 80vh; /* 최대 높이 설정 */
  }
  .work-media{
    flex-grow:0;
  }
  .work-callout{
    margin-bottom: 15px;
    margin-left: 14px;
    font-size: 14px;
    /* white-space: pre-wrap;는 상속됨 */
  }
  .work-product-text{
    font-size: 22px;
    margin-left: 14px;
  }
}

@media (max-width: 420px) {
  :root {
    --pad: 24px; 
}
  
  .work-close{
    width:28px;
    height: 28px;
  }
  .modal-prev,
  .modal-next {
    width: 28px !important;
    height: 28px !important;
  }
  .work-callout{
    margin-bottom: 15px;
    font-size: 14px;
  }
  .work-product-text{
    font-size: 20px;
    margin-bottom: 0px;
  }


}



@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr; 
  }
}

@media (max-width: 768px) {
  .header a.contact { 
    padding: 0 16px;
    font-size: 14px;
  }
}


/* ===============================
   ✅ Responsive Slider Adjustment
   =============================== */
@media (max-width: 1600px) {
  .slider .track .slide {
    width: 360px;
  }
  .slide .card img {
    height: 440px;
  }
}

@media (max-width: 1200px) {
  .slider .track .slide {
    width: 300px;
  }
  .slide .card img {
    height: 380px;
  }
  .slider .track .slide{
    margin-right: 12px;
  }
.hero {
  width: min(1920px, 100%);   
  aspect-ratio: 1920 / 700; 
  overflow: hidden;
  background: url(./assets/images/hero_pc.png);
  background-size: cover;
}
}

@media (max-width: 1100px) {
  .hero {
    width: min(1100px, 100%);   
    aspect-ratio: 1100 / 667; 
    overflow: hidden;
    background: url(./assets/images/hero_pc_1100.png);
    background-size: cover;
  }
}



@media (max-width: 960px) {
  .slider .track .slide {
    width: 260px;
  }
  .slide .card img {
    height: 320px;
  }
}

@media (max-width: 768px) {
  .slider .track .slide {
    width: 220px;
  }
  .slide .card img {
    height: 280px;
  }
}

@media (max-width: 600px) {
  .hero {
    width: min(600px, 100%);   
    aspect-ratio: 600 / 600; 
    overflow: hidden;
    background: url(./assets/images/hero_m_600.png);
    background-size: cover;
  }
}
@media (max-width: 420px) {
  .hero {
    width: min(420px, 100%);   
    aspect-ratio: 420 / 530; 
    overflow: hidden;
    background: url(./assets/images/hero_m_420.png);
    background-size: cover;
  }
}

@media (max-width: 390px) {
 

  .header a.contact { 
    height: 32px;
    font-size: 12px;
   }
   .header{
    height: 62px;
   }
}



/* ===============================
   Modal Slider Navigation Buttons
   =============================== */
   .modal-slider {
    position: relative;
    overflow: hidden;
  }
  
  .modal-prev,
  .modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  
  .modal-prev {
    left: 12px;
  }
  
  .modal-next {
    right: 12px;
  }


  /* ===============================
   9. Icon Image Styles
   =============================== */
.icon-img {
  width: 20px; /* 클로즈 버튼 내부 아이콘 크기 */
  height: 20px;
  object-fit: contain;
  /* 🚨 PNG 이미지 색상이 흰색이라면 이 줄을 삭제하세요. */
  /* filter: invert(1); */ 
}

/* 슬라이드 버튼 내부 아이콘 크기 조정 */
.modal-prev .icon-img,
.modal-next .icon-img {
  width: 24px;
  height: 24px;
  /* 🚨 PNG 이미지 색상이 흰색이라면 이 줄을 삭제하세요. */
  /* filter: invert(1); */ 
}

.work-modal[aria-hidden="false"] {
  visibility: visible;
  /* 🚨 JS에서 display: flex를 설정하므로 여기서 display: flex를 제거 */
}