/* 홈페이지 글꼴(2026-11-28) — routes/church-homepage/site-font.js
 * 글꼴을 고른 교회만 이 파일을 읽는다(document-start.ejs). body 에 --sf-title·--sf-body 변수와 data-sf-* 속성이 붙는다.
 * 템플릿 CSS 는 `font-family: var(--sf-body, 원래 글꼴)` 로 써 두었고, 여기서는 Plus 템플릿의 글꼴 변수와 글자 크기를 맞춘다.
 */

/* ---------- Google Fonts 에 없는 글꼴(무료·상업 이용 가능, SIL OFL). 화면에 쓰일 때만 파일을 받는다 ---------- */
@font-face {
  font-family: 'JP SUIT';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/sun-typeface/SUIT@2.0.5/fonts/variable/woff2/SUIT-Variable.woff2') format('woff2');
}
@font-face {
  font-family: 'JP NanumSquareNeo';
  font-style: normal;
  font-weight: 100 500;
  font-display: swap;
  src: url('https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-bRg.woff2') format('woff2');
}
@font-face {
  font-family: 'JP NanumSquareNeo';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-cBd.woff2') format('woff2');
}
@font-face {
  font-family: 'JP NanumSquareNeo';
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url('https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-dEb.woff2') format('woff2');
}
@font-face {
  font-family: 'JP MaruBuri';
  font-style: normal;
  font-weight: 100 500;
  font-display: swap;
  src: url('https://hangeul.pstatic.net/hangeul_static/webfont/MaruBuri/MaruBuri-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'JP MaruBuri';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('https://hangeul.pstatic.net/hangeul_static/webfont/MaruBuri/MaruBuri-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'JP MaruBuri';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('https://hangeul.pstatic.net/hangeul_static/webfont/MaruBuri/MaruBuri-Bold.woff2') format('woff2');
}

/* ---------- 제목 글꼴: Plus 템플릿 9종은 글꼴이 변수(--pt-display 등)로 모여 있다 ---------- */
body[data-sf-title] .pt-shell {
  --pt-display: var(--sf-title);
  --pt-serif: var(--sf-title);
  --pt-hand: var(--sf-title);
  --pt-heading-font: var(--sf-title);
}
body[data-sf-title].church-site .pt-shell :is(h1, h2, h3, h4, h5) { font-family: var(--sf-title); }

/* 머리글의 교회 이름: 예전 템플릿(따뜻함·클래식·미니멀·청년)은 h 태그가 아니라 본문 글꼴을 물려받는다 → 제목 글꼴로 */
body[data-sf-title] :is(.ew-brand-text strong, .ck-mast-name, .mn-brand-name, .md-brand strong) { font-family: var(--sf-title); }

/* 굵기가 하나뿐인 제목 글꼴(송명·검은고딕·도현·주아·손글씨): 브라우저가 억지로 굵게 그려 번지지 않게 */
body[data-sf-title-single] :is(h1, h2, h3, h4, h5, .cs-brand-text strong, .pt-brand-text strong, .gr-heading, .ew-brand-text strong, .ck-mast-name, .mn-brand-name, .md-brand strong) {
  font-synthesis: none;
}

/* 손글씨(나눔손글씨 펜)는 같은 크기에서 20%쯤 작아 보인다(DEV 14종 확인 2026-11-28) → 제목만 키운다.
   LIGHT 는 처음부터 이 글꼴에 맞춘 크기라 그대로 둔다. */
body[data-sf-title="nanum-pen"]:not(.template-light) :is(h1, h2, h3, h4, h5, .cs-brand-text strong, .pt-brand-text strong, .gr-heading, .ew-brand-text strong, .ck-mast-name, .mn-brand-name, .md-brand strong) {
  zoom: 1.25;
}

/* ---------- 글자 크기 "크게": 머리(메뉴)·배너·바닥글을 뺀 본문 영역을 1.1배 ---------- */
body[data-sf-size="L"] main > :not(.cs-hd) { zoom: 1.1; }
