/* Defiende México — formulario de registro. Diseño de una sola columna pensado primero para celular. */

:root {
    --azul-marino: #1f2a78;
    --texto: #2f3640;
    --texto-suave: #6b7280;
    --borde: #8e949c;
    --borde-foco: #1f2a78;
    --rojo: #e53935;
    --tarjeta: rgba(232, 237, 242, 0.88);
    --boton: #1f2a78;
    --boton-apagado: #c3c8cf;
    --radio: 10px;
    --fuente: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--fuente);
    color: var(--texto);
    background: #2b6a96;
    padding: 0 16px 40px;
}

/* Cielo con nubes, hecho con CSS (sin imágenes). */
.cielo {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(180deg, #17527e 0%, #2e6c99 22%, #5b8fb7 48%, #8fb3cf 72%, #b7cddd 100%);
}
.nube {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.35) 60%, rgba(255, 255, 255, 0));
    filter: blur(6px);
}
.n1 { width: 520px; height: 220px; top: 18%; left: -180px; }
.n2 { width: 640px; height: 260px; top: 40%; right: -260px; opacity: 0.8; }
.n3 { width: 700px; height: 300px; bottom: -60px; left: -120px; opacity: 0.9; }
.n4 { width: 380px; height: 160px; top: 6%; right: -120px; opacity: 0.6; }

.encabezado {
    max-width: 560px;
    margin: 0 auto;
    padding: 34px 0 26px;
    text-align: center;
}
.encabezado h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.6rem, 6vw, 2.1rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.tarjeta {
    max-width: 560px;
    margin: 0 auto;
    padding: 28px 22px 26px;
    background: var(--tarjeta);
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(10, 30, 60, 0.18);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Campos con etiqueta flotante: se ve como el texto de ayuda y sube al escribir. */
.campo {
    position: relative;
    display: flex;
    align-items: center;
    height: 58px;
    margin-top: 14px;
    background: #fff;
    border: 1.5px solid var(--borde);
    border-radius: var(--radio);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.campo:first-of-type { margin-top: 0; }
.campo:focus-within {
    border-color: var(--borde-foco);
    box-shadow: 0 0 0 3px rgba(31, 42, 120, 0.15);
}
.campo.con-error { border-color: var(--rojo); }
.campo .icono {
    flex: none;
    width: 26px;
    height: 26px;
    margin: 0 14px 0 18px;
    fill: var(--azul-marino);
}
.campo input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 18px 14px 0 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: 500 1.05rem var(--fuente);
    color: var(--texto);
    letter-spacing: 0.02em;
}
/* Nombres y apellidos se ven en MAYUSCULAS desde que se escriben (el script tambien cambia el valor). */
.campo input[data-mayusculas] {
    text-transform: uppercase;
}
.campo label {
    position: absolute;
    left: 58px;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--texto-suave);
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    transition: top 0.15s, font-size 0.15s, color 0.15s;
}
.campo input:focus + label,
.campo input:not(:placeholder-shown) + label {
    top: 15px;
    font-size: 0.75rem;
    color: var(--azul-marino);
}

.campo-error {
    display: block;
    min-height: 0;
    margin: 4px 4px 0;
    color: var(--rojo);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}
.campo-error:empty { margin: 0; }
.oculto { display: none; }

/* Casillas de actividades: texto a la izquierda, casilla a la derecha. */
.actividades {
    margin: 26px 0 0;
    padding: 0;
    border: 0;
}
.actividades legend {
    padding: 0;
    margin-bottom: 10px;
    color: var(--azul-marino);
    font-size: 1.12rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.actividad {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 0;
    cursor: pointer;
    font-size: 0.98rem;
    line-height: 1.45;
    letter-spacing: 0.03em;
}
.actividad input {
    flex: none;
    appearance: none;
    -webkit-appearance: none;
    width: 26px;
    height: 26px;
    margin: 0 10px 0 0;
    border: 2px solid #3a3f47;
    border-radius: 5px;
    background: #fff center / 18px no-repeat;
    cursor: pointer;
    transition: background-color 0.12s, border-color 0.12s;
}
.actividad input:checked {
    background-color: var(--azul-marino);
    border-color: var(--azul-marino);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
}
.actividad input:focus-visible { outline: 3px solid rgba(31, 42, 120, 0.35); outline-offset: 2px; }
.actividades-error { margin-top: 6px; }

.enviar {
    display: block;
    width: 100%;
    margin-top: 26px;
    padding: 17px 20px;
    border: 0;
    border-radius: 14px;
    background: var(--boton-apagado);
    color: #5d636b;
    font: 600 1.1rem var(--fuente);
    letter-spacing: 0.04em;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.05s;
}
.enviar.listo { background: var(--boton); color: #fff; }
.enviar.listo:hover { background: #18216a; }
.enviar:active { transform: translateY(1px); }
.enviar:disabled { cursor: wait; opacity: 0.7; }

.aviso {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: var(--radio);
    background: #fff4e5;
    color: #8a4b00;
    font-size: 0.95rem;
}

.trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.gracias { text-align: center; padding: 10px 4px; }
.gracias h2 { margin: 6px 0 12px; color: var(--azul-marino); font-size: 1.35rem; font-weight: 600; }
.gracias p { margin: 0; line-height: 1.6; }
.palomita {
    width: 64px;
    height: 64px;
    padding: 12px;
    border-radius: 50%;
    background: var(--azul-marino);
    fill: #fff;
}

@media (max-width: 380px) {
    .tarjeta { padding: 22px 16px; }
    .campo .icono { margin: 0 10px 0 12px; }
    .campo label { left: 48px; font-size: 1rem; }
    .actividad { font-size: 0.92rem; }
}

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