/* ============================================================
   base.css — Reset + estilos globales
   ============================================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--t-base), color var(--t-base);
    min-height: 100vh;
}

/* Tipografía base */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}
p { color: var(--text-secondary); }
a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-hover); }
strong { font-weight: 600; }
small  { font-size: 0.8125rem; }
code   { font-family: var(--font-mono); font-size: 0.875em; background: var(--bg-secondary); padding: 0.15em 0.4em; border-radius: var(--radius-xs); }

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

/* Imágenes */
img, svg { display: block; max-width: 100%; }

/* Botones e inputs — base */
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}
button { cursor: pointer; border: none; background: none; }
input, textarea, select {
    outline: none;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }

/* Focus visible accesible */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Scrollbar personalizado */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
    transition: background var(--t-fast);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Selección de texto */
::selection { background: var(--accent-light); color: var(--accent-text); }

/* Deshabilitar select */
[disabled], [aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Clases utilitarias base */
.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;
}
.hidden   { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex     { display: flex; }
.flex-col { flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.w-full { width: 100%; }
.text-sm   { font-size: 0.875rem; }
.text-xs   { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.font-semibold { font-weight: 600; }
.font-medium   { font-weight: 500; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.p-4  { padding: var(--space-4); }
