/*
 * Mi Formulario WP — Estilos Principales
 * Versión: 1.0.0
 *
 * Paleta de colores y tokens de diseño definidos en :root
 * para facilitar la personalización futura.
 */

/* =========================================================
   1. TOKENS DE DISEÑO (variables CSS)
   ========================================================= */
:root {
    /* Paleta principal */
    --mfw-azul:       #1a56db;
    --mfw-azul-hover: #1648c0;
    --mfw-azul-claro: #e8f0fe;
    --mfw-oscuro:     #0f172a;
    --mfw-gris:       #64748b;
    --mfw-gris-claro: #f1f5f9;
    --mfw-blanco:     #ffffff;
    --mfw-verde:      #16a34a;
    --mfw-verde-claro:#dcfce7;
    --mfw-rojo:       #dc2626;
    --mfw-rojo-claro: #fee2e2;

    /* Tipografía */
    --mfw-font:    'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --mfw-radius:  16px;
    --mfw-shadow:  0 4px 24px rgba(15, 23, 42, 0.08);
    --mfw-shadow-hover: 0 8px 40px rgba(26, 86, 219, 0.15);

    /* Transiciones */
    --mfw-trans: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================
   2. RESET Y BASE
   ========================================================= */
.mfw-wrapper *,
.mfw-wrapper *::before,
.mfw-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.mfw-wrapper {
    font-family: var(--mfw-font);
    color: var(--mfw-oscuro);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* =========================================================
   3. ANIMACIONES
   ========================================================= */
@keyframes mfw-fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes mfw-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.15); opacity: 0.7; }
}

@keyframes mfw-floatShape {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-20px) rotate(8deg); }
}

.mfw-animate-up {
    animation: mfw-fadeUp 0.55s ease both;
    animation-delay: var(--delay, 0s);
}

/* =========================================================
   4. HERO / BIENVENIDA
   ========================================================= */
.mfw-hero {
    position: relative;
    overflow: hidden;
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 80px 24px 60px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f1f47 100%);
}

/* Formas decorativas de fondo */
.mfw-hero__bg-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.mfw-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
}
.mfw-shape--1 {
    width: 520px; height: 520px;
    background: var(--mfw-azul);
    top: -180px; right: -160px;
    animation: mfw-floatShape 8s ease-in-out infinite;
}
.mfw-shape--2 {
    width: 320px; height: 320px;
    background: #6366f1;
    bottom: -120px; left: -100px;
    animation: mfw-floatShape 10s ease-in-out infinite reverse;
}
.mfw-shape--3 {
    width: 160px; height: 160px;
    background: #22d3ee;
    top: 40%; left: 60%;
    animation: mfw-floatShape 6s ease-in-out infinite 2s;
}

/* Contenido central del hero */
.mfw-hero__content {
    position: relative;
    text-align: center;
    max-width: 680px;
    animation: mfw-fadeUp 0.7s ease both;
}

/* Insignia / Badge */
.mfw-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 28px;
    backdrop-filter: blur(8px);
}

.mfw-badge-dot {
    width: 8px; height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: mfw-pulse 2s ease-in-out infinite;
}

/* Título principal */
.mfw-hero__title {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 800;
    color: var(--mfw-blanco);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.mfw-hero__title--accent {
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtítulo */
.mfw-hero__subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.7);
    max-width: 520px;
    margin: 0 auto 40px;
}

/* =========================================================
   5. BOTONES
   ========================================================= */
.mfw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--mfw-font);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    padding: 14px 32px;
    transition: all var(--mfw-trans);
    white-space: nowrap;
}

.mfw-btn--primary {
    background: var(--mfw-azul);
    color: var(--mfw-blanco);
    box-shadow: 0 4px 20px rgba(26, 86, 219, 0.35);
}

.mfw-btn--primary:hover,
.mfw-btn--primary:focus-visible {
    background: var(--mfw-azul-hover);
    box-shadow: 0 6px 28px rgba(26, 86, 219, 0.5);
    transform: translateY(-2px);
    color: var(--mfw-blanco);
    text-decoration: none;
}

.mfw-btn--primary:active { transform: translateY(0); }

.mfw-btn--full { width: 100%; }

/* =========================================================
   6. TARJETAS DE CARACTERÍSTICAS
   ========================================================= */
.mfw-features {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 820px;
}

