/* =============================================================
   base.css — Reset y estilos base del sistema
   Cerro Lodge & Gardens Management System
   ============================================================= */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-base);
    color: var(--color-text-primary);
    background-color: var(--color-bg-secondary);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Enlace de saltar al contenido (accesibilidad) */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    padding: var(--space-2) var(--space-4);
    background: var(--color-primary);
    color: var(--color-text-inverse);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-md);
    text-decoration: none;
    z-index: var(--z-toast);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-primary);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

h1 { font-size: var(--font-size-4xl); font-weight: var(--font-weight-bold); }
h2 { font-size: var(--font-size-3xl); font-weight: var(--font-weight-bold); }
h3 { font-size: var(--font-size-2xl); font-weight: var(--font-weight-semibold); }
h4 { font-size: var(--font-size-xl);  font-weight: var(--font-weight-semibold); }
h5 { font-size: var(--font-size-lg);  font-weight: var(--font-weight-semibold); }
h6 { font-size: var(--font-size-base); font-weight: var(--font-weight-semibold); }

p {
    margin-bottom: var(--space-4);
    color: var(--color-text-primary);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

a:focus-visible {
    outline: 2px solid var(--color-border-focus);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Foco visible global */
:focus-visible {
    outline: 2px solid var(--color-border-focus);
    outline-offset: 2px;
}

/* Imágenes */
img {
    max-width: 100%;
    height: auto;
}

/* Listas base */
ul, ol {
    padding-left: var(--space-6);
}

/* Texto seleccionado */
::selection {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
}

/* Campos de formulario base */
input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
}

/* Tablas base */
table {
    width: 100%;
    border-collapse: collapse;
}

/* Código */
code {
    font-size: var(--font-size-sm);
    background-color: var(--color-bg-secondary);
    padding: 0.1rem 0.3rem;
    border-radius: var(--radius-sm);
    color: var(--color-primary-dark);
}

/* Horizontal rule */
hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-6) 0;
}

/* Texto muted */
.text-muted {
    color: var(--color-text-secondary) !important;
    font-size: var(--font-size-sm);
}

/* Requerido */
.required-indicator {
    color: var(--color-error);
    margin-left: var(--space-1);
    font-weight: var(--font-weight-bold);
    aria-hidden: true;
}
