/* ═══════════════════════════════════════════════════════════════
   VIVEREA — Global Styles (Dark + Light Theme)
   ═══════════════════════════════════════════════════════════════ */

html {
  font-size: var(--font-size-base);
}

body {
  background: var(--bg-0);
  color: var(--on-bg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: var(--lh-body);
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  line-height: var(--lh-heading);
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--on-bg);
}

p, li, dt, dd, small {
  line-height: var(--lh-body);
}

/* ── Links ── */
a {
  color: var(--accent-text);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

/* ── Tabular Numbers ── */
.number,
[data-number] {
  font-variant-numeric: tabular-nums;
}

/* ── Focus Rings (WCAG AA visible) ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ── Selection ── */
::selection {
  background: var(--selection-bg);
  color: var(--on-bg);
}

/* ── Scrollbar (Webkit) ── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-hover);
}

/* ── 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;
  }
}
