/*
    sitio.css — la web de Nutrición: presentación, registro y descarga. Nada más.

    Todo color y toda medida salen de tokens.css, que instancia los roles de
    IDENTIDAD-VISUAL con el tema verde del producto. Aquí no hay ni un valor
    cableado, que es la norma del canon (§11).

    Esta web es una puerta de entrada, no una aplicación: no lleva JavaScript.
    Lo que no se puede hacer con un formulario y un enlace, no está.
*/

* {
    box-sizing: border-box;
}

html {
    /* Inter es la sans del canon (§3). No se trae de un tercero a propósito: una
       página de registro no debería depender de que responda un servidor de
       fuentes ajeno. Se usa Inter si el equipo la tiene y, si no, la del sistema. */
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: var(--body-font-size);
    color: var(--text-primary);
}

body {
    margin: 0;
    padding: 0 var(--view-margin) 40px;
    background: var(--app-background);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.envoltura {
    width: 100%;
    max-width: 480px;
}

/* ── Cabecera: el logo de la aplicación y poco más ──────────────────────────── */

header.marca {
    text-align: center;
    padding: 40px 0 28px;
}

/* El icono real de la App, incrustado como SVG. Mismo verde, misma «N». */
header.marca a {
    text-decoration: none;
    display: block;
}

header.marca svg {
    width: 72px;
    height: 72px;
    display: block;
    margin: 0 auto 14px;
    border-radius: 18px;
    box-shadow: var(--card-elevation);
}

header.marca h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--brand);
    margin: 0;
    letter-spacing: -0.4px;
}

header.marca p {
    font-size: var(--body-font-size);
    color: var(--text-secondary);
    margin: 6px 0 0;
    line-height: 1.5;
}

/* ── Tarjetas: sin borde, la sombra hace el trabajo (§5) ────────────────────── */

.tarjeta {
    background: var(--card-background);
    border-radius: var(--corner-radius);
    box-shadow: var(--card-elevation);
    padding: var(--card-padding);
    margin-bottom: var(--card-gap);
}

.tarjeta h2 {
    font-size: var(--card-title-font-size);
    font-weight: 600;
    color: var(--brand);
    margin: 0 0 12px;
}

.tarjeta > h2:first-child {
    margin-top: 0;
}

.tarjeta p {
    margin: 0 0 10px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tarjeta p:last-child {
    margin-bottom: 0;
}

/* Lista de lo que hace, con una marca verde en vez de un topo gris */
.rasgos {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rasgos li {
    position: relative;
    padding: 7px 0 7px 26px;
    color: var(--text-secondary);
    line-height: 1.5;
    border-top: 1px solid var(--divider);
}

.rasgos li:first-child {
    border-top: none;
    padding-top: 0;
}

.rasgos li:last-child {
    padding-bottom: 0;
}

.rasgos li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* ── Formularios ────────────────────────────────────────────────────────────── */

/* La etiqueta SIEMPRE encima del campo (§3). */
label {
    display: block;
    font-size: var(--label-font-size);
    font-weight: 600;
    color: var(--brand);
    margin: 0 0 5px;
}

label .opcional {
    font-weight: 400;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
    display: block;
    width: 100%;
    font-family: inherit;
    font-size: var(--data-font-size);
    color: var(--text-primary);
    background: var(--card-background);
    border: 1px solid var(--input-border);
    border-radius: var(--corner-radius);
    padding: 11px 12px;
    margin-bottom: 14px;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--row-selected);
}

.ayuda {
    font-size: var(--small-font-size);
    color: var(--text-muted);
    margin: -10px 0 16px;
    line-height: 1.5;
}

/* Las dos contraseñas van juntas y se ve que son un par */
.par-contrasena {
    background: var(--row-hover);
    border-radius: var(--corner-radius);
    padding: 14px 14px 2px;
    margin-bottom: 16px;
}

.par-contrasena .ayuda {
    margin-bottom: 10px;
}

.par-contrasena input:last-of-type {
    margin-bottom: 12px;
}

/* ── Botones ────────────────────────────────────────────────────────────────── */

.boton {
    display: inline-block;
    font-family: inherit;
    font-size: var(--button-font-size);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    border-radius: var(--corner-radius);
    padding: 12px 20px;
}

.boton.primario {
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: var(--button-elevation);
}

.boton.primario:hover {
    background: var(--accent-hover);
}

.boton.primario:active {
    background: var(--accent-pressed);
}

.boton.secundario {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--input-border);
}

.boton.secundario:hover {
    background: var(--row-hover);
    border-color: var(--accent);
}

.boton.ancho {
    display: block;
    width: 100%;
}

.acciones {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Avisos: el color nunca es el único canal (§9) ──────────────────────────── */

.aviso {
    border-radius: var(--corner-radius);
    padding: 13px 15px;
    margin-bottom: var(--card-gap);
    line-height: 1.55;
    border-left: 3px solid transparent;
}

.aviso .rotulo {
    display: block;
    font-weight: 600;
    margin-bottom: 3px;
}

.aviso.error {
    background: #FDECEA;
    color: var(--error);
    border-left-color: var(--error);
}

.aviso.exito {
    background: var(--row-selected);
    color: var(--brand);
    border-left-color: var(--accent);
}

.aviso ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

/* ── Sesión y pie ───────────────────────────────────────────────────────────── */

.sesion {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: var(--small-font-size);
    color: var(--text-muted);
    margin-bottom: var(--card-gap);
}

.sesion strong {
    color: var(--text-secondary);
}

.sesion form {
    margin: 0;
}

.sesion button {
    font-family: inherit;
    font-size: var(--small-font-size);
    color: var(--accent);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}

.enlace-pie {
    text-align: center;
    font-size: var(--small-font-size);
    color: var(--text-muted);
    padding-top: 4px;
}

.enlace-pie a {
    color: var(--accent);
}
