/* index.css - Final Integrated Version with Text Animation */

:root {
  --font-serif: 'Playfair Display', 'Cormorant Garamond', serif;
  --font-family: 'SUIT Variable', 'Pretendard Variable', system-ui,
    -apple-system, sans-serif;
  --primary-color: #1a1a1a;
  --accent-color: #c5a47e;
  /* 골드 */
}

* {
  box-sizing: border-box;
  color: black;
  font-family: var(--font-family);
  scroll-behavior: smooth;
}

/* ==================== 
   전역 로딩 스피너 
   ==================== */
#globalLoader {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.loader-backdrop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  width: 100%;
  height: 100%;
  gap: 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-text {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}


body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  background-color: #ffffff;
  overflow-x: hidden;
}

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

ul,
li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fa-arrow-right {
  color: var(--accent-color);
}

/* ---------------------- */
/* 1. 히어로 이미지 영역 (Fade & Zoom) */
/* ---------------------- */
.HeroImage {
  position: relative;
  width: 100%;
  height: 90vh;
  /* 화면 전체 높이 (PC 기준) */
  min-height: 600px;
  background-color: #000;
  /* 로딩 전 검은 배경 */
  overflow: hidden;
}

.hero-swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  overflow: hidden;
  /* 이미지가 커질 때 밖으로 나가지 않게 */
}

.hero-img-box {
  width: 100%;
  height: 100%;
  position: relative;
}

/* 1-1. 이미지 오버레이 (텍스트 가독성용) - [추가됨] */
.hero-img-box::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  /* 35% 투명도 검은색 막 */
  z-index: 1;
}

.hero-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1);
  transition: transform 10s ease;
  /* 줌인 속도 */
}

/* ★ 중요: 현재 보여지는 슬라이드만 이미지 줌인 실행 */
.swiper-slide-active .hero-img-box img {
  transform: scale(1.1);
  /* 1.1배로 천천히 커짐 */
}

/* 1-2. 히어로 텍스트 애니메이션 스타일 - [추가됨] */
.hero-text-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* 화면 정중앙 배치 */
  z-index: 5;
  /* 오버레이보다 위에 */
  text-align: center;
  width: 80%;
  color: #fff;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  /* PC 폰트 크기 */
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -1px;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);

  /* 애니메이션 초기 상태 (안 보임 + 아래로 내려감) */
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s cubic-bezier(0.215, 0.61, 0.355, 1);
  /* 부드러운 효과 */
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 1px;

  /* 애니메이션 초기 상태 */
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* ★ 핵심: 슬라이드가 활성화될 때 텍스트 등장 */
.swiper-slide-active .hero-title {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
  /* 슬라이드 바뀌고 0.5초 뒤 등장 */
}

.swiper-slide-active .hero-subtitle {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.7s;
  /* 제목보다 0.2초 늦게 등장 (시차 효과) */
}

/* 페이지네이션 (하단 점) 커스텀 */
.hero-pagination {
  bottom: 40px !important;
  z-index: 10;
}

.hero-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  margin: 0 8px !important;
  transition: all 0.3s;
}

