/* ============================================================
   BASE — Reset, Typography, Global Utilities
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--scroll-offset);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Skip Link (Accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--surface);
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: top var(--duration-fast) var(--ease-out-expo);
}

.skip-link:focus {
  top: 16px;
}

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

/* ── SVG ── */
svg {
  display: block;
}

/* ── Text ── */
p {
  text-wrap: pretty;
}

/* ── Headings ── */
h1, h2, h3 {
  font-family: var(--font-display);
  text-wrap: balance;
  letter-spacing: -0.035em;
  margin: 0;
}

h1 {
  font-size: var(--text-7xl);
  line-height: 0.97;
  max-width: 24ch;
}

h2 {
  font-size: var(--text-6xl);
  line-height: 1.04;
}

h3 {
  font-size: var(--text-4xl);
  line-height: 1.12;
}

/* ── Selection ── */
::selection {
  background: color-mix(in oklch, var(--accent) 24%, transparent);
  color: var(--fg);
}

/* ── Utility: Container ── */
.container {
  width: min(var(--container-max), calc(100% - var(--container-padding)));
  margin: 0 auto;
}

/* ── Utility: Section ── */
.section {
  padding: var(--space-section) 0;
}

.section + .section {
  border-top: 1px solid color-mix(in oklch, var(--border) 70%, transparent);
}

/* ── Utility: Eyebrow ── */
.eyebrow {
  margin: 0 0 var(--space-lg);
  color: var(--link);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Utility: Lead ── */
.lead {
  max-width: 66ch;
  color: var(--muted);
  font-size: var(--text-2xl);
  margin: 24px 0 0;
}

/* ── Utility: Meta ── */
.meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--text-md);
}

/* ── Utility: Prose ── */
.prose p,
.prose li {
  color: color-mix(in oklch, var(--fg) 84%, var(--muted));
}

.prose strong {
  color: var(--fg);
}

/* ── Layout: Two Column ── */
.two-col {
  display: grid;
  grid-template-columns: minmax(260px, 0.76fr) minmax(0, 1.24fr);
  gap: clamp(34px, 6vw, 82px);
  align-items: start;
}

/* ── Layout: Product Grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

/* ── Dark Section Override ── */
.dark {
  background: var(--black);
  color: var(--surface);
}

.dark .lead,
.dark .prose p,
.dark .prose li {
  color: color-mix(in oklch, var(--surface) 88%, transparent);
}

/* ── Scroll Progress Bar ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklch, var(--accent) 70%, #49b6a3));
  z-index: 9999;
  transition: none;
  pointer-events: none;
}

/* ── Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity var(--duration-reveal) var(--ease-out-expo),
              transform var(--duration-reveal) var(--ease-out-expo);
  transition-delay: calc(var(--i, 0) * 0.1s);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Keyframes ── */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 color-mix(in oklch, var(--accent) 0%, transparent);
  }
  50% {
    box-shadow: 0 0 0 9px color-mix(in oklch, var(--accent) 12%, transparent);
  }
}

/* ── High Contrast Mode (Acessibilidade Macular) ── */
body.high-contrast {
  --bg: #000000 !important;
  --surface: #000000 !important;
  --fg: #ffff00 !important; /* Amarelo vibrante de alta visibilidade */
  --muted: #ffffff !important; /* Branco puro para textos secundários */
  --border: #ffff00 !important;
  --accent: #ffff00 !important;
  --black: #000000 !important;
  --link: #00ffff !important; /* Ciano brilhante para links */
  --dark-surface: #000000 !important;
  --glass: #000000 !important;
  --glass-dark: #000000 !important;
  --soft: #222200 !important;
  --soft-strong: #444400 !important;
  background-color: #000000 !important;
  color: #ffff00 !important;
}

/* Forçar cores de fundo e remoção de gradientes nas seções e cabeçalhos */
body.high-contrast .section,
body.high-contrast .hero,
body.high-contrast .visionx-section,
body.high-contrast .final-verdict,
body.high-contrast .topnav,
body.high-contrast .pagefoot {
  background: #000000 !important;
  background-image: none !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
}

/* Ocultar pseudo-elementos com gradientes radiais ou decorações coloridas */
body.high-contrast .visionx-section::before,
body.high-contrast .final-verdict::before,
body.high-contrast .product-showcase-art::before,
body.high-contrast .ingredient-visual::before {
  display: none !important;
  background-image: none !important;
}

