/* 홈페이지 공통 헤더·푸터 — 모든 정식 페이지가 @gen:home-header/@gen:home-footer 와 이 파일을 쓴다.
   헤더 마크업·메뉴 항목의 원본은 js/header.js(NAV_ITEMS). 880px 이하는 햄버거 + 오른쪽 슬라이드 패널. */
body > .site-header, body > .home-footer, .gnb-backdrop {
  --site-bg: #070e13; --site-ink: #eef8f7; --site-muted: #99aeb5;
  --site-accent: #67f8cb; --site-line: #25373e; --site-gutter: clamp(22px, 5vw, 88px);
}
body > .site-header, body > .home-footer {
  box-sizing: border-box; font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--site-bg); color: var(--site-ink);
}
body > .site-header {
  position: relative; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  gap: 28px; padding: 24px var(--site-gutter); border-bottom: 1px solid #ffffff12; line-height: normal;
}
.site-header .brand { flex-shrink: 0; }
.site-header .brand img { display: block; width: 156px; height: 38px; object-fit: contain; }
.site-header a, .home-footer a { color: inherit; text-decoration: none; }
.site-header a:focus-visible, .home-footer a:focus-visible, .gnb-burger:focus-visible { outline: 2px solid var(--site-accent); outline-offset: 6px; }

/* 메뉴 — 옛 style.css·페이지 CSS 의 전역 nav{} 규칙(sticky·높이·배경)이 번지지 않게 body > 로 시작해 되돌린다 */
body > .site-header .gnb {
  position: static; inset: auto; z-index: auto; transform: none; width: auto; height: auto; margin: 0; padding: 0;
  background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; overflow: visible;
  display: flex; align-items: center; justify-content: flex-start; gap: 38px; font-size: 14px; color: #c1cdcf;
}
body > .site-header .gnb a { position: static; font-size: 14px; font-weight: 400; color: inherit; white-space: nowrap; }
body > .site-header .gnb a::after { display: none; }
body > .site-header .gnb small, body > .site-header .gnb .gnb-cta { display: none; }
.site-header .gnb a:hover, .site-header .gnb a[aria-current="page"], .home-footer a:hover { color: var(--site-accent); }
.site-header .header-cta { display: flex; flex-shrink: 0; gap: 28px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid #718188; font-size: 14px; white-space: nowrap; }
.site-header .header-cta span { color: var(--site-accent); }

/* 햄버거(모바일에서만) */
.gnb-burger { display: none; position: relative; z-index: 2; width: 40px; height: 40px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; margin: -6px -8px -6px 0; padding: 0; background: none; border: 0; border-radius: 6px; cursor: pointer; }
.gnb-burger span { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--site-ink); transition: transform .22s, opacity .22s; }
.gnb-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.gnb-burger.is-open span:nth-child(2) { opacity: 0; }
.gnb-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.gnb-backdrop { display: none; position: fixed; inset: 0; z-index: 29; background: #02070acc; }
.gnb-backdrop.on { display: block; }
body.nav-open { overflow: hidden; }

/* 푸터 — 옛 style.css·페이지 CSS 의 footer .footer-* 규칙보다 앞서도록 body > 로 시작한다 */
body > .home-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 12px 24px;
  width: auto; max-width: none; margin: 0; grid-template-columns: none;
  padding: 27px var(--site-gutter); border-top: 1px solid var(--site-line); color: var(--site-muted);
  font-size: 12px; line-height: 1.7; letter-spacing: 0; text-align: left;
}
body > .home-footer p { margin: 0; line-height: 1.7; }
body > .home-footer span:not(.footer-sep) { color: inherit; }
body > .home-footer .footer-corp { font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--site-ink); margin: 0; }
body > .home-footer .footer-info, body > .home-footer .footer-copy, body > .home-footer .footer-links { font-size: 12px; line-height: 1.7; color: var(--site-muted); margin-top: 0; }
body > .home-footer .footer-links a { color: var(--site-muted); font-size: 12px; text-decoration: none; }
body > .home-footer .footer-links a:hover { color: var(--site-accent); }
.home-footer .footer-copy { margin-left: auto; }
.home-footer .footer-links { display: flex; align-items: center; gap: 12px; }
body > .home-footer .footer-sep { color: var(--site-line); margin: 0; }

@media (max-width: 1100px) {
  body > .site-header .gnb { gap: 24px; }
  .site-header .header-cta { gap: 16px; }
}
/* 880px 이하 — 햄버거 + 오른쪽 슬라이드 패널 */
@media (max-width: 880px) {
  body > .site-header { padding-top: 16px; padding-bottom: 16px; gap: 16px; }
  .site-header .brand img { width: 132px; height: 32px; }
  .site-header .header-cta { display: none; }
  .gnb-burger { display: flex; }
  body > .site-header .gnb {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1; width: min(320px, 84vw); height: 100dvh;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px;
    padding: 76px 18px 24px; overflow-y: auto; background: #0b171b; border-left: 1px solid var(--site-line);
    box-shadow: -18px 0 40px #0008; transform: translateX(100%); visibility: hidden;
    transition: transform .28s ease, visibility 0s linear .28s;
  }
  body > .site-header .gnb.on { transform: translateX(0); visibility: visible; transition: transform .28s ease; }
  body > .site-header .gnb a {
    display: flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 9px 14px;
    border: 1px solid #ffffff14; border-radius: 10px; background: #ffffff08; color: var(--site-ink); white-space: normal;
  }
  body > .site-header .gnb a span { font-size: 16px; font-weight: 600; line-height: 1.3; }
  body > .site-header .gnb small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.3; color: var(--site-muted); }
  body > .site-header .gnb a[aria-current="page"] { border-color: #67f8cb66; color: var(--site-accent); }
  body > .site-header .gnb .gnb-cta {
    display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px; margin-top: 10px;
    min-height: 50px; border: 0; background: var(--site-accent); color: #07140f; font-size: 15px; font-weight: 700;
  }
  body > .site-header .gnb .gnb-cta b { font-weight: 700; }
  body > .home-footer { gap: 12px 20px; }
}
@media (max-width: 640px) {
  .home-footer .footer-copy { margin-left: 0; }
}
