/* Elementos base y tipografía */

body {
    background-color: var(--neutral-50);
    color: var(--neutral-700);
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    line-height: 1.6;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--neutral-800);
    font-weight: var(--fw-bold);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
}

h1 {
    font-size: var(--fs-hero);
    line-height: 1.1;
    font-weight: var(--fw-black);
}

h2 {
    font-size: var(--fs-xxl);
    position: relative;
    padding-bottom: var(--space-xs);
    display: inline-block;
    width: fit-content;
    max-width: 100%;
}

/* Linea roja debajo de los headers */
h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    border-radius: var(--radius-full);
}

/* Título centrado que ocupa más de una línea (js/headings.js le agrega .is-wrapped): la línea va al centro */
h2.is-wrapped::after {
    left: 50%;
    transform: translateX(-50%);
}

h3 {
    font-size: var(--fs-xl);
}

h4 {
    font-size: var(--fs-lg);
}

p {
    margin-bottom: var(--space-md);
}

/* transicion elementos base */
a {
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

a:hover {
    color: var(--primary);
}

/* Focus states */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 4px;
}

/* estilo de selección de texto */
::selection {
    background-color: var(--primary);
    color: var(--white);
}

/* Screen Reader Helper */
.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;
}
