/**
 * Fonte própria IBG — ficheiros em /fonts/
 * Família CSS: "IBG"
 *
 * ibg-light.ttf   → 300–400 (não há ibg-regular na pasta)
 * ibg-medium.ttf  → 500–600
 * ibg-bold.ttf    → 700–900
 *
 * NUNCA aplicar font-family a body * — isso apaga Font Awesome / ícones.
 */

@font-face {
  font-family: "IBG";
  src: url("../fonts/ibg-light.ttf") format("truetype");
  font-weight: 300 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBG";
  src: url("../fonts/ibg-medium.ttf") format("truetype");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBG";
  src: url("../fonts/ibg-bold.ttf") format("truetype");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ibg-font: "IBG", system-ui, sans-serif;
  --ibg-font-display: "IBG", system-ui, sans-serif;
  --ibg-font-heading: var(--ibg-font-display);
  --ibg-font-body: var(--ibg-font);
  --hub-font: var(--ibg-font);

  --ibg-text-base: 16px;
  --ibg-line-base: 1.55;
  --ibg-h1: clamp(2rem, 4.2vw, 3.6rem);
  --ibg-h2: clamp(1.65rem, 3.2vw, 2.75rem);
  --ibg-h3: clamp(1.25rem, 2.2vw, 1.75rem);
  --ibg-h4: clamp(1.05rem, 1.6vw, 1.25rem);
  --ibg-text-sm: 0.875rem;
  --ibg-container: min(1120px, calc(100% - 2.5rem));
  --ibg-radius: 4px;
  --ibg-spacing: 1rem;
}

@media (max-width: 768px) {
  :root {
    --ibg-text-base: 15px;
    --ibg-h1: clamp(1.7rem, 8vw, 2.35rem);
    --ibg-h2: clamp(1.45rem, 6.2vw, 2rem);
    --ibg-h3: clamp(1.15rem, 4.4vw, 1.4rem);
    --ibg-container: min(100% - 2rem, 680px);
  }
}

html,
body,
body.adm,
body.adm-login,
body.studio,
.body-color,
.ibg-site,
.ibg-ministry-page,
.ibg-min-v2,
.ibg-reg-page,
.cms,
.cms-hub,
.post-edit,
.ibg-admin-glass-page,
.studio-side,
.studio-top,
.studio-rail {
  font-family: var(--ibg-font);
}

h1,
h2,
h3,
h4,
h5,
body.studio h1,
body.studio h2,
body.adm h1,
.ibg-min-reveal__title,
.ibg-min-hero__title,
.section-title h2,
.hero-content h1,
.cms-ed-page,
.ibg-reg-card__title,
.ibg-post-head h1 {
  font-family: var(--ibg-font-display);
  font-weight: 800;
}

.ibg-min-kicker,
.section-title span,
label,
.cms-hub-section-label,
.cms-ed-panel h2,
.cms-ed-kicker,
.ibg-reg-card__brand,
.ibg-reg-summary__label {
  font-family: var(--ibg-font);
  font-weight: 600;
}

p,
li,
input,
textarea,
select,
button,
.theme-btn,
.ibg-min-btn,
.ibg-min-action,
.cms-btn,
.cms-hub-btn,
.ibg-reg-submit {
  font-family: var(--ibg-font);
}

/* Template Inter/Manrope → IBG (sem * universal) */
body.body-color,
.ibg-site {
  font-family: var(--ibg-font) !important;
}

body.body-color,
.ibg-site {
  font-size: var(--ibg-text-base);
  line-height: var(--ibg-line-base);
}

body.body-color h1,
body.body-color h2,
body.body-color h3,
.ibg-site h1,
.ibg-site h2,
.ibg-site h3,
.ibg-site h4 {
  font-family: var(--ibg-font-heading) !important;
  overflow-wrap: break-word;
}

.ibg-site p,
.ibg-site .ibg-lead,
.ibg-site .ibg-nm-lead,
.ibg-site .ibg-minis-lead,
.ibg-site .ibg-blog-lead {
  letter-spacing: 0.01em;
  word-spacing: normal;
  overflow-wrap: break-word;
}

.ibg-site .theme-btn,
.ibg-site .ibg-min-btn,
.ibg-site .ibg-min-action,
.ibg-site .ibg-btn {
  max-width: 100%;
}

/*
 * Restaura Font Awesome — precisa ganhar de qualquer regra antiga
 * com body * { font-family: IBG !important } ainda em cache.
 */
.fa,
.fas,
.far,
.fal,
.fat,
.fad,
.fab,
.fa-solid,
.fa-regular,
.fa-light,
.fa-thin,
.fa-duotone,
.fa-brands,
.fa-sharp,
i[class^="fa-"],
i[class*=" fa-"],
.ibg-lucide,
[data-lucide],
.ibg-hdr-ico i,
.theme-btn i,
.ibg-pub-card__go i,
.ibg-pub-card__date i,
.mean-container .mean-nav i,
body.body-color .fa,
body.body-color .fas,
body.body-color .far,
body.body-color .fab,
body.body-color .fa-solid,
body.body-color .fa-regular,
body.body-color .fa-brands,
body.body-color i[class^="fa-"],
body.body-color i[class*=" fa-"],
.ibg-site .fa,
.ibg-site .fas,
.ibg-site .far,
.ibg-site .fab,
.ibg-site .fa-solid,
.ibg-site .fa-regular,
.ibg-site .fa-brands,
.ibg-site i[class^="fa-"],
.ibg-site i[class*=" fa-"],
.ibg-site .ibg-hdr-ico i,
.ibg-site .theme-btn i,
.ibg-site .ibg-pub-card__go i,
body.ibg-ministry-page .fa,
body.ibg-ministry-page .fas,
body.ibg-ministry-page .fab,
body.ibg-ministry-page .fa-solid,
body.ibg-ministry-page .fa-brands,
body.ibg-ministry-page i[class^="fa-"],
body.ibg-ministry-page i[class*=" fa-"] {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 6 Pro", "FontAwesome" !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  -webkit-font-smoothing: antialiased;
  line-height: 1;
}

.fab,
.fa-brands,
.ibg-site .fab,
.ibg-site .fa-brands,
.ibg-hdr-ico .fab,
.ibg-hdr-ico .fa-brands {
  font-family: "Font Awesome 6 Brands", "FontAwesome" !important;
  font-weight: 400 !important;
}

.fas,
.fa-solid,
.ibg-site .fas,
.ibg-site .fa-solid {
  font-weight: 900 !important;
}

.far,
.fa-regular,
.ibg-site .far,
.ibg-site .fa-regular {
  font-weight: 400 !important;
}
