/* =========================================================================
   스플릿인베스트 홈페이지 — 공통 토큰 / 레이아웃 / 헤더 / 푸터
   Figma: 매직스플릿 › 반응형 디자인 (7336:42089)
   브레이크포인트 (고정)
     · Mobile  ≤ 799
     · Tablet  800 ~ 1439
     · Desktop ≥ 1440
   ========================================================================= */

:root {
  /* Figma 변수 */
  --primary: #1960f3;
  --primary-soft: #f2f5ff;
  --ink: #222;
  --ink-950: #0f1a25;
  --ink-on-dark: #f9fbff; /* dark_background / very-light */
  --ink-900: #111c2d;
  --ink-800: #2f343e; /* dark_background / dark-gray */
  --ink-700: #3f444f; /* dark_background / gray */
  --ink-600: #6d7481; /* dark_background / light-gray */
  --ink-500: #99a0ad; /* dark_background / dark-light */
  --ink-400: #9ca6bb; /* background / gray */
  --line: #dadde7; /* background / dark-light */
  --line-soft: #eff1f7; /* background / light */
  --line-strong: #c3c6d7;
  --page-bg: #fcfdff; /* page / section band */
  --surface: #ffffff;
  --surface-soft: #f8f9fb; /* background / very-light */
  --surface-tint: #fcfdff; /* primary / very-very-light — section bands */
  --surface-panel: #fcfdff; /* services tab idle */

  --shadow-card: 0 4px 20px rgba(156, 166, 187, 0.08);
  --shadow-card-hover:
    0 2px 20px rgba(25, 96, 243, 0.09), 0 4px 20px rgba(156, 166, 187, 0.08);
  --shadow-pop: 0 4px 30px rgba(156, 166, 187, 0.3);

  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 40px;
  --radius-pill: 999px;

  /* Figma PC 프레임 1440 — 뷰포트가 더 넓어도 콘텐츠·GNB는 이 폭 안에 */
  --frame-max: 1440px;
  /* 컨테이너: 375→20 / 800→105 / 1440→(1062 고정, 여백 189) */
  --gutter: 20px;
  --content: 1062px;
  /* JS(site.js)가 innerWidth로 갱신 — 100vw/50vw 대체(스크롤바·해상도별 가로 스크롤 방지) */
  --vw: 1vw;

  --header-h: 60px;

  /* 유동 타이포 (모바일 → 데스크톱) */
  --fs-display: clamp(28px, 2.2vw + 20px, 50px);
  --fs-h2: clamp(24px, 2vw + 16px, 45px);
  --fs-h3: clamp(18px, 0.5vw + 16px, 20px);
  --fs-lead: clamp(14px, 0.4vw + 12px, 18px);
  --fs-body: clamp(14px, 0.25vw + 13px, 16px);
  --fs-eyebrow: 12px;

  --section-y: clamp(60px, 6vw, 130px);
}

@media (min-width: 800px) {
  :root {
    --gutter: 105px;
    --header-h: 87px;
    --fs-eyebrow: 15px;
  }
}

@media (min-width: 1440px) {
  :root {
    --gutter: calc((var(--frame-max) - var(--content)) / 2);
  }
}

/* ------------------------------------------------------------------ reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* 스크롤바 자리를 항상 확보한다. 모바일 메뉴가 overflow:hidden 을 걸거나
     페이지 길이가 달라져도 레이아웃 폭이 변하지 않아 헤더가 흔들리지 않는다. */
  scrollbar-gutter: stable;
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
  background: var(--page-bg);
  color: var(--ink-800);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
    "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol {
  margin: 0;
}

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

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

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(25, 96, 243, 0.5);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

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

/* -------------------------------------------------------------- primitives */

