/* 공통 틀 (v2, 2026-10-28) — 메뉴마다 같은 모양으로 시작하고 같은 부품으로 채운다.
   상단(hero) : 사진 띠 + 제목·한 줄 설명 + 반투명 글래스 카드 + 같은 묶음의 하위 메뉴 탭   → sub.lib.php wm2_sub_hero()
   본문 부품   : 구역(wm2-sec: 흰 / is-light 밝은 회색 / is-dark 짙은 남색), 구역 제목(wm2-sec-h), 카드(wm2-card),
                칸 나눔(wm2-grid c2·c3·c4), 비교표(wm2-table), 단위 꼬리표(wm2-chip), 문의 띠(wm2-ask), 버튼(wm2-btn)
   넘김       : 소개형 메뉴는 구역에 pg 를 붙이고 js/pages.js 를 부르면 메인처럼 한 장씩. 휴대폰·낮은 화면은 늘 스크롤.
   옛 CSS(부트스트랩·ety.css)와 같은 페이지에 있을 수 있으므로 이름은 모두 wm2- 로 시작하고 글꼴·여백·색을 여기서 다시 정한다. */
:root {
  --wm2-dark: #1A2430; --wm2-dark2: #0E151C; --wm2-light: #F2F5F8;
  --wm2-ink-d: #EEF2F5; --wm2-ink-d2: #B4BEC7; --wm2-ink-d3: #8592A0;
  --wm2-acc: #4FA3E3;
  --wm2-r: 16px;
}
.wm2-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 max(28px, 4vw); box-sizing: border-box; }
body.wm2-page { margin: 0; background: #fff; color: var(--wm2-ink); } /* 옛 CSS 를 안 받는 페이지($wm2_bare)는 브라우저 기본 여백 8px 이 남는다 */
.wm2-sh, .wm2-page { font-family: var(--wm2-font); letter-spacing: -0.01em; word-break: keep-all; -webkit-font-smoothing: antialiased; }
.wm2-sh *, .wm2-page * { box-sizing: border-box; }
.wm2-sh a, .wm2-page a { text-decoration: none; }
.wm2-sh a:hover, .wm2-page a:hover { text-decoration: none; }
.wm2-sh p, .wm2-sh dl, .wm2-sh dd, .wm2-sh ul, .wm2-page p, .wm2-page dl, .wm2-page dd, .wm2-page ul, .wm2-page ol { margin: 0; }
.wm2-sh ul, .wm2-page ul, .wm2-page ol { padding: 0; list-style: none; }
.wm2-sh h1, .wm2-sh h2, .wm2-page h2, .wm2-page h3 { margin: 0; font-family: inherit; color: inherit; }

/* ── 버튼·화살표 ── */
.wm2-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent; background: var(--wm2-blue); color: #fff !important; font-size: 16px; font-weight: 650; line-height: 1; white-space: nowrap; transition: background-color .2s var(--wm2-ease), border-color .2s var(--wm2-ease), color .2s var(--wm2-ease); -webkit-user-select: none; user-select: none; }
.wm2-btn:hover { background: #1B5F9C; }
.wm2-btn.is-glass { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .28); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.wm2-btn.is-glass:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .5); }
.wm2-btn.is-line { background: #fff; border-color: #C8D1DA; color: var(--wm2-ink) !important; }
.wm2-btn.is-line:hover { border-color: var(--wm2-ink); }
.wm2-btn.is-white { background: #fff; color: var(--wm2-ink) !important; }
.wm2-btn.is-white:hover { background: var(--wm2-ink); color: #fff !important; }
.wm2-ar { display: inline-block; flex: none; width: 16px; height: 10px; background: currentColor; transition: transform .25s var(--wm2-ease);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M0 5h14M10 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M0 5h14M10 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat; }
a:hover > .wm2-ar, a:hover .wm2-ar { transform: translateX(4px); }

/* 글래스: 사진·짙은 바탕 위의 반투명 판 */
.wm2-glass { background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .06)); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--wm2-r);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 20px 40px -28px rgba(0, 0, 0, .6); color: #fff; }

/* ───────── 상단(hero) ───────── */
.wm2-sh { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(460px, 64vh, 660px); padding-top: calc(var(--wm2-hd) + var(--wm2-st)); background: var(--wm2-dark); color: #fff; }
.wm2-sh-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.wm2-sh-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 등장 효과는 새로 만든 메뉴(.wm2-page)에서만 — 옛 메뉴는 페이지가 무거워 효과가 늦게 시작되면 글자가 한동안 안 보인다 */
.wm2-page .wm2-sh-bg img { animation: wm2-sh-zoom 2.4s var(--wm2-ease) both; }
.wm2-sh-bg::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(14, 21, 28, .9) 0%, rgba(14, 21, 28, .68) 42%, rgba(14, 21, 28, .28) 100%), linear-gradient(0deg, rgba(14, 21, 28, .72) 0%, rgba(14, 21, 28, 0) 46%), linear-gradient(180deg, rgba(14, 21, 28, .55) 0%, rgba(14, 21, 28, 0) 22%); }
@keyframes wm2-sh-zoom { from { transform: scale(1.08); opacity: .4; } to { transform: scale(1); opacity: 1; } }
.wm2-sh-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px 56px; align-items: end; padding-top: 48px; padding-bottom: 44px; }
.wm2-sh.has-side .wm2-sh-in { grid-template-columns: minmax(0, 1fr) minmax(0, auto); }
.wm2-page .wm2-sh-copy > * { animation: wm2-up .9s var(--wm2-ease) both; }
.wm2-page .wm2-sh-copy > :nth-child(2) { animation-delay: .08s; } .wm2-page .wm2-sh-copy > :nth-child(3) { animation-delay: .16s; } .wm2-page .wm2-sh-copy > :nth-child(4) { animation-delay: .24s; }
.wm2-page .wm2-sh-side { animation: wm2-up 1s var(--wm2-ease) .3s both; }
@keyframes wm2-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.wm2-sh-path { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 14px; font-weight: 550; color: rgba(255, 255, 255, .7); }
.wm2-sh-path a { color: rgba(255, 255, 255, .7) !important; }
.wm2-sh-path a:hover { color: #fff !important; }
.wm2-sh-path i { width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); opacity: .7; }
.wm2-sh .wm2-sh-t { max-width: 15em; font-size: clamp(36px, 4.2vw, 60px); line-height: 1.16; letter-spacing: -0.035em; font-weight: 700; color: #fff; }
.wm2-sh-lead { max-width: 34em; margin-top: 18px !important; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.7; color: rgba(255, 255, 255, .82); }
.wm2-sh-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* 글래스 카드: 숫자·요점 2~4개 */
.wm2-sh-cards { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(150px, 210px)); gap: 12px; }
.wm2-sh-cards > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 20px 22px 18px; }
.wm2-sh-cards dt { font-size: 14px; font-weight: 550; color: rgba(255, 255, 255, .72); }
.wm2-sh-cards dd { font-size: clamp(26px, 2.2vw, 34px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: #fff; }
.wm2-sh-cards dd small { margin-left: 3px; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .8); }
/* 글래스 안내판: 연락처·주소처럼 줄로 적는 것 */
.wm2-sh-sum { width: min(420px, 100%); padding: 24px 26px; }
.wm2-sh-sum-t { margin-bottom: 12px !important; font-size: 16px; font-weight: 700; }
.wm2-sh-sum dl > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 15px; line-height: 1.55; }
.wm2-sh-sum dt { color: rgba(255, 255, 255, .62); font-weight: 550; }
.wm2-sh-sum dd { color: #fff; }

/* 하위 메뉴 탭 */
.wm2-sh-tabs { position: relative; border-top: 1px solid rgba(255, 255, 255, .14); background: rgba(14, 21, 28, .34); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.wm2-sh-tabs ul { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.wm2-sh-tabs ul::-webkit-scrollbar { display: none; }
.wm2-sh-tabs li { flex: none; }
.wm2-sh-tabs a { position: relative; display: block; padding: 19px 20px; font-size: 15.5px; font-weight: 600; color: rgba(255, 255, 255, .66) !important; white-space: nowrap; transition: color .2s var(--wm2-ease); }
.wm2-sh-tabs li:first-child a { padding-left: 0; }
.wm2-sh-tabs a:hover { color: #fff !important; }
.wm2-sh-tabs a[aria-current] { color: #fff !important; }
.wm2-sh-tabs a::after { content: ''; position: absolute; left: 20px; right: 20px; bottom: 0; height: 2px; background: var(--wm2-acc); transform: scaleX(0); transition: transform .3s var(--wm2-ease); }
.wm2-sh-tabs li:first-child a::after { left: 0; }
.wm2-sh-tabs a[aria-current]::after { transform: none; }
.wm2-sh-tabs a:focus-visible, .wm2-sh a:focus-visible, .wm2-page a:focus-visible { outline: 2px solid var(--wm2-acc); outline-offset: 2px; border-radius: 6px; }

/* 글 보기 화면: 낮은 띠 */
.wm2-sh.is-compact { min-height: clamp(300px, 40vh, 380px); }
.wm2-sh.is-compact .wm2-sh-t { font-size: clamp(28px, 3vw, 40px); }
.wm2-sh.is-compact .wm2-sh-in { padding-bottom: 32px; }

/* ───────── 본문 부품 ───────── */
.wm2-page { color: var(--wm2-ink); background: #fff; line-height: 1.6; }
.wm2-sec { position: relative; padding: clamp(80px, 9vw, 124px) 0; background: #fff; color: var(--wm2-ink); }
.wm2-sec.is-light { background: var(--wm2-light); }
.wm2-sec.is-dark { background: var(--wm2-dark); color: var(--wm2-ink-d); }
.wm2-sec-h { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: end; margin-bottom: clamp(36px, 4vw, 52px); }
.wm2-sec-h h2 { font-size: clamp(30px, 3vw, 44px); line-height: 1.22; letter-spacing: -0.03em; font-weight: 700; }
.wm2-sec-h p { max-width: 36em; font-size: 17px; line-height: 1.75; color: var(--wm2-ink2); }
.is-dark .wm2-sec-h p { color: var(--wm2-ink-d2); }
.wm2-sec-h.is-solo { grid-template-columns: minmax(0, 1fr); gap: 16px; }

.wm2-grid { display: grid; gap: 16px; }
.wm2-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wm2-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wm2-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 카드: 흰 바탕에선 흰 판+선, 짙은 바탕에선 글래스 */
.wm2-card { position: relative; display: block; padding: 28px; border-radius: var(--wm2-r); background: #fff; border: 1px solid var(--wm2-line); color: var(--wm2-ink); }
.is-light .wm2-card { border-color: transparent; box-shadow: 0 1px 2px rgba(20, 32, 43, .05); }
.is-dark .wm2-card { background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); border-color: rgba(255, 255, 255, .12); color: var(--wm2-ink-d); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
a.wm2-card { transition: transform .35s var(--wm2-ease), box-shadow .35s var(--wm2-ease), border-color .35s var(--wm2-ease), background-color .35s var(--wm2-ease); }
a.wm2-card:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -26px rgba(20, 32, 43, .35); border-color: rgba(35, 112, 180, .35); }
.is-dark a.wm2-card:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .26); box-shadow: none; }
.wm2-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.35; }
.wm2-card p { margin-top: 8px !important; font-size: 15.5px; line-height: 1.65; color: var(--wm2-ink2); }
.is-dark .wm2-card p { color: var(--wm2-ink-d2); }
.wm2-card > .wm2-ar { position: absolute; right: 26px; top: 30px; color: var(--wm2-blue); }
.is-dark .wm2-card > .wm2-ar { color: var(--wm2-acc); }

/* 단위 꼬리표: 계측기 라벨처럼 */
.wm2-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wm2-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 7px; background: #EAF2FA; color: var(--wm2-blue); font-size: 13.5px; font-weight: 650; font-style: normal; font-variant-numeric: tabular-nums; }
.is-dark .wm2-chip { background: rgba(79, 163, 227, .14); color: #8CC6F2; }

/* 비교표 */
.wm2-table { border-top: 2px solid var(--wm2-ink); }
.wm2-table [role="row"] { display: grid; grid-template-columns: var(--cols, 1.2fr 1fr 2fr auto); gap: 24px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--wm2-line); }
.wm2-table .is-hd { padding: 14px 4px; font-size: 14px; font-weight: 650; color: var(--wm2-ink3); }
.wm2-table a { color: var(--wm2-blue) !important; font-weight: 650; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

/* 문의 띠 (모든 메뉴 끝에 같은 모양) */
.wm2-ask { padding: clamp(72px, 7vw, 96px) 0; background: linear-gradient(120deg, #1D5D96 0%, #2370B4 55%, #2B80C4 100%); color: #fff; }
.wm2-ask-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 56px; align-items: center; }
.wm2-ask h2 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.2; letter-spacing: -0.03em; font-weight: 700; }
.wm2-ask p { max-width: 34em; margin-top: 14px !important; font-size: 18px; line-height: 1.65; color: rgba(255, 255, 255, .86); }
.wm2-ask-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.wm2-ask-tel { display: grid; gap: 4px; padding-left: 40px; border-left: 1px solid rgba(255, 255, 255, .25); }
.wm2-ask-tel span { font-size: 14px; color: rgba(255, 255, 255, .75); }
.wm2-ask-tel a { color: #fff !important; font-size: 34px; font-weight: 700; letter-spacing: -0.01em; }
.wm2-ask-tel a.mail { font-size: 16px; font-weight: 500; color: rgba(255, 255, 255, .85) !important; }

/* 나타나는 움직임 (pages.js 가 .in 을 붙인다) */
.wm2-page .rv { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--wm2-ease), transform .8s var(--wm2-ease); transition-delay: calc(var(--d, 0) * 70ms); }
.wm2-page .rv.in { opacity: 1; transform: none; }
.wm2-sec-h.rv { opacity: 1; transform: none; }
.wm2-sec-h.rv h2 { opacity: 0; transform: translateX(-36px); transition: opacity .9s var(--wm2-ease), transform .9s var(--wm2-ease); }
.wm2-sec-h.rv p { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--wm2-ease) .16s, transform .9s var(--wm2-ease) .16s; }
.wm2-sec-h.rv.in h2, .wm2-sec-h.rv.in p { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .wm2-page .rv, .wm2-sec-h.rv h2, .wm2-sec-h.rv p { opacity: 1; transform: none; transition: none; }
  .wm2-sh-bg img, .wm2-sh-copy > *, .wm2-sh-side { animation: none; }
}

/* ───────── 한 장씩(소개형 메뉴, js/pages.js) ───────── */
html.m-page .wm2-page .pg { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--wm2-hd) + var(--wm2-st) + 8px) 0 32px; transform-origin: 50% 0; }
html.m-page .wm2-page .pg::after { content: ''; position: absolute; inset: 0; z-index: 40; background: #0B1016; opacity: var(--cov, 0); pointer-events: none; }
html.m-page .wm2-page .wm2-sh.pg { justify-content: flex-end; min-height: 0; padding-bottom: 0; }
html.m-page .wm2-page .wm2-sh.pg .wm2-sh-in { flex: 1; align-content: center; align-items: center; padding-top: 24px; padding-bottom: calc(24px + 4vh); } /* 첫 장은 머리말과 탭 사이 가운데(살짝 위)에 */
html.m-page .wm2-page .pg-last { position: relative; height: auto; overflow: visible; display: block; padding: 0; }
html.m-page .wm2-page .pg-last::after { display: none; }
html.m-page .wm2-page .wm2-sec.pg .wm2-sec-h { margin-bottom: clamp(24px, 3.4vh, 44px); }
.pdots { position: fixed; z-index: 25; right: 22px; top: 50%; transform: translateY(-50%); display: none; flex-direction: column; gap: 14px; }
html.m-page .pdots { display: flex; }
.pdots button { all: unset; cursor: pointer; position: relative; width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .38); transition: transform .3s var(--wm2-ease), background .3s; }
.pdots button.on { background: #fff; transform: scale(1.45); }
.pdots.onlight button { background: rgba(20, 32, 43, .22); }
.pdots.onlight button.on { background: var(--wm2-blue); }
.pdots button span { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-family: var(--wm2-font); font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: rgba(20, 28, 38, .88); color: #fff; opacity: 0; pointer-events: none; transition: opacity .2s; }
.pdots button:hover span, .pdots button:focus-visible span { opacity: 1; }

/* ───────── 좁은 화면 ───────── */
@media (max-width: 1024px) {
  .wm2-sh.has-side .wm2-sh-in { grid-template-columns: minmax(0, 1fr); }
  .wm2-sh-cards { grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); max-width: 640px; }
  .wm2-sec-h { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .wm2-grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wm2-grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wm2-ask-in { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .wm2-ask-tel { padding: 24px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .25); }
}
@media (max-width: 760px) {
  .wm2-wrap { padding: 0 20px; }
  .wm2-sh { min-height: 0; }
  .wm2-sh-in { padding-top: 64px; padding-bottom: 28px; gap: 24px; }
  .wm2-sh .wm2-sh-t { font-size: clamp(30px, 8.4vw, 38px); }
  .wm2-sh-lead { font-size: 16px; }
  .wm2-sh-cards { grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 8px; }
  .wm2-sh-cards > div { padding: 15px 16px 14px; }
  .wm2-sh-cards dd { font-size: 24px; }
  .wm2-sh-sum { padding: 18px 20px; }
  .wm2-sh-sum dl > div { grid-template-columns: 64px minmax(0, 1fr); font-size: 14px; }
  .wm2-sh-tabs a { padding: 16px 14px; font-size: 14.5px; }
  .wm2-sh-tabs a::after { left: 14px; right: 14px; }
  .wm2-sh-act .wm2-btn { min-height: 46px; padding: 0 18px; font-size: 15px; }
  .wm2-sec-h h2 { font-size: 28px; }
  .wm2-sec-h p { font-size: 16px; }
  .wm2-grid.c2, .wm2-grid.c3 { grid-template-columns: minmax(0, 1fr); }
  .wm2-card { padding: 22px; }
  .wm2-table [role="row"] { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; }
  .wm2-table .is-hd { display: none !important; }
  .wm2-ask-tel a { font-size: 28px; }
}
