/* ============================================
   ACESSIBILIDADE - Processador Desmistificado
   Skip links, reduced motion, high contrast, focus
   ============================================ */

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  z-index: 10002;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 8px 0;
  transition: top 0.2s;
}

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

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

/* 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;
  }
  
  .hero-content {
    animation: none !important;
  }
  
  .notificacao {
    animation: none !important;
  }
}

/* High Contrast */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #000000;
    --text-secondary: #333333;
    --text-muted: #666666;
    --bg-main: #ffffff;
    --bg-card: #f5f5f5;
    --bg-elevated: #ffffff;
    --primary: #0000EE;
    --primary-dark: #000088;
    --primary-light: #3333FF;
    --glass: rgba(255, 255, 255, 0.95);
    --glass-border: #000000;
  }
  
  .glass,
  .navbar.scrolled,
  .progress-card,
  .capitulo-card,
  .conquista-card,
  .desafio-card {
    background: #ffffff;
    border: 2px solid #000000;
    box-shadow: none;
  }
  
  .hero-bg,
  .hero-grid {
    display: none;
  }
  
  .btn-primary {
    background: #0000EE;
    color: white;
    border: 2px solid #000000;
  }
  
  .btn-secondary {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
  }
}

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

/* Animação de notificação acessível */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ARIA Live regions */
[aria-live="polite"] {
  /* Garantir que mudanças sejam anunciadas */
}

/* Modo de leitura confortável */
body.modo-leitura {
  --font-main: 'Georgia', 'Merriweather', serif;
  --line-height: 2;
  --text-width: 700px;
}

body.modo-leitura .hero-bg,
body.modo-leitura .hero-grid,
body.modo-leitura .particles {
  display: none;
}

body.modo-leitura .hero {
  background: var(--bg-main);
  min-height: auto;
  padding: 4rem 2rem;
}

/* Fonte OpenDyslexic */
@font-face {
  font-family: 'OpenDyslexic';
  src: url('https://cdn.jsdelivr.net/npm/open-dyslexic@1.0.0/woff/OpenDyslexic-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Print styles */
@media print {
  .navbar,
  .hero-bg,
  .hero-grid,
  .progress-section,
  .conquistas-section,
  .desafios-section,
  .recursos-section,
  .footer,
  .notificacao,
  .painel-personalizacao {
    display: none !important;
  }
  
  .capitulos-section {
    page-break-before: always;
  }
  
  .capitulo-card {
    break-inside: avoid;
    border: 1px solid #ccc;
    box-shadow: none;
  }
}