.container {
  width: min(var(--content), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

/* 1440 Figma 아트보드 — GNB·본문·푸터를 동일 폭으로 가운데 정렬 */
.site-header__inner,
.site-footer__inner,
main {
  width: min(100%, var(--frame-max));
  max-width: var(--frame-max);
  margin-inline: auto;
}

.section {
  padding-block: var(--section-y);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--primary);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.section-title {
  margin: 0;
  color: var(--ink);
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: center;
}

.section-title em {
  display: block;
  color: var(--primary);
  font-style: normal;
}

.section-lead {
  color: var(--ink-500);
  font-size: var(--fs-lead);
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-align: center;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--dark {
  padding: 16px 30px;
  background: #222;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.btn--primary {
  padding: clamp(14px, 1.4vw, 20px) clamp(24px, 3.4vw, 50px);
  background: var(--primary);
  color: #fff;
  font-size: clamp(16px, 0.8vw + 13px, 24px);
  box-shadow: 0 10px 30px rgba(25, 96, 243, 0.25);
}

.btn--ghost {
  padding: 16px 30px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-800);
  font-size: 15px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--ink-950);
  font-size: 15px;
  font-weight: 600;
}

.pill-link:hover {
  background: var(--line-soft);
}

/* ------------------------------------------------------------------ header */

/* Figma PC 8202:80542 · Tablet 7340:87550 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 16px 20px;
}

/* Figma PC 8202:80542 — logo + gap + nav row / Tablet 7340:87550 — logo ↔ nav 양끝 */
.site-header__cluster {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

/* 로고는 어떤 상황에서도 줄어들지 않는다 (GNB 가 넓어져도 눌리지 않도록) */
.site-header__logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

/* 원본 비율 938 : 219 — 폭·높이를 모두 못박아 렌더 크기를 고정한다 */
.site-header__logo img {
  flex: 0 0 auto;
  width: 118px;
  height: 27.55px;
}

.gnb {
  /* 드롭다운의 기준 박스. 패널을 GNB 오른쪽 끝에 고정해
     어떤 폭에서도 문서가 가로로 넘치지 않게 한다. */
  position: relative;
  display: none;
}

.hamburger {
  display: grid;
  gap: 4px;
  width: 24px;
  padding: 4px 1px;
}

.hamburger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-800);
}

@media (min-width: 800px) {
  .site-header__inner {
    padding: 24px 40px;
  }

  .site-header__logo img {
    width: 146px;
    height: 34.09px;
  }

  .site-header__cluster {
    gap: 0;
  }

  .gnb {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    min-width: 0;
  }

  .gnb__link {
    padding: 9px 15px;
  }

  .hamburger {
    display: none;
  }
}

@media (min-width: 1440px) {
  .site-header__inner {
    position: relative;
    justify-content: flex-start;
  }

  .site-header__cluster {
    flex: 0 0 auto;
    justify-content: flex-start;
    gap: 0;
  }

  .gnb {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 22px;
    width: max-content;
    transform: translate(-50%, -50%);
  }
}

/* position 을 주지 않는다 — 드롭다운의 기준 박스는 .gnb 여야 한다 */
.gnb__group {
  display: inline-flex;
  align-items: center;
}

.gnb__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink-700);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.24px;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

/* SemiBold 폭을 미리 확보해 active/hover 시 GNB가 흔들리지 않는다 */
.gnb__label {
  display: inline-block;
}

.gnb__label::before {
  content: attr(data-text);
  display: block;
  height: 0;
  overflow: hidden;
  font-weight: 600;
  pointer-events: none;
  user-select: none;
  visibility: hidden;
}

.gnb__link:hover,
.gnb__link:active,
.gnb__link[aria-expanded="true"] {
  color: #1960f3;
  font-weight: 600;
}

.gnb__link[data-nav-active],
.gnb__link--toggle[data-nav-active] {
  color: #1960f3;
  font-weight: 700;
}

.gnb__link[data-nav-active] .gnb__label::before {
  font-weight: 700;
}

/* 드롭다운 트리거는 항상 SemiBold — 열림/닫힘 폭 동일 */
.gnb__link--toggle {
  font-weight: 600;
}

@media (min-width: 800px) {
  .gnb__link {
    flex-shrink: 0;
  }
}

/* 회전만 하고 자리 차지는 항상 동일한 18×18 박스 */
.gnb__chevron {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  transition: transform 0.18s ease;
}

.gnb__link[aria-expanded="true"] .gnb__chevron {
  transform: rotate(180deg);
}

/* GNB 드롭다운 (Figma 7340:122122 / 7340:125166)
   기준 박스는 .gnb — 패널 오른쪽 끝을 GNB 오른쪽 끝(= 헤더 내부 여백 선)에 맞춘다.
   트리거 중앙 정렬(left:50% + translateX(-50%))은 패널이 뷰포트 오른쪽으로 넘쳐
   문서 폭을 키우기 때문에 쓰지 않는다. 문서가 넓어지면 모바일 브라우저(데스크톱 모드)가
   페이지 전체를 축소해 로고와 GNB 글자가 작아 보인다. */
.dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  left: auto;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: min(650px, calc(var(--vw) * 100 - 80px));
  padding: 30px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.dropdown[hidden] {
  display: none;
}

.dropdown--services {
  width: min(860px, calc(var(--vw) * 100 - 80px));
}

.dropdown__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-inline: 20px;
}

.dropdown__title {
  color: var(--ink-800);
  font-size: 16px;
  font-weight: 600;
}

.dropdown__desc {
  color: var(--ink-500);
  font-size: 16px;
  font-weight: 500;
}

.dropdown__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.dropdown__grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.channel-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

a.channel-card:hover {
  box-shadow: 0 6px 24px rgba(156, 166, 187, 0.22);
}

.channel-card--wide {
  gap: 18px;
  align-items: flex-end;
}

