:root {
  --overlay-h: 260px;
  --logo-h: 28px;
  --logo-gap: 10px;
  --mark-nudge-y: 1px;
}

/* ─── 리셋 ───────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Inter", sans-serif;
  color: #0a0a0a;
}

/* ─── 고정 헤더 ──────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 32px;
  z-index: 2000;
  background: #050505;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, border-color 0.2s ease;
}
body.hero-mode .site-header {
  background: #050505;
}
body.hero-mode .logo a,
body.hero-mode .top-nav a {
  color: #fff;
}

.site-header.scrolled,
.site-header.menu-open {
  background: #050505;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.site-header.scrolled .logo a,
.site-header.menu-open .logo a,
.site-header.scrolled .top-nav a,
.site-header.menu-open .top-nav a {
  color: #fff;
}

.site-header.menu-open::before {
  content: none;
}

/* 로고 ---------------------------------------------------- */
/* currentColor를 사용하므로 텍스트 색과 아이콘 색이 항상 동일해짐 */
.logo a {
  display: inline-flex;
  align-items: center; /* ← 텍스트와 아이콘 수직 중앙 정렬 */
  gap: var(--logo-gap);
  padding: 6px 0;
  margin-right: 32px;
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  transition: color 0.25s;
}

/* 아이콘: mask로 투명 배경 + 단색 렌더링 */
.logo .mark {
  display: inline-block;
  width: var(--logo-h);
  height: var(--logo-h);
  background-color: currentColor;

  /* ✅ CSS 파일(/css) 기준 → ../asset/ 가 맞습니다 */
  -webkit-mask-image: url("../asset/logo.svg");
  mask-image: url("../asset/logo.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;

  /* 아이콘 시각 중심이 약간 아래라면 마스크 위치를 52%로 살짝 내림 */
  -webkit-mask-position: center 52%;
  mask-position: center 52%;

  -webkit-mask-size: contain;
  mask-size: contain;

  /* ▼ 시각적 미세 보정(기본 1px 내려서 눈높이 맞춤) */
  transform: translateY(var(--mark-nudge-y));
}
@supports (translate: 0) {
  .logo .mark {
    transform: none;
    translate: 0 var(--mark-nudge-y);
  }
}

/* 텍스트(회사명) */
.logo .word {
  font-weight: 600;
  line-height: 1; /* 아이콘과 동일 라인박스 */
}

/* 시각장애인용 스크린리더 전용 텍스트 (필요 시 사용) */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 네비 ---------------------------------------------------- */
.top-nav {
  min-width: 0;
}
.top-nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.top-nav a {
  padding: 8px 0;
  font-weight: 600;
  font-size: 14px;
  border-radius: 0;
  color: #fff;
  text-decoration: none;
  opacity: 0.72;
  transition: opacity 0.18s ease;
}
body.hero-mode .top-nav a:hover {
  opacity: 1;
}
.site-header.scrolled .top-nav a:hover,
.site-header.menu-open .top-nav a:hover {
  opacity: 1;
}
.top-nav li.active > a {
  opacity: 1;
}

/* ─── 메가메뉴 ───────────────────── */
.mega-menu {
  position: absolute;
  top: 64px;
  left: 0;
  width: 100%;
  padding: 0;
  display: block;
  background: #050505;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateY(-6px);
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.16s ease, transform 0.16s ease, max-height 0.2s ease;
  z-index: 1500;
}
.mega-menu::before {
  content: none;
}
.mega-menu.show {
  opacity: 1;
  transform: translateY(0);
  max-height: var(--overlay-h);
}

.mega-inner {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(180px, 0.8fr) minmax(
      220px,
      1fr
    );
  gap: clamp(32px, 7vw, 96px);
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px clamp(24px, 5vw, 48px) 44px;
}
.mega-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.mega-column--primary {
  gap: 18px;
}
.mega-kicker {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.52);
}
.mega-menu a,
.mega-menu p {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}
.mega-menu a {
  transition: color 0.16s ease, opacity 0.16s ease;
}
.mega-menu a:hover {
  color: #fff;
}
.mega-primary-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff !important;
  font-size: clamp(25px, 3vw, 34px) !important;
  font-weight: 700;
  line-height: 1.25 !important;
  letter-spacing: -0.02em;
}
.mega-menu .cta {
  background: transparent !important;
  padding: 0;
  margin: 0;
  border-radius: 0;
}
.mega-menu .arrow {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-left: 0;
  border-bottom: 0;
  transform: rotate(45deg);
  flex-shrink: 0;
}

.mega-overlay {
  display: none;
}

/* ─── 모바일 ───────────────────────── */
@media (max-width: 768px) {
  .site-header {
    padding: 0 18px;
  }
  .logo a {
    margin-right: 20px;
    font-size: 16px;
  }
  .top-nav {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .top-nav::-webkit-scrollbar {
    display: none;
  }
  .top-nav ul {
    gap: 18px;
    min-width: max-content;
  }
  .mega-menu {
    top: 64px;
  }
  .mega-menu.show {
    max-height: 520px;
  }
  .mega-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 20px 36px;
  }
  .mega-primary-link {
    font-size: 25px !important;
  }
}
