/*
 * MIDAS typography contract — Loaded last at priority 999.
 *
 * Yêu cầu đồng bộ toàn site:
 *   - Headline: BEBAS NEUE (H1, H2, .sec-tt, .section-title, .hero-blue__title, .hero__title, .page-title, .banner__title, v.v.)
 *   - Còn lại: GG SANS (Google Sans) cho toàn bộ nội dung, H3-H6, thẻ cards, timeline, số liệu, menu, nút, form, footer.
 *   - Letter-spacing: 0 cho toàn bộ tiêu đề & heading (yêu cầu khách hàng).
 *   - Text-transform: uppercase cho Headline (Bebas Neue).
 */

/* ==========================================================================
   1. CÒN LẠI: Mặc định toàn site dùng Google Sans
   ========================================================================== */
html,
body.midas-typography {
  font-family: var(--font-body) !important;
}

/* Toàn bộ văn bản, khối nội dung, form, nút, thẻ card, danh mục: Google Sans */
body.midas-typography p,
body.midas-typography span,
body.midas-typography a,
body.midas-typography li,
body.midas-typography dt,
body.midas-typography dd,
body.midas-typography blockquote,
body.midas-typography figcaption,
body.midas-typography label,
body.midas-typography input,
body.midas-typography textarea,
body.midas-typography select,
body.midas-typography button,
body.midas-typography small,
body.midas-typography strong,
body.midas-typography b,
body.midas-typography em,
body.midas-typography i,
body.midas-typography table,
body.midas-typography th,
body.midas-typography td,
body.midas-typography caption,
body.midas-typography h3,
body.midas-typography h4,
body.midas-typography h5,
body.midas-typography h6,
body.midas-typography .tt-sub,
body.midas-typography .tt-25,
body.midas-typography .lead,
body.midas-typography .hero-blue__lead,
body.midas-typography .hero__lead,
body.midas-typography .seo2-lead,
body.midas-typography .metric-tt,
body.midas-typography .count-num,
body.midas-typography .hero-blue__stat,
body.midas-typography .hero-blue__stat strong,
body.midas-typography .csa-hstat,
body.midas-typography .csa-hstat b,
body.midas-typography .seo2-stat-value,
body.midas-typography .stat-strip-item b,
body.midas-typography .res-num,
body.midas-typography .timeline-tt,
body.midas-typography .timeline-step,
body.midas-typography .benefit-tt,
body.midas-typography .services-tt,
body.midas-typography .article-title,
body.midas-typography .blg-card__title,
body.midas-typography .csa-card__title,
body.midas-typography .rec-culture__tt,
body.midas-typography .rec-job__tt,
body.midas-typography .rec-process__tt,
body.midas-typography .tm-body h3,
body.midas-typography .btn,
body.midas-typography .header-btn,
body.midas-typography .site-trust__txt,
body.midas-typography .site-trust__txt p,
body.midas-typography #site-trust-title,
body.midas-typography .faq-tt,
body.midas-typography .domain-tt,
body.midas-typography .rules .stage-number,
body.midas-typography .post-related__title,
body.midas-typography .midas-heading-exempt {
  font-family: var(--font-body) !important;
}

/* Article & blog copy uses Google Sans */
body.midas-typography .mona-content p,
body.midas-typography .mona-content li,
body.midas-typography .mona-content dt,
body.midas-typography .mona-content dd,
body.midas-typography .mona-content blockquote,
body.midas-typography .mona-content figcaption,
body.midas-typography .mona-content h3,
body.midas-typography .mona-content h4,
body.midas-typography .mona-content h5,
body.midas-typography .mona-content h6,
body.midas-typography .mona-content span,
body.midas-typography .mona-content a,
body.midas-typography .mona-content strong,
body.midas-typography .mona-content b {
  font-family: var(--font-body) !important;
}

/* ==========================================================================
   2. HEADLINE: Bebas Neue, uppercase, letter-spacing 0
   ========================================================================== */
body.midas-typography h1,
body.midas-typography h2,
body.midas-typography .sec-tt,
body.midas-typography .section-title,
body.midas-typography .hero-blue__title,
body.midas-typography .hero__title,
body.midas-typography .page-title,
body.midas-typography .banner__title,
body.midas-typography .banner-title,
body.midas-typography .h2-row h2,
body.midas-typography .cm-head h2,
body.midas-typography .form-wrap h2,
body.midas-typography .seo2-section-head h2,
body.midas-typography .commit-layout h2,
body.midas-typography #trust-market-title,
body.midas-typography .trust__market-heading h2,
body.midas-typography .csa-cta__title,
body.midas-typography .csx h1 {
  font-family: var(--font-heading) !important;
  font-weight: 700;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
  text-wrap: balance;
  -webkit-text-stroke: 0;
}

/* Chữ bên trong Headline (span, strong, a, em) thừa kế Bebas Neue */
body.midas-typography h1 span,
body.midas-typography h1 strong,
body.midas-typography h1 b,
body.midas-typography h1 a,
body.midas-typography h1 em,
body.midas-typography h2 span,
body.midas-typography h2 strong,
body.midas-typography h2 b,
body.midas-typography h2 a,
body.midas-typography h2 em,
body.midas-typography .sec-tt span,
body.midas-typography .sec-tt strong,
body.midas-typography .sec-tt b,
body.midas-typography .sec-tt a,
body.midas-typography .hero-blue__title span,
body.midas-typography .hero__title span,
body.midas-typography .page-title span,
body.midas-typography .banner__title span {
  font-family: var(--font-heading) !important;
  letter-spacing: 0 !important;
}