.channel-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.channel-card__head img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* 알파 마스크로만 제공되는 로고(코인원)는 Figma 와 같은 회색으로 채웁니다 */
.logo-mask {
  display: inline-block;
  flex: none;
  width: auto;
  max-width: 100%;
  background-color: #8d99b2;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

/* Home partners 마퀴 — stale home.css 캐시 시에도 가로 행 유지 */
.partners__marquee {
  overflow: hidden;
}

.partners__track,
.partners__set {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
}

.partners__set {
  flex-shrink: 0;
}

.partners__logos-img {
  flex-shrink: 0;
  width: auto;
  max-width: none;
  object-fit: contain;
  opacity: 0.8;
}

.logo-mask--coinone {
  aspect-ratio: 161 / 34;
  mask-image: url("/assets/shared/logo-coinone-mask.png");
  -webkit-mask-image: url("/assets/shared/logo-coinone-mask.png");
}

/* 유튜브 마크는 Figma 와 같은 크롭 박스로 노출합니다 (원본은 워드마크 포함) */
.logo-youtube {
  position: relative;
  flex: none;
  display: block;
  width: 36px;
  height: 36px;
  overflow: hidden;
}

.logo-youtube img {
  position: absolute;
  top: -16.11%;
  left: -111.11%;
  width: 322.22%;
  max-width: none;
  height: 132.22%;
}

.channel-card__name {
  color: var(--ink-800);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.channel-card__desc {
  width: 100%;
  color: var(--ink-600);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.dropdown__grid--4 .channel-card__name {
  font-size: 16px;
}

.dropdown__grid--4 .channel-card__desc,
.dropdown--channel .channel-card__desc {
  font-size: 14px;
  font-weight: 500;
}

/* 모바일 햄버거 메뉴 (Figma 7358:20406) */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(15, 26, 37, 0.35);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 176px;
  max-width: 80vw;
  padding: 20px 10px 30px;
  border-bottom-left-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.mobile-menu__close {
  align-self: flex-end;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-800);
  cursor: pointer;
}

.mobile-menu__close svg {
  width: 28px;
  height: 28px;
}

.mobile-menu__item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 20px;
  color: var(--ink-800);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.mobile-menu__item--toggle svg {
  transition: transform 0.18s ease;
}

.mobile-menu__item[aria-expanded="true"] {
  color: var(--primary);
  font-weight: 600;
}

.mobile-menu__item[data-nav-active] {
  color: #1960f3;
  font-weight: 700;
}

.mobile-menu__item[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.mobile-menu__sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-menu__sub[hidden] {
  display: none;
}

.mobile-menu__sub a {
  padding: 10px 30px;
  color: var(--ink-800);
  font-size: 16px;
  font-weight: 500;
}

@media (min-width: 800px) {
  .mobile-menu {
    display: none;
  }
}

/* ------------------------------------------------------------------ footer
   Figma: 7336:44936 (PC) · 7340:67757 (Tablet) · 7340:72483 (Mobile) */

.site-footer {
  padding-block: 30px;
  background: var(--ink-950);
}

@media (min-width: 800px) {
  .site-footer {
    padding-block: 60px;
  }
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  line-height: 1.4;
}

.site-footer__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.site-footer__brand {
  margin: 0;
  color: var(--ink-on-dark);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.24px;
}

.site-footer__addr {
  margin: 0;
  color: var(--ink-500);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.28px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  color: var(--ink-400);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.21px;
  text-decoration: none;
}

@media (min-width: 800px) {
  .site-footer__brand {
    font-size: 18px;
    letter-spacing: -0.27px;
  }

  .site-footer__addr {
    font-size: 18px;
    letter-spacing: -0.36px;
  }

  .site-footer__links a {
    font-size: 18px;
    letter-spacing: -0.27px;
  }
}

.site-footer__links a:hover {
  color: var(--ink-on-dark);
}

/* -------------------------------------------------- 공통 CTA 배너 (앱 다운로드) */

.app-cta {
  padding-block: clamp(40px, 5vw, 90px);
}

/* Figma 7336:46656 — 반응형 합성 배너 아트 + 스토어 히트 영역 */
.app-cta__banner {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
}

.app-cta__banner:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

.app-cta__banner picture,
.app-cta__img {
  display: block;
  width: 100%;
  height: auto;
}

.app-cta__stores {
  position: absolute;
  left: 6.8%;
  bottom: 9.5%;
  display: flex;
  gap: 2.2%;
  width: 34%;
  height: 17%;
}

.app-cta__store {
  flex: 1;
  min-width: 0;
  border-radius: 6px;
}

.app-cta__store:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (min-width: 800px) {
  .app-cta__stores {
    left: 4.8%;
    bottom: 10.5%;
    width: 28%;
    height: 18%;
  }
}

@media (min-width: 1440px) {
  .app-cta__stores {
    left: 3.6%;
    bottom: 11%;
    width: 22%;
    height: 19%;
  }
}
