/* ==========================================================================
   Sumivolt · Base · Reset y tipografía base
   v0.1.1
   ========================================================================== */

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

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-body-md-size);
    line-height: var(--text-body-md-line);
    color: var(--color-grafito);
    background-color: var(--color-fondo-app);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

ul,
ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

/* --- Tipografía base --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--color-grafito);
    line-height: 1.2;
}

h1 {
    font-size: var(--text-display-size);
    line-height: var(--text-display-line);
    font-weight: var(--text-display-weight);
    letter-spacing: var(--text-display-tracking);
}

h2 {
    font-size: var(--text-headline-xl-size);
    line-height: var(--text-headline-xl-line);
    font-weight: var(--text-headline-xl-weight);
    letter-spacing: var(--text-headline-xl-tracking);
}

h3 {
    font-size: var(--text-headline-lg-size);
    line-height: var(--text-headline-lg-line);
    font-weight: var(--text-headline-lg-weight);
}

h4 {
    font-size: var(--text-headline-md-size);
    line-height: var(--text-headline-md-line);
    font-weight: var(--text-headline-md-weight);
}

p {
    line-height: var(--text-body-md-line);
}

/* --- Selección de texto --- */
::selection {
    background-color: var(--color-verde-energia);
    color: var(--color-grafito);
}

/* --- Focus visible accesible --- */
:focus-visible {
    outline: 2px solid var(--color-azul-noche);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* --- Utilidades de accesibilidad --- */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--color-blanco);
    clip: auto !important;
    clip-path: none;
    color: var(--color-azul-noche);
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 1rem 1.5rem;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* --- Skip link para teclado --- */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-azul-noche);
    color: var(--color-blanco);
    padding: 8px 16px;
    z-index: 100000;
}

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