/* Dấu ấn số liệu / metric / timeline luôn giữ Google Sans kể cả khi có CSS ghi đè */
body.midas-typography .metric-tt,
body.midas-typography .seo2-stat-line .metric-tt,
body.midas-typography .p-seo-v2 .seo2-stat-line .metric-tt,
body.midas-typography .p-backlink-v2 .seo2-stat-line .metric-tt,
body.midas-typography .p-seo-audit-v2 .seo2-stat-line .metric-tt,
body.midas-typography .results .metric-tt,
body.midas-typography .results .metric-card .metric-tt,
body.midas-typography .hero-blue__stat strong,
body.midas-typography .count-num,
body.midas-typography .csa-hstat b,
body.midas-typography .csa-cstat b,
body.midas-typography .seo2-stat-value,
body.midas-typography .hstat b,
body.midas-typography .stat-strip-item b,
body.midas-typography .res-num,
body.midas-typography .timeline-tt,
body.midas-typography .process .timeline-tt,
body.midas-typography .c-timeline .timeline-tt,
body.midas-typography #seo2-process .timeline-tt,
body.midas-typography .p-seo-v2 #seo2-process .timeline-tt,
body.midas-typography .p-backlink-v2 #seo2-process .timeline-tt,
body.midas-typography .p-seo-audit-v2 #seo2-process .timeline-tt,
body.midas-typography .midas-heading-exempt {
  font-family: var(--font-body) !important;
  letter-spacing: 0 !important;
}

/* ==========================================================================
   3. Sizing scale & leading
   ========================================================================== */
body.midas-typography:not(.page-template-null-template) h1 {
  font-size: var(--text-h1) !important;
  line-height: var(--heading-leading-tight) !important;
}

body.midas-typography:not(.page-template-null-template) h2,
body.midas-typography:not(.page-template-null-template) .sec-tt,
body.midas-typography:not(.page-template-null-template) .seo2-section-head h2,
body.midas-typography:not(.page-template-null-template) .h2-row h2,
body.midas-typography:not(.page-template-null-template) .cm-head h2,
body.midas-typography:not(.page-template-null-template) .form-wrap h2,
body.midas-typography:not(.page-template-null-template) #trust-market-title {
  font-size: var(--text-h2) !important;
  line-height: var(--heading-leading) !important;
}

body.midas-typography:not(.page-template-null-template) h3:not(.midas-heading-exempt) {
  font-size: var(--text-h3) !important;
  line-height: var(--heading-leading) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

body.midas-typography:not(.page-template-null-template) h4:not(.midas-heading-exempt) {
  font-size: var(--text-h4) !important;
  line-height: var(--heading-leading) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

body.midas-typography:not(.page-template-null-template) h5:not(.midas-heading-exempt) {
  font-size: var(--text-h5) !important;
  line-height: var(--heading-leading) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

body.midas-typography:not(.page-template-null-template) h6:not(.midas-heading-exempt) {
  font-size: var(--text-h6) !important;
  line-height: var(--heading-leading) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

/* Heading support copy / Subheads */
body.midas-typography:not(.page-template-null-template) h1 + p,
body.midas-typography:not(.page-template-null-template) h2 + p {
  font-size: 1.6rem;
  line-height: 1.55;
  font-family: var(--font-body) !important;
}

body.midas-typography:not(.page-template-null-template) .tt-sub,
body.midas-typography:not(.page-template-null-template) .seo2-section-head > h2 + .seo2-lead,
body.midas-typography:not(.page-template-null-template) .h2-row > .lead,
body.midas-typography:not(.page-template-null-template) .h2-row > p.lead,
body.midas-typography:not(.page-template-null-template) .cm-head > .lead,
body.midas-typography:not(.page-template-null-template) .form-wrap > div > h2 + .lead {
  font-family: var(--font-body) !important;
  font-size: var(--text-h3) !important;
  font-weight: 600;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

body.midas-typography.p-backlink-v2 #seo2-pricing .seo2-eyebrow {
  text-transform: none !important;
  letter-spacing: 0 !important;
}

body.midas-typography.p-backlink-v2 #seo2-pricing h2,
body.midas-typography.p-backlink-v2 #seo2-pricing h2 span,
body.midas-typography.p-backlink-v2 #seo2-pricing .sa2-vc-blue {
  font-family: var(--font-body, 'Google Sans', sans-serif) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

body.midas-typography.p-backlink-v2 #seo2-pricing .seo2-lead,
body.midas-typography.p-backlink-v2 .sa2-vc-lead {
  font-family: var(--font-body) !important;
  font-size: 1.6rem !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  color: var(--s2-muted) !important;
  text-transform: none !important;
}

/* LadiPage template contract: retains uppercase */
body.midas-typography.page-template-null-template h1:not(.midas-heading-exempt),
body.midas-typography.page-template-null-template h2:not(.midas-heading-exempt),
body.midas-typography.page-template-null-template h3:not(.midas-heading-exempt),
body.midas-typography.page-template-null-template h4:not(.midas-heading-exempt),
body.midas-typography.page-template-null-template h5:not(.midas-heading-exempt),
body.midas-typography.page-template-null-template h6:not(.midas-heading-exempt) {
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
  text-wrap: balance;
}

/* Đội ngũ v1 (.tmx) section title contract */
body.midas-typography .tmx h2,
body.midas-typography .tmx .tmx__title {
  font-family: var(--font-body) !important;
  font-size: 34px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  color: var(--b, #3c3bdf) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

@media (max-width: 560px) {
  body.midas-typography .tmx h2,
  body.midas-typography .tmx .tmx__title {
    font-size: 26px !important;
  }
}

