/*
 * Bem Esportivo — acabamento tipografico responsivo
 * Esta folha deve ser carregada por ultimo. Ela harmoniza a leitura entre
 * produtos sem substituir a composicao visual especifica de cada pagina.
 */

:root {
  --be-type-display: "Manrope", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --be-type-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --be-type-ink: #171412;
  --be-type-muted: #68615d;
}

html {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  font-kerning: normal;
}

body:not(.game-page) {
  color: var(--be-type-ink);
  font-family: var(--be-type-body);
  font-synthesis: none;
}

body:not(.game-page) :where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--be-type-display) !important;
  font-weight: 800;
  letter-spacing: -.025em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

body:not(.game-page) :where(p, li, blockquote, figcaption) {
  text-wrap: pretty;
}

body:not(.game-page) :where(button, input, select, textarea) {
  font-family: var(--be-type-body);
  letter-spacing: 0;
}

body:not(.game-page) :where(.site-footer, .site-footer *) {
  font-family: var(--be-type-body) !important;
}

/* Pequenos rotulos continuam compactos, mas deixam de parecer borrados. */
body:not(.game-page) :where(.eyebrow, .kicker, .be-kicker, [class*="-kicker"], [class*="-eyebrow"]) {
  font-weight: 800 !important;
  line-height: 1.35;
}

@media (max-width: 760px) {
  body:not(.game-page) {
    font-size: 16px;
    line-height: 1.6;
  }

  body:not(.game-page) main :where(h1, h2, h3, h4) {
    hyphens: none;
    text-wrap: balance;
  }

  body:not(.game-page) main h1 {
    line-height: 1.06 !important;
    letter-spacing: -.032em !important;
  }

  body:not(.game-page) main h2 {
    font-weight: 700 !important;
    line-height: 1.12 !important;
    letter-spacing: -.026em !important;
  }

  body:not(.game-page) main :where(h3, h4) {
    font-weight: 700 !important;
    line-height: 1.22 !important;
    letter-spacing: -.018em !important;
  }

  body:not(.game-page) main :where(button, .btn, [class*="button"], [class*="-btn"]) {
    font-weight: 750;
    line-height: 1.2;
  }

  /* Home e busca: hierarquia clara e cards legiveis sem aumentar a pagina. */
  .home-page .be-ecosystem-hero .home-hero-copy h1 {
    max-width: 12ch;
    font-size: clamp(2.25rem, 10.5vw, 3rem) !important;
    font-weight: 800 !important;
  }

  .home-page .be-ecosystem-hero .home-hero-copy > p {
    max-width: 34ch;
    font-size: .9375rem !important;
    line-height: 1.55;
  }

  .home-page .be-search-form input {
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
  }

  .home-page .be-search-form button[type="submit"] {
    font-size: .9375rem;
    font-weight: 800;
  }

  .home-page .be-search-examples :where(span, button) {
    font-size: .75rem;
    font-weight: 700;
  }

  .home-page .be-ecosystem-product strong {
    font-size: .8125rem;
    font-weight: 800;
    line-height: 1.25;
  }

  .home-page .be-ecosystem-product small {
    font-size: .75rem;
    line-height: 1.35;
  }

  .home-page .be-search-discovery-main > h2 {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    font-weight: 700;
  }

  .home-page .be-search-discovery-main > p,
  .home-page .be-search-result-body > span {
    font-size: .875rem;
    line-height: 1.5;
  }

  .home-page .be-search-result-body > strong {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
  }

  .home-page .be-home-mobile-dock a {
    font-size: .6875rem;
    font-weight: 700;
    line-height: 1.15;
  }

  /* Reportagens: leitura editorial confortavel em telas estreitas. */
  .reportagens-page :where(.report-body, .report-article-section, .article-body, .story-body) > p,
  .reportagens-page :where(.report-body, .report-article-section, .article-body, .story-body) li {
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.72 !important;
    letter-spacing: 0 !important;
  }

  .reportagens-page :where(.report-deck, .hero p, .page-hero p) {
    font-size: .9375rem !important;
    line-height: 1.58 !important;
  }

  .reportagens-page :where(.report-card h2, .report-card h3, .story-card h2, .story-card h3) {
    font-weight: 700 !important;
  }

  /* Catalogos: nomes e descricoes ganham contraste e ritmo uniformes. */
  .professionals-page :where(.professional-card, .professional-feature-card) h3,
  body :where(.card.product, .produto-card, .product-card) h3 {
    font-size: 1.25rem;
    font-weight: 700 !important;
    line-height: 1.2;
  }

  .professionals-page :where(.professional-card, .professional-feature-card) p,
  body :where(.card.product, .produto-card, .product-card) p {
    font-size: .9375rem;
    line-height: 1.55;
  }

  /* Meu Caminho Be: reduz o excesso de negrito e recupera textos pequenos. */
  .fala-bem-app-page :where(.fb-app-intro, .fb-now, .fb-profile-page, .fb-diary-page) p {
    font-size: .9375rem;
    line-height: 1.55;
  }

  .fala-bem-app-page :where(.fb-app-intro, .fb-now, .fb-profile-page, .fb-diary-page) h2 {
    font-weight: 700 !important;
  }

  .fala-bem-app-page :where(label, summary, .fb-app-nav button) {
    font-weight: 700;
    line-height: 1.3;
  }

  /* Perfil publico e BEplay mantem personalidade, com leitura minima segura. */
  .be-public-page .be-public-post-copy p {
    font-size: .9375rem;
    line-height: 1.65;
  }

  .beplay-page :where(.video-meta p, .video-card p, .match-card p) {
    font-size: .875rem;
    line-height: 1.5;
  }
}

@media (max-width: 390px) {
  .home-page .be-ecosystem-hero .home-hero-copy h1 {
    font-size: clamp(2rem, 10vw, 2.45rem) !important;
  }

  body:not(.game-page) main h1 {
    overflow-wrap: anywhere;
  }
}
