/* ────────────────────────────────────────────────────────────────────────────
   Be Vietnam Pro - self-hosted from public/fonts (woff2 copied out of the
   @fontsource package, so the build stays 100% offline - no Google Fonts).

   Why self-host instead of importing @fontsource CSS or using next/font?
   - Keeps the REAL family name `Be Vietnam Pro`, which is referenced as a string
     literal in ~50 places (incl. SVG fontFamily attributes). next/font would mint
     a hashed family name and silently break all of them.
   - Stable, predictable file URLs (/fonts/...) → we can <link rel="preload"> the
     LCP-critical faces in the layout <head>. Bundler-hashed @fontsource paths
     can't be preloaded reliably.
   - Adds the proper `unicode-range` per subset (the per-subset @fontsource CSS
     we imported before OMITTED it, so latin/vietnamese faces shadowed each other
     and the browser couldn't pick the right subset per glyph).

   Only the weights actually rendered are shipped: 400/500/600/700/800 normal,
   plus 300/400 italic (the hero <em>). `font-display: swap` keeps LCP text
   painting instantly with the metric-similar system fallback.

   ⚠ FILE NÀY PHẢI NẰM Ở public/ — TUYỆT ĐỐI KHÔNG `import` VÀO BUNDLE.

   `url(/fonts/...)` dưới đây là đường dẫn tuyệt đối từ GỐC, và trình duyệt phân
   giải nó theo origin của CHÍNH FILE CSS, không phải theo origin của trang. Từ khi
   next.config.mjs đặt `assetPrefix = NEXT_STATIC_ORIGIN`, mọi CSS đi qua bundler
   được phục vụ từ static.avenir.vn — nên khi file này còn được `import`, 14 khai
   báo @font-face trỏ thẳng vào static.avenir.vn/fonts/*.woff2 và 404 sạch (webpack
   KHÔNG viết lại `url(/...)`). Cả site tụt về font hệ thống, mà purge cache không
   cứu được vì URL sai đã nướng vào chính file CSS của build. Sự cố 18/08/2026.

   Nằm ở public/ thì file được phục vụ nguyên văn từ origin của app, `url(/fonts/…)`
   trỏ đúng về đó, khớp luôn với các <link rel="preload"> trong layout — không cần
   CORS, không tải trùng. Nạp bằng <link rel="stylesheet" href="/fonts.css"> trong
   <head> của cả ba root shell; app/fonts-asset-origin.test.ts canh bất biến này.
   ──────────────────────────────────────────────────────────────────────────── */

/* latin  - U+0000–00FF + punctuation/symbols */
/* vietnamese - Vietnamese diacritic composites + ₫ */

/* ===== weight 400 (regular / body) ===== */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/be-vietnam-pro-latin-400-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: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/be-vietnam-pro-vietnamese-400-normal.woff2) format('woff2');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ===== weight 500 (medium) ===== */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/be-vietnam-pro-latin-500-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: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/be-vietnam-pro-vietnamese-500-normal.woff2) format('woff2');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ===== weight 600 (semibold) ===== */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/be-vietnam-pro-latin-600-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: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/be-vietnam-pro-vietnamese-600-normal.woff2) format('woff2');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ===== weight 700 (bold) ===== */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/be-vietnam-pro-latin-700-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: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/be-vietnam-pro-vietnamese-700-normal.woff2) format('woff2');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ===== weight 800 (extrabold / display headings) ===== */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/fonts/be-vietnam-pro-latin-800-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: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/fonts/be-vietnam-pro-vietnamese-800-normal.woff2) format('woff2');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ===== italic 300 (hero <em>) ===== */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url(/fonts/be-vietnam-pro-latin-300-italic.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: 'Be Vietnam Pro';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url(/fonts/be-vietnam-pro-vietnamese-300-italic.woff2) format('woff2');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* ===== italic 400 ===== */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/be-vietnam-pro-latin-400-italic.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: 'Be Vietnam Pro';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/be-vietnam-pro-vietnamese-400-italic.woff2) format('woff2');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
