/* ========================================
   SmartProcess AI · Tarjeta Digital — v3
   ======================================== */

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

:root {
    --turquesa-spai: #00D4FF;
    --verde-quantum: #00B686;
    --whatsapp: #25D366;
    --azul-vortex: #001F3F;
    --gris-nube: #F4F9FA;
    --gris-operativo: #B8C5CC;
    --coral-insight: #FF7C6B;
    --gradient-spai: linear-gradient(135deg, #00D4FF 0%, #00B686 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

html, body {
    min-height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, #001F3F 0%, #001529 100%);
    color: var(--gris-nube);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

#neural-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.35;
}

.logo-watermark {
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    opacity: 0.08;
    pointer-events: none;
}
.logo-watermark img { width: 460px; height: auto; }

.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    max-width: 440px;
    margin: 0 auto;
    padding: 48px 22px 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ========== HEADER ========== */
.profile-header { text-align: center; width: 100%; margin-bottom: 24px; }

.photo-container {
    width: 132px;
    height: 132px;
    margin: 0 auto 18px;
    border-radius: 50%;
    padding: 4px;
    background: var(--gradient-spai);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.25), 0 0 80px rgba(0, 182, 134, 0.15);
    animation: pulse-glow 4s ease-in-out infinite;
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 40px rgba(0,212,255,.25), 0 0 80px rgba(0,182,134,.15); }
    50% { box-shadow: 0 0 60px rgba(0,212,255,.35), 0 0 100px rgba(0,182,134,.25); }
}
.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 35%;
    background-color: var(--azul-vortex);
    display: block;
}

.company {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--turquesa-spai);
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 30px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    transition: border-color .25s ease;
}
.company:hover { border-color: rgba(0,212,255,.4); }
.company-logo { width: 20px; height: 20px; object-fit: contain; }

.name {
    font-family: 'Sora', sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.5px;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 2px 30px rgba(0, 212, 255, 0.25);
}
.name span { color: var(--gris-nube); }

.title {
    font-size: 14px;
    color: var(--gris-operativo);
    font-weight: 400;
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto 16px;
}

.credential-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 15px;
    background: linear-gradient(135deg, rgba(0,182,134,.18) 0%, rgba(0,212,255,.18) 100%);
    border: 1px solid rgba(0,212,255,.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--turquesa-spai);
    letter-spacing: 0.3px;
}

/* ========== CTA PRINCIPAL ========== */
.cta-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 17px 24px;
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #25D366 0%, #1ebe5a 100%);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
    transition: transform .25s ease, box-shadow .25s ease;
}
.cta-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(37,211,102,.4); }
.cta-primary:active { transform: translateY(0); }

/* ========== ACCIONES SECUNDARIAS ========== */
.actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-bottom: 24px;
}
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 14px;
    font-size: 13.5px;
    font-weight: 500;
    font-family: inherit;
    color: var(--turquesa-spai);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    cursor: pointer;
    transition: all .25s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.btn-action:hover { background: rgba(255,255,255,.1); border-color: rgba(0,212,255,.4); transform: translateY(-2px); }
.btn-action svg { stroke: var(--turquesa-spai); flex-shrink: 0; }

/* ========== BIO ========== */
.bio {
    text-align: center;
    width: 100%;
    margin-bottom: 22px;
    padding: 18px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.bio p { font-size: 14px; line-height: 1.7; color: var(--gris-nube); font-weight: 300; }

/* ========== ENLACES ========== */
.contact-links {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin-bottom: 36px;
}
.link-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    color: var(--gris-nube);
    text-decoration: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all .25s ease;
    box-shadow: var(--glass-shadow);
}
.link-btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); transform: translateY(-2px); }
.link-btn:active { transform: translateY(0); }