.hero-pagination .swiper-pagination-bullet-active {
  background: var(--accent-color, #c5a47e);
  /* 골드색 */
  width: 30px;
  /* 활성화되면 길어지게 */
  border-radius: 5px;
}

/* ---------------------- */
/* 2. 메인 카피 영역 */
/* ---------------------- */
.main-content>h1 {
  margin: 80px 20px 10px;
  font-size: 2rem;
  text-align: center;
  color: var(--primary-color);
}

/* ---------------------- */
/* 3. 최신 프로젝트 (JS로 처리) */
/* ---------------------- */
.latest-projects-section {
  padding: 80px 20px;
  background-color: #f9f9f9;
  width: 100%;
  overflow: hidden;
}

/* JS에서 생성되는 .img-card 스타일은 JS 내부에 있거나 여기서 보조 */
.img-card {
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* ---------------------- */
/* 4. [통합됨] 프리미엄 소개 + 통계 섹션 */
/* ---------------------- */
.merged-about-section {
  background-color: #1a1a1a;
  /* 다크 배경 */
  padding: 120px 20px;
  color: #fff;
  overflow: hidden;
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
}

/* 왼쪽: 비주얼 영역 */
.about-visual {
  position: relative;
  flex: 1;
  max-width: 450px;
}

.visual-frame {
  position: absolute;
  top: -30px;
  left: -30px;
  width: 100%;
  height: 100%;
  border: 3px solid var(--accent-color);
  z-index: 1;
  pointer-events: none;
}

.visual-img-box {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 600px;
  overflow: hidden;
  filter: grayscale(100%);
  transition: filter 0.5s;
}

.visual-img-box:hover {
  filter: grayscale(0%);
}

.visual-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 오른쪽: 텍스트 영역 */
.about-text-content {
  flex: 1;
  text-align: left;
}

.sub-label {
  color: var(--accent-color);
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 15px;
}

.about-text-content h2 {
  font-size: 2.5rem;
  line-height: 1.3;
  margin-bottom: 30px;
  font-weight: 400;
  color: #fff;
}

.gold-text {
  color: var(--accent-color);
  font-weight: 700;
}

.about-text-content .desc {
  color: #999;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 50px;
  max-width: 90%;
}

/* 통계 그리드 (2열로 배치) */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  padding-left: 20px;
  border-left: 2px solid #333;
  /* 왼쪽에 얇은 선 포인트 */
}

.stat-num {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 10px;
}

/* 1 Year 같은 텍스트 혼합용 */
.stat-num-wrapper {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--accent-color);
  font-size: 1.2rem;
  font-weight: 700;
}

.stat-num-wrapper .stat-num {
  margin-bottom: 0;
  font-size: 3rem;
}

.stat-unit {
  color: white;
}

.stat-label {
  font-size: 0.85rem;
  color: #ccc;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* 링크 */
.mission-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 600;
  letter-spacing: 1px;
  border-bottom: 1px solid #555;
  padding-bottom: 5px;
  transition: all 0.3s;
}

.mission-link:hover {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  gap: 15px;
}

/* ---------------------- */
/* 5. 파트너스 롤링 배너 */
/* ---------------------- */
.partners-rolling-section {
  padding: 60px 0;
  background-color: #fff;
  border-top: 1px solid #eee;
  overflow: hidden;
}

.rolling-title {
  text-align: center;
  margin-bottom: 30px;
}

.rolling-title p {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: 3px;
}

.rolling-wrapper {
  display: flex;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.rolling-wrapper::before,
.rolling-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.rolling-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #fff, transparent);
}

.rolling-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #fff, transparent);
}

.rolling-track {
  display: flex;
  gap: 60px;
  animation: scrollRolling 30s linear infinite;
  width: max-content;
}

.partner-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ccc;
  white-space: nowrap;
  cursor: default;
  transition: color 0.3s;
}

.partner-logo:hover {
  color: #333;
}

