@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;800&display=swap");

/* =========================================================
  Design Tokens
  - 컬러, 간격, 타이포 등 모든 공통 값은 여기서 관리
  - main.css / company.css / history.css 에서 덮어쓰지 말 것
========================================================= */

:root {
  /* Brand colors */
  --color-primary: #087df5;
  --color-primary-dk: #065ec0;
  --color-navy: #0d2b55;
  --color-navy-deep: #09264b;
  --color-navy-hero: rgba(3, 13, 28, 0.92);

  /* Text */
  --color-text: #10274d;
  --color-text-muted: #71819a;
  --color-text-faint: #9aaabd;
  --color-text-white: rgba(255, 255, 255, 0.86);

  /* Surface */
  --color-bg: #ffffff;
  --color-bg-subtle: #f7fbff;
  --color-border: #e2e7ed;
  --color-border-mid: #c9d4e1;

  /* Spacing scale */
  --sp-xs: 8px;
  --sp-sm: 16px;
  --sp-md: 24px;
  --sp-lg: 48px;
  --sp-xl: 80px;
  --sp-2xl: 120px;

  /* Container */
  --container-max: 1280px;
  --container-pad: 40px;
  --container-width: min(var(--container-max), calc(100% - var(--container-pad) * 2));

  /* Header */
  --header-h: 76px;

  /* Radius */
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-pill: 28px;

  /* Shadow */
  --shadow-card: 0 5px 20px rgba(21, 50, 86, 0.06);
  --shadow-hover: 0 15px 40px rgba(20, 52, 95, 0.12);

  /* Transition */
  --ease: 0.25s ease;
}

/* =========================================================
  Reset
========================================================= */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans KR", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  word-break: keep-all;
}

a {
  color: inherit;
  text-decoration: none;
}
button,
select {
  font-family: inherit;
}
img {
  display: block;
}

/* =========================================================
  Layout helpers
========================================================= */

.container {
  width: var(--container-width);
  margin: 0 auto;
}

/* 페이지별 컨테이너가 다른 max-width를 쓸 경우 로컬 변수로 오버라이드
   예) .company-page { --container-max: 1180px; } */

/* =========================================================
  Typography — 공통 섹션 레이블·제목
========================================================= */