.link-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}
.link-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.link-title { font-size: 15px; font-weight: 500; letter-spacing: 0.2px; }
.link-sub {
    font-size: 12px;
    color: var(--gris-operativo);
    font-weight: 300;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-icon.whatsapp { background: rgba(37,211,102,.15); color: var(--whatsapp); }
.link-icon.phone { background: rgba(0,212,255,.15); }
.link-icon.phone svg { stroke: var(--turquesa-spai); }
.link-icon.email { background: rgba(255,124,107,.15); }
.link-icon.email svg { stroke: var(--coral-insight); }
.link-icon.website { background: rgba(0,182,134,.15); }
.link-icon.website svg { stroke: var(--verde-quantum); }
.link-icon.instagram { background: linear-gradient(135deg, rgba(131,58,180,.15) 0%, rgba(253,29,29,.15) 50%, rgba(252,176,69,.15) 100%); }
.link-icon.instagram svg { stroke: #E4405F; }
.link-icon.linkedin { background: rgba(10,102,194,.15); }
.link-icon.linkedin svg { fill: #0A66C2; }

/* ========== FOOTER ========== */
.footer { margin-top: auto; text-align: center; }
.footer a {
    font-size: 12px;
    color: rgba(184,197,204,.55);
    font-weight: 300;
    letter-spacing: 1px;
    text-decoration: none;
    transition: color .25s ease;
}
.footer a:hover { color: var(--turquesa-spai); }

/* ========== MODAL QR ========== */
.qr-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 10, 22, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.qr-modal.open { display: flex; animation: fadeIn .25s ease; }
.qr-card {
    position: relative;
    text-align: center;
    max-width: 320px;
    width: 100%;
    padding: 30px 26px 26px;
    background: linear-gradient(160deg, #00284f 0%, #001a33 100%);
    border: 1px solid rgba(0,212,255,.3);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    animation: popIn .3s cubic-bezier(.2,.9,.3,1.2);
}
.qr-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none; border: none;
    color: var(--gris-operativo);
    font-size: 28px; line-height: 1;
    cursor: pointer;
}
.qr-card h3 { font-family: 'Sora', sans-serif; font-size: 20px; color: #fff; margin-bottom: 6px; }
.qr-card p { font-size: 13px; color: var(--gris-operativo); margin-bottom: 18px; }
.qr-img {
    width: 220px; height: 220px;
    border-radius: 16px;
    background: #fff;
    padding: 12px;
    margin-bottom: 18px;
}
.btn-share { width: 100%; }

/* ========== ANIMACIONES ENTRADA ========== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }

.profile-header { animation: fadeInUp .6s ease-out; }
.cta-primary { animation: fadeInUp .6s ease-out .1s both; }
.actions-row { animation: fadeInUp .6s ease-out .15s both; }
.bio { animation: fadeInUp .6s ease-out .2s both; }
.contact-links .link-btn { animation: fadeInUp .5s ease-out both; }
.contact-links .link-btn:nth-child(1) { animation-delay: .25s; }
.contact-links .link-btn:nth-child(2) { animation-delay: .3s; }
.contact-links .link-btn:nth-child(3) { animation-delay: .35s; }
.contact-links .link-btn:nth-child(4) { animation-delay: .4s; }
.contact-links .link-btn:nth-child(5) { animation-delay: .45s; }
.contact-links .link-btn:nth-child(6) { animation-delay: .5s; }
.contact-links .link-btn:nth-child(7) { animation-delay: .55s; }
.contact-links .link-btn:nth-child(8) { animation-delay: .6s; }
.footer { animation: fadeInUp .6s ease-out .6s both; }

/* ========== RESPONSIVE ========== */
@media (min-width: 480px) {
    .name { font-size: 32px; }
    .photo-container { width: 144px; height: 144px; }
}

/* ========== ACCESIBILIDAD: menos movimiento ========== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    #neural-bg { display: none; }
    .photo-container { animation: none; }
}

@supports (padding-top: env(safe-area-inset-top)) {
    .container {
        padding-top: calc(40px + env(safe-area-inset-top));
        padding-bottom: calc(40px + env(safe-area-inset-bottom));
    }
}
