
:where(html, body) {
  color: #101218;
}

html{
  font-size: 16px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 1000;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  font-size: 16px;
  border-radius: 4px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  clip: auto;
  overflow: visible;
}

.header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 100px;
  z-index: 1000;
  background: transparent;
  transform: translateY(0);
  transition:  transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease;
}

.header.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none !important;
}

.header:not(.is-hidden) {
  opacity: 1;
}

.header .header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 60px;
  height: 100%;
}

.header.is-scrolled,
.header.is-mega-active {
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition:
    transform 0.6s cubic-bezier(0.4,0,0.2,1),
    opacity 0.4s ease,
    background-color 0.3s ease,
    backdrop-filter 0.3s ease;
}

.header.is-scrolled.is-mega-active {
  background-color: rgba(0, 0, 0, 0.7);
}

.logo {
  justify-self: start;
}

.gnb {
  justify-self: center;
  position: relative;
  margin: 0 auto;
}

.gnb .depth1 {
  display: flex;
  gap: 80px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gnb .depth1 > li {
  position: relative;
}

.gnb .depth1 > li > a {
  display: inline-block;
  /* padding: 0 40px; */
  font-size: 1.375rem;
  font-weight: 200;
  text-decoration: none;
  color: #fff;
}

.gnb .depth1 > li > a:hover,
.gnb .depth1 > li > a:focus,
.gnb .depth1 > li > a[aria-current="page"] {
  font-weight: 600;
}

.mega-wrap {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  border-top: 1px solid #000;
  border-bottom: 1px solid #fff;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 60px 0;
  /* display: none; */
  z-index:999;
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.mega-wrap.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mega-wrap.is-active header {
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

/* 컬럼 레이아웃 */
.mega-grid {
  display: grid;
  grid-template-columns: repeat(6, 260px); /* 6개 1depth 맞춤 */
  justify-content: center;
  /* gap: 40px; */
  color: #fff;
}

.mega-grid nav {
  text-align: center;
}

.mega-grid nav + nav {
  border-left: 1px solid #5d5d61;
}

.mega > span {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 8px;
}

.mega > span::after {
  content: '';
  display: block;
  margin: 6px auto auto;
  border-radius: 100%;
  width: 5px;
  height: 5px;
  background: #2f91ff;
}

.mega ul {
  margin-top: 25px;
}

.mega li + li{
  margin-top: 25px;
}

.mega a {
  position: relative;
  text-decoration: none;
  font-size: 1.125em;
  font-weight: 100;
}

.mega a::after {
  position: absolute;
  left: 0;
  bottom: -5px;
  content: '';
  display: none;
  width: 100%;
  height: 1px;
  background: #fff;
}

.mega a:hover::after,
.mega a:focus::after {
  display: block;
}

@media (max-width: 1024px) {
  .gnb,
  .mega-wrap {
    display: none;
  }
}

.lang-select {
  position: relative;
  display: inline-block;
  justify-self: end;
}

.btn-lang-slt {
  display: flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #fff;
  border-radius: 20px;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.btn-lang-slt::before {
  content: '';
  margin-right: 6px;
  width: 16px;
  height: 16px;
  background: url("../../images/user/common/ico-language.png") no-repeat center / contain;
}

.btn-lang-slt::after {
  content: '';
  margin-left: 8px;
  width: 7px;
  height: 5px;
  background: url("../../images/user/common/ico-arrow-down.png") no-repeat center / contain;
}

.lang-options {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px 0;
  border: 1px solid #fff;
  border-radius: 20px;
  list-style: none;
  width: 100%;
  display: none;
  background: #07080c;
  z-index: 1000;
}

.lang-options li a {
  display: block;
  padding: 5px 12px;
  text-align: center;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
}

/* 모바일 메뉴 */
.btn-gnb-toggle {
  display: none;
  background: none;
  margin-left: 20px;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 22px;
  position: relative;
}

.btn-gnb-toggle .bar {
  position: absolute;
  width: 100%;
  height: 3px;
  background: #fff;
  left: 0;
  transition: all 0.3s ease;
}

.btn-gnb-toggle .bar:nth-child(1) {
  top: 2px;
}

.btn-gnb-toggle .bar:nth-child(2) {
  bottom: 2px;
}

/* X로 변환 */
.btn-gnb-toggle.is-active .bar:nth-child(1) {
  transform: rotate(45deg);
  top: 10px;
}

.btn-gnb-toggle.is-active .bar:nth-child(2) {
  transform: rotate(-45deg);
  bottom: 9px;
}

/* 모바일 전체메뉴 */
.mobile-gnb {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  height: 100%;
  background: rgba(10,10,10,0.95);
  color: #fff;
  transform: translateX(100%); /* ← 오른쪽 화면 밖으로 시작 */
  transition: transform 0.4s ease;
  z-index: 999;
  overflow-y: auto;
}

.mobile-gnb.is-active {
  transform: translateX(0);
}

.mobile-gnb-list {
  padding: 105px 30px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-gnb-list .depth1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  color: #fff;
  text-align: left;
  font-size: 1.375rem;
  font-weight: 700;
  padding: 12px 0;
  cursor: pointer;
}

/* 화살표 아이콘 */
.mobile-gnb-list .depth1 .depth-icon {
  margin-right: 3px;
  width: 20px;
  height: auto;
  transition: transform 0.3s ease;
  transform-origin: center;
  filter: brightness(0) invert(1); /* 어두운 배경용 */
}

/* depth1이 열릴 때 (is-open 상태) */
.mobile-gnb-list .depth1.is-open .depth-icon {
  transform: rotate(180deg);
}

.mobile-gnb-list .depth2 {
  padding: 0;
  margin-top: 6px;
  border-radius: 10px;
  overflow: hidden;
  max-height: 0;
  font-weight: 200;
  opacity: 0;
  transition: all 0.35s ease;
  background: #2c3039;
}
.mobile-gnb-list .depth2.is-open {
  padding: 20px 30px;
  max-height: 600px;
  opacity: 1;
}

.mobile-gnb-list .depth2 a {
  display: block;
  padding: 8px 0;
}

/* 딤 처리 */
.menu-dim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
}

.menu-dim.is-active {
  opacity: 1;
  pointer-events: auto;
}



/* main {
  width: 100%;
  overflow: hidden;
} */

.site-footer {
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: 0 60px 35px;
  min-height: 583px;
  width: 100%;
  aspect-ratio: 1920/583;
  color: #fff;
  background: url("../../images/user/common/bg-footer-gradient.png") no-repeat center bottom;
  background-size: cover;
}

.footer-container {
  width: 100%;
}

.footer-head {
  position: relative;
  width: fit-content;
}

.footer-title {
  font-size: 100px;
  font-weight: 600;
  line-height: 1;
}

.footer-brand {
  position: absolute;
  right: 0;
  bottom: 10px;
}

.footer-body {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 110px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.privacy-policy {
  position: absolute;
  top: -43px;
  left: 0; /* 개인정보처리방침 좌측 정렬 */
  padding: 4px 12px;
  border-radius: 10px;
  background: #101218;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 50px;
}

.footer-copy,
.footer-label {
  font-weight: 600;
}

.footer-label {
  letter-spacing: 0.3px;
}

.footer-flex-wrap {
  display: flex;
  align-items: center;
  gap: 50px;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 100;
}

.footer-partners {
  display: flex;
  gap: 25px;
  align-items: center;
}

.footer-partners .separator {
  border-radius: 100%;
  width: 3px;
  height: 3px;
  background: #fff;
}

.btn-top {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  bottom: 235px;
  right: 60px;
  border: none;
  width: 117px;
  height: 117px;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 300;
  background: none;
  overflow: hidden;
  cursor: pointer;
  clip-path: path("M100.528,0.534 L10.839,0.534 C1.947,0.534 -2.505,11.286 3.782,17.574 L99.459,113.251 C105.747,119.538 116.498,115.85 116.498,106.193 L116.498,16.505 C116.498,7.684 109.348,0.534 100.528,0.534 Z");
  z-index: 900;
  transition: color 0.6s ease;
}

.btn-top::before {
  content: "";
  position: absolute;
  inset: 0;
  background: black;
  transform: translateY(100%);
  transition: transform 0.6s ease;
  z-index: 0;
}

.btn-top:hover::before {
  transform: translateY(0);
}

.btn-top svg {
  position: absolute;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: white;
  stroke-width: 1;
  z-index: 1;
  pointer-events: none;
}

.btn-top span {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  transition: color 0.6s ease;
  font-weight: bold;
}

.btn-top.is-dark {
  color: #000;
}

.btn-top.is-light {
  color: #fff;
}

.btn-top.is-dark:hover span {
  color: #fff;
}

/* .btn-top-wrap {
  width: fit-content;
  height:fit-content;
}
.btn-top-wrap:has(.btn-top:focus-visible) {
  outline: 2px solid #0065d6;
  border-radius: 50%;
} */

/* 공통 : 투자자커뮤니티 버튼 추가 */
.move-box{
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    justify-self: end;
}
.btn-invest-community{
    display: inline-block;
    margin-right: 8px;
    padding: 8px 10px 6px;
    width: 150px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 20px;
    background-color:rgba(16,18,24,0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-sizing: border-box;
}
.btn-invest-community span{
    position: relative;
    padding-left: 24px;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
}
.btn-invest-community span::before{
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 17px;
    background: url("../../images/user/common/ico-community.png") no-repeat center / cover;
}

/* 메인 로드 직후 헤더, 탑버튼 깜빡이는 현상 수정용*/
body.main-page .header {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body:not(.js-ready) .btn-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}


/* ========== 반응형 ========== */
@media (max-width: 1600px) {

  .header .header-inner {
    /*display: flex;*/
  }

  .gnb .depth1 {
    gap: 60px;
  }

  .mega-grid {
      grid-template-columns: repeat(6, 230px);
  }

  .footer-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-flex-wrap {
    align-items: flex-start;
  }

  .footer-contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

}

@media (max-width: 1440px) {

  .header .header-inner {
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
  }

  .gnb {
    display: none;
  }

  .btn-gnb-toggle {
    display: block;
  }

  .site-footer {
    padding: 0 30px 35px
  }

  .footer-title {
    font-size: 5rem;
  }

  .footer-brand {
    height: 65px;
  }

  .footer-brand img {
    height: 100%;
  }

  .btn-top {
    right: 30px;
  }

}

@media (max-width: 1279px) {

  .header {
    height: 70px;
  }

  .header-inner .logo {
    width: 180px;
  }

  .btn-invest-community {
    padding: 3px 10px;
  }

  .btn-invest-community span {
    font-size: 0.9375rem;
  }

  .btn-invest-community span::before {
    width: 17px;
    height: 16px;
  }

  .btn-lang-slt {
    padding: 4px 10px;
    font-size: 0.9375rem;
  }

  .lang-options {
    border-radius: 16px;
  }

  .btn-gnb-toggle {
    width: 24px;
    height: 18px;
  }

  .btn-gnb-toggle.is-active .bar:nth-child(1) {
    top: 7px;
  }

  .btn-gnb-toggle.is-active .bar:nth-child(2) {
    top: 7px;
  }

  .mobile-gnb-list {
    padding: 75px 30px 40px;
  }
  .mobile-gnb-list .depth1 {
    padding: 10px 0;
    font-size: 1.25rem;
  }

  .mobile-gnb-list .depth1 .depth-icon {
    width: 18px;
  }

  .site-footer {
    padding: 0 30px 10px;
    min-height: unset;
  }

  .footer-title {
    font-size: 5.26vw;
  }

  .footer-brand {
    right: -25px;
    bottom: 3px;
    height: auto;
  }

  .footer-brand img {
    width: 18.6vw;

  }

  .footer-body {
    align-items: anchor-center;
    margin-top: 45px;
    padding-top: 10px;
    font-size: 0.8125rem;
  }

  .privacy-policy {
    top: -35px;
    border-radius: 6px;
  }

  .footer-info {
    gap: 5px;
  }

  .footer-partners li:first-child a {
    display: block;
    width: 150px;
  }

  .footer-partners li:last-child a {
    display: block;
    width: 160px;
  }

  .btn-top:not(.en) {
    transform: scale(0.45) !important;
  }

  .btn-top {
    /*transform: scale(0.6);*/
    right: 7px;
    bottom: 150px;
  }

  .btn-top span.en {
    font-weight: 300;
    transform: scale(1.3) !important;
  }

}

@media (max-width: 767px) {

  .header {
    height: 58px;
  }

  .header .header-inner {
    padding: 0 15px;
  }

  .header-inner .logo {
    width: 143px;
  }

  .btn-invest-community {
    display: none;
  }

  .btn-lang-slt {
    padding: 3px 7px;
    /* font-size: 0.75rem; */
  }

  .btn-lang-slt::before {
    margin-right: 5px;
  }

  .btn-lang-slt::after {
    margin-left: 6px;
  }

  .lang-options {
    border-radius: 14px;
  }

  .lang-options li a {
    padding: 3px 12px;
  }

  .btn-gnb-toggle {
    width: 21px;
    height: 21px;
  }
  .btn-gnb-toggle .bar {
    height: 2px;
  }

  .btn-gnb-toggle .bar:nth-child(1) {
    top: 4px;
  }

  .btn-gnb-toggle .bar:nth-child(2) {
    bottom: 5px;
  }

  .btn-gnb-toggle.is-active .bar:nth-child(1) {
    top: 9px;
  }

  .btn-gnb-toggle.is-active .bar:nth-child(2) {
    top: 9px;
  }

  .mobile-gnb {
    max-width: 100%;
  }

  .mobile-gnb-list {
    padding: 65px 15px 40px;
  }

  .mobile-gnb-list .depth1 .depth-icon {
    width: 15px;
  }

  .mobile-gnb-list .depth2.is-open {
    padding: 7px 15px;
  }

  .site-footer {
    padding: 0 15px 30px;
    aspect-ratio: unset;
  }

  .footer-title {
    font-size: 6.58vw;
  }

  .footer-brand {
    position: static;
    margin-top: 15px;
  }

  .footer-brand img {
    width: 46vw;
  }

  .footer-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
    padding-top: 15px;
  }

  .footer-partners li:first-child a {
    width: 130px;
  }

  .footer-partners li:last-child a {
    width: 140px;
  }

  .footer-partners {
    gap: 12px;
  }

  .footer-partners .separator {
    width: 2px;
    height: 2px;
  }

  .btn-top {
    right: -10px;
    bottom: 50px;
  }

  .site-footer {
    min-height: 95vw;
    word-break: auto-phrase;
  }

  .footer-info {
    width: 100%;
  }

}

/* 모바일 가로 방지 */
.landscape-blocker {
    display: none;
}

html.lock-landscape .landscape-blocker {
    display: flex;
}

html.lock-landscape body {
    overflow: hidden;
}

/* 폰(터치, 코스 포인터) + 가로방향 + 짧은 변이 480px 이하일 때만 노출 */
@media (orientation: landscape) and (hover: none) and (pointer: coarse) and (max-height: 480px) {

    .landscape-blocker {
        position: fixed;
        inset: 0;
        display: flex;                 /* html.lock-landscape에서 display:flex, 여기선 크기/배경만 재확인 */
        align-items: center;
        justify-content: center;
        padding: 24px;
        background: rgba(0,0,0,0.7);
        backdrop-filter: blur(2px);
        z-index: 9999;
        pointer-events: all;

        /* 오른쪽 여백 방지 & 정확한 뷰포트 높이 */
        width: 100vw;
        height: 100dvh;                /* 지원 안 하는 구형은 JS에서 --vh 보정 */
      }

     .blocker-card {
        max-width: 480px;
        width: 100%;
        text-align: center;
        color: #fff;
        background: rgba(20,20,20,0.85);
        border-radius: 16px;
        padding: 24px 20px;
      }

}


