/* ---------------------------------------------------------------------------
   Residencial La Bocana - Registro de interesados
   Complementa a Bootstrap 5.3. Las variables de color las inyecta el layout
   desde config/marca.php, de modo que cambiar la identidad visual no obliga a
   tocar esta hoja.
   --------------------------------------------------------------------------- */

body {
    background: #fbfbfa;
    color: var(--marca-texto, #1f2933);
    -webkit-font-smoothing: antialiased;
}

.text-tenue { color: var(--marca-texto-tenue, #5b6b78); }

.req { color: #b42318; font-weight: 600; }

/* --- Cabecera y pie ------------------------------------------------------- */
.cabecera {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, .07);
}

/* Alturas ajustadas a la resolucion real de los PNG (114 y 59 px de alto).
   Mostrarlos mas grandes los dejaria blandos en pantallas de alta densidad
   hasta que la promotora facilite las versiones vectoriales. */
.logo-promotora { max-height: 46px; width: auto; }
.logo-promocion { max-height: 38px; width: auto; }

@media (max-width: 575.98px) {
    .logo-promotora { max-height: 36px; }
    .logo-promocion { max-height: 30px; }
}

/* Marcador tipográfico mientras no hay logotipos definitivos. */
.logo-texto {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: var(--marca-principal, #1b5c6e);
}

.logo-sigla {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 2px solid currentColor;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: .02em;
}

.logo-nombre {
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .78rem;
}

.pie {
    border-top: 1px solid rgba(0, 0, 0, .07);
    background: #fff;
    color: var(--marca-texto-tenue, #5b6b78);
}

.pie a { color: inherit; }

/* --- Hero ----------------------------------------------------------------- */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    /* Alto proporcional al ancho pero acotado: en pantallas muy anchas una
       banda proporcional empujaria el formulario fuera de la vista. */
    height: clamp(240px, 34vw, 420px);
    background: var(--marca-oscuro, #1e3556);
}

.hero picture,
.hero img {
    display: block;
    width: 100%;
    height: 100%;
}

.hero img {
    object-fit: cover;
    /* El interes de la imagen esta en la fachada, algo por encima del centro. */
    object-position: center 42%;
}

/* Velo degradado: sin el, el texto blanco sobre el cielo claro del render
   quedaria por debajo del contraste minimo exigible. */
.hero-velo {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(21, 40, 66, .88) 0%,
        rgba(21, 40, 66, .55) 45%,
        rgba(21, 40, 66, .12) 100%
    );
}

.hero-contenido {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: clamp(1.25rem, 3vw, 2.5rem);
    color: #fff;
    text-shadow: 0 1px 12px rgba(10, 22, 38, .45);
}

.hero-ubicacion {
    margin: 0 0 .35rem;
    font-size: .82rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--marca-acento, #e6be41);
}

.hero-ubicacion i { margin-right: .4rem; }

.hero-titulo {
    margin: 0;
    font-size: clamp(1.75rem, 4.2vw, 3rem);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.1;
}

.hero-bajada {
    margin: .5rem 0 0;
    font-size: clamp(.9rem, 1.6vw, 1.05rem);
    max-width: 46ch;
    opacity: .92;
}

/* --- Bloque de pasos ------------------------------------------------------ */
.bloque-pasos {
    padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}

.intro-pasos {
    max-width: 62ch;
    font-size: 1.02rem;
    line-height: 1.65;
}

.tarjeta-paso {
    position: relative;
    height: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 1rem;
    padding: 1.75rem 1.5rem 1.5rem;
    /* Franja superior en color de marca: distingue las tarjetas del fondo sin
       recurrir a sombras pesadas. */
    border-top: 3px solid var(--marca-principal, #2b4a76);
    transition: transform .15s ease, box-shadow .15s ease;
}

.tarjeta-paso:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(16, 40, 56, .09);
}

.paso-numero {
    position: absolute;
    top: -.9rem;
    left: 1.5rem;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--marca-principal, #2b4a76);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    font-variant-numeric: tabular-nums;
}

.paso-icono {
    display: block;
    font-size: 1.5rem;
    color: var(--marca-acento, #e6be41);
    margin-bottom: .85rem;
}

.paso-titulo {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.paso-texto {
    font-size: .875rem;
    line-height: 1.6;
    color: var(--marca-texto-tenue, #5b6b78);
    margin: 0;
}

/* --- Agrupaciones de campos ----------------------------------------------- */
.bloque-campos {
    border: none;
    padding: 0;
    margin: 0 0 2rem;
}

.bloque-campos:last-of-type { margin-bottom: 1rem; }

.leyenda-bloque {
    float: none;           /* Bootstrap pone width:100% en legend; se anula */
    width: auto;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--marca-principal, #2b4a76);
    padding: 0 0 .65rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    display: block;
}

.leyenda-bloque i { margin-right: .45rem; }

.etiqueta-opcional {
    display: inline-block;
    margin-left: .35rem;
    padding: .05rem .4rem;
    border-radius: .25rem;
    background: #eef1f4;
    color: var(--marca-texto-tenue, #5b6b78);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* --- Textos legales ------------------------------------------------------- */
.texto-legal h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; }
.texto-legal h3 { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 .75rem; }
.texto-legal p  { font-size: .92rem; line-height: 1.7; margin-bottom: .9rem; }
.texto-legal strong { color: var(--marca-texto, #1f2933); }

/* --- Tarjeta del formulario ---------------------------------------------- */
.tarjeta-formulario {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(16, 40, 56, .06);
}

@media (max-width: 575.98px) {
    .tarjeta-formulario { padding: 1.25rem; }
}

.form-label {
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: .35rem;
}

.form-control,
.form-select {
    padding: .7rem .9rem;
    border-color: #dfe3e8;
    border-radius: .55rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--marca-principal, #1b5c6e);
    box-shadow: 0 0 0 .2rem rgba(27, 92, 110, .15);
}

.form-control::placeholder { color: #aab4bd; }

.bloque-vpp {
    background: var(--marca-claro, #e8f1f3);
    border: 1px solid rgba(27, 92, 110, .18);
    border-radius: .75rem;
    padding: 1.1rem;
}

/* Campo trampa antibot. Se saca del flujo sin display:none ni
   visibility:hidden, que algunos bots detectan y evitan rellenar. */
.campo-trampa {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- Botón de marca ------------------------------------------------------- */
.btn-marca {
    background: var(--marca-principal, #1b5c6e);
    border: 1px solid var(--marca-principal, #1b5c6e);
    color: #fff;
    font-weight: 600;
    border-radius: .55rem;
    transition: background-color .15s ease, border-color .15s ease;
}

.btn-marca:hover:not(:disabled),
.btn-marca:focus-visible:not(:disabled) {
    background: var(--marca-oscuro, #134653);
    border-color: var(--marca-oscuro, #134653);
    color: #fff;
}

.btn-marca:disabled { opacity: .6; }

.btn-link { color: var(--marca-principal, #1b5c6e); }

.borde-marca {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(16, 40, 56, .2);
}

/* --- Casillas del código OTP --------------------------------------------- */
.otp-casillas {
    display: flex;
    justify-content: center;
    gap: .5rem;
}

.otp-casilla {
    width: 3rem;
    height: 3.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    border: 1px solid #dfe3e8;
    border-radius: .55rem;
    background: #fff;
    color: var(--marca-texto, #1f2933);
    transition: border-color .12s ease, box-shadow .12s ease;
}

.otp-casilla:focus {
    outline: none;
    border-color: var(--marca-principal, #1b5c6e);
    box-shadow: 0 0 0 .2rem rgba(27, 92, 110, .18);
}

.otp-casilla.error {
    border-color: #b42318;
    box-shadow: 0 0 0 .2rem rgba(180, 35, 24, .12);
}

@media (max-width: 400px) {
    .otp-casilla { width: 2.4rem; height: 3rem; font-size: 1.25rem; }
    .otp-casillas { gap: .35rem; }
}

/* --- Confirmación --------------------------------------------------------- */
.icono-exito {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto;
    border-radius: 50%;
    background: #e6f4ea;
    color: #1e7e46;
    font-size: 1.6rem;
}

.recuadro-expediente {
    display: grid;
    gap: .15rem;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: .75rem;
    background: #fafbfc;
}

.recuadro-expediente .etiqueta {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--marca-texto-tenue, #5b6b78);
}

.recuadro-expediente .numero {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
    color: var(--marca-principal, #1b5c6e);
}

.recuadro-expediente .valor {
    font-size: 1.05rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.recuadro-expediente .nota {
    font-size: .72rem;
    color: var(--marca-texto-tenue, #5b6b78);
}

/* Respeta la preferencia del sistema de reducir animaciones. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}
