/*
 * AIS Fibre + Phase 3 typography contract.
 *
 * Contract only: this file is not referenced by the application. WOFF2 is the
 * primary target and WOFF is the fallback; the supplied WOFF filenames are
 * mapped to these normalized runtime URLs by Phase3/asset-manifest.json.
 * URLs remain unresolved until the clean publish step.
 * Rubik WOFF fallbacks must be generated from the variable TTF sources. The
 * supplied Rubik-Light WOFF files are static 300 and cannot serve this range.
 */

@font-face {
  font-family: "AIS Rubik";
  src: url("/brand/ais-fibre-plus/fonts/rubik/Rubik-VariableFont_wght.woff2") format("woff2"),
       url("/brand/ais-fibre-plus/fonts/rubik/Rubik-VariableFont_wght.woff") format("woff");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: "AIS Rubik";
  src: url("/brand/ais-fibre-plus/fonts/rubik/Rubik-Italic-VariableFont_wght.woff2") format("woff2"),
       url("/brand/ais-fibre-plus/fonts/rubik/Rubik-Italic-VariableFont_wght.woff") format("woff");
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
}

/* Match DB Heavent's smaller visible glyphs to Rubik at the same CSS size. */
@font-face {
  font-family: "AIS DB Heavent";
  src: url("/brand/ais-fibre-plus/fonts/db-heavent/DB-Heavent-v3.2.woff2") format("woff2"),
       url("/brand/ais-fibre-plus/fonts/db-heavent/DB-Heavent-v3.2.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  size-adjust: 140%;
}

@font-face {
  font-family: "AIS DB Heavent";
  src: url("/brand/ais-fibre-plus/fonts/db-heavent/DB-Heavent-Li-v3.2.woff2") format("woff2"),
       url("/brand/ais-fibre-plus/fonts/db-heavent/DB-Heavent-Li-v3.2.woff") format("woff");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  size-adjust: 140%;
}

@font-face {
  font-family: "AIS DB Heavent";
  src: url("/brand/ais-fibre-plus/fonts/db-heavent/DB-Heavent-Med-v3.2.woff2") format("woff2"),
       url("/brand/ais-fibre-plus/fonts/db-heavent/DB-Heavent-Med-v3.2.woff") format("woff");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  size-adjust: 140%;
}

@font-face {
  font-family: "AIS DB Heavent";
  src: url("/brand/ais-fibre-plus/fonts/db-heavent/DB-Heavent-Bd-v3.2.woff2") format("woff2"),
       url("/brand/ais-fibre-plus/fonts/db-heavent/DB-Heavent-Bd-v3.2.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  size-adjust: 140%;
}

@font-face {
  font-family: "AIS DB Heavent";
  src: url("/brand/ais-fibre-plus/fonts/db-heavent/DB-Heavent-It-v3.2.woff2") format("woff2"),
       url("/brand/ais-fibre-plus/fonts/db-heavent/DB-Heavent-It-v3.2.woff") format("woff");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  size-adjust: 140%;
}

@font-face {
  font-family: "AIS DB Heavent Condensed";
  src: url("/brand/ais-fibre-plus/fonts/db-heavent/DB-Heavent-Bd-Cond-v3.2.woff2") format("woff2"),
       url("/brand/ais-fibre-plus/fonts/db-heavent/DB-Heavent-Bd-Cond-v3.2.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  size-adjust: 140%;
}

:root {
  --brand-font-latin: "AIS Rubik", "AIS DB Heavent", Arial, sans-serif;
  --brand-font-thai: "AIS DB Heavent", "AIS Rubik", Tahoma, sans-serif;
  --brand-font-thai-condensed: "AIS DB Heavent Condensed", "AIS DB Heavent", Tahoma, sans-serif;
}

/* Apply Thai-first typography only to explicitly marked Thai content.
   :lang(th) also matches every descendant of <html lang="th">. */
[lang|="th"]:not(html) {
  font-family: var(--brand-font-thai);
}
