@charset "utf-8";

:root{
  --header-h: 72px; /* 실제 헤더 높이 */      
  --max: 1400px;
  --accent: #32d38a;
}

html, body{
  margin:0;
  background:#070b12;
  height:100%;
}

main {
  padding-top: 0;
}

/* Swiper-like: scroll-snap (no dependency) */
.hero-swiper{
  /* height: calc(100vh - var(--header-h)); */
  height: 100vh;
  min-height: 620px;
  position: relative;
}
.swiper-track{
  height: 100%;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
/* 추가 */
.swiper-track {
  scroll-behavior: auto; /* JS에서 제어 */
}
.swiper-track::-webkit-scrollbar{ height: 0; }

.slide {
  scroll-snap-align: start;
  height: 100%;
  display:flex;
  align-items:center;
  position:relative;
  overflow:hidden;
  color:#fff;
  background:
    radial-gradient(900px 420px at 10% 20%, rgba(50,211,138,.0), transparent 60%),
    linear-gradient(90deg, rgba(0,0,0,.1), rgba(0,0,0,.18)),
    var(--bgimg) center/cover no-repeat;
}
.slide-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 55px 30px;
  width: 100%;
  margin-top: -55px;
}
.slide h1 {
  font-weight:600;
  margin:0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.28;
}
.slide h1 .accent { color: var(--accent); }
.slide p {
  margin-top: 18px;
  font-size: 25px;
  line-height: 1.65;
  color: rgba(255,255,255,.86);
  max-width: 720px;
  white-space: pre-line;
}

.hero-actions {
  margin-top: 28px;
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-lg{
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
}
.btn-ghost{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.22);
  color:#fff;
}
/* .btn-chip{
  padding: 14px 20px;
  color: rgba(255,255,255,.92);
  font-weight: 500;
  border-radius: 10px;
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,.15);
  border-bottom: 1px solid rgba(255,255,255,.1);
  transition: all .25s ease;
  background: rgb(31,63,103,.2);
  box-shadow: inset 5px 8px 6px 0 rgb(5,15,26,0.25);
} */
.btn-chip{
  padding: 14px 20px;
  color: rgba(255,255,255,.92);
  font-weight: 500;
  border-radius: 10px;
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,.15);
  border-bottom: 1px solid rgba(255,255,255,.1);
  transition: all .25s ease;
  background: rgb(0 0 0 / 1.025%);
  box-shadow: inset 5px 8px 6px 0 rgb(5,15,26,0.25);
}
.btn-chip:after {
  content:'';
  display:inline-block;
  margin-left: 25px;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(255,255,255,.78);
  border-bottom: 2px solid rgba(255,255,255,.78);
  transform: rotate(-45deg);
}
.btn-chip:hover{
  background: rgba(50,211,138,.9);
  border-color: rgba(50,211,138,1);
  box-shadow: inset 5px 6px 6px 0 rgb(255,255,255,0.2);
  color:#fff;
}

/* bottom tabs with images */
.hero-tabs{
  position:absolute;
  left:0; right:0;
  bottom: 60px;
  display:flex;
  justify-content:center;
  gap: 70px;
  z-index: 5;
}
.hero-tabs button{
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.3);
  font-size: 17px;
  padding: 10px 25px;
  cursor: pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 10px;
}
.hero-tabs .thumb{
  width: 46px;
  height: 46px;
  border-radius: 999px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
}
.hero-tabs .label{
  font-weight: 500;
}
.hero-tabs .active{
  color: rgba(255,255,255,.60);
  position:relative;
}
.hero-tabs .active::after{
  content:"";
  position:absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom:-6px;
  width: 100%;
  height: 3px;
  background:rgba(255,255,255,.60);
  opacity:.85;
  border-radius: 2px;
}