/* 소제목 라벨  (예: "ABOUT US", "PRODUCT LINE") */
.section-label {
  display: block;
  /* margin-bottom: 10px; */
  color: var(--color-primary);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* 섹션 H2 */
.section-title {
  color: var(--color-navy);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.045em;
}

/* 섹션 본문 */
.section-desc {
  margin-top: var(--sp-sm);
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.85;
}

/* =========================================================
   Buttons — 전 페이지 공통
========================================================= */

/* 기본 아웃라인 버튼 (파란 테두리) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-pill);
  color: var(--color-primary);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background var(--ease),
    color var(--ease),
    border-color var(--ease);
}

.btn:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn span {
  font-size: 18px;
}

/* 흰색 테두리 버튼 (어두운 배경 위) */
.btn-white {
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
}

.btn-white:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* 채워진 파란 버튼 */
.btn-fill {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.btn-fill:hover {
  background: var(--color-bg);
  color: var(--color-navy);
  border-color: var(--color-bg);
}

/* =========================================================
   Header
========================================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: 1400px;
  height: 100%;
  padding: 0 var(--container-pad);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  width: 150px;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 52px;
  margin-left: 80px;
}

.nav a {
  position: relative;
  font-size: 16px;
  font-weight: 500;
  color: #162b50;
  transition: color var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -26px;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transform: translateX(-50%);
  transition: width var(--ease);
}

.nav a:hover,
.nav a.active {
  color: var(--color-primary);
}
.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-btn {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  position: relative;
  cursor: pointer;
}

.search-btn::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--color-text);
  border-radius: 50%;
  left: 4px;
  top: 4px;
}

.search-btn::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  background: var(--color-text);
  transform: rotate(45deg);
  left: 16px;
  top: 18px;
}

.login-btn {
  min-width: 78px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-navy-deep);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--ease);
}

.login-btn:hover {
  background: var(--color-primary);
}

/* ── 햄버거 버튼 ── */
.menu-btn {
  display: none; /* 데스크톱에서는 숨김 */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  transition: background var(--ease);
}

.menu-btn:hover {
  background: var(--color-bg-subtle);
}

/* 햄버거 3선 */
.menu-btn-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease,
    width 0.3s ease;
}

/* 열렸을 때 X 모양으로 변환 */
.menu-btn.is-open .menu-btn-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-btn.is-open .menu-btn-bar:nth-child(2) {
  opacity: 0;
  width: 0;
}
.menu-btn.is-open .menu-btn-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================================
   모바일 드로어 메뉴
========================================================= */

/* 배경 딤 */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(5, 20, 45, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* 드로어 패널 */
.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1200;
  width: min(320px, 85vw);
  height: 100dvh; /* 모바일 주소창 높이 대응 */
  background: #fff;
  box-shadow: -8px 0 32px rgba(10, 30, 70, 0.15);
  transform: translateX(100%); /* 기본: 화면 밖으로 숨김 */
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-nav.is-open {
  transform: translateX(0); /* 열기: 화면 안으로 슬라이드 */
}

/* 드로어 헤더 */
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav-header .logo img {
  width: 110px;
}

/* 닫기 버튼 */
.mobile-nav-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 18px;
  cursor: pointer;
  transition:
    background var(--ease),
    color var(--ease),
    border-color var(--ease);
}

.mobile-nav-close:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* 메뉴 링크 리스트 */
.mobile-nav-list {
  list-style: none;
  padding: 12px 0;
}

.mobile-nav-list li {
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav-list li:last-child {
  border-bottom: none;
}

.mobile-nav-list a {
  display: flex;
  align-items: center;
  height: 58px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  transition:
    background var(--ease),
    color var(--ease),
    padding-left var(--ease);
}

.mobile-nav-list a:hover,
.mobile-nav-list a.active {
  background: var(--color-bg-subtle);
  color: var(--color-primary);
  padding-left: 36px; /* hover 시 살짝 들여쓰기 */
}

.mobile-nav-list a.active {
  font-weight: 700;
}

/* =========================================================
  Footer
========================================================= */

.footer {
  background: #202328;
  color: #fff;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 50px 0;
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 50px;
}

.footer-logo {
  width: 200px;
}

.footer-company {
  display: flex;
  align-items: center;
  /* justify-content: center; */
}

.footer-column {
  padding-left: 30px;
  border-left: 1px solid rgba(255, 255, 255, 0.55);
}

.footer-column h3 {
  margin-bottom: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.footer-column p {
  color: rgba(255, 255, 255, 0.63);
  font-size: 14px;
  letter-spacing: 0.05em;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-icon p {
  color: rgba(255, 255, 255, 0.63);
  font-size: 14px;
  line-height: 1.9;
}

.footer-icon {
  color: rgba(255, 255, 255, 0.63);
  flex-shrink: 0;
}

.footer-icon svg {
  width: 12px;
  height: 12px;
}

.family-site select {
  width: 100%;
  height: 47px;
  padding: 0 15px;
  color: rgba(255, 255, 255, 0.8);
  background: #292d32;
  border: 1px solid #41464d;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.55);
}

.footer-bottom p {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
}

/* =========================================================
   Responsive — Header / Footer
========================================================= */

@media (max-width: 1100px) {
  .nav {
    gap: 25px;
    margin-left: 30px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 68px;
    --container-pad: 20px;
  }

  .section-label {
    font-size: 13px;
  }

  .logo img {
    width: 120px;
  }
  /* 데스크톱 전용 요소 숨김 */
  .nav,
  .search-btn,
  .login-btn {
    display: none;
  }

  /* 햄버거 버튼 표시 */
  .menu-btn {
    display: flex;
  }

  .footer-inner {
    padding: 50px 20px 35px;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-company p {
    max-width: 100%;
  }

  .footer-bottom {
    /* padding: 18px 20px; */
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}
