/**
 * RAKTHAN — ประกาศฟอนต์
 *
 * ⚠️ ไฟล์นี้ต้องอยู่ใน static/ เท่านั้น ห้ามย้ายไป src/css/
 *
 * เหตุผล: webpack จะประมวลผล url() ใน CSS ที่อยู่ใต้ src/ แล้วสร้าง
 * สำเนาไฟล์ฟอนต์ที่มี hash ต่อท้ายไว้ที่ /assets/fonts/ ผลที่ตามมาคือ
 *   1. ฟอนต์ถูกส่งขึ้นเว็บสองชุด (สำเนาละ 73KB)
 *   2. <link rel="preload"> ใน docusaurus.config.ts ชี้ไปที่ /fonts/ ซึ่งเป็น
 *      คนละไฟล์กับที่ CSS เรียกใช้ เบราว์เซอร์จึงโหลดทิ้งเปล่า ~29KB ต่อการเปิดหน้าแรก
 *      และ preload ไม่ได้ช่วยอะไรเลยเพราะอุ่นผิดไฟล์
 *
 * ไฟล์ที่อยู่ใน static/ ถูกคัดลอกตรง ๆ ไม่ผ่าน webpack path จึงคงที่
 * และตรงกับ preload เสมอ
 *
 * โหลดแค่น้ำหนัก 400 กับ 600 และแยก subset ไทย/ละตินด้วย unicode-range
 * เพื่อให้หน้าที่ไม่มีอักษรไทยไม่ต้องโหลดไฟล์ไทย
 *
 * ห้ามใช้ Google Fonts CDN — เหตุผล 4 ข้อ อยู่ใน CLAUDE.md หัวข้อ 3.2
 */

@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/plex-sans-thai-thai-400.woff2') format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/plex-sans-thai-latin-400.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: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/plex-sans-thai-thai-600.woff2') format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/plex-sans-thai-latin-600.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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/plex-mono-latin-400.woff2') format('woff2');
}
