/* ====================================================================
   fonts.css  —  INSPIRE 공식 글꼴 (저장소의 template/Font, 브랜드 툴킷 v7)
   언어마다 한 글꼴, 제목은 굵기로만 구분한다 (한국어만 예외, 아래 "한국어는" 참고):
     · 영어           NanumSquare      fonts/         처음 접속 때 서비스 워커가 저장
     · 일본어         Noto Sans JP     assets/fonts/  일본어로 볼 때만 받아서 저장
     · 중국어         Noto Sans SC     assets/fonts/  중국어로 볼 때만 받아서 저장
   영어 공식 글꼴 Optima 는 웹 사용 허락이 없어 파일은 넣지 않고 이름만 맨 앞에 부른다
   (아이폰 · 맥에는 깔려 있어서 Optima, 다른 폰은 위 글꼴의 영어 글자로 보인다).
   파일은 이 가이드 문구에 쓰인 글자만 잘라 낸 것이다. 문구를 고치면 저장소 루트에서
     python build-brand-fonts.py <이 폴더>
   를 다시 돌린다 (안 하면 새 글자만 폰 기본 글꼴로 보인다). 그다음 sw.js 지문도 새로.
   Noto 라이선스: SIL Open Font License 1.1 (assets/fonts/LICENSE-noto.txt)
   ==================================================================== */

@font-face { font-family: 'NanumSquare'; font-weight: 400; font-display: swap; src: url(../fonts/nanumsquare-400.woff) format('woff'); }
@font-face { font-family: 'NanumSquare'; font-weight: 700; font-display: swap; src: url(../fonts/nanumsquare-700.woff) format('woff'); }
@font-face { font-family: 'NanumSquare'; font-weight: 800; font-display: swap; src: url(../fonts/nanumsquare-800.woff) format('woff'); }

@font-face { font-family: 'Noto Sans JP'; font-weight: 400; font-display: swap; src: url(../assets/fonts/noto-sans-jp-400.woff) format('woff'); }
@font-face { font-family: 'Noto Sans JP'; font-weight: 700; font-display: swap; src: url(../assets/fonts/noto-sans-jp-700.woff) format('woff'); }
@font-face { font-family: 'Noto Sans JP'; font-weight: 800; font-display: swap; src: url(../assets/fonts/noto-sans-jp-800.woff) format('woff'); }

@font-face { font-family: 'Noto Sans SC'; font-weight: 400; font-display: swap; src: url(../assets/fonts/noto-sans-sc-400.woff) format('woff'); }
@font-face { font-family: 'Noto Sans SC'; font-weight: 700; font-display: swap; src: url(../assets/fonts/noto-sans-sc-700.woff) format('woff'); }
@font-face { font-family: 'Noto Sans SC'; font-weight: 800; font-display: swap; src: url(../assets/fonts/noto-sans-sc-800.woff) format('woff'); }

/* 한국어는 공식 글꼴 대신 처음 디자인 시스템의 글꼴로 되돌렸다: 영어 Petrona · Manrope · JetBrains Mono,
   한글은 폰의 기본 글꼴 (NanumSquare 는 작은 글자에서 읽기 어려웠다). 아래 세 묶음은 이 용도다.
   파일은 Fontsource 의 variable 글꼴에서 영어(latin) · 확장 라틴(₩ 포함)만 가져왔다. 라이선스: OFL 1.1 (fonts/LICENSE-*.txt) */
@font-face { font-family: 'Petrona'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/petrona-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Petrona'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/petrona-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(../fonts/manrope-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(../fonts/manrope-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 100 800; src: url(../fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 100 800; src: url(../fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* <html lang> 은 js/core/i18n.js 가 언어를 바꿀 때 같이 바꾼다 (zh-Hans 도 :lang(zh) 에 걸림).
   일본어 · 중국어는 --font-sans 만 바꾸면 되고 (--font-display · --font-mono 가 따라감), 한국어는 세 개 다 처음 값으로. */
:root:lang(ja) { --font-sans: "Optima", "Noto Sans JP", sans-serif; }
:root:lang(zh) { --font-sans: "Optima", "Noto Sans SC", sans-serif; }
:root:lang(ko) {
  --font-display: "Petrona", Georgia, serif;
  --font-sans: "Manrope", "Noto Sans KR", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;
}

/* 글꼴마다 같은 px 라도 글자가 작거나 커 보인다 (소문자 높이: NanumSquare 0.513 · Noto JP 0.543 · Noto SC 0.527).
   영어 · 일본어 · 중국어는 소문자 높이를 0.53 으로 맞춰 셋이 같은 크기로 보이게 한다 (font-size-adjust 를 모르는 오래된 브라우저는 그냥 무시).
   한국어는 일부러 뺐다: 처음 디자인의 제목 글꼴 Petrona 는 소문자 높이가 0.443 이라 맞추면 제목이 20% 커진다. */
:root:not(:lang(ko)) { font-size-adjust: 0.53; }
button { font-size-adjust: inherit; }   /* 브라우저 기본 버튼 글꼴 설정(font 단축 속성)이 위 값을 지워서, 버튼만 글자 크기가 달라 보였다 */

/* 바카라 Method 그림의 SVG 글자는 속성(font-family="Petrona, serif" 등)으로 글꼴이 박혀 있다.
   CSS 는 속성보다 앞서므로, 한국어 말고는 공식 글꼴을 따르게 덮는다 */
:root:not(:lang(ko)) svg text { font-family: var(--font-sans); }
