/* ==========================================================
 * Onboarding Wizard Styles
 * Uses variables from landing-config.css
 * ========================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body.ob-body {
    font-family: var(--lp-font-body);
    color: var(--lp-gray-900);
    background: var(--lp-off-white);
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 2rem 1rem;
    -webkit-font-smoothing: antialiased;
    position: relative; overflow-x: hidden;
}

/* Background pattern */
body.ob-body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(14,59,48,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(198,162,78,0.04) 0%, transparent 50%);
}

/* ---- Container ---- */
.ob-wrapper {
    position: relative; z-index: 1;
    width: 100%; max-width: 580px;
}

/* ---- Logo ---- */
.ob-logo {
    display: flex; align-items: center; justify-content: center;
    gap: 0.6rem; margin-bottom: 2rem;
}
.ob-logo img { height: 32px; }
.ob-logo span {
    font-family: var(--lp-font-heading); font-weight: 700;
    font-size: 1.15rem; color: var(--lp-gray-900);
}

/* ---- Progress Bar ---- */
.ob-progress {
    display: flex; align-items: center;
    gap: 0; margin-bottom: 2rem;
    padding: 0 1rem;
}
.ob-progress-step {
    display: flex; align-items: center; flex: 1;
    position: relative;
}
.ob-progress-step:last-child { flex: 0; }
.ob-progress-dot {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--lp-font-heading); font-weight: 700;
    font-size: 0.85rem; flex-shrink: 0;
    background: var(--lp-gray-100); color: var(--lp-gray-400);
    border: 2px solid var(--lp-gray-200);
    transition: all var(--lp-transition-base);
    position: relative; z-index: 1;
}
.ob-progress-step.active .ob-progress-dot {
    background: var(--lp-primary); color: var(--lp-white);
    border-color: var(--lp-primary);
    box-shadow: 0 0 0 4px rgba(14,59,48,0.15);
}
.ob-progress-step.completed .ob-progress-dot {
    background: var(--lp-primary); color: var(--lp-white);
    border-color: var(--lp-primary);
}
.ob-progress-line {
    flex: 1; height: 2px;
    background: var(--lp-gray-200);
    margin: 0 -2px;
    transition: background var(--lp-transition-base);
}
.ob-progress-step.completed .ob-progress-line {
    background: var(--lp-primary);
}

/* ---- Card ---- */
.ob-card {
    background: var(--lp-white);
    border-radius: var(--lp-radius-lg);
    border: 1px solid var(--lp-gray-100);
    box-shadow: var(--lp-shadow-md);
    padding: 2.5rem;
    position: relative; overflow: hidden;
}
.ob-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--lp-gold);
}

/* ---- Step Content ---- */
.ob-step {
    display: none;
    animation: ob-fadeIn 0.35s ease;
}
.ob-step.active { display: block; }

@keyframes ob-fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.ob-step-header {
    text-align: center; margin-bottom: 2rem;
}
.ob-step-icon {
    width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    background: rgba(14,59,48,0.08);
    color: var(--lp-primary); font-size: 1.5rem;
}
.ob-step-title {
    font-family: var(--lp-font-heading); font-weight: 800;
    font-size: 1.4rem; color: var(--lp-gray-900); margin-bottom: 0.4rem;
    text-transform: uppercase; letter-spacing: 0.02em;
}
.ob-step-desc {
    font-size: 0.92rem; color: var(--lp-gray-500);
}

