/* ==========================================================================
   common.css — index.html과 subpage.html이 함께 쓰는 순수 공통 요소
   (리셋, 폰트/색상 토큰, 로고, 버튼, 푸터 기본형, 파트너 슬라이더)
   ========================================================================== */
   
/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  background: #fff;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  color: #1e1e1e;
  line-height: normal;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

ul, ol {
  list-style: none;
}

/* ---- Tokens / helpers ---- */
.text-orange { color: #f47621; }

/* ---- 로고 (마스크) ---- */
.logo {
  position: relative;
  z-index: 1;
  display: inline-block;
  width: 175px;
  height: 49px;
}

.logo img { width: 100%; height: 100%; object-fit: contain; }

/* ---- 버튼: 필/아웃라인 파일 ---- */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  padding: 15px 35px;
  border-radius: 68px;
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  text-transform: uppercase;
  line-height: 38px;
  white-space: nowrap;
  backdrop-filter: blur(17px);
}

.btn-pill--outline {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, .01);
  border: 1px solid #fff;
  transition: border-color .35s ease;
}

.btn-pill--outline::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 0;
  height: calc(100% + 2px);
  background: #ff6700;
  transition: width .35s ease;
  z-index: -1;
}

.btn-pill--outline:hover {
  border-color: #ff6700;
}

.btn-pill--outline:hover::before {
  width: calc(100% + 2px);
}

.btn-pill--solid {
  background: #f47621;
  transition: background .3s ease, box-shadow .3s ease;
}

.btn-pill--solid:hover {
  background: #ff6700;
  box-shadow: 0 0 10px rgba(255, 134, 53, .4);
}

.btn-pill__arrow {
  width: 14px;
  height: 14px;
  transform: rotate(135deg);
}

/* ---- 방향/재생 컨트롤 아이콘 ---- */
.ctrl-icon {
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ctrl-icon img,
.ctrl-icon svg { width: 100%; height: 100%; }
.ctrl-icon svg { color: #fff; }
.ctrl-icon--next img,
.ctrl-icon--next svg { transform: rotate(180deg); }
.ctrl-icon--lg { width: 40px; height: 40px; }

/* ==========================================================================
   헤더 (기본형 — 1920px 기준)
   ========================================================================== */

:root {
  --header-h: 100px;
  --gnb-accent: #f47621;
  --gnb-panel-bg: rgba(12, 12, 14, .94);
}

/* ---- 헤더 셸 ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  padding: 0 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  transition:
    transform .75s cubic-bezier(.16, 1, .3, 1),
    background-color .45s ease-in-out;
  will-change: transform;
}

/* 스크롤 다운 시 헤더 숨김 / 스크롤 업 시 노출 */
.header.is-hidden { transform: translateY(-100%); }

/* 서브메뉴·전체메뉴가 열려 있을 때는 숨기지 않음 */
.header.is-open { transform: translateY(0); }

/* 헤더 배경 레이어
   .header 자체에 backdrop-filter 를 걸면 하위 서브메뉴 배경의 블러가 무효화되므로
   헤더 바 영역의 블러는 ::before 레이어로 분리합니다. */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(12, 12, 14, .55);
  -webkit-backdrop-filter: blur(24px) saturate(130%);
  backdrop-filter: blur(24px) saturate(130%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease-in-out;
}

.header.is-scrolled::before,
.header.is-open::before { opacity: 1; }

.header.is-scrolled { background-color: transparent; }
.header.is-scrolled .header__bg { opacity: 0; }

.header__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: normal;   /* multiply 는 헤더를 격리 그룹으로 만들어 하위 블러를 무효화 */
  opacity: .45;
  transition: opacity .4s ease;
}

/* 서브메뉴가 열린 상태 */
.header.is-open { background-color: transparent; }
.header.is-open .header__bg { opacity: 0; }

.header__util {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 26px;
}

.gnb-toggle {
  position: relative;
  z-index: 1;
  width: 31px;
  height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.gnb-toggle img { width: 100%; height: 100%; transition: opacity .25s ease; }
.gnb-toggle:hover img { opacity: .6; }

/* ---- GNB ---- */
.gnb {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 1116px;
  font-size: 21px;
  font-weight: 400;
  color: #fff;
}

.gnb__list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.gnb__item { position: static; }

/* 1차 메뉴 — 밑줄은 헤더 하단에 닿는 짧은 라인 (윈콘즈형) */
.gnb .gnb__link {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--header-h);
  white-space: nowrap;
  transition: all .25s ease;
}

.gnb .gnb__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--gnb-accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s cubic-bezier(.22, .61, .36, 1);
}

