/* ==========================================================================
   base.css — reset, elementos HTML y tipografía
   ========================================================================== */

/* ── Reset ─────────────────────────────────────────────────────────────── */

html, body, div, span, h1, h6, p, a, ul, li, audio {
    border: 0;
    font: inherit;
    font-size: 100%;
    margin: 0;
    padding: 0;
    vertical-align: baseline;
}

body { line-height: 1; }
ul   { list-style: none; }

*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ── Documento ─────────────────────────────────────────────────────────── */

html { scroll-behavior: smooth; }

html, body {
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    background-color: var(--bg);
    color: var(--text);
    font: 400 17px/1.55 var(--font-body);
    padding: 5px 0;
}

img   { max-width: 100%; height: auto; }
audio { max-width: 100%; display: block; }

/* ── Tipografía ────────────────────────────────────────────────────────── */

h1, h2, h3, h6 {
    font-family: var(--font-display);
    color: var(--heading);
    font-weight: 400;
}

/* Título de página: en blanco, con peso medio y por debajo del logo para
   no competir con él. */
h1 {
    font-size: clamp(20px, 3vw, 26px);   /* por debajo del logo (28px de alto) */
    line-height: 1.2;
    margin: 20px 0 12px;   /* sin margen inferior quedaba pegado a lo que sigue */
    color: var(--text-strong);
    font-weight: 600;
    letter-spacing: -0.01em;
}
h2 { font-size: clamp(18px, 3vw, 24px);   line-height: 1.25; margin: 16px 0 8px; }
h6 { font-size: clamp(15px, 2.5vw, 18px); line-height: 1.4;  margin: 4px 0 20px; }
p  { font-size: clamp(14px, 2.5vw, 16px); line-height: 1.55; margin: 0 0 6px; }

/* ── Links ─────────────────────────────────────────────────────────────── */

a, a:visited     { color: var(--text-light); outline: 0; text-decoration: none; }
a:hover, a:focus { color: var(--text-dim); }
p a, p a:visited { line-height: inherit; }

/* ── Foco visible (navegación con teclado) ─────────────────────────────── */
/* Mismo nivel de especificidad que "a:visited" para ganarle al outline: 0. */

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 2px;
}

/* ── Separadores ───────────────────────────────────────────────────────── */

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 0.5em 0;
}

/* ── Controles de formulario ───────────────────────────────────────────── */
/* Todos oscuros y del mismo alto, estén o no dentro de un .form-row (los
   selects del directorio salían con el aspecto nativo, blancos). */

input:not([type="checkbox"], [type="radio"], [type="file"], [type="hidden"], [type="submit"]),
select,
textarea {
    min-height: var(--control-height);
    padding: 6px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-family: inherit;
    font-size: 16px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    outline: none;
}

input[type="checkbox"],
input[type="radio"] { accent-color: var(--accent); }

/* ── Selección ─────────────────────────────────────────────────────────── */

::selection { background-color: var(--selection-bg); color: var(--selection-text); }

/* ── Atributo hidden ───────────────────────────────────────────────────── */
/* Los elementos que el JS muestra/oculta usan [hidden] en vez de
   style="display:none". Esto garantiza que ninguna regla con display lo pise. */

[hidden] { display: none !important; }
