/* ═══════════════════════════════════════════════════════════════
   ARJUNAFIT — RESET CSS
   ═══════════════════════════════════════════════════════════════
   Normaliza diferencias entre navegadores.
   Carga DESPUÉS de tokens.css y ANTES de cualquier otro CSS.
   ═══════════════════════════════════════════════════════════════ */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Imágenes y media */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

/* Form elements heredan tipografía */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Botones limpios por defecto */
button {
  background: none;
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

button:disabled {
  cursor: not-allowed;
}

/* Inputs sin estilos nativos feos */
input,
textarea,
select {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
}

/* Inputs numéricos sin spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Search sin X de Chrome */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

/* Autofill fix — Chrome pone un fondo blanco horrible */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-elevated) inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  caret-color: var(--text-primary);
  transition: background-color 5000s ease-in-out 0s;
}

/* Selects nativos invisibles */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* Listas sin estilos */
ul, ol {
  list-style: none;
}

/* Headings heredan tamaño */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: var(--lh-tight);
}

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

/* Tablas */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Selección */
::selection {
  background: var(--primary);
  color: var(--text-primary);
}

/* Scrollbar (solo desktop) */
@media (min-width: 768px) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-track {
    background: var(--bg-base);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--border-base);
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
  }
}

/* Focus visible accesible */
*:focus {
  outline: none;
}
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Reduce motion para usuarios con preferencias */
@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;
  }
}

/* Hidden helper accesible */
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
