/* ============================================================================
   Novatecsystem | Portal Web Corporativo + NEIF
   Módulo M1 — Estilos base (reset, tipografía, elementos).
   ============================================================================ */

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

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-ink);
    background: var(--color-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.25;
    color: var(--color-graphite);
    font-weight: 700;
    margin: 0 0 var(--space-4);
}

p {
    margin: 0 0 var(--space-4);
}

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

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

ul, ol {
    margin: 0;
    padding: 0;
}

li {
    list-style: none;
}

dl {
    margin: 0;
}

dt {
    font-weight: 700;
}

dd {
    margin: 0;
}

code {
    font-family: var(--font-code);
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

main {
    flex: 1;
}

:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 2px;
}

::selection {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Enlaces de salto al contenido */
.skip-link {
    position: absolute;
    top: -48px;
    left: var(--space-4);
    z-index: 100;
    background: var(--color-graphite);
    color: var(--color-text-light);
    padding: var(--space-3) var(--space-4);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.skip-link:focus {
    top: 0;
}

.muted {
    color: var(--color-text-muted);
}

/* Preferencia por menos movimiento */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
