/* ============================================
   SNFX Design System — Base
   Reset, typography, scrollbar, focus, utilities.
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img, video { max-width: 100%; height: auto; }

::selection {
  background: rgba(108, 99, 255, 0.3);
  color: var(--text);
}

/* ---- Focus ---- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Scrollbar ---- */
@supports (scrollbar-width: thin) {
  * {
    scrollbar-width: thin;
    scrollbar-color: rgba(108, 99, 255, 0.3) transparent;
  }
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(108, 99, 255, 0.3);
  border-radius: 3px;
}

/* ---- Utilities ---- */
.ml-sm { margin-left: 8px; }
.ml-md { margin-left: 16px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 12px; }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent); }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---- Skip to content link ---- */
.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 100000;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

/* ---- 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;
  }
}
