/*
 * Base: reset, tipografia, foco e utilitários.
 * Breakpoint único: mobile < 768px (prancha Home-Mobile, 390) e desktop >= 768px (prancha Main, 1440).
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--space-6);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--papel);
  color: var(--grafite-700);
  font-family: var(--fonte-texto);
  font-size: var(--corpo-tamanho);
  line-height: var(--corpo-linha);
  font-weight: var(--corpo-peso);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, dl, dd, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--oliva-700);
}

a:hover {
  color: var(--oliva-800);
}

/* Ícones de linha do sprite */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icone {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icone[stroke-width="2"] { stroke-width: 2; }
.icone[stroke-width="2.25"] { stroke-width: 2.25; }

/* Foco visível: anel oliva-700 (sobre fundos escuros o anel fica claro, ver cta-empresas.css) */
:focus-visible {
  outline: 2px solid var(--oliva-700);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.secao {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding-top: var(--space-16);
}

.secao__cabecalho {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.secao__textos {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.secao__titulo {
  font-family: var(--fonte-display);
  font-size: var(--titulo-1-tamanho);
  line-height: var(--titulo-1-linha);
  font-weight: var(--titulo-1-peso);
  color: var(--grafite-900);
}

.secao__descricao {
  color: var(--grafite-500);
}

.secao__rodape {
  display: flex;
  justify-content: center;
}

.sobretitulo {
  font-size: var(--rotulo-tamanho);
  line-height: var(--rotulo-linha);
  font-weight: var(--rotulo-peso);
  color: var(--oliva-700);
}

.sobretitulo--icone {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.legenda {
  font-size: var(--legenda-tamanho);
  line-height: var(--legenda-linha);
  font-weight: var(--legenda-peso);
  color: var(--grafite-500);
}

.link-seta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--alvo-toque);
  font-size: 15px;
  font-weight: 600;
  color: var(--oliva-700);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Marca */
.marca {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  text-decoration: none;
}

.marca__simbolo {
  position: relative;
  width: 48px;
  height: 48px;
  flex: none;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--superficie);
}

/* O arquivo do logo tem margem branca: ampliamos e recortamos como na prancha (77px em 48px). */
.marca__simbolo img {
  position: absolute;
  width: 160%;
  height: 160%;
  max-width: none;
  left: -30%;
  top: -30%;
}

.marca__nome {
  font-family: var(--fonte-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--grafite-700);
}

/* Avatar e contador */
.avatar {
  width: 40px;
  height: 40px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-family: var(--fonte-display);
  font-size: 15px;
  font-weight: 700;
}

.avatar--oliva { background: var(--oliva-100); color: var(--oliva-800); }
.avatar--terracota { background: var(--terracota-100); color: var(--terracota-700); }
.avatar--areia { background: var(--areia-100); color: var(--areia-800); }

.contador {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--terracota-500);
  border: 2px solid var(--superficie);
  color: var(--superficie);
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  text-align: center;
}

/* Acessibilidade */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.pular-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--oliva-700);
  color: var(--superficie);
  font-weight: 600;
  transform: translateY(-200%);
}

.pular-link:focus {
  transform: none;
  color: var(--superficie);
}

/* Variantes por largura e por estado de login */
.so-mobile,
.so-mobile-flex,
.so-logado {
  display: none !important;
}

.so-desktop-flex {
  display: flex;
}

body.is-logado .so-logado {
  display: flex !important;
}

body.is-logado .so-deslogado {
  display: none !important;
}

.mensagem-vazia {
  grid-column: 1 / -1;
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--superficie);
  text-align: center;
  color: var(--grafite-500);
}

@media (max-width: 767.98px) {
  html {
    scroll-padding-top: 80px;
  }

  body {
    /* espaço da navegação inferior fixa */
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .container {
    padding-inline: var(--space-4);
  }

  .secao {
    gap: var(--space-4);
    padding-top: 28px;
  }

  .secao__cabecalho {
    align-items: center;
    flex-wrap: nowrap;
    gap: var(--space-3);
  }

  .secao__titulo {
    font-size: var(--titulo-2-tamanho);
    line-height: var(--titulo-2-linha);
  }

  .secao__descricao {
    font-size: var(--corpo-sm-tamanho);
    line-height: var(--corpo-sm-linha);
  }

  .link-seta {
    font-size: 14px;
    flex: none;
  }

  .link-seta .icone {
    display: none;
  }

  .so-desktop,
  .so-desktop-flex {
    display: none !important;
  }

  .so-mobile {
    display: inline !important;
  }

  .so-mobile-flex {
    display: flex !important;
  }
}
