/* BASIC css start */
.site-header {
  --inner: min(1280px, calc(100vw - 48px));
  --soft: #f6f6f6;
  --purple: #7d4cfc;
  --deep: #260088;
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  padding: 0 calc((100vw - var(--inner)) / 2);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
}

.site-header.is-scrolled {
  box-shadow: none;
}

.logo {
  display: block;
  width: 172px;
  height: 26px;
  overflow: hidden;
  flex: 0 0 172px;
}

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

.nav,
.actions {
  display: flex;
  align-items: center;
}

.nav {
  gap: 40px;
  margin-left: auto;
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background:
    transparent
    url("https://sucia5374.imglink.kr/publishing/resource/image/nineandcompany/free-icon-hamburger.png")
    center / 20px 20px no-repeat;
  cursor: pointer;
  transition: background-color 180ms ease;
}

.menu-toggle:hover,
.site-header.is-menu-open .menu-toggle {
  background-color: var(--soft);
}

.visually-hidden {
  overflow: hidden;
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.actions {
  gap: 12px;
  margin-left: 40px;
}

.lang,
.download {
  display: inline-flex;
  align-items: center;
  height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
  white-space: nowrap;
}

.lang {
  gap: 4px;
  background: var(--soft);
}

.lang::after {
  content: "";
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background: url("https://sucia5374.imglink.kr/publishing/resource/image/nineandcompany/chevron-down.svg")
    center / 24px 24px no-repeat;
}

.download {
  gap: 4px;
  color: #fff;
  background: linear-gradient(90deg, var(--purple), var(--deep));
}

.download::after {
  content: "";
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background: url("https://sucia5374.imglink.kr/publishing/resource/image/nineandcompany/download.svg")
    center / 24px 24px no-repeat;
}

@media (max-width: 1200px) {
  .site-header {
    flex-wrap: wrap;
    height: auto;
    gap: 16px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .actions {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .site-header {
    display: grid !important;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding-top: 6px;
    padding-bottom: 0px;
  }

  .nav {
    display: grid !important;
    order: 4;
    grid-column: 1 / -1;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    border-top: 1px solid rgba(16, 16, 16, 0.08);
    opacity: 0;
    transform: translateY(-10px);
    transition:
      max-height 320ms cubic-bezier(0.19, 1, 0.22, 1),
      opacity 240ms ease,
      padding 240ms ease,
      transform 320ms cubic-bezier(0.19, 1, 0.22, 1);
  }

  .site-header.is-menu-open .nav {
    display: grid !important;
    gap: 14px;
    max-height: 320px;
    padding: 14px 0 4px;
    opacity: 1;
    transform: translateY(0);
  }

  .nav a {
    display: block;
    padding: 8px 0;
    font-size: 16px;
    line-height: 22px;
  }

  .menu-toggle {
    display: inline-grid;
    place-content: center;
  }

  .logo {
    width: 145px;
  }

  .actions {
    margin-left: 0;
  }

  .lang,
  .download {
    height: 38px;
    padding: 8px 12px;
    font-size: 14px;
  }
}


/* 언어 선택 드롭다운 */
.site-header .lang-dropdown {
    position: relative;
    flex-shrink: 0;
}

/* KOR 버튼 */
.site-header .lang {
    cursor: pointer;
    justify-content: space-between;
}

/* 언어 선택 메뉴 */
.site-header .lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 100;

    display: flex;
    flex-direction: column;

    min-width: 100%;
    padding: 6px;

    border-radius: 8px;
    background: #f6f6f6;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);

    transition:
        opacity 360ms cubic-bezier(0.19, 1, 0.22, 1),
        transform 360ms cubic-bezier(0.19, 1, 0.22, 1),
        visibility 360ms;
}

/* 언어 메뉴 링크 */
.site-header .lang-menu a {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;
    padding: 8px 16px;

    border-radius: 6px;
    color: #101010;
    text-decoration: none;

    font-size: 16px;
    font-weight: 500;

    transition:
        background-color 180ms ease,
        color 180ms ease;
}

/* 마우스 오버 */
.site-header .lang-menu a:hover {
    background: #eae4ff;
    color: #7d4cfc;
}

/* 메뉴 열림 */
.site-header .lang-dropdown.is-open .lang-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* KOR 화살표 회전 */
.site-header .lang::after {
    transition: transform 260ms ease;
}

.site-header .lang-dropdown.is-open .lang::after {
    transform: rotate(180deg);
}

/* 키보드 접근성 */
.site-header .lang-menu a:focus-visible {
    outline: 2px solid #7d4cfc;
    outline-offset: 2px;
}

/* 모바일 */
@media (max-width: 720px) {
    .site-header .lang-menu {
        min-width: 100%;
    }

    .site-header .lang-menu a {
        min-height: 36px;
        padding: 8px 12px;
        font-size: 14px;
    }
}
/* 헤더 기본 설정 */
.site-header {
    position: relative;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
}

/* 헤더 공간 유지 */
.header-placeholder {
    width: 100%;
    height: 0;
    pointer-events: none;
}

/* 스크롤 시 헤더 고정 */
.site-header.is-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;

    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    transform: translateY(0);
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.3s ease;
}

/* 아래로 스크롤 시 헤더 숨김 */
.site-header.is-fixed.is-hidden {
    transform: translateY(-100%);
    pointer-events: none;
}

/* 모바일 메뉴가 열리면 항상 표시 */
.site-header.is-fixed.is-menu-open {
    transform: translateY(0);
    pointer-events: auto;
}

/* 움직임 최소화 설정 */
@media (prefers-reduced-motion: reduce) {
    .site-header.is-fixed {
        transition: none;
    }
}
/* BASIC css end */

