:root {
    --habitat-red:      #BF0C25;
    --habitat-red-dark: #C8102E;
    --habitat-black:    #2D2926;
    --habitat-gray:     #E6E6E6;
    --white:            #FFFFFF;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--habitat-black);
    line-height: 1.6;
    background-color: var(--white);
    min-height: 100dvh;
}

.cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 5%;
    background: var(--white);
    border-bottom: 2px solid var(--habitat-gray);
    position: relative;
    z-index: 10;
}

.cabecera a {
    text-decoration: none;
    display: inline-block;
}

.logotipo { height: 60px; transition: height 0.3s; }

.insignia-promo {
    background: var(--habitat-red);
    color: var(--white);
    padding: 8px 24px;
    font-weight: bold;
    border-radius: 50px;
    animation: pulso 4s infinite;
    text-decoration: none;
    font-size: 14px;
    text-align: center;
}

.contenedor-promo {
    position: relative;
    min-height: 70vh;
    background: url('/images/fondo.png') center center / cover no-repeat;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 5%;
    text-align: center;
}

.contenedor-promo::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    z-index: 1;
}

.imagen-texto-promo {
    position: relative;
    z-index: 2;
    width: 100%;
    height: auto;
    max-width: 800px;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.3));
    user-select: none;
}

.acciones-hero {
    position: relative;
    z-index: 2;
    margin-top: 20px;
}

.btn-accion {
    display: inline-block;
    background: var(--habitat-red);
    color: var(--white);
    padding: 19px 45px;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(191, 12, 37, 0.4);
    transition: transform 0.2s, background 0.2s;
}

.btn-accion:hover {
    background: var(--habitat-red-dark);
    transform: scale(1.05);
}

.seccion-pasos {
    padding: 64px 5%;
    background: var(--habitat-gray);
    text-align: center;
}

