/* 전 페이지 공통 틀(기본값·글꼴·상단 헤더·푸터) — 마크업은 tools/sync.cjs가 써 넣음 — 제조업 홈 엔진 파일(수정은 templates/mfg-site/engine에서) — 2026.11.17 작성 */
:root{--brand:#16244f;--brand-dark:#22346e;--accent:#2237c9;--accent-dark:#1a2ca5;--notice:#CC3D2B}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Pretendard Variable',Pretendard,-apple-system,BlinkMacSystemFont,'Malgun Gothic',sans-serif;color:var(--text,#333);background:var(--bg,#fff);font-size:15px;line-height:1.7;min-height:100vh;display:flex;flex-direction:column}
img{max-width:100%;height:auto;display:block}
a{text-decoration:none;color:inherit}
html{scroll-behavior:smooth}

/* 상단 고정 헤더 */
.site-header{position:fixed;top:0;left:0;right:0;background:var(--surface,#fff);z-index:1000;box-shadow:0 1px 4px rgba(0,0,0,.06)}
.header-inner{max-width:1180px;margin:0 auto;padding:0 20px;display:flex;align-items:center;justify-content:space-between;height:88px}
.logo img{height:64px;width:auto}
.gnb{display:flex;gap:8px;list-style:none}
.gnb a{display:block;padding:32px 16px;font-weight:700;font-size:15px;color:var(--brand-ink,var(--brand));letter-spacing:-.2px;border-bottom:3px solid transparent}
.gnb a:hover{color:#2c4a9e}
.gnb a.active{border-bottom-color:var(--brand)}
.call-pill{display:inline-flex;align-items:center;gap:7px;background:var(--accent);color:#fff;font-weight:700;font-size:14px;padding:8px 18px;border-radius:9999px;white-space:nowrap}
.call-pill:hover{background:var(--accent-dark)}
.header-acts{display:flex;align-items:center;gap:10px}
.hamburger{display:none;background:none;border:0;cursor:pointer;padding:8px}
.hamburger span{display:block;width:24px;height:2px;background:var(--text,#333);margin:5px 0}
.page-body{padding-top:88px;flex:1 0 auto}
@media(max-width:768px){
  .header-inner{height:64px}
  .logo img{height:44px}
  .hamburger{display:block}
  .gnb{display:none;position:absolute;top:64px;left:0;right:0;background:var(--surface,#fff);flex-direction:column;gap:0;border-top:1px solid var(--line,#eee);box-shadow:0 8px 16px rgba(0,0,0,.08)}
  .gnb.open{display:flex}
  .gnb a{padding:14px 24px;border-bottom:1px solid var(--line,#f2f2f2)}
  .gnb a.active{border-bottom:1px solid var(--line,#f2f2f2);color:var(--accent)}
  .call-pill .txt{display:none}
  .call-pill{padding:10px 12px}
  .page-body{padding-top:64px}
}

/* 푸터 */
.site-footer{background:#2e2e2e;color:#cfcfcf;text-align:center;padding:56px 20px 40px;font-size:12px;line-height:1.9}
.site-footer .fname{font-size:18px;color:#fff;margin-bottom:18px}
.site-footer a{color:#cfcfcf}
.site-footer .copy{margin-top:34px}
.site-footer .policy{margin-top:14px}
.site-footer .policy a{margin:0 8px}
.site-footer .policy a.b{font-weight:700;color:#fff}

/* 하단 고정 안내 띠 — 본문을 가리지 않도록 높이만큼 body 아래 여백(layout.js), 입력 중에는 숨김 */
.site-notice{position:fixed;left:0;right:0;bottom:0;z-index:950;background:var(--notice);color:#fff;padding-bottom:env(safe-area-inset-bottom,0px)}
.site-notice[hidden]{display:none}
.notice-inner{max-width:1180px;margin:0 auto;padding:11px 20px;display:flex;align-items:center;justify-content:center;gap:16px;position:relative}
.notice-inner p{font-size:14px;font-weight:700;line-height:1.5;text-align:center;padding:0 36px}
.notice-close{position:absolute;right:12px;top:50%;transform:translateY(-50%);width:32px;height:32px;border:0;border-radius:50%;background:rgba(var(--veil,255,255,255),.18);color:#fff;font-size:20px;line-height:1;cursor:pointer}
.notice-close:hover{background:rgba(var(--veil,255,255,255),.3)}
body.typing .site-notice{display:none}
@media(max-width:768px){
  .notice-inner{padding:9px 16px;justify-content:flex-start}
  .notice-inner p{font-size:13px;text-align:left;padding:0 40px 0 0;word-break:keep-all}
}
@media print{.site-notice{display:none}}

/* 다크 모드 — 관리자에서 '어둡게'(또는 '기기 설정 따르기'+기기 다크)를 고르면 html에 data-scheme="dark"가 붙는다. 밝은 화면은 각 변수의 기본값(원래 색) 그대로 */
html[data-scheme="dark"]{color-scheme:dark;--bg:#121417;--surface:#1b1e23;--surface-2:#23272e;--text:#e8eaed;--text-2:#c3c7cf;--muted:#9aa0aa;--line:#343a43;--line-strong:#5a6270;--veil:18,20,24;--brand-ink:#9fb4ff}
html[data-scheme="dark"] .gnb a.active{border-bottom-color:var(--brand-ink)}
html[data-scheme="dark"] .logo img.inv{filter:brightness(0) invert(1)}
.logo .logo-d,html[data-scheme="dark"] .logo .logo-l{display:none}
html[data-scheme="dark"] .logo .logo-d{display:block}
input,textarea,select{color:var(--text,inherit)}
