/* ==========================================================================
   웹 폰트 불러오기 (Pretendard & Paperlogy)
   ========================================================================== */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css");

@font-face {
  font-family: "Paperozi";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-1Thin.woff2")
    format("woff2");
  font-weight: 100;
  font-display: swap;
}

@font-face {
  font-family: "Paperozi";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-4Regular.woff2")
    format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Paperozi";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-5Medium.woff2")
    format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Paperozi";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-6SemiBold.woff2")
    format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Paperozi";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-7Bold.woff2")
    format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Paperozi";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-8ExtraBold.woff2")
    format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ==========================================================================
   Design Tokens (디자인 시스템 변수)
   ========================================================================== */

:root {
  /* Fonts */
  --font-main:
    "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", sans-serif;
  --font-point: "Paperlogy", sans-serif;

  /* Colors */
  --color-main: #1984ff;
  --color-sub: #ff8235;
  --color-text-main: #111111;
  --color-text-sub: #555555;
  --color-gray-light: #999999;
  --color-date: #a9a9a9;
  --color-navy: #181f29;
  --color-white: #ffffff;

  /* Layout Spacing */
  --margin-main: 0 30px;
  --margin-sub: 0 17px;
}

body {
  font-family: var(--font-main);
  color: var(--color-text-main);
  background-color: var(--color-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typography Components */
.font-point {
  font-family: var(--font-point);
}
.title-main {
  font-size: clamp(28px, 6vw, 34px);
  font-weight: 800;
  color: var(--color-text-main);
  line-height: 1.4;
  word-break: keep-all;
}
.title-sub {
  font-size: clamp(18px, 4.5vw, 22px);
  font-weight: 500;
  color: var(--color-text-main);
  line-height: 1.4;
}
.text-main {
  font-size: clamp(16px, 4vw, 18px);
  color: var(--color-text-main);
  font-weight: 400;
}
.text-sub {
  font-size: clamp(14px, 4vw, 18px);
  color: var(--color-text-sub);
}
.text-date {
  font-size: clamp(14px, 3.8vw, 16px);
  color: var(--color-date);
}

/* Layout Components */
.layout-main {
  padding: var(--margin-main);
}
.layout-sub {
  padding: var(--margin-sub);
}

/* Button Components */
.btn-primary {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 60px;
  background-color: var(--color-main);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  font-size: clamp(16px, 4vw, 18px);
  font-weight: 600;
}

footer .btn-primary {
  height: 52px;
  line-height: 52px;
}

/* 섹션 내 컨텐츠 정렬 */
.hero-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.top-align {
  padding-top: 15vh;
  justify-content: flex-start;
}
.mid-align {
  justify-content: center;
}

/* 첫 번째 섹션 (히어로 영역) - 100vh 고정 */
.sub-hero {
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  /* 텍스트 가독성을 위해 이미지 위에 반투명 어두운 오버레이 추가 */
  background-image: url("/m/sub/company/img/hero-bg.jpg");
  text-align: center;
}

.sub-hero-badge {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 30px;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: clamp(18px, 4.5vw, 22px);
  font-weight: 500;
  margin-bottom: 24px;
  color: var(--color-white);
}

.sub-hero .title-main,
.color-white {
  color: var(--color-white);
}
.text-center {
  text-align: center;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--color-text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

ul,
li {
  list-style: none;
}

/* * ==========================================
   * 4. Header & Navigation (CSS Icons included)
   * ==========================================
   */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 100;
  display: flex;
  align-items: center;
  /* 스크롤 업/다운 동작을 위해 transform 트랜지션 추가 */
  transition:
    background-color 0.4s ease,
    transform 0.4s ease;
}

/* 스크롤을 내릴 때 헤더를 숨기기 위한 클래스 */
.header.hidden {
  transform: translateY(-100%);
}

/* 스크롤 업 시 헤더 흰색 배경 */
.header.bg-white {
  background-color: var(--color-white) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.header.bg-white .btn-hamburger::before,
.header.bg-white .btn-hamburger::after,
.header.bg-white .btn-hamburger span {
  background-color: var(--color-text-main) !important;
}

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

.logo a {
  font-size: 22px;
  font-weight: 900;
  color: #000;
  letter-spacing: -0.5px;
}

.logo img {
  width: 100px;
  height: auto;
}

/* 햄버거 메뉴 아이콘 (가상요소 사용, 폰트어썸 X) */
.btn-hamburger {
  width: 24px;
  height: 18px;
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
}
.btn-hamburger::before,
.btn-hamburger::after,
.btn-hamburger span {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-text-main);
  border-radius: 2px;
}
.btn-hamburger::before {
  top: 0;
}
.btn-hamburger span {
  top: 50%;
  transform: translateY(-50%);
}
.btn-hamburger::after {
  bottom: 0;
}

/* 헤더 다크 테마 (어두운 배경 섹션에서 적용) */
.header.theme-dark .btn-hamburger::before,
.header.theme-dark .btn-hamburger::after,
.header.theme-dark .btn-hamburger span {
  background-color: var(--color-white);
}

/* 닫기 버튼 아이콘 (가상요소 사용) */
.btn-close {
  width: 24px;
  height: 24px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}
.btn-close::before,
.btn-close::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-text-main);
  border-radius: 2px;
}
.btn-close::before {
  transform: rotate(45deg);
}
.btn-close::after {
  transform: rotate(-45deg);
}

/* * ==========================================
   * 5. Side Menu (Full Screen Drawer)
   * ==========================================
   */
