/* ============================================================
   MAPSNY — Tarjetas de presentación digitales (/contacto)
   Tema "Vision" · dark · acento cian #00f2ea
   Mobile-first · compartible (QR/NFC)
   ============================================================ */

:root {
    --bg-color:           #000b18;
    --surface-color:      #031629;
    --surface-hover:      #0a2440;
    --surface-high:       #0f2d4a;
    --border-color:       #0d2d4d;
    --text-primary:       #ffffff;
    --text-secondary:     #8fb3ce;
    --text-muted:         #6a90ad;
    --accent-brand:       #00f2ea;
    --accent-brand-dim:   rgba(0, 242, 234, 0.12);
    --accent-brand-glow:  rgba(0, 242, 234, 0.30);
    --accent-brand-hover: #00bfb8;
    --shadow-brand:       0 0 20px rgba(0, 242, 234, 0.25);
    --shadow:             0 20px 50px rgba(0, 0, 0, 0.55);
    --glass-bg:           rgba(4, 20, 37, 0.72);
    --glass-blur:         blur(18px);
    --radius:             24px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Outfit', system-ui, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(16px, 5vw, 40px) 16px;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* ── Fondo científico atmosférico ── */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 242, 234, 0.16), transparent 60%),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(0, 242, 234, 0.08), transparent 60%),
        var(--bg-color);
}
.bg-layer::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('/portal/assets/hero-bg.png');
    background-size: cover;
    background-position: center;
    opacity: 0.10;
    mix-blend-mode: screen;
    filter: saturate(1.3) hue-rotate(-8deg);
}
/* Retícula tenue tipo instrumento científico */
.bg-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 242, 234, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 234, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 80%);
}

/* ============================================================
   TARJETA
   ============================================================ */
.card {
    width: 100%;
    max-width: 440px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow), 0 0 0 1px rgba(0, 242, 234, 0.06);
    padding: 0 26px 30px;
    position: relative;
    overflow: hidden;
    animation: card-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
/* Barra superior de acento */
.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-brand), transparent);
    opacity: 0.9;
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(24px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Cabecera de marca dentro de la tarjeta ── */
.card-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 22px 0 4px;
    animation: fade-up 0.6s ease both;
    animation-delay: 0.05s;
}
.card-brand img { width: 22px; height: 22px; }
.card-brand .wordmark {
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 0.98rem;
}
.card-brand .wordmark b { color: var(--accent-brand); font-weight: 700; }

/* ── Foto circular con anillo cian ── */
.avatar-wrap {
    display: flex;
    justify-content: center;
    margin-top: 22px;
    animation: fade-up 0.6s ease both;
    animation-delay: 0.12s;
}
.avatar {
    position: relative;
    width: 138px;
    height: 138px;
    border-radius: 50%;
    padding: 4px;
    background:
        conic-gradient(from 0deg, var(--accent-brand), rgba(0,242,234,0.15), var(--accent-brand));
    box-shadow: var(--shadow-brand), 0 0 40px rgba(0, 242, 234, 0.18);
}
.avatar::after {
    /* halo giratorio sutil */
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(0,242,234,0.35) 40deg, transparent 90deg);
    z-index: -1;
    animation: spin 6s linear infinite;
    opacity: 0.5;
}
.avatar img,
.avatar .monogram {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    display: block;
    background: var(--surface-high);
    border: 3px solid var(--bg-color);
}
.avatar .monogram {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 3rem;
    color: var(--accent-brand);
    background: radial-gradient(circle at 50% 35%, var(--surface-high), var(--surface-color));
    letter-spacing: 1px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .avatar::after { animation: none; }
    .card, .card-brand, .avatar-wrap, .identity, .contact-list, .actions, .qr-block, .card-footer { animation: none !important; }
}

/* ── Identidad ── */
.identity {
    text-align: center;
    margin-top: 18px;
    animation: fade-up 0.6s ease both;
    animation-delay: 0.20s;
}
.identity h1 {
    font-size: clamp(1.5rem, 6vw, 1.85rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.4px;
}
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    padding: 7px 16px;
    background: var(--accent-brand-dim);
    border: 1px solid rgba(0, 242, 234, 0.4);
    border-radius: 50px;
    color: var(--accent-brand);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 0 14px var(--accent-brand-glow);
}
.role-badge .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-brand);
    box-shadow: 0 0 8px var(--accent-brand);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }
