/* ==========================================================================
   NEXTZHOP SIGNATURE - LANDING CANVAS (V49.1 - FEATHERED SOFT-BLUR EDITION)
   Ubicación: /assets/css/landing-canvas.css
   Lógica: Diseño Inmersivo, Progressive Edge Blur, Rounded UI, Inter Typography.
   ========================================================================== */

/* 🛡️ SELLO DE RENDIMIENTO NATIVO */
::-webkit-scrollbar { display: none; }
html, body { margin: 0; padding: 0; background-color: var(--hub-bg-app); color: var(--hub-text-main); scroll-behavior: smooth; }
.nz-hidden { display: none !important; }
.nz-flex { display: flex !important; }

.nz-text-stroke { -webkit-text-stroke: 1.5px var(--hub-text-main); color: transparent; }

/* ==========================================================================
   1. CHASIS PERIMETRAL (HEADER INMERSIVO FEATHERED BLUR)
   ========================================================================== */
.nz-landing-header {
    width: 100%;
    height: calc(54px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 4vw 0 4vw;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9990;
    background-color: transparent !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    pointer-events: none;
}

/* Viñeta superior imperceptible en reposo (Scroll = 0) */
.nz-landing-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -10px;
    background: linear-gradient(180deg, rgba(5, 5, 7, 0.34) 0%, rgba(5, 5, 7, 0) 100%);
    opacity: 1;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: -2;
}

.nz-landing-header.is-scrolled::after {
    opacity: 0;
}

/* Difusión degradada sin borde recto (Progressive Feather Blur) */
.nz-landing-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -14px;
    background: linear-gradient(180deg, rgba(12, 12, 16, 0.34) 0%, rgba(12, 12, 16, 0.16) 54%, rgba(12, 12, 16, 0) 100%);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.9) 56%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.9) 56%, transparent 100%);
    opacity: 0;
    transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: -1;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.nz-landing-header.is-scrolled::before {
    opacity: 1;
}

.nz-header-logo, .nz-header-actions {
    pointer-events: auto;
}

.nz-header-logo {
    display: inline-flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

.nz-header-logo img {
    width: 132px;
    height: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.25));
}

.nz-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Botón Cápsula Glassmorphism (Contraste Dual Oscuro/Claro) */
.nz-header-glass-btn {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 15px;
    min-height: 31px;
    background: rgba(15, 16, 20, 0.34);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    background-clip: padding-box;
    overflow: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    user-select: none;
    position: relative;
    z-index: 2;
}

@media (hover: hover) and (pointer: fine) {
    .nz-header-glass-btn:hover {
        background: rgba(15, 16, 20, 0.56);
        border-color: rgba(255, 255, 255, 0.36);
        color: #ffffff !important;
        transform: translateY(-1px);
    }
}

.nz-header-glass-btn:active {
    background: rgba(15, 16, 20, 0.65);
    transform: scale(0.97);
}

.nz-header-glass-btn img.nz-avatar-node {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.38);
}

@media (max-width: 768px) {
    .nz-landing-header {
        height: calc(48px + env(safe-area-inset-top));
        padding: env(safe-area-inset-top) 16px 0 16px;
    }
    .nz-landing-header::before {
        bottom: -12px;
    }
    .nz-header-logo img {
        width: 114px;
    }
    .nz-hide-mobile {
        display: none !important;
    }
    .nz-header-actions {
        gap: 6px;
    }
    .nz-header-glass-btn {
        padding: 5px 12px;
        min-height: 28px;
        font-size: 9.5px;
        letter-spacing: 0.06em;
        background: rgba(15, 16, 20, 0.38);
        border-color: rgba(255, 255, 255, 0.24);
    }
}

/* ==========================================================================
   NZ CHASSIS RECOVERY: MODAL OVERLAYS & LAYOUT TOKENS (CAPA 5)
   ========================================================================== */
.nz-paywall-overlay {
    position: fixed;
    inset: 0;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99995;
    background: rgba(5, 5, 5, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.nz-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: #050505;
    display: flex;
    flex-direction: column;
}

.nz-hub-modal-content {
    background: #0d0e12;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 24rem;
    position: relative;
    padding: 32px;
    box-sizing: border-box;
}

/* Modal Controls & Typography */
.nz-modal-close-trigger {
    position: absolute;
    top: 20px; right: 20px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none; color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; z-index: 100; transition: background 0.3s ease;
}
.nz-modal-close-trigger:hover { background: rgba(255, 255, 255, 0.2); }

.nz-auth-header-wrap { text-align: center; margin-bottom: 24px; padding-top: 10px; }
.nz-auth-title { font-family: 'Inter', sans-serif; font-weight: 300; font-size: 1.8rem; margin: 0 0 8px 0; color: #fff; letter-spacing: -0.02em; }
.nz-auth-subtitle { display: block; color: rgba(255,255,255,0.5); font-family: 'Inter', sans-serif; font-size: 13px; margin: 0; }

.nz-auth-tabs-nav { display: flex; background: rgba(255,255,255,0.05); padding: 4px; border-radius: 12px; margin-bottom: 24px; }
.nz-auth-form-stack { display: flex; flex-direction: column; gap: 12px; }
.nz-brand-input-wrap { position: relative; }
.nz-brand-status-badge { position: absolute; right: 16px; top: 16px; font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 500; }
.nz-shield-ghost { display: none !important; visibility: hidden !important; position: absolute !important; left: -9999px !important; }

.nz-auth-alt-trigger { background: transparent; border: none; color: rgba(255,255,255,0.6); width: 100%; cursor: pointer; font-family: 'Inter', sans-serif; font-size: 12px; transition: color 0.3s ease; margin-top: 12px; }
.nz-auth-alt-trigger:hover { color: #fff; }

/* Fast Login Profile Card */
.nz-fast-profile-card { text-align: center; padding: 10px 0 24px 0; }
.nz-fast-avatar-img { width: 72px; height: 72px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.1); object-fit: cover; margin-bottom: 12px; }
.nz-fast-node-name { font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 600; color: #fff; margin: 0; }
.nz-fast-pin-wrap { margin-bottom: 24px; }
.nz-fast-pin-input { text-align: center !important; font-size: 24px !important; letter-spacing: 0.5em !important; padding: 16px !important; }
.nz-fast-pin-hint { text-align: center; font-size: 11px; color: rgba(255, 255, 255, 0.4); margin-top: 10px; font-family: 'Inter', sans-serif; }

/* ==========================================================================
   NZ CHASSIS: NEO-BRUTALIST AUTH TOKENS (NEON GREEN)
   ========================================================================== */
:root {
    --nz-neon: #00FF66;
}

/* Rediseño de Pestañas (Segmented Control) */
.nz-auth-tabs-nav {
    display: flex; background: rgba(255,255,255,0.03); padding: 4px; border-radius: 12px; margin-bottom: 24px; position: relative;
}
.nz-hub-filter-tab {
    flex: 1; background: transparent; border: none; color: rgba(255,255,255,0.4); padding: 10px; font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; border-radius: 8px; position: relative;
}
.nz-hub-filter-tab.active {
    background: rgba(255,255,255,0.05); color: #fff;
}
/* Micro-indicador Neón en pestaña activa */
.nz-hub-filter-tab.active::after {
    content: ''; position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); width: 24px; height: 2px; background: var(--nz-neon); border-radius: 2px; box-shadow: 0 0 8px rgba(0, 255, 102, 0.4);
}

/* Trazado de Luz en Inputs (Focus Beam) */
.nz-auth-input-slot {
    position: relative; width: 100%;
}
.nz-auth-input {
    width: 100%; background: transparent !important; border: none !important; border-bottom: 1px solid rgba(255,255,255,0.1) !important; color: #fff !important; padding: 12px 0 !important; border-radius: 0 !important; font-family: 'Inter', sans-serif; font-size: 14px; outline: none !important; box-shadow: none !important; transition: border-color 0.3s ease;
}
.nz-auth-input::placeholder { color: rgba(255,255,255,0.3); }

/* Haz de luz inactivo (Escala X = 0) */
.nz-auth-input-slot::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--nz-neon); transform: scaleX(0); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); transform-origin: center; pointer-events: none; box-shadow: 0 0 10px rgba(0, 255, 102, 0.3);
}
/* Activación del haz mediante GPU (Escala X = 1) */
.nz-auth-input-slot:focus-within::after {
    transform: scaleX(1);
}

/* Botón CTA Mecánico */
.nz-auth-submit-btn {
    width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15); color: #fff; padding: 14px; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: all 0.3s ease; margin-top: 16px; outline: none; position: relative; overflow: hidden;
}
.nz-auth-submit-btn:hover:not([disabled]) {
    background: var(--nz-neon); color: #050505; border-color: var(--nz-neon); transform: translateY(-1px); box-shadow: 0 4px 15px rgba(0, 255, 102, 0.2);
}
.nz-auth-submit-btn[disabled] {
    opacity: 0.4; cursor: not-allowed;
}

/* ==========================================================================
   NZ CHASSIS: RECOVERY ISOLATION & CONTRAST SHIELD
   ========================================================================== */
/* Oculta las pestañas y el título general cuando la vista de recuperación está activa */
.nz-hub-modal-content:has(#view-forgot:not(.nz-hidden)) .nz-auth-tabs-nav,
.nz-hub-modal-content:has(#view-forgot:not(.nz-hidden)) #paywall-message {
    display: none !important;
}

/* Blindaje de contraste contra User-Agent stylesheets */
.nz-auth-instructions {
    color: rgba(255, 255, 255, 0.7) !important;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    text-align: center;
    margin: 0 0 24px 0 !important;
    line-height: 1.5;
}
