/* ==========================================================================
   CSS BASE — RESET MODERNO, ACESSIBILIDADE & TIPOGRAFIA
   ========================================================================== */

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

html {
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Integração Lenis Smooth Scroll */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  min-height: 100dvh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* Textura sutil de fundo (Grid de Precisão Atlética) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(ellipse 60% 40% at 85% 10%, rgba(204, 255, 0, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 15% 90%, rgba(255, 77, 0, 0.03) 0%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 64px 64px, 64px 64px;
  pointer-events: none;
  z-index: 0;
}

/* Link de Salto de Acessibilidade */
.skip-link {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 9999;
  background-color: var(--accent-volt);
  color: var(--text-inverse);
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Foco Acessível & Visível (WCAG AA) */
:focus-visible {
  outline: 2px solid var(--accent-volt);
  outline-offset: 3px;
}

/* Tipografia Base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  text-wrap: balance;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 68ch;
}

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

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

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

ul, ol {
  list-style: none;
}

/* Fallback Estrito para Prefers Reduced 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;
  }
}
