/* ============================================================
   Estilos de las páginas legales (privacidad, cookies, términos)
   Compartido entre los tres archivos para no mantener tres copias.
   index.html no lo usa: lleva su propio CSS inline.
   ============================================================ */

:root {
    --clr-lavender-light: #818cf8;
    --clr-lavender: #6366f1;

    --font: "Poppins", Helvetica, sans-serif;
    --text-xs: 11px;
    --text-sm: 13px;
    --text-base: 15px;
    --text-md: 18px;
    --text-xl: 40px;

    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;
    --sp-18: 72px;

    --max-w: 1200px;
    --pad-x: 64px;
    --nav-h: 77px;
    /* Alto del header sticky, igual que en index.html */
    --ease: 0.2s ease;
}

[data-theme="dark"] {
    --bg: #2b2b2b;
    --text-hi: #ffffff;
    --text-mid: #b0b0b0;
    --text-lo: #888888;
    --border: rgba(255, 255, 255, 0.07);
}

[data-theme="light"] {
    --bg: #f4f2ee;
    --text-hi: #1a1916;
    --text-mid: #5a5754;
    --text-lo: #9a9794;
    --border: rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-hi);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background var(--ease), color var(--ease);
}

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--pad-x);
    width: 100%;
}

/* ---------- Navegación ---------- */
/* El sticky va en el <header>, no en el .nav: un sticky solo puede deslizarse
   dentro de la caja de su padre, y el header mide lo mismo que el nav.
   El fondo es obligatorio: sin él, el texto pasaría por debajo y se leería
   a través de la barra al hacer scroll. */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transition: background var(--ease);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-6);
    padding: 20px var(--pad-x);
}

.nav__logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-hi);
    text-decoration: none;
}

.nav__links {
    display: flex;
    gap: var(--sp-8);
    list-style: none;
}

.nav__links a {
    font-size: var(--text-sm);
    color: var(--text-mid);
    text-decoration: none;
    transition: color var(--ease);
}

.nav__links a:hover {
    color: var(--text-hi);
}

/* ---------- Contenido legal ---------- */
main {
    flex: 1;
    padding: var(--sp-18) 0;
    /* El header sticky se superpone: sin esto, el skip link deja el inicio
       del contenido oculto detrás de la barra. */
    scroll-margin-top: var(--nav-h);
}

.legal__back {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--text-sm);
    color: var(--clr-lavender);
    font-weight: 500;
    text-decoration: none;
    margin-bottom: var(--sp-8);
    transition: color var(--ease);
}

.legal__back:hover {
    color: var(--clr-lavender-light);
}

.legal h1 {
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: -.03em;
    margin-bottom: var(--sp-2);
}

.legal .updated {
    font-size: var(--text-xs);
    color: var(--text-lo);
    margin-bottom: var(--sp-10);
}

.legal h2 {
    font-size: var(--text-md);
    font-weight: 600;
    margin: var(--sp-8) 0 var(--sp-3);
}

.legal p {
    font-size: var(--text-base);
    color: var(--text-mid);
    line-height: 1.8;
    margin-bottom: var(--sp-4);
    font-weight: 300;
    max-width: 70ch;
}

.legal ul {
    margin-left: var(--sp-5);
    margin-bottom: var(--sp-4);
}

.legal li {
    font-size: var(--text-base);
    color: var(--text-mid);
    line-height: 1.8;
    font-weight: 300;
    margin-bottom: var(--sp-2);
    max-width: 70ch;
}

.legal a {
    color: var(--clr-lavender);
    transition: color var(--ease);
}

.legal a:hover {
    color: var(--clr-lavender-light);
}

/* ---------- Pie ---------- */
.footer {
    border-top: 1px solid var(--border);
    padding: 28px var(--pad-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-6);
    flex-wrap: wrap;
}

.footer__logo {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--text-hi);
    text-decoration: none;
}

.footer__copy {
    font-size: var(--text-xs);
    color: var(--text-lo);
}

.footer__links {
    display: flex;
    gap: var(--sp-5);
    list-style: none;
}

.footer__links a {
    font-size: var(--text-xs);
    color: var(--text-lo);
    text-decoration: none;
    transition: color var(--ease);
}

.footer__links a:hover {
    color: var(--text-mid);
}

/* ---------- Enlace de salto ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--clr-lavender);
    color: #fff;
    padding: var(--sp-3) var(--sp-4);
    z-index: 200;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}

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

@media(max-width:900px) {
    :root {
        --pad-x: 32px;
        --text-xl: 32px;
    }

    .nav__links {
        display: none;
    }
}

@media(max-width:600px) {
    .footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