.contenedor-pasos, .cuadricula-pasos {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.cuadricula-pasos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.paso, .tarjeta-paso {
    background: var(--white);
    padding: 24px;
    border-radius: 10px;
    width: 100%;
    max-width: 250px;
    text-align: center;
    transition: all 0.3s ease;
    animation: olaPasos 3s ease-in-out infinite;
    text-decoration: none;
    color: inherit;
    display: block;
}

.tarjeta-paso {
    border: 2px solid var(--habitat-red-dark);
}

.paso span, .numero-paso {
    display: block;
    font-size: 32px;
    font-weight: bold;
    color: var(--habitat-red);
}

.paso p, .tarjeta-paso p { margin: 8px 0 0; }

.paso.destacado, .tarjeta-paso.activo {
    background: var(--habitat-red);
    color: var(--white);
    border: none;
    animation: brilloLatente 4s infinite;
}

.paso.destacado span, .tarjeta-paso.activo .numero-paso { color: var(--white); }

.paso:nth-child(1), .tarjeta-paso:nth-child(1) { animation-delay: 0s; }
.paso:nth-child(2), .tarjeta-paso:nth-child(2) { animation-delay: 0.2s; }
.paso:nth-child(3), .tarjeta-paso:nth-child(3) { animation-delay: 0.4s; }
.paso:nth-child(4), .tarjeta-paso:nth-child(4) { animation-delay: 0.6s; }

.cabecera-formulario {
    padding: 48px 24px;
    text-align: center;
}

.titulo-cabecera {
    color: var(--habitat-red);
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.subtitulo-cabecera {
    font-size: 20px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contenedor {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 16px;
}

.formulario-promo {
    background-color: var(--habitat-gray);
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.titulo-seccion {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    border-bottom: 2px solid #ccc;
    padding-bottom: 8px;
    text-transform: uppercase;
}

.cuadricula-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.campo-texto {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.campo-texto:focus {
    outline: none;
    border-color: var(--habitat-red);
    box-shadow: 0 0 0 3px rgba(191, 12, 37, 0.12);
}

.ancho-total { grid-column: span 2; }

.seccion-legal {
    margin-bottom: 32px;
    font-size: 14px;
}

.grupo-opcion {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
}

.grupo-opcion input[type="checkbox"] {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    accent-color: var(--habitat-red);
}

.btn-enviar {
    width: 100%;
    background-color: var(--habitat-red);
    color: var(--white);
    font-weight: 700;
    padding: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.btn-enviar:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.errores-validacion {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fc8181;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    font-size: 14px;
}

.seccion-bases {
    margin-top: 48px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 32px;
    font-size: 14px;
    line-height: 1.8;
    color: #444;
}

.seccion-bases h3 {
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--habitat-red);
    border-bottom: 2px solid var(--habitat-red);
    padding-bottom: 8px;
    margin-bottom: 24px;
}

.seccion-bases h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--habitat-black);
    margin: 20px 0 6px;
}

.nota-pie {
    text-align: center;
    margin-top: 24px;
    color: #718096;
    font-size: 12px;
    font-style: italic;
}

.pie-pagina {
    background-color: var(--habitat-black);
    color: #b0a9a6;
    padding: 60px 5% 32px;
}

.interior-pie {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}

.pie-columna-logo { display: flex; flex-direction: column; gap: 12px; }
.pie-columna-contacto { display: column; gap: 8px; }

.pie-icono {
    width: 16px;
    height: 16px;
    color: var(--habitat-red);
}

.pie-dato-contacto {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #8a8380;
    margin: 0 0 8px;
}

.pie-dato-contacto a {
    color: #8a8380;
    text-decoration: none;
}

.logotipo-pie {
    max-width: 180px;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    margin: 0 auto;
    display: block;
}

.separador-pie {
    width: 60px;
    height: 2px;
    background: var(--habitat-red);
    border: none;
    margin: 4px auto;
}

.pie-barra-inferior {
    max-width: 1000px;
    margin: 32px auto 0;
    border-top: 1px solid #3a3330;
    padding-top: 20px;
    text-align: center;
}

.copyright { font-size: 12px; color: #6b6460; }

@keyframes pulso {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes olaPasos {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes reboteSuave {
    0%, 100% { transform: translateY(-1px); }
    50% { transform: translateY(8px); }
}

@keyframes brilloLatente {
    0%, 100% { box-shadow: 0 0 0 0 rgba(191, 12, 37, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(191, 12, 37, 0); }
}

.paso:hover, .tarjeta-paso:hover {
    transform: translateY(-15px) !important;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

a.contenedor-indicador {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 40px auto;
    font-weight: 900;
    color: var(--habitat-red);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 26px;
    transition: transform 0.3s ease;
}

a.contenedor-indicador:hover {
    transform: scale(1.1);
}

.flecha-alineada {
    width: 36px;
    height: 36px;
    color: var(--habitat-red);
    animation: reboteSuave 2s infinite;
}

.seccion-ayuda {
    padding: 60px 5%;
    background-color: var(--white);
    text-align: center;
    border-top: 1px solid var(--habitat-gray);
}

.contenedor-ayuda {
    max-width: 800px;
    margin: 0 auto;
}

.texto-llamada {
    font-size: 22px;
    color: var(--habitat-black);
    font-weight: 300;
}

.enlace-destacado {
    color: var(--habitat-red);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    padding: 0 4px;
}

.enlace-destacado:hover {
    color: var(--habitat-red-dark);
    border-bottom-color: var(--habitat-red);
    background-color: rgba(191, 12, 37, 0.05);
}

@media (max-width: 768px) {
    .cuadricula-form { grid-template-columns: 1fr; }
    .ancho-total { grid-column: span 1; }
    .contenedor-promo { min-height: 50vh; background-attachment: scroll; }
    .titulo-cabecera { font-size: 28px; }
    .texto-llamada { font-size: 18px; line-height: 1.8; }
    a.contenedor-indicador { font-size: 20px; }
    .flecha-alineada { width: 28px; height: 28px; }
}

@media (max-width: 640px) {
    .cabecera { flex-direction: column; gap: 16px; text-align: center; }
    .interior-pie { grid-template-columns: 1fr; text-align: center; }
    .pie-dato-contacto { justify-content: center; }
}