@keyframes scrollRolling {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ---------------------- */
/* 6. 하단 CTA 섹션 */
/* ---------------------- */
.bottom-cta-section {
  padding: 100px 20px;
  background-color: #1a1a1a;
  text-align: center;
  color: #fff;
  position: relative;
  border-top: 1px solid #333;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-family: var(--font-serif);
  margin-bottom: 20px;
  color: #fff;
}

.cta-content p {
  font-size: 1.1rem;
  color: #999;
  line-height: 1.6;
  margin-bottom: 50px;
}

.cta-btn-group {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.btn-gold {
  padding: 15px 40px;
  background-color: var(--accent-color);
  color: #fff;
  font-weight: 700;
  border-radius: 4px;
  transition: all 0.3s;
}

.btn-gold:hover {
  background-color: #b08d66;
  transform: translateY(-3px);
}

.btn-line {
  padding: 15px 40px;
  border: 1px solid #555;
  color: #ccc;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.3s;
}

.btn-line:hover {
  border-color: #fff;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
}

/* ---------------------- */
/* 7. 스크롤 등장 애니메이션 */
/* ---------------------- */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
  /* margin-bottom: 0; */
}

.reveal.latest {
  margin-bottom: 0;
}

.delay-100 {
  transition-delay: 0.1s;
}

.delay-200 {
  transition-delay: 0.2s;
}

.delay-300 {
  transition-delay: 0.3s;
}

/* ========================================= */
/* 8. 반응형 통합 (Mobile Optimization)      */
/* ========================================= */

/* 태블릿 및 모바일 (900px 이하) */
@media screen and (max-width: 900px) {

  /* --- [1] 히어로 섹션 (Hero) --- */
  .HeroImage {
    margin-top: 75px;
    width: 100%;
    height: 400px;
    /* 기본 모바일 높이 */
    min-height: 0 !important;
    background-color: #000;
  }

  /* Swiper 내부 요소들이 부모 높이를 꽉 채우도록 설정 */
  .hero-swiper,
  .swiper-wrapper,
  .swiper-slide {
    width: 100%;
    height: 100% !important;
    position: relative;
  }

  /* 이미지 박스 */
  .hero-img-box {
    width: 100%;
    height: 100% !important;
    overflow: hidden;
    position: relative;
  }

  /* 이미지 자체 설정 */
  .hero-img-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;

    transform: none !important;
    /* 줌인 효과 제거 */
    transition: none !important;
  }

  /* [추가] 모바일 텍스트 조정 */
  .hero-title {
    font-size: 1.8rem;
    /* 제목 크기 줄임 */
    margin-bottom: 10px;
  }

  .hero-subtitle {
    font-size: 1rem;
    /* 부제목 크기 줄임 */
    word-break: keep-all;
    /* 단어 끊김 방지 */
    width: 90%;
    margin: 0 auto;
  }

  .hero-pagination {
    bottom: 20px !important;
  }

  /* --- [2] 메인 타이틀 --- */
  .main-content>h1 {
    font-size: 1.5rem;
    margin: 40px 20px 0;
  }

  /* --- [3] 소개 및 통계 (Merged Section) --- */
  .merged-about-section {
    padding: 60px 20px !important;
  }

  .about-container {
    flex-direction: column !important;
    gap: 50px !important;
  }

  .about-visual {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
  }

  .visual-img-box {
    width: 100% !important;
    height: auto !important;
    /* 높이 자동 */
    aspect-ratio: auto !important;
  }

  .visual-img-box img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .about-text-content {
    text-align: center !important;
    width: 100% !important;
  }

  .about-text-content .desc {
    margin: 0 auto 40px !important;
    max-width: 100% !important;
    word-break: keep-all;
  }

  .stats-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    margin-bottom: 40px !important;
    justify-items: center;
  }

  .stat-box {
    width: 100% !important;
    border-left: none !important;
    border-top: 1px solid #333 !important;
    padding-top: 20px !important;
    padding-left: 0 !important;
    align-items: center !important;
  }

  .stat-num {
    font-size: 2.5rem !important;
    margin-bottom: 5px !important;
  }

  .stat-num-wrapper .stat-num {
    font-size: 2.5rem !important;
  }

  /* --- [4] 기타 섹션 (CTA 등) --- */
  .bottom-cta-section {
    padding: 60px 20px;
  }

  .cta-btn-group {
    flex-direction: column;
  }
}

/* 작은 모바일 (669px 이하) - 히어로 높이 더 줄임 */
@media screen and (max-width: 669px) {
  .HeroImage {
    height: 330px !important;
  }

  /* 텍스트 더 작게 */
  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }
}

/* 초소형 모바일 (400px 이하) - 히어로 높이 최소화 */
@media screen and (max-width: 400px) {
  .HeroImage {
    height: 240px !important;
    margin-top: 78px;
  }

  /* 텍스트 최소화 */
  .hero-title {
    font-size: 1.3rem;
  }

  .hero-subtitle {
    display: none;
    /* 공간 부족하면 부제목 숨김 */
  }
}

/* ==================== 
   스크롤 상단 이동 버튼
   ==================== */
.scroll-to-top {
  position: fixed;
  bottom: 90px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-color, #c5a47e);
  color: #fff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s;
}

.scroll-to-top:hover {
  background: #b08d66;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

@media screen and (max-width: 600px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}