/* ============================================
   BASE.CSS — Aditor Hub v2 Premium
   Reset + Foundation
   ============================================ */

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

/* Prevent iOS text size adjust */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100%;
  line-height: 1.5;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Remove default list styles */
ul, ol { list-style: none; }

/* Reset links */
a {
  color: inherit;
  text-decoration: none;
}

/* Reset media */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* Reset form elements */
input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Tabular nums for all data */
.tabular-nums {
  font-variant-numeric: tabular-nums lining-nums;
}

/* Remove autofill bg in webkit */
input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--color-surface-2) inset;
  -webkit-text-fill-color: var(--color-text);
}

/* Focus ring — visible only for keyboard */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Skip to content */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* Light mode scrollbar */
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.25);
}

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