/**
 * WA Jurídico - Base Styles
 * Estilos fundamentais do sistema
 */

/* === RESET E BASE === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--wa-font-family-primary);
  font-size: var(--wa-font-size-base);
  line-height: var(--wa-line-height-relaxed);
  color: var(--wa-color-text-primary);
  background-color: var(--wa-color-neutral-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === TIPOGRAFIA === */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--wa-font-weight-semibold);
  line-height: var(--wa-line-height-tight);
}

h1 { font-size: var(--wa-font-size-4xl); }
h2 { font-size: var(--wa-font-size-3xl); }
h3 { font-size: var(--wa-font-size-2xl); }
h4 { font-size: var(--wa-font-size-xl); }
h5 { font-size: var(--wa-font-size-lg); }
h6 { font-size: var(--wa-font-size-base); }

p {
  margin: 0 0 var(--wa-spacing-4) 0;
}

a {
  color: var(--wa-color-primary-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--wa-color-secondary-blue);
}

/* === LISTAS === */
ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* === FORMULÁRIOS === */
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

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

/* === TABELAS === */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

th,
td {
  padding: 0;
  text-align: left;
}

/* === IMAGENS === */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === ESTADOS DE FOCO === */
*:focus {
  outline: 2px solid var(--wa-color-primary-blue);
  outline-offset: 2px;
}

button:focus {
  outline: 2px solid var(--wa-color-primary-blue);
  outline-offset: 2px;
}

/* === SELEÇÃO DE TEXTO === */
::selection {
  background-color: var(--wa-color-primary-blue);
  color: var(--wa-color-white);
}

::-moz-selection {
  background-color: var(--wa-color-primary-blue);
  color: var(--wa-color-white);
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--wa-color-neutral-light);
}

::-webkit-scrollbar-thumb {
  background: var(--wa-color-neutral-dark);
  border-radius: var(--wa-border-radius-base);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--wa-color-text-secondary);
}

/* === ANIMAÇÕES === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* === RESPONSIVIDADE === */
@media (max-width: 768px) {
  body {
    font-size: var(--wa-font-size-sm);
  }
  
  h1 { font-size: var(--wa-font-size-3xl); }
  h2 { font-size: var(--wa-font-size-2xl); }
  h3 { font-size: var(--wa-font-size-xl); }
  h4 { font-size: var(--wa-font-size-lg); }
}

/* === REDUÇÃO DE MOVIMENTO === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
