:root {
    color-scheme: dark;
    --primary-color: #ffcc00;
    --primary-hover: #e6b800;
    --bg-color: #050505;
    --surface-color: rgba(18, 18, 18, 0.85);
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --border-color: rgba(255, 204, 0, 0.2);
    --input-bg: rgba(0, 0, 0, 0.6);
    --input-focus-bg: #111111;
    --error-color: #ef4444;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 15px;
    overflow-x: hidden;
    position: relative;
    overscroll-behavior-y: none;
}

/* --- Block: promo-bg (Background Animations) --- */
.promo-bg {
    position: fixed;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    top: 0; left: 0;
}

.promo-bg__shape {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
}

.promo-bg__shape--primary {
    width: 300px; height: 300px;
    background: rgba(255, 204, 0, 0.15);
    top: -50px; left: -50px;
}

.promo-bg__shape--secondary {
    width: 400px; height: 400px;
    background: rgba(255, 255, 255, 0.05);
    bottom: -100px; right: -50px;
    animation-delay: -5s;
}

.promo-bg__shape--accent {
    width: 250px; height: 250px;
    background: rgba(255, 204, 0, 0.1);
    top: 40%; left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 40px) scale(1.1); }
}

/* --- Block: lead-form (Form Container - Ultra Premium) --- */
.lead-form {
    background: linear-gradient(145deg, rgba(22, 22, 22, 0.95) 0%, rgba(8, 8, 8, 0.98) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 204, 0, 0.15);
    border-radius: 24px;
    padding: 45px 30px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255,204,0,0.1);
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

/* Barra dorada animada en el tope */
.lead-form::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, #ffcc00, #fff2a8, #ffcc00);
    background-size: 200% auto;
    animation: shineLine 3s linear infinite;
}

@keyframes shineLine {
    to { background-position: 200% center; }
}

@keyframes slideUp { to { transform: translateY(0); opacity: 1; } }

.lead-form__header { 
    text-align: center; 
    margin-bottom: 35px; 
}

.lead-form__logo {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%; /* Totalmente circular */
    margin: 0 auto 16px auto; /* display: block centrado perfecto */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    display: block; /* Fuerza a romper la línea para no chocar con la etiqueta */
    border: 2px solid rgba(255, 204, 0, 0.2); /* Toque premium */
}

.lead-form__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 204, 0, 0.1);
    color: #ffcc00;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
    font-size: 11px;
    border: 1px solid rgba(255, 204, 0, 0.3);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.lead-form__badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -150%; }
    20% { left: 150%; }
    100% { left: 150%; }
}

.lead-form__title {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 10px;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #d4d4d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.lead-form__subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.lead-form__subtitle strong {
    color: #ffcc00;
}