.btn-ghost{
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15);
  transition: all .25s ease;
  border-radius: 10px;
  background: rgba(44, 228, 152, 0.10);
}
.btn-ghost:hover{
  background: rgba(50,211,138,.9);
  border-color: rgba(50,211,138,1);
  color:#fff;
}

/* ---------------------------- 테스트 애니메이션 ------ */
.hero-title,
.hero-desc {
  opacity: 0;
}

/* 타이틀: 왼쪽 → 오른쪽 */
.hero-title {
  transform: translateX(-40px);
  transition: opacity 1s ease, transform 1s ease;
}

/* 서브 텍스트: 아래 → 위 */
.hero-desc {
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
  transition-delay: .35s;
}

/* 활성화 상태 */
.hero.is-active .hero-title,
.hero.is-active .hero-desc {
  opacity: 1;
  transform: translate(0, 0);
}


/* =========================
   IMAGE VISUAL ANIMATION
   ========================= */

.visual-anim {
  position: relative;
  overflow: hidden;
}

.visual-bg {
  position: absolute;
  inset: 0;
  background-image: var(--bgimg);
  background-size: 120%;
  background-position: center;
  background-repeat: no-repeat;
  transform-origin: center;
  animation: none;
}

/* 활성 슬라이드에서만 실행 */
.slide.active .visual-bg {
  animation: zoomOut 18s ease-out forwards;
}

@keyframes zoomOut {
  from {
    transform: scale(1.25) rotate(0.6deg);
  }
  to {
    transform: scale(1) rotate(0deg);
  }
}
/* =========================
   HERO TEXT LAYER FIX
   ========================= */

.slide-inner {
  position: relative;
  z-index: 2;   /* 텍스트를 배경 위로 */
}

.visual-bg {
  z-index: 1;   /* 배경은 아래 */

}/* ===============================
   VISUAL IMAGE BASE STATE
   =============================== */

.visual-bg {
  transform: scale(1.25) translate(0, 0);
  transition: none;
  will-change: transform;
}


/* =========================
   HERO MOBILE OPTIMIZATION
   ========================= */
  @media (max-width: 820px) {

    /* Hero 전체 높이 조정 */
    .hero-swiper {
      height: 100svh; /* 모바일 주소창 대응 */
      min-height: 540px;
    }

    /* 슬라이드 자체는 중앙 정렬 */
    .slide {
      align-items: center;    
      justify-content: center;
    }

    /* 텍스트 컨테이너 */
    .slide-inner {
      margin-top: 0;
      padding: 0 20px;
      display: flex;
      flex-direction: column;
      align-items: flex-start; 
      text-align: left;   
    }
    .slide h1 {
      font-size: clamp(26px, 7vw, 34px);
      line-height: 1.25;
    }
    /* 설명 문단 폭 유지 */
    .slide p {
      margin-left: 0;
      font-size: 16px;
      margin-right: 0;
    }

    /* 버튼도 좌측 정렬 */
    .hero-actions {
      justify-content: flex-start;
    }

    /* 버튼 영역 */
    .hero-actions {
      margin-top: 20px;
      gap: 10px;
    }

    .btn-lg {
      height: 40px;
      padding: 0 16px;
      font-size: 14px;
    }

    .btn-chip {
      padding: 12px 16px;
      font-size: 14px;
    }

    .btn-chip::after {
      margin-left: 14px;
      width: 6px;
      height: 6px;
    }

    /* 하단 탭 위치 */
    .hero-tabs {
      bottom: 24px;
      gap: 18px;
    }

    .hero-tabs button {
      padding: 6px 18px;
      font-size: 16px;
    }

    .hero-tabs .thumb {
      width: 36px;
      height: 36px;
    }

    /* 모바일에서는 배경 줌 애니메이션 완화 */
    .slide.active .visual-bg {
      animation: zoomOutMobile 14s ease-out forwards;
    }

    @keyframes zoomOutMobile {
      from {
        transform: scale(1.15);
      }
      to {
        transform: scale(1);
      }
    }
  }