.gnb__item.is-active .gnb__link {
  color: #fff;
}

.gnb .gnb__link:hover::after,
.gnb__item.is-active .gnb__link::after { transform: scaleX(1); }

.gnb a.gnb__link--active {
  color: #f47621;
  font-weight: 600;
}

.gnb a.gnb__link--active::after { transform: scaleX(1); }

/* ---- 서브메뉴 드롭다운 ---- */
.gnb__backdrop {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 0;
  background: rgba(12, 12, 14, .55);
  -webkit-backdrop-filter: blur(24px) saturate(130%);
  backdrop-filter: blur(24px) saturate(130%);
  border-top: 1px solid rgba(255, 255, 255, .12);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: height .55s cubic-bezier(.16, 1, .3, 1), opacity .35s ease-in-out;
  z-index: 0;
}

.header.is-open .gnb__backdrop { opacity: 1; }

.gnb__panel {
  background: transparent;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100vw;
  margin-left: calc(-1 * var(--gnb-left, 0px));
  padding: 50px 80px 70px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, visibility .3s ease;
  z-index: 1;
}

.gnb__item.is-active .gnb__panel {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.gnb__panel-inner { padding-left: var(--panel-pad, 0px); }

.gnb__sub {
  display: flex;
  align-items: flex-start;
  gap: 64px;
  width: max-content;
  max-width: 100%;
}

/* 3차 메뉴가 없는 패널은 한 줄로 세로 정렬 (탐색 이동 거리 최소화) */
.gnb__sub.gnb__sub--stack {
  flex-direction: column;
  gap: 20px;
}

.gnb__sub-item {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s ease, transform .45s cubic-bezier(.22, .61, .36, 1);
}

.gnb__item.is-active .gnb__sub-item {
  opacity: 1;
  transform: none;
}

.gnb__sub-item:nth-child(1) { transition-delay: .06s; }
.gnb__sub-item:nth-child(2) { transition-delay: .12s; }
.gnb__sub-item:nth-child(3) { transition-delay: .18s; }
.gnb__sub-item:nth-child(4) { transition-delay: .24s; }
.gnb__sub-item:nth-child(5) { transition-delay: .3s; }

.gnb .gnb__sub-link {
  position: relative;
  display: inline-block;
  padding-bottom: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  white-space: nowrap;
  transition: color .25s ease;
}

.gnb .gnb__sub-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: var(--gnb-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.gnb .gnb__sub-link:hover { color: var(--gnb-accent); }
.gnb .gnb__sub-link:hover::after { transform: scaleX(1); }

.gnb__third {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gnb .gnb__third a {
  padding-bottom: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, .6);
  white-space: nowrap;
}

.gnb .gnb__third a::after { display: none; }
.gnb .gnb__third a:hover { color: var(--gnb-accent); }

/* ==========================================================================
   전체메뉴 (사이드 패널)
   ========================================================================== */
.allmenu {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  pointer-events: none;
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
}

.allmenu.is-open {
  visibility: visible;
  pointer-events: auto;
}

.allmenu__dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .4s ease;
}

.allmenu.is-open .allmenu__dim { opacity: 1; }

.allmenu__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 880px;
  max-width: 100%;
  height: 100%;
  background: #0c0c0e;
  border-left: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .55s cubic-bezier(.22, .61, .36, 1);
  overflow: hidden;
}

.allmenu.is-open .allmenu__panel { transform: none; }