.side-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.side-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.side-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100dvh;
  background-color: var(--color-white);
  z-index: 1000;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.side-menu.active {
  right: 0;
}

.side-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  padding: 10px 30px;
}

.menu-list-wrapper {
  padding: var(--margin-main);
  overflow-y: auto;
  flex: 1;
}

.menu-list > li {
  border-bottom: 1px solid #f4f4f4;
}
.menu-list > li:last-child {
  border-bottom: none;
}

.menu-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 24px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-main);
  cursor: pointer;
}

/* 아코디언 화살표 (하위 메뉴가 있는 경우) */
.has-sub .menu-link::after {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid #111;
  border-right: 1.5px solid #111;
  transform: rotate(45deg);
  transition: transform 0.3s;
  margin-right: 4px;
}
.has-sub.active .menu-link::after {
  transform: rotate(135deg);
} /* 열렸을 때 아래 화살표 */

.depth2 {
  display: none;
  padding: 0 0 24px 0;
}
.has-sub.active .depth2 {
  display: block;
} /* 활성화 시 노출 */

.depth2 li {
  margin-bottom: 16px;
}
.depth2 li:last-child {
  margin-bottom: 0;
}
.depth2 li a {
  font-size: clamp(16px, 4vw, 18px);
  color: #777;
  font-weight: 500;
  display: block;
}

/* 하단 앱 다운로드 버튼 영역 */
.side-menu-footer {
  padding: 20px;
}

.btn-download {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 58px;
  line-height: 58px;
  border: none;
  border-radius: 8px;
  font-size: clamp(16px, 4vw, 18px);
  font-weight: 600;
  cursor: pointer;
  background-color: var(--color-navy);
  color: var(--color-white);
}

/* * ==========================================
   * 7. Footer
   * ==========================================
   */
.footer {
  background-color: var(--color-navy);
  padding-top: 60px;
  padding-bottom: 60px;
  color: #fff;
}
.footer a {
  color: inherit;
  text-decoration: none;
}

/* 푸터 상단 링크 */
.footer-policy {
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 700;
  margin-bottom: 30px;
}
.footer-policy .divider {
  margin: 0 8px;
  font-weight: 400;
  color: #505967;
}

/* 회사명 */
.footer-company-name {
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 700;
  margin-bottom: 15px;
}

/* 관련사이트 셀렉트 (가상요소로 + 아이콘 구현) */
.family-site {
  position: relative;
  margin-bottom: 12px;
}
.family-site select {
  width: 100%;
  height: 52px;
  background-color: #333d4b;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: var(--margin-sub);
  font-size: clamp(14px, 4vw, 18px);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}
.family-site::after {
  /* + 가로선 */
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 1px;
  background-color: #fff;
  pointer-events: none;
}
.family-site::before {
  /* + 세로선 */
  content: "";
  position: absolute;
  right: 21.5px;
  top: calc(50% - 6px);
  width: 1px;
  height: 12px;
  background-color: #fff;
  pointer-events: none;
  z-index: 1;
}

/* 앱 다운로드 버튼 */
.footer .btn-app-down {
  background-color: #0055ff;
  color: #fff;
  border-radius: 6px;
  margin-bottom: 40px;
  padding: var(--margin-sub);
  justify-content: start;
}

/* 회사 정보 텍스트 */
.footer-info-group {
  font-size: clamp(14px, 4vw, 18px);
  color: #b0b8c1;
  line-height: 1.6;
  margin-bottom: 20px;
}
.footer-info-group strong {
  display: block;
  color: #fff;
  font-size: clamp(14px, 4vw, 18px);
  margin-bottom: 6px;
}
.footer-info-group .divider {
  margin: 0 6px;
  color: #505967;
}

/* 구분선 */
.footer-line {
  border: none;
  border-top: 1px solid #2b323b;
  margin: 30px 0;
}

/* 카피라이트 및 안내문구 */
.footer-copyright .copy {
  font-size: clamp(14px, 3.8vw, 16px);
  color: #8b95a1;
  margin-bottom: 12px;
}
.footer-copyright .warning {
  font-size: clamp(14px, 3.8vw, 16px);
  color: #6b7684;
  line-height: 1.6;
  word-break: keep-all;
}

/* ==========================================================================
   메인팝업
   ========================================================================== */

/* 팝업 컨테이너 (화면 전체 덮기) */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.65); /* 반투명 검은색 배경 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* 항상 최상단에 위치 */
    opacity: 0; /* 처음엔 투명하게 */
    visibility: hidden; /* 보이지 않게 처리 */
    transition: opacity 0.3s ease, visibility 0.3s ease; /* 부드러운 전환 효과 */
}

/* 팝업이 활성화되었을 때의 클래스 */
.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 이미지와 닫기 버튼을 감싸는 래퍼 */
.popup-content {
    position: relative;
    width: 90%;
    max-width: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 통이미지 스타일 */
.popup-image {
    width: 100%;
    height: auto; /* 원본 이미지 비율 유지 */
    display: block;
}

/* 닫기 버튼 스타일 (이미지 우측 바깥) */
.close-btn {
    position: absolute;
    top: -50px;
    right: -10px;
    background: transparent;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 40px;
    line-height: 1;
    font-weight: 300;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
    z-index: 10000;
}

.close-btn:hover {
    color: #d4d4d8;
    transform: scale(1.1);
}

/* 스크롤 방지용 클래스 */
body.no-scroll {
    overflow: hidden;
}