/* ---- Form Elements ---- */
.ob-form-group { margin-bottom: 1.2rem; }
.ob-label {
    display: block; margin-bottom: 0.4rem;
    font-size: 0.76rem; font-weight: 700; color: var(--lp-gray-700);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.ob-label .ob-optional {
    font-weight: 500; color: var(--lp-gray-400); font-size: 0.72rem;
    text-transform: none; letter-spacing: 0;
}
.ob-input {
    width: 100%; padding: 0.7rem 1rem;
    border: 2px solid var(--lp-gray-100);
    border-radius: var(--lp-radius-sm);
    font-family: var(--lp-font-body); font-size: 0.95rem;
    color: var(--lp-gray-900); background: var(--lp-white);
    transition: all var(--lp-transition-fast);
}
.ob-input:focus {
    outline: none; border-color: var(--lp-primary);
    box-shadow: 0 0 0 3px rgba(14,59,48,0.1);
}
.ob-input::placeholder { color: var(--lp-gray-400); }
.ob-input.error { border-color: #EF4444; }
.ob-error-text {
    font-size: 0.8rem; color: #EF4444; margin-top: 0.3rem;
    display: none;
}
.ob-error-text.visible { display: block; }

.ob-select {
    width: 100%; padding: 0.7rem 1rem;
    border: 2px solid var(--lp-gray-100);
    border-radius: var(--lp-radius-sm);
    font-family: var(--lp-font-body); font-size: 0.95rem;
    color: var(--lp-gray-900); background: var(--lp-white);
    appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    transition: all var(--lp-transition-fast);
}
.ob-select:focus {
    outline: none; border-color: var(--lp-primary);
    box-shadow: 0 0 0 3px rgba(14,59,48,0.1);
}

/* Industry type cards */
.ob-industry-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem;
    margin-bottom: 1rem;
}
.ob-industry-option {
    padding: 1rem; border-radius: var(--lp-radius-md);
    border: 2px solid var(--lp-gray-100);
    cursor: pointer; text-align: center;
    transition: all var(--lp-transition-fast);
}
.ob-industry-option:hover {
    border-color: var(--lp-gray-200);
    background: var(--lp-off-white);
}
.ob-industry-option.selected {
    border-color: var(--lp-primary);
    background: rgba(14,59,48,0.04);
}
.ob-industry-option .ob-ind-icon {
    display: flex; align-items: center; justify-content: center;
    color: var(--lp-primary); margin-bottom: 0.5rem;
}
.ob-industry-option.selected .ob-ind-icon { color: var(--lp-primary); }
.ob-industry-option .ob-ind-label {
    font-size: 0.76rem; font-weight: 700; color: var(--lp-gray-700);
    text-transform: uppercase; letter-spacing: 0.04em;
}

/* Row layout */
.ob-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}

/* ---- Buttons ---- */
.ob-actions {
    display: flex; gap: 1rem; margin-top: 2rem;
}
.ob-btn {
    flex: 1; padding: 0.8rem 1.5rem;
    border-radius: var(--lp-radius-full);
    font-family: var(--lp-font-body);
    font-weight: 600; font-size: 0.95rem;
    text-align: center;
    transition: all var(--lp-transition-fast);
    cursor: pointer; border: none;
}
.ob-btn-primary {
    background: var(--lp-gold); color: var(--lp-gold-ink);
    box-shadow: 0 2px 12px var(--lp-gold-glow);
    text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
}
.ob-btn-primary:hover {
    background: var(--lp-gold-soft);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--lp-gold-glow);
}
.ob-btn-primary:disabled {
    opacity: 0.6; cursor: not-allowed; transform: none;
}
.ob-btn-secondary {
    background: transparent; color: var(--lp-gray-600);
    border: 2px solid var(--lp-gray-200);
    text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
}
.ob-btn-secondary:hover {
    border-color: var(--lp-gray-300); color: var(--lp-gray-700);
}
.ob-btn-skip {
    background: transparent; color: var(--lp-gray-400);
    font-size: 0.85rem; font-weight: 500;
    border: none; padding: 0.6rem 1rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.ob-btn-skip:hover { color: var(--lp-gray-600); }

/* ---- Captcha ---- */
.ob-captcha-row {
    display: flex; align-items: center; gap: 0.8rem;
    margin-top: 0.5rem;
    padding: 0.8rem 1rem; border-radius: var(--lp-radius-sm);
    background: var(--lp-off-white); border: 1px solid var(--lp-gray-100);
}
.ob-captcha-label {
    font-size: 0.88rem; font-weight: 600; color: var(--lp-gray-700);
    white-space: nowrap;
}
.ob-captcha-input {
    width: 70px; text-align: center;
}

/* ---- Loading Overlay ---- */
.ob-loading {
    display: none; position: absolute; inset: 0;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    z-index: 10; border-radius: var(--lp-radius-lg);
    align-items: center; justify-content: center;
    flex-direction: column; gap: 1rem;
}
.ob-loading.active { display: flex; }
.ob-spinner {
    width: 36px; height: 36px; border-radius: 50%;
    border: 3px solid var(--lp-gray-200);
    border-top-color: var(--lp-primary);
    animation: ob-spin 0.7s linear infinite;
}
@keyframes ob-spin { to { transform: rotate(360deg); } }
.ob-loading-text {
    font-size: 0.9rem; color: var(--lp-gray-500); font-weight: 500;
}

/* ---- Footer link ---- */
.ob-footer {
    text-align: center; margin-top: 1.5rem;
    font-size: 0.88rem; color: var(--lp-gray-400);
}
.ob-footer a {
    color: var(--lp-primary); font-weight: 600;
    text-decoration: none;
}
.ob-footer a:hover { text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
    body.ob-body { padding: 1.5rem 1rem; }
    .ob-card { padding: 1.5rem; }
    .ob-progress-dot { width: 30px; height: 30px; font-size: 0.75rem; }
    .ob-industry-grid { grid-template-columns: 1fr; }
    .ob-row { grid-template-columns: 1fr; }
    .ob-actions { flex-direction: column; }
}

/* ==========================================================
 * TEMA H2U — "Claridad líquida", dirección B
 * ==========================================================
 * Actúa solo bajo `body.lp-theme-h2u`. Quitar la clase del <body>
 * devuelve el asistente a la paleta Caja Fuerte.
 *
 * El resto del archivo ya lee de los tokens --lp-*, que vienen
 * retematizados desde landing-config.css. Aquí van los valores que
 * estaban quemados —los lavados verde y oro del fondo, el anillo de
 * foco, el rojo de error— y el paso a campo profundo, para que el
 * registro se sienta la misma superficie que /login.
 * ========================================================== */

body.lp-theme-h2u.ob-body {
    color: var(--ink);
    background-color: #002855;
    background-image:
        radial-gradient(38rem 30rem at 18% 12%, rgba(8,164,244,.50), transparent 60%),
        radial-gradient(30rem 26rem at 88% 8%, rgba(8,132,208,.42), transparent 55%),
        radial-gradient(34rem 30rem at 70% 110%, rgba(8,28,140,.55), transparent 60%),
        linear-gradient(160deg, #04305f 0%, #002855 45%, #001a3a 100%);
    background-attachment: fixed;
    font-feature-settings: 'ss01', 'cv01';
}
/* Los dos lavados del fondo original eran verde y oro. Se sustituyen por
   el grano en mezcla overlay del campo profundo. */
body.lp-theme-h2u.ob-body::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
    opacity: .5;
    mix-blend-mode: overlay;
}

/* ---- Marca sobre el campo profundo ---- */
/* El <img> declara width="1000" como pista de presentacion: sin width:auto
   la altura CSS no basta y el logo sale estirado. */
body.lp-theme-h2u .ob-logo img { filter: brightness(0) invert(1); height: 30px; width: auto; }
body.lp-theme-h2u .ob-logo span { color: #fff; }

/* ---- Progreso: sobre navy el aqua es el que avanza ---- */
body.lp-theme-h2u .ob-progress-dot {
    font-family: var(--lp-font-mono);
    font-variant-numeric: tabular-nums;
    background: rgba(255,255,255,.10);
    color: rgba(255,255,255,.55);
    border: 0;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
body.lp-theme-h2u .ob-progress-step.active .ob-progress-dot {
    background: var(--aqua-500); color: #fff;
    box-shadow: 0 0 0 4px rgba(8,164,244,.25);
}
body.lp-theme-h2u .ob-progress-step.completed .ob-progress-dot {
    background: var(--aqua-600); color: #fff; box-shadow: none;
}
body.lp-theme-h2u .ob-progress-line { background: rgba(255,255,255,.16); }
body.lp-theme-h2u .ob-progress-step.completed .ob-progress-line { background: var(--aqua-600); }

/* ---- Tarjeta: blanca sobre el campo, con anillo en vez de borde ---- */
body.lp-theme-h2u .ob-card {
    background: #fff;
    border: 0;
    border-radius: var(--lp-radius-xl);
    box-shadow: 0 40px 90px -40px rgba(0,10,30,.9), inset 0 0 0 1px rgba(255,255,255,.10);
}
/* El filete superior era oro; sobre una tarjeta clara el acento es aqua. */
body.lp-theme-h2u .ob-card::before {
    height: 3px;
    background: linear-gradient(90deg, var(--aqua-500), var(--aqua-300));
}
body.lp-theme-h2u .ob-step-icon {
    background: var(--aqua-50);
    color: var(--aqua-600);
    box-shadow: inset 0 0 0 1px var(--aqua-100);
}
body.lp-theme-h2u .ob-step-title { letter-spacing: -0.028em; text-transform: none; }

/* ---- Campos: anillo y resplandor aqua ---- */
body.lp-theme-h2u .ob-input,
body.lp-theme-h2u .ob-select {
    border: 0;
    border-radius: var(--lp-radius-md);
    box-shadow: inset 0 0 0 1px var(--line-cool);
    background: #fff;
}
body.lp-theme-h2u .ob-input:focus,
body.lp-theme-h2u .ob-select:focus {
    box-shadow: inset 0 0 0 2px var(--aqua-500), var(--lp-shadow-glow);
}
body.lp-theme-h2u .ob-input.error { box-shadow: inset 0 0 0 2px var(--danger); }
body.lp-theme-h2u .ob-error-text { color: var(--danger); }
/* La flecha del select venía en gris pizarra; el sistema no tiene grises neutros. */
body.lp-theme-h2u .ob-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235d7088' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

/* ---- Tarjetas de giro ---- */
body.lp-theme-h2u .ob-industry-option {
    border: 0;
    box-shadow: inset 0 0 0 1px var(--line-cool);
}
body.lp-theme-h2u .ob-industry-option:hover {
    background: var(--mist);
    box-shadow: inset 0 0 0 1px var(--aqua-200);
}
body.lp-theme-h2u .ob-industry-option.selected {
    background: var(--aqua-50);
    box-shadow: inset 0 0 0 2px var(--aqua-500);
}
body.lp-theme-h2u .ob-industry-option .ob-ind-icon { color: var(--aqua-600); }

/* ---- Botones: el oro se queda como acción de alta prioridad ---- */
body.lp-theme-h2u .ob-btn { min-height: 44px; }
body.lp-theme-h2u .ob-btn-primary { box-shadow: 0 14px 36px -16px var(--lp-gold-glow); }
body.lp-theme-h2u .ob-btn-secondary {
    border: 0;
    color: var(--navy-900);
    box-shadow: inset 0 0 0 1px rgba(0,40,85,.15);
}
body.lp-theme-h2u .ob-btn-secondary:hover {
    color: var(--aqua-700);
    background: var(--aqua-50);
    box-shadow: inset 0 0 0 1px var(--aqua-500);
}

body.lp-theme-h2u a:focus-visible,
body.lp-theme-h2u button:focus-visible,
body.lp-theme-h2u .ob-input:focus-visible {
    outline: 2px solid var(--aqua-500);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    body.lp-theme-h2u, body.lp-theme-h2u * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ---- Pie: sobre el campo profundo ---- */
body.lp-theme-h2u .ob-footer { color: rgba(255,255,255,.62); }
body.lp-theme-h2u .ob-footer a { color: var(--aqua-300); font-weight: 600; }
body.lp-theme-h2u .ob-footer a:hover { color: #fff; }
