/* ============================================================
   Modern CSS Reset
   ============================================================ */

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

* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }

html, body { height: 100%; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

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

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--gray-900);
}

p { max-width: 70ch; }

/* Focus visível para acessibilidade */
:focus-visible {
  outline: 3px solid var(--red-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Seleção */
::selection { background: var(--red-primary); color: var(--white); }

/* Scrollbar (webkit) */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 8px; border: 2px solid var(--gray-100); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-600); }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--black);
  color: var(--white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  z-index: 999;
  font-weight: var(--fw-semibold);
}
.skip-link:focus { top: var(--space-4); }