.mfw-feature-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    border-radius: var(--mfw-radius);
    padding: 28px 24px;
    text-align: center;
    color: var(--mfw-blanco);
    transition: all var(--mfw-trans);
}

.mfw-feature-card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.2);
}

.mfw-feature-card__icon {
    width: 52px; height: 52px;
    background: var(--mfw-azul);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #fff;
}

.mfw-feature-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.mfw-feature-card__text {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.5;
}

/* =========================================================
   7. SECCIÓN DEL FORMULARIO
   ========================================================= */
.mfw-form-section {
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 80px 24px 60px;
    background: var(--mfw-gris-claro);
}

/* Cabecera del formulario */
.mfw-form-header {
    width: 100%;
    max-width: 520px;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
}

.mfw-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--mfw-gris);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--mfw-trans);
}

.mfw-back-link:hover { color: var(--mfw-azul); text-decoration: none; }

.mfw-form-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--mfw-oscuro);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.mfw-form-subtitle {
    font-size: 1rem;
    color: var(--mfw-gris);
}

/* Tarjeta del formulario */
.mfw-form-card {
    width: 100%;
    max-width: 520px;
    background: var(--mfw-blanco);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: var(--mfw-shadow);
    border: 1px solid rgba(0,0,0,0.05);
}

/* =========================================================
   8. CAMPOS DEL FORMULARIO
   ========================================================= */
.mfw-form { display: flex; flex-direction: column; gap: 24px; }

.mfw-field { display: flex; flex-direction: column; gap: 8px; }

.mfw-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mfw-oscuro);
}

.mfw-required { color: var(--mfw-rojo); margin-left: 3px; }

.mfw-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.mfw-input-icon {
    position: absolute;
    left: 14px;
    color: var(--mfw-gris);
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: color var(--mfw-trans);
}

.mfw-input {
    width: 100%;
    padding: 13px 16px 13px 46px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: var(--mfw-font);
    font-size: 1rem;
    color: var(--mfw-oscuro);
    background: var(--mfw-blanco);
    outline: none;
    transition: all var(--mfw-trans);
    -webkit-appearance: none;
}

.mfw-input::placeholder { color: #94a3b8; }

.mfw-input:focus {
    border-color: var(--mfw-azul);
    box-shadow: 0 0 0 3px var(--mfw-azul-claro);
}

.mfw-input:focus + .mfw-input-icon,
.mfw-input-wrapper:focus-within .mfw-input-icon {
    color: var(--mfw-azul);
}

/* Estado de error en el campo */
.mfw-field--error .mfw-input {
    border-color: var(--mfw-rojo);
    box-shadow: 0 0 0 3px var(--mfw-rojo-claro);
}

.mfw-field--error .mfw-input-icon { color: var(--mfw-rojo); }

/* Estado de éxito en el campo */
.mfw-field--ok .mfw-input {
    border-color: var(--mfw-verde);
    box-shadow: 0 0 0 3px var(--mfw-verde-claro);
}

/* Mensajes de error de campo */
.mfw-field-error {
    font-size: 0.82rem;
    color: var(--mfw-rojo);
    font-weight: 500;
    min-height: 1em;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =========================================================
   9. SPINNER Y BOTÓN DE ENVÍO
   ========================================================= */
.mfw-btn__spinner {
    width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mfw-spin 0.65s linear infinite;
}

.mfw-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none !important;
}

/* =========================================================
   10. MENSAJE DE RESULTADO GLOBAL
   ========================================================= */
.mfw-mensaje {
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: mfw-fadeUp 0.35s ease both;
}

.mfw-mensaje--ok {
    background: var(--mfw-verde-claro);
    color: #166534;
    border: 1px solid #bbf7d0;
}

.mfw-mensaje--error {
    background: var(--mfw-rojo-claro);
    color: #7f1d1d;
    border: 1px solid #fecaca;
}

/* Nota de privacidad */
.mfw-form-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--mfw-gris);
    text-align: center;
}

/* =========================================================
   11. RESPONSIVE — MÓVILES
   ========================================================= */
@media (max-width: 600px) {
    .mfw-hero     { padding: 60px 16px 48px; gap: 40px; }
    .mfw-features { grid-template-columns: 1fr; }

    .mfw-form-section { padding: 48px 16px 40px; }
    .mfw-form-card    { padding: 28px 20px; border-radius: 16px; }

    .mfw-btn { padding: 13px 24px; }
}