/* Animación de entrada en cascada */
.lead-form__field, .lead-form__radio-group, .lead-form__checkbox-group, .lead-form__submit {
    opacity: 0;
    transform: translateY(15px);
    animation: fadeUpField 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.lead-form__field:nth-child(1) { animation-delay: 0.2s; }
.lead-form__field:nth-child(2) { animation-delay: 0.3s; }
.lead-form__radio-group { animation-delay: 0.4s; }
.lead-form__checkbox-group { animation-delay: 0.5s; }
.lead-form__submit { animation-delay: 0.6s; }

@keyframes fadeUpField {
    to { opacity: 1; transform: translateY(0); }
}

/* Inputs */
.lead-form__field {
    position: relative;
    margin-bottom: 24px;
}

.lead-form__input {
    width: 100%;
    padding: 16px;
    padding-left: 48px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 16px; 
    outline: none;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

/* Teléfono (Selector de País) */
.lead-form__field--phone {
}

.lead-form__prefix-select {
    position: absolute;
    left: 42px;
    top: 26px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
    z-index: 10;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.lead-form__prefix-select:hover, .lead-form__prefix-select:focus {
    background: rgba(255, 255, 255, 0.1);
}

.lead-form__prefix-select option {
    background-color: var(--bg-color);
    color: var(--text-primary);
}

.lead-form__field--phone .lead-form__input {
    padding-left: 110px; 
}

/* Etiquetas flotantes para inputs de texto */
.lead-form__label {
    position: absolute;
    left: 48px; 
    top: 26px;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lead-form__field--phone .lead-form__label {
    left: 110px;
}

.lead-form__required {
    color: var(--primary-color);
    font-weight: 800;
    margin-left: 2px;
}

.lead-form__input:focus,
.lead-form__input:not(:placeholder-shown) {
    border-color: var(--primary-color);
    background: var(--input-focus-bg);
    box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.15);
}

.lead-form__input:focus + .lead-form__label,
.lead-form__input:not(:placeholder-shown) + .lead-form__label {
    top: 0px;
    left: 12px !important;
    font-size: 12px;
    padding: 0 6px;
    background: var(--input-focus-bg);
    color: var(--primary-color);
    border-radius: 4px;
}

/* Estilos de Iconos SVGs */
.lead-form__icon {
    position: absolute;
    left: 16px;
    top: 26px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    pointer-events: none;
    z-index: 10;
    transition: color 0.3s ease;
}

.lead-form__field:focus-within .lead-form__icon {
    color: var(--primary-color);
}

/* --- Radio Group (Mobility) --- */
.lead-form__radio-group {
    margin-bottom: 24px;
}

.lead-form__radio-title {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 12px;
}

.lead-form__radio-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lead-form__radio-btn {
    cursor: pointer;
    position: relative;
}

.lead-form__radio-btn input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.lead-form__radio-box {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 16px;
    text-align: left;
    padding-left: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.lead-form__radio-box:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lead-form__radio-box:active {
    transform: translateY(1px) scale(0.98);
}

.lead-form__radio-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.lead-form__radio-btn input:checked ~ .lead-form__radio-box .lead-form__radio-icon {
    color: var(--primary-color);
}

.lead-form__radio-btn input:checked ~ .lead-form__radio-box {
    background: rgba(255, 204, 0, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: inset 0 0 0 1px var(--primary-color);
}

/* --- Checkbox Group --- */
.lead-form__checkbox-group {
    margin-bottom: 24px;
}

.lead-form__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.lead-form__checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.lead-form__checkbox-box {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.lead-form__checkbox-box svg {
    width: 14px;
    height: 14px;
    color: #000;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lead-form__checkbox-input:checked ~ .lead-form__checkbox-box {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.lead-form__checkbox-input:checked ~ .lead-form__checkbox-box svg {
    opacity: 1;
    transform: scale(1);
}

.lead-form__checkbox-text {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.lead-form__checkbox-text a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: rgba(255,204,0,0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}

.lead-form__checkbox-text a:hover {
    text-decoration-color: var(--primary-color);
}

/* --- Mensajes de Error (Validación) --- */
.lead-form__error-msg {
    display: none;
    color: var(--error-color);
    font-size: 13px;
    margin-top: 8px;
    margin-left: 12px;
    font-weight: 500;
    animation: fadeUpField 0.3s ease forwards;
}

.has-error .lead-form__error-msg {
    display: block;
}

.has-error .lead-form__input,
.has-error .lead-form__radio-btn .lead-form__radio-box,
.has-error .lead-form__checkbox-box {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3) !important;
    background: rgba(239, 68, 68, 0.05);
}

.has-error .lead-form__radio-title {
    color: var(--error-color);
}

/* Fallback para inputs nativos (opcional) */
.lead-form__input:invalid:not(:placeholder-shown) {
    border-color: var(--error-color);
}

/* Botón Premium Ultra */
.lead-form__submit {
    width: 100%;
    padding: 16px;
    background-color: var(--primary-color);
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.lead-form__submit:hover {
    background-color: #e6b800;
    box-shadow: 0 6px 24px rgba(255, 204, 0, 0.4);
    transform: translateY(-2px);
}

.lead-form__submit:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 10px rgba(255, 204, 0, 0.3);
}

.lead-form__submit::after {
    content: '';
    position: absolute;
    top: -50%; left: -60%;
    width: 20%; height: 200%;
    background: rgba(255, 255, 255, 0.5);
    transform: rotate(30deg);
    animation: buttonShine 4s infinite cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes buttonShine {
    0% { left: -60%; }
    20% { left: 150%; }
    100% { left: 150%; }
}

.lead-form__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 204, 0, 0.4);
}

.lead-form__submit:active {
    transform: scale(0.98);
}

.lead-form__spinner {
    width: 22px; height: 22px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.lead-form__submit:disabled svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Modal de Términos --- */
.lead-form__modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lead-form__modal-overlay.active {
    display: flex;
    opacity: 1;
}

.lead-form__modal-content {
    background: #111;
    border: 1px solid rgba(255, 204, 0, 0.2);
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    max-height: 85vh;
    padding: 24px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.lead-form__modal-overlay.active .lead-form__modal-content {
    transform: translateY(0);
}

.lead-form__modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 28px;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.lead-form__modal-close:hover {
    color: var(--primary-color);
}

.lead-form__modal-body {
    overflow-y: auto;
    padding-right: 10px;
}

/* Scrollbar personalizada para el modal */
.lead-form__modal-body::-webkit-scrollbar {
    width: 6px;
}
.lead-form__modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}
.lead-form__modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.lead-form__modal-body h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 20px;
    text-align: center;
    font-family: 'Outfit', sans-serif;
}

.lead-form__modal-body h3 {
    color: var(--primary-color);
    font-size: 15px;
    margin-top: 20px;
    margin-bottom: 8px;
}

.lead-form__modal-body p, 
.lead-form__modal-body li {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.lead-form__modal-body ul {
    padding-left: 20px;
    margin-bottom: 10px;
}

/* --- Vistas de Éxito y Error --- */
.lead-form__success-view {
    text-align: center;
    padding: 20px;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #10b981;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    margin: 0 auto;
    box-shadow: inset 0px 0px 0px #10b981;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes fill {
    100% { box-shadow: inset 0px 0px 0px 40px #10b981; }
}

.success-title {
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
    font-family: 'Outfit', sans-serif;
}

.success-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 30px;
}

.success-logo img {
    box-shadow: 0 0 25px rgba(255, 204, 0, 0.4);
    border: 2px solid rgba(255, 204, 0, 0.5);
}

/* Animación de error en el botón */
.btn-error {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    background-color: #ef4444 !important;
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4) !important;
    color: #fff !important;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Botón de Instagram */
.btn-instagram {
    width: 100%;
    padding: 16px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.3);
    white-space: nowrap;
}

.btn-instagram:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 39, 67, 0.5);
}