.allmenu__head {
  flex-shrink: 0;
  height: var(--header-h);
  padding: 0 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.allmenu__logo { display: block; width: 150px; }
.allmenu__logo img { width: 100%; }

.allmenu__close {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  flex-shrink: 0;
}

.allmenu__close span {
  position: absolute;
  left: 3px;
  top: 15px;
  width: 26px;
  height: 2px;
  background: #fff;
  transition: background .25s ease;
}

.allmenu__close span:first-child { transform: rotate(45deg); }
.allmenu__close span:last-child { transform: rotate(-45deg); }
.allmenu__close:hover span { background: var(--gnb-accent); }

.allmenu__body {
  position: relative;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 46px 40px 60px;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 118, 33, .55) rgba(255, 255, 255, .06);
}

.allmenu__body::-webkit-scrollbar { width: 4px; }

.allmenu__body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .06);
  border-radius: 2px;
}

.allmenu__body::-webkit-scrollbar-thumb {
  background: rgba(244, 118, 33, .55);
  border-radius: 2px;
}

.allmenu__body::-webkit-scrollbar-thumb:hover { background: var(--gnb-accent); }

/* 스크롤 영역 상/하단 페이드 */
.allmenu__scroll {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
}

.allmenu__scroll::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: linear-gradient(to top, #0c0c0e, rgba(12, 12, 14, 0));
  pointer-events: none;
  opacity: 1;
  transition: opacity .3s ease;
}

.allmenu__scroll.is-end::after { opacity: 0; }

.am-group {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 34px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.22, .61, .36, 1);
}

.allmenu.is-open .am-group {
  opacity: 1;
  transform: none;
}

.am-group:nth-child(1) { transition-delay: .12s; }
.am-group:nth-child(2) { transition-delay: .17s; }
.am-group:nth-child(3) { transition-delay: .22s; }
.am-group:nth-child(4) { transition-delay: .27s; }
.am-group:nth-child(5) { transition-delay: .32s; }
.am-group:nth-child(6) { transition-delay: .37s; }
.am-group:nth-child(7) { transition-delay: .42s; }
.am-group:nth-child(8) { transition-delay: .47s; }

.am-group:last-child { border-bottom: 0; }

.am-group__title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.am-group__title a { transition: color .25s ease; }
.am-group__title a:hover { color: var(--gnb-accent); }

.am-group__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
  padding-top: 4px;
}

.am-col__title {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: rgba(255, 255, 255, .92);
  transition: color .25s ease;
}

.am-col__title:hover { color: var(--gnb-accent); }

.am-col__list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.am-col__list a {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, .55);
  transition: color .25s ease;
}

.am-col__list a:hover { color: var(--gnb-accent); }