.identity .subtitle {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 0.98rem;
    font-weight: 400;
    line-height: 1.5;
}
.identity .subtitle .subtitle-2 {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 0.88rem;
}
.identity .institution {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.identity .institution svg { width: 14px; height: 14px; opacity: 0.8; }

/* ── Datos de contacto ── */
.contact-list {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fade-up 0.6s ease both;
    animation-delay: 0.28s;
}
.contact-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 15px;
    background: rgba(10, 36, 64, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.15s ease;
}
.contact-row:active { transform: scale(0.985); }
@media (hover: hover) {
    .contact-row:hover {
        border-color: var(--accent-brand);
        background: var(--surface-hover);
    }
}
.contact-row .ico {
    flex-shrink: 0;
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: var(--accent-brand-dim);
    color: var(--accent-brand);
}
.contact-row .ico svg { width: 19px; height: 19px; }
.contact-row .txt { display: flex; flex-direction: column; min-width: 0; }
.contact-row .txt .label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}
.contact-row .txt .value {
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Botones de acción ── */
.actions {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    animation: fade-up 0.6s ease both;
    animation-delay: 0.36s;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 12px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.25s ease, background 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: var(--accent-brand);
    color: #001018;
    box-shadow: 0 6px 20px var(--accent-brand-glow);
    grid-column: 1 / -1;
}
@media (hover: hover) { .btn-primary:hover { box-shadow: 0 8px 28px var(--accent-brand-glow); transform: translateY(-2px); } }
.btn-outline {
    background: rgba(10, 36, 64, 0.5);
    border-color: rgba(0, 242, 234, 0.35);
    color: var(--accent-brand);
}
@media (hover: hover) { .btn-outline:hover { background: var(--surface-hover); border-color: var(--accent-brand); } }
.btn-web {
    grid-column: 1 / -1;
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}
@media (hover: hover) { .btn-web:hover { border-color: var(--accent-brand); color: var(--accent-brand); } }

/* ── QR ── */
.qr-block {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: fade-up 0.6s ease both;
    animation-delay: 0.44s;
}
.qr-tile {
    background: #ffffff;
    padding: 18px;
    border-radius: 20px;
    box-shadow: 0 0 28px rgba(0, 242, 234, 0.18);
    line-height: 0;
    width: 100%;
}
.qr-tile img { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.qr-caption {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── Enlace a MAPSNY.com (reemplaza el QR de la página) ── */
.site-icon-link { text-decoration: none; transition: transform 0.15s ease; }
.site-icon-link:active { transform: scale(0.98); }
.site-icon-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: rgba(0, 242, 234, 0.05);
    box-shadow: 0 0 28px rgba(0, 242, 234, 0.18);
    width: 100%;
}
.site-icon-tile img { width: 84px; height: 84px; filter: drop-shadow(0 0 14px rgba(0, 242, 234, 0.35)); }
@media (hover: hover) { .site-icon-link:hover .site-icon-tile { box-shadow: 0 0 34px rgba(0, 242, 234, 0.30); } }

/* ── Instagram (bajo el QR) ── */
.ig-link { text-decoration: none; margin-top: 16px; transition: transform 0.15s ease; }
.ig-link:active { transform: scale(0.98); }
@media (hover: hover) { .ig-link:hover .qr-tile { box-shadow: 0 0 34px rgba(0, 242, 234, 0.30); } }

/* ── Footer con logos ── */
.card-footer {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    animation: fade-up 0.6s ease both;
    animation-delay: 0.52s;
}
.logo-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}
.logo-strip a { display: inline-flex; transition: transform 0.15s ease; }
.logo-strip a:active { transform: scale(0.94); }
@media (hover: hover) { .logo-strip a:hover { transform: translateY(-2px); } }
.logo-strip img { height: 84px; width: auto; opacity: 0.95; filter: drop-shadow(0 0 16px var(--accent-brand-glow)); }
/* Placeholder para logos aún no provistos (UDD / CRM) */
.logo-ph {
    height: 34px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    border: 1px dashed rgba(143, 179, 206, 0.35);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}
.card-footer .site-link {
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-align: center;
}
.card-footer .site-link b { color: var(--accent-brand); font-size: 1.1rem; letter-spacing: 0.5px; }
.card-footer .site-link .site-sub { color: var(--text-muted); font-size: 0.8rem; font-weight: 400; }
.card-footer .site-link:active { opacity: 0.7; }

@keyframes fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ÍNDICE (/contacto)
   ============================================================ */
.index-head {
    text-align: center;
    max-width: 440px;
    margin-bottom: 26px;
    animation: fade-up 0.6s ease both;
}
.index-head .logo-big { width: 58px; height: 58px; margin-bottom: 14px; }
.index-head h1 {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.4px;
}
.index-head h1 b { color: var(--accent-brand); font-weight: 700; }
.index-head p {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.people-list {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.person-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 16px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
    animation: fade-up 0.55s ease both;
}
.person-link:active { transform: scale(0.99); }
@media (hover: hover) {
    .person-link:hover {
        border-color: var(--accent-brand);
        box-shadow: 0 0 0 1px var(--accent-brand-glow), var(--shadow);
    }
}
.person-link .mini-avatar {
    width: 58px; height: 58px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    flex-shrink: 0;
    border: 2px solid var(--accent-brand);
    box-shadow: 0 0 14px var(--accent-brand-glow);
    background: var(--surface-high);
}
.person-link .mini-mono {
    display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800; font-size: 1.3rem; color: var(--accent-brand);
    background: radial-gradient(circle at 50% 35%, var(--surface-high), var(--surface-color));
}
.person-link .p-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.person-link .p-info .p-name { font-weight: 600; font-size: 1.05rem; }
.person-link .p-info .p-role {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-brand);
}
.person-link .chevron { margin-left: auto; color: var(--text-muted); flex-shrink: 0; }
.person-link .chevron svg { width: 20px; height: 20px; }

.index-foot {
    margin-top: 30px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}
.index-foot a { color: var(--accent-brand); text-decoration: none; }