/* Ajustes no progresso de rolagem */
body.high-contrast .scroll-progress {
  background: #ffff00 !important;
}

/* Ajustes nos elementos estruturais e cards */
body.high-contrast .glass-card,
body.high-contrast .alert,
body.high-contrast .product-card,
body.high-contrast .quote-card,
body.high-contrast .report-card,
body.high-contrast .faq-item,
body.high-contrast .protocol li,
body.high-contrast .visionx-visual,
body.high-contrast .verdict-img {
  background: #000000 !important;
  background-image: none !important;
  border: 2px solid #ffff00 !important;
  box-shadow: none !important;
  color: #ffff00 !important;
}

/* Garantir que todos os textos herdem a cor de contraste */
body.high-contrast p,
body.high-contrast span,
body.high-contrast li,
body.high-contrast strong,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast td,
body.high-contrast th,
body.high-contrast blockquote,
body.high-contrast time,
body.high-contrast .disclosure {
  color: #ffff00 !important;
  border-color: #ffff00 !important;
}

/* Sobrescrever a cor dos links e botões */
body.high-contrast a,
body.high-contrast .btn {
  color: #00ffff !important;
  border: 2px solid #00ffff !important;
  background: #000000 !important;
  box-shadow: none !important;
}

body.high-contrast .btn-primary {
  background: #ffff00 !important;
  color: #000000 !important;
  border-color: #ffff00 !important;
}

body.high-contrast .btn:hover {
  background: #00ffff !important;
  color: #000000 !important;
  border-color: #00ffff !important;
}

body.high-contrast .navlinks a[aria-current="true"] {
  background: #222200 !important;
  color: #ffff00 !important;
  border: 1px solid #ffff00 !important;
}

/* Ajustar tabelas e colunas em destaque */
body.high-contrast table,
body.high-contrast td,
body.high-contrast th {
  border-color: #ffff00 !important;
  background: #000000 !important;
}

body.high-contrast td:nth-child(2),
body.high-contrast th:nth-child(2) {
  background: #222200 !important;
  border: 2px solid #ffff00 !important;
}

/* Ajustes em badges e pódios de vencedores */
body.high-contrast .badge,
body.high-contrast .visionx-badge,
body.high-contrast .winner-tag {
  background: #000000 !important;
  color: #ffff00 !important;
  border: 2px solid #ffff00 !important;
}

body.high-contrast .winner-highlight .verdict-img {
  border-color: #00ffff !important; /* Cor de destaque ciano para o pódio vencedor */
}

/* Ajustes nos botões e elementos de carrossel */
body.high-contrast .icon-btn {
  background: #000000 !important;
  color: #ffff00 !important;
  border: 2px solid #ffff00 !important;
}

body.high-contrast .icon-btn:hover {
  background: #ffff00 !important;
  color: #000000 !important;
}

body.high-contrast .carousel-dots button {
  background: #555555 !important;
}

body.high-contrast .carousel-dots button[aria-current="true"] {
  background: #ffff00 !important;
}

/* Ajustes na barra de acessibilidade e seus botões */
body.high-contrast .accessibility-bar {
  background: #000000 !important;
  border-bottom: 2px solid #ffff00 !important;
}

body.high-contrast .accessibility-btn {
  background: #000000 !important;
  border: 1px solid #ffff00 !important;
  color: #ffff00 !important;
}

body.high-contrast .accessibility-btn:hover {
  background: #ffff00 !important;
  color: #000000 !important;
}

/* Ajustes em SVGs de ícones */
body.high-contrast svg {
  stroke: #ffff00 !important;
  fill: none !important;
}
body.high-contrast svg[fill="currentColor"],
body.high-contrast .stars svg {
  fill: #ffff00 !important;
  stroke: #ffff00 !important;
}

/* Formulário de captura de leads no alto contraste */
body.high-contrast .lead-capture-section {
  background: #000000 !important;
}

body.high-contrast .lead-form input {
  background: #000000 !important;
  color: #ffff00 !important;
  border: 2px solid #ffff00 !important;
}

body.high-contrast .lead-form input::placeholder {
  color: #888888 !important;
}