.allmenu__foot {
  flex-shrink: 0;
  padding: 24px 60px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.allmenu__contact {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 12px 26px;
  border-radius: 68px;
  background: var(--gnb-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  transition: background .3s ease, box-shadow .3s ease;
}

.allmenu__contact:hover {
  background: #ff6700;
  box-shadow: 0 0 10px rgba(255, 134, 53, .4);
}

.allmenu__contact img {
  width: 12px;
  height: 12px;
  transform: rotate(135deg);
}

body.is-menu-open { overflow: hidden; }

/* ==========================================================================
   반응형
   ========================================================================== */
@media (max-width: 1600px) {
  .header { padding: 0 40px; }
  .gnb { width: auto; gap: 34px; }
  .gnb__list { gap: 34px; justify-content: flex-start; }
  .gnb__panel { padding: 64px 40px 68px; }
  .allmenu__head,
  .allmenu__foot { padding-left: 40px; padding-right: 40px; }
  .allmenu__body { padding: 20px 28px 40px 40px; }
  .header-preview__text { left: 40px; }
}

@media (max-width: 1360px) {
  .gnb { font-size: 18px; }
  .gnb__list { gap: 26px; }
  .am-group { grid-template-columns: 180px 1fr; }
}

@media (max-width: 1180px) {
  :root { --header-h: 72px; }
  .header { padding: 0 24px; }
  .gnb { display: none; }
  .logo { width: 128px; height: 36px; }
  .allmenu__panel { width: 100%; border-left: 0; }
  .allmenu__head,
  .allmenu__foot { padding-left: 24px; padding-right: 24px; }
  .allmenu__body { padding: 8px 14px 32px 24px; }
  .am-group {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 26px 0;
  }
  .am-group__title { font-size: 22px; }
  .am-group__cols { gap: 22px 32px; }
  .header-preview__text { left: 24px; bottom: 40px; }
}

/* 모션 최소화 설정 존중 */
@media (prefers-reduced-motion: reduce) {
  .header,
  .header::before { transition: none; }
}


/* ==========================================================================
   파트너 슬라이더 (common.css 에서 이관 — 브라우저 폭에 따라 유동 축소)
   ========================================================================== */
.partner-slider {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
}

.partner-slider__track {
  display: flex;
  gap: clamp(14px, 2.0833vw, 40px);               /* 40 / 1920 */
  width: max-content;
  animation: partner-scroll 45s linear infinite;
}

.partner {
  position: relative;
  flex-shrink: 0;
  width: clamp(128px, 15.1042vw, 290px);          /* 290 / 1920 */
  height: clamp(56px, 5.9896vw, 115px);           /* 115 / 1920 */
  background: #fff;
  border-radius: clamp(6px, 0.5208vw, 10px);
  padding: 0 clamp(12px, 1.5625vw, 30px);
}

.partner__img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: calc(100% - 2 * clamp(12px, 1.5625vw, 30px));
  max-height: 72%;
  object-fit: contain;
  transition: opacity .3s ease;
}

.partner__img--gray { opacity: .7; }
.partner__img--color { opacity: 0; }

@media (hover: hover) {
  .partner:hover .partner__img--gray { opacity: 0; }
  .partner:hover .partner__img--color { opacity: 1; }
}

@keyframes partner-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   푸터 (common.css 에서 이관 — 반응형)
   ========================================================================== */
.footer {
  position: relative;
  background: #000;
  padding: clamp(48px, 4.1667vw, 80px) clamp(20px, 4.1667vw, 80px) clamp(28px, 2.0833vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(16px, 1.4583vw, 28px);               /* 28 / 1920 */
  overflow: hidden;
}

.footer .logo {
  width: clamp(124px, 9.1146vw, 175px);           /* 175 / 1920 */
  height: auto;
  aspect-ratio: 175 / 49;
}

.footer__company,
.footer__copyright {
  color: #7d7d7d;
  font-size: clamp(13px, 0.8333vw, 16px);         /* 16 / 1920 */
  font-weight: 400;
  line-height: 1.7;
}

.f-util {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 1.0417vw, 20px) clamp(24px, 4.1667vw, 80px);
  color: #fff;
  font-size: clamp(13px, 0.8333vw, 16px);
  font-weight: 200;
  line-height: 1.7;
}

.f-util > div { min-width: 0; }
.f-util__label { font-weight: 700; }

.divider--footer {
  width: 100%;
  height: 1px;
  object-fit: cover;
}

/* ---- 맨 위로 버튼 ---- */
.btn-top {
  position: absolute;
  right: clamp(20px, 4.1667vw, 80px);
  top: clamp(96px, 9.5573vw, 183.5px);
  width: clamp(52px, 4.1667vw, 80px);
  height: clamp(52px, 4.1667vw, 80px);
  border-radius: 50%;
  background: #f47621;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color .35s ease, box-shadow .35s ease;
}

/* 아이콘은 인라인 SVG(currentColor) — 색상 전환 안전 */
.btn-top__icon {
  display: block;
  width: clamp(17px, 1.3021vw, 25px);
  height: auto;
  color: #fff;
  transition: color .35s ease, transform .35s ease;
}

@media (hover: hover) {
  .btn-top:hover {
    background-color: #fff;
    box-shadow: inset 0 0 0 1px rgba(244, 118, 33, .5), 0 8px 22px rgba(244, 118, 33, .28);
  }

  .btn-top:hover .btn-top__icon {
    color: #f47621;
    transform: translateY(-3px);
  }
}

.btn-top:active .btn-top__icon { transform: translateY(-1px); }

@media (max-width: 1024px) {
  .btn-top {
    top: 20px;
    bottom: clamp(20px, 3vw, 40px);
  }
}

@media (max-width: 480px) {
  .f-util { gap: 12px 24px; }
  .f-util > div { flex: 1 1 calc(50% - 24px); }
  .btn-top { right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .partner-slider__track { animation: none; }
  .btn-top,
  .btn-top__icon,
  .partner__img { transition: none; }
}
