/* ============================================================
   public/css/base.css — Reset moderno e tipografia base
   Depende de: tokens.css (deve ser importado antes)
   ============================================================ */

/* ----------------------------------------------------------
   Google Fonts
   ---------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@600;800;900&family=Inter:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap');

/* ----------------------------------------------------------
   Reset moderno
   ---------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Garante que [hidden] não seja sobrescrito por display:flex/grid de componentes */
[hidden] { display: none !important; }

/* Evita overflow horizontal indesejado */
html,
body {
  overflow-x: hidden;
}

/* Remove list-style de listas com role="list" */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* ----------------------------------------------------------
   Base — html e body
   ---------------------------------------------------------- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-on-surface);
  background-color: var(--color-surface);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----------------------------------------------------------
   Tipografia — Headings
   ---------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headline);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: inherit;
  text-wrap: balance;
}

h1 { font-size: var(--text-5xl); font-weight: 900; }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); font-weight: 700; }
h5 { font-size: var(--text-xl);  font-weight: 700; }
h6 { font-size: var(--text-lg);  font-weight: 600; }

p {
  max-width: 70ch;
  text-wrap: pretty;
}

/* ----------------------------------------------------------
   Links
   ---------------------------------------------------------- */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* Foco visível para acessibilidade */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ----------------------------------------------------------
   Imagens e mídia
   ---------------------------------------------------------- */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ----------------------------------------------------------
   Formulários (reset básico)
   ---------------------------------------------------------- */
input,
button,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ----------------------------------------------------------
   Skip link acessível
   ---------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background-color: var(--color-accent);
  color: var(--color-primary);
  font-family: var(--font-label);
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0 0 4px 4px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: none;
}

/* ----------------------------------------------------------
   Utilitários base
   ---------------------------------------------------------- */

/* Container centralizado */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Acessibilidade: texto visualmente oculto, disponível para leitores de tela */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------------------------------------
   Material Symbols — variações
   ---------------------------------------------------------- */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
  user-select: none;
}

/* Ícone preenchido (filled) */
.material-symbols-outlined.filled {
  font-variation-settings:
    'FILL' 1,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

/* ----------------------------------------------------------
   Scrollbar estilizada (Webkit)
   ---------------------------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface-container-low);
}

::-webkit-scrollbar-thumb {
  background-color: var(--color-outline-variant);
  border-radius: 4px;
  border: 2px solid var(--color-surface-container-low);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-on-surface-variant);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-outline-variant) var(--color-surface-container-low);
}

/* ----------------------------------------------------------
   Seleção de texto
   ---------------------------------------------------------- */
::selection {
  background-color: var(--color-accent);
  color: var(--color-primary);
}
