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

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #333;
    /* Sin fondo declarado, un navegador en modo oscuro pinta el lienzo
       oscuro y el texto gris queda ilegible. La paleta definitiva es #18. */
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
}

nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline;
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

footer {
    background: #34495e;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: auto;
}

/* Accesibilidad: salto al contenido y foco perceptible */

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    left: 0;
    top: 0;
    padding: 0.5rem 1rem;
    background: #fff;
    z-index: 100;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Encabezado y pie */

.site-header,
.site-footer {
    padding: 1rem;
}

.site-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: baseline;
    justify-content: space-between;
}

/* El CSS base solo colorea `nav a`, asi que el wordmark y el correo del
   pie caian al azul por defecto del navegador: 1.17:1 y 1.01:1 sobre sus
   fondos oscuros, es decir practicamente invisibles. */
.site-header a,
.site-footer a {
    color: #fff;
}

.wordmark {
    font-weight: 700;
    text-decoration: none;
}

.site-header nav ul,
.site-footer nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
}

.site-header [aria-current="page"] {
    font-weight: 600;
}

.site-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
