/* =====================================================
   VARIABLES Y RESET
   ===================================================== */
:root {
    --primary-green: #10b981;
    --primary-blue: #3b82f6;
    --bg-dark: #111827;
    --bg-darker: #0f172a;
    --text-light: #f9fafb;
    --text-gray: #9ca3af;
    --glass-bg: rgba(31, 41, 55, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    overflow-x: hidden;
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */
.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, #10b981);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

/* =====================================================
   NAVIGATION
   ===================================================== */
.nav-link {
    position: relative;
    color: #d1d5db;
    font-weight: 500;
    transition: color 0.3s ease;
    padding-bottom: 4px;
}

.nav-link:hover {
    color: var(--primary-green);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-blue));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link-mobile {
    color: #d1d5db;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.nav-link-mobile:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-green);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    color: white;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.5);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(31, 41, 55, 0.6);
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 600;
    border-radius: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(31, 41, 55, 0.8);
    border-color: var(--primary-green);
    transform: translateY(-2px);
}

/* =====================================================
   PROFILE IMAGE
   ===================================================== */

.profile-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2rem;
    border: 3px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.profile-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@media (max-width: 768px) {
    .profile-container {
        width: 300px;
        height: 300px;
    }
}

/* =====================================================
   SOCIAL ICONS
   ===================================================== */
.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 41, 55, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: #d1d5db;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.social-icon-footer {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 41, 55, 0.4);
    border-radius: 0.5rem;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.social-icon-footer:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
}

/* =====================================================
   GLASS CARDS
   ===================================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(31, 41, 55, 0.6);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* =====================================================
   SERVICE CARDS
   ===================================================== */
.service-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(59, 130, 246, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.2);
}

.service-card>* {
    position: relative;
    z-index: 1;
}

.service-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* =====================================================
   PROJECT CARDS
   ===================================================== */
.project-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.4s ease;
}

.project-card:hover {
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(59, 130, 246, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

/* =====================================================
   TECH TAGS & BADGES
   ===================================================== */
.tech-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--primary-green);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--primary-green);
    transform: translateY(-2px);
}

.tech-badge {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: #e5e7eb;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.tech-badge:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--primary-green);
    color: var(--primary-green);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

/* =====================================================
   TECH CARDS
   ===================================================== */
.tech-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    min-width: 140px;
    transition: all 0.3s ease;
}

.tech-card:hover {
    background: rgba(31, 41, 55, 0.6);
    border-color: var(--primary-green);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.3);
}

.tech-card i {
    transition: transform 0.3s ease;
}

.tech-card:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* =====================================================
   SCROLL TO TOP BUTTON
   ===================================================== */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.6);
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* =====================================================
   CUSTOM SCROLLBAR
   ===================================================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-green), var(--primary-blue));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #059669, #2563eb);
}

/* =====================================================
   RESPONSIVE ADJUSTMENTS
   ===================================================== */
@media (max-width: 768px) {

    .service-card,
    .project-card,
    .glass-card {
        padding: 1.5rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        min-height: 44px;
        min-width: 44px;
    }

    .tech-card {
        min-width: 100px;
        padding: 1.5rem;
    }

    .project-image-container {
        height: 200px;
    }

    .social-icon,
    .social-icon-footer {
        min-width: 44px;
        min-height: 44px;
    }
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.text-shadow {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   LOADING ANIMATION (Optional)
   ===================================================== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}
/* ============================================
   AÑADIDOS: barra de datos, galería de capturas
   y placeholder de imagen faltante
   ============================================ */

.proof-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px;
    background: var(--glass-border);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
}
.proof-bar > div {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 24px 16px;
    text-align: center;
    transition: background .3s ease;
}
.proof-bar > div:hover { background: rgba(16, 185, 129, .08); }
.proof-bar strong {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.proof-bar span {
    display: block;
    margin-top: 6px;
    font-size: .8rem;
    color: var(--text-gray);
}

/* Galería de capturas */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}
.gitem { margin: 0; }
.gitem-img {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    transition: border-color .3s ease, transform .3s ease;
}
.gitem-img:hover {
    border-color: rgba(16, 185, 129, .45);
    transform: translateY(-4px);
}
.gitem-img img {
    width: 100%;
    height: auto;
    max-height: 560px;
    object-fit: contain;
    display: block;
}
.gitem figcaption {
    margin-top: 14px;
    font-size: .9rem;
    line-height: 1.6;
    color: var(--text-gray);
}

/* Placeholder cuando falta la imagen */
.img-missing {
    position: relative;
    min-height: 200px;
    display: block;
    background: repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 12px, transparent 12px 24px), var(--glass-bg);
    border: 1px dashed rgba(255,255,255,.18);
}
.img-missing::after {
    content: "Falta la captura\A" attr(data-missing);
    white-space: pre-wrap;
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    line-height: 1.7;
    color: #6b7280;
}
.project-image-container.img-missing { min-height: 240px; }

/* Tarjetas de proyecto: contenedor de imagen con proporción fija */
.project-card { display: flex; flex-direction: column; }
.project-image-container {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(15, 23, 42, .6);
}
.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform .5s ease;
}
.project-card > .p-6 { flex: 1; }

/* El listado de otros trabajos arranca oculto (gana al display:grid de Tailwind) */
#otros-list[hidden] { display: none !important; }

@media (max-width: 640px) {
    .gallery { grid-template-columns: 1fr; }
    .proof-bar strong { font-size: 1.4rem; }
}


/* ============================================
   AJUSTES FINALES: mobile compacto, áreas
   táctiles y visor de capturas
   ============================================ */

/* que el nav fijo no tape los títulos al saltar por ancla */
section[id] { scroll-margin-top: 84px; }

/* áreas táctiles cómodas */
.social-icon, .social-icon-footer { min-width: 44px; min-height: 44px; }
.glass-card a[href^="mailto"], .glass-card a[href^="https://wa.me"], .glass-card a[href*="linkedin"] { display: inline-block; padding: 4px 0; }
.project-card .p-6 > a:last-child { display: inline-block; padding: 8px 0; }
.nav-link, .nav-link-mobile { padding: 6px 2px; }

/* visor de capturas */
.lightbox {
    position: fixed; inset: 0; z-index: 9999;
    display: none; align-items: center; justify-content: center;
    background: rgba(3, 7, 18, .93);
    backdrop-filter: blur(6px);
    padding: 24px;
    opacity: 0; transition: opacity .22s ease;
}
.lightbox.open { display: flex; opacity: 1; }
.lightbox-scroll {
    max-width: 100%; max-height: 92vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
}
.lightbox img {
    display: block;
    max-width: min(1400px, 96vw); max-height: 92vh;
    width: auto; height: auto;
    cursor: zoom-out;
}
/* en pantallas angostas la captura se agranda y se puede arrastrar para leerla */
@media (max-width: 820px) {
    .lightbox { padding: 12px; }
    .lightbox img { max-width: none; max-height: none; height: 74vh; width: auto; }
    .lightbox-scroll::after { content: ""; }
}
body.lightbox-open .scroll-top-btn { display: none; }

/* pista de que la captura se puede ampliar */
.gitem-img { position: relative; }
.gitem-img::after {
    content: "\f00e";
    font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; top: 10px; right: 10px;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    background: rgba(15, 23, 42, .75);
    color: var(--primary-green);
    font-size: .85rem;
    opacity: 0; transition: opacity .25s ease;
    pointer-events: none;
}
.gitem-img:hover::after { opacity: 1; }
@media (hover: none) { .gitem-img::after { opacity: .85; } }
.gitem-img.img-missing::after { content: none; }
.lightbox-close {
    position: absolute; top: 14px; right: 18px;
    width: 44px; height: 44px;
    font-size: 2rem; line-height: 1;
    color: var(--text-light); background: rgba(255, 255, 255, .08);
    border: 1px solid var(--glass-border); border-radius: 50%;
    cursor: pointer; transition: background .2s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .18); }

/* mobile: menos aire vertical, todo más cerca */
@media (max-width: 640px) {
    section.py-20 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
    section.py-16 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
    .mb-16 { margin-bottom: 2rem !important; }
    .section-title { font-size: 1.85rem; line-height: 1.2; }
    #inicio { padding-top: 6rem; padding-bottom: 2rem; min-height: 0; }
    .project-card .project-image-container { aspect-ratio: 16 / 9; }
    .gitem figcaption { font-size: .85rem; }
    .service-card, .glass-card { padding: 1.25rem !important; }
    .service-card h3 { font-size: 1.25rem; }
    .tech-badge { font-size: .78rem; padding: 6px 12px; }
    .profile-container { width: 210px; height: 210px; }
    #inicio h1 { font-size: 2.75rem; }
    #inicio h2 { font-size: 1.15rem; letter-spacing: .01em; }
    .glass-card .text-3xl { font-size: 1.6rem; }
}

/* más área de toque en la marca y en el volver */
nav .flex.items-center.space-x-2, .crumb-link { padding: 6px 0; }
a[href$="#portafolio"].text-gray-400 { display: inline-block; padding: 8px 0; }

/* respeta la preferencia de menos movimiento */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* logo de marca: version aclarada, va directo sobre el fondo oscuro */
.brand-logo {
    height: 40px; width: auto;
    display: block;
    flex: none;
    transition: transform .3s ease, filter .3s ease;
}
nav a:hover .brand-logo { transform: scale(1.06); filter: drop-shadow(0 0 10px rgba(34, 179, 162, .5)); }
footer .brand-logo { height: 34px; }
@media (max-width: 640px) { .brand-logo { height: 34px; } }

/* boton flotante de WhatsApp */
.wa-float {
    position: fixed; right: 24px; bottom: 24px; z-index: 90;
    display: flex; align-items: center; gap: 10px;
    height: 56px; padding: 0 20px 0 18px;
    border-radius: 28px;
    background: #25D366;
    color: #04301a;
    font-weight: 700; font-size: .95rem;
    text-decoration: none;
    box-shadow: 0 8px 26px rgba(37, 211, 102, .38);
    transition: transform .25s ease, box-shadow .25s ease;
}
.wa-float i { font-size: 1.6rem; }
.wa-float:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(37, 211, 102, .5); color: #04301a; }
.wa-float span { white-space: nowrap; }
body.lightbox-open .wa-float { display: none; }

/* el boton de subir se corre para no chocar con el de WhatsApp */
.scroll-top-btn { bottom: 94px !important; right: 30px !important; }

@media (max-width: 640px) {
    .wa-float { right: 16px; bottom: 16px; height: 52px; padding: 0 16px; }
    .wa-float span { display: none; }
    .wa-float { padding: 0 15px; }
    .scroll-top-btn { bottom: 80px !important; right: 20px !important; }
}

/* copiar el correo */
.copy-mail {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 8px; padding: 5px 12px;
    font-size: .78rem; font-family: 'JetBrains Mono', monospace;
    color: var(--text-gray);
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--glass-border); border-radius: 8px;
    cursor: pointer; transition: all .2s ease;
}
.copy-mail:hover { color: var(--primary-green); border-color: rgba(16, 185, 129, .5); }
.copy-mail.copiado { color: var(--primary-green); border-color: var(--primary-green); }


/* =========================================
   PÁGINA DE PROYECTO
   ========================================= */
.case-hero { padding-top: 7.5rem; padding-bottom: 2.5rem; }
.volver {
    display: block; width: fit-content; padding: 8px 0; margin-bottom: 1.75rem;
    color: var(--text-gray); font-family: 'JetBrains Mono', monospace; font-size: .82rem;
    text-decoration: none; transition: color .2s ease;
}
.volver:hover { color: var(--primary-green); }
.case-tag {
    display: inline-block; padding: 7px 16px;
    background: rgba(16, 185, 129, .1); border: 1px solid rgba(16, 185, 129, .5);
    border-radius: 999px; color: var(--primary-green);
    font-family: 'JetBrains Mono', monospace; font-size: .72rem; letter-spacing: .02em;
}
.case-title { font-size: clamp(2.25rem, 6vw, 4rem); font-weight: 800; line-height: 1.05; margin: 1.25rem 0 1.25rem; }
.case-lede { font-size: clamp(1.02rem, 1.6vw, 1.22rem); line-height: 1.75; color: #cbd5e1; max-width: 62ch; }

.case-meta {
    display: flex; flex-wrap: wrap; gap: 0 2.5rem;
    margin: 2.5rem 0 0; padding: 1.25rem 0 0;
    border-top: 1px solid var(--glass-border);
    list-style: none;
}
.case-meta li { padding: .5rem 0; }
.case-meta span {
    display: block; font-family: 'JetBrains Mono', monospace;
    font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: #64748b; margin-bottom: 4px;
}
.case-meta b { font-size: .95rem; font-weight: 600; color: var(--text-light); }

/* portada a lo ancho */
.case-cover { margin: 0; }
.case-cover .gitem-img {
    border-radius: 16px; overflow: hidden;
    border: 1px solid var(--glass-border); background: var(--glass-bg);
}
.case-cover img { width: 100%; height: auto; display: block; max-height: 640px; object-fit: contain; }
.case-cover figcaption { margin-top: 14px; color: var(--text-gray); font-size: .92rem; line-height: 1.6; }

/* problema + resultado, lado a lado */
.case-split { display: grid; grid-template-columns: 1.35fr 1fr; gap: 3.5rem; align-items: start; }
.case-h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); font-weight: 700; margin-bottom: 1rem; }
.case-p { font-size: 1.05rem; line-height: 1.8; color: #cbd5e1; }
.case-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.case-stats li {
    padding: 1rem 1.1rem; border-radius: 12px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
}
.case-stats b {
    display: block; font-size: 1.55rem; font-weight: 800; line-height: 1.1; margin-bottom: 4px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.case-stats span { font-size: .82rem; color: var(--text-gray); line-height: 1.4; }
.case-nota { margin-top: 1.1rem; font-size: .8rem; color: #64748b; line-height: 1.6; }

/* lo que construí: lista limpia, sin tarjetas */
.case-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 3rem; }
.case-list li {
    break-inside: avoid; position: relative;
    padding: 0 0 1.1rem 1.6rem; margin-bottom: .2rem;
    color: #cbd5e1; line-height: 1.7; font-size: .98rem;
}
.case-list li::before {
    content: ""; position: absolute; left: 0; top: .62em;
    width: 7px; height: 7px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
}

/* capturas: una por fila, alternando lado */
.case-row {
    display: grid; grid-template-columns: 1.7fr 1fr; gap: 2.5rem;
    align-items: center; margin: 0 0 3.5rem;
}
.case-row.alt > .gitem-img { order: 2; }
.case-row.alt > figcaption { order: 1; }
.case-row .gitem-img {
    border-radius: 14px; overflow: hidden;
    border: 1px solid var(--glass-border); background: var(--glass-bg);
    transition: border-color .3s ease, transform .3s ease;
}
.case-row .gitem-img:hover { border-color: rgba(16, 185, 129, .45); transform: translateY(-4px); }
.case-row img { width: 100%; height: auto; display: block; max-height: 560px; object-fit: contain; }
.case-row figcaption { color: #cbd5e1; font-size: 1rem; line-height: 1.75; }
.case-row .num {
    display: block; font-family: 'JetBrains Mono', monospace;
    font-size: .72rem; color: var(--primary-green); margin-bottom: .6rem; letter-spacing: .1em;
}

@media (max-width: 900px) {
    .case-split { grid-template-columns: 1fr; gap: 2.5rem; }
    .case-list { columns: 1; }
    .case-row { grid-template-columns: 1fr; gap: 1rem; margin-bottom: 2.5rem; }
    .case-row.alt > .gitem-img { order: 0; }
    .case-row.alt > figcaption { order: 1; }
    .case-meta { gap: 0 1.75rem; }
}
@media (max-width: 640px) {
    .case-hero { padding-top: 6rem; padding-bottom: 1.5rem; }
    .case-meta li { width: calc(50% - 1rem); }
    .case-stats { grid-template-columns: 1fr 1fr; gap: .75rem; }
    .case-stats b { font-size: 1.3rem; }
}


/* marca del nav: solo el logo */
.brand { display: inline-flex; align-items: center; }
nav .brand-logo { height: 44px; }
footer .brand-logo { height: 34px; }
@media (max-width: 640px) { nav .brand-logo { height: 38px; } }

/* hero: en celular la foto va entre el subtítulo y la descripción */
.hero-grid { display: flex; align-items: center; justify-content: space-between; gap: 3rem; }
.hero-txt { flex: 1; }
.hero-foto { flex: 1; display: flex; justify-content: center; }

@media (max-width: 768px) {
    .hero-grid { flex-direction: column; gap: 1.5rem; text-align: center; }
    .hero-txt { display: contents; }
    .hero-txt > div:nth-of-type(1) { order: 1; }
    .hero-txt > h1 { order: 2; }
    .hero-txt > h2 { order: 3; margin-bottom: 0; }
    .hero-foto { order: 4; margin: .5rem 0; }
    .hero-txt > p:nth-of-type(1) { order: 5; }
    .hero-txt > p:nth-of-type(2) { order: 6; }
    .hero-txt > div:nth-of-type(2) { order: 7; width: 100%; }
    .hero-txt > div:nth-of-type(3) { order: 8; }
    .hero-txt > p { max-width: 100%; }
}


/* =========================================
   PÁGINA DE PROYECTO v3: resumen → carrusel → info
   ========================================= */
.case-hero { padding-bottom: 1.5rem; }
.case-lede { font-size: clamp(1rem, 1.5vw, 1.15rem); }
.case-kpis {
    list-style: none; margin: 1.5rem 0 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: .75rem;
}
.case-kpis li {
    display: flex; align-items: baseline; gap: .5rem;
    padding: .55rem .95rem; border-radius: 10px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
}
.case-kpis b {
    font-size: 1.15rem; font-weight: 800;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.case-kpis span { font-size: .8rem; color: var(--text-gray); }

/* carrusel */
.carousel { position: relative; }
.carousel-stage {
    position: relative;
    height: clamp(300px, 62vh, 660px);
    border-radius: 16px; overflow: hidden;
    background: #0b1220; border: 1px solid var(--glass-border);
}
.carousel-slide {
    position: absolute; inset: 0; margin: 0;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .35s ease; pointer-events: none;
}
.carousel-slide.is-active { opacity: 1; pointer-events: auto; }
.carousel-slide img {
    max-width: 100%; max-height: 100%; width: auto; height: auto;
    object-fit: contain; display: block; cursor: zoom-in;
}
.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 46px; height: 46px; border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, .75); color: var(--text-light);
    backdrop-filter: blur(6px);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .2s ease, transform .2s ease; z-index: 2;
}
.carousel-btn:hover { background: rgba(16, 185, 129, .35); }
.carousel-btn.prev { left: 14px; }
.carousel-btn.next { right: 14px; }
.carousel-count {
    position: absolute; right: 14px; top: 12px; z-index: 2;
    padding: 4px 10px; border-radius: 999px;
    background: rgba(15, 23, 42, .75); border: 1px solid var(--glass-border);
    font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: var(--text-gray);
}
.carousel-count b { color: var(--primary-green); }
.carousel-caption { position: relative; min-height: 3.4rem; margin-top: 14px; }
.carousel-cap {
    position: absolute; inset: 0; margin: 0;
    color: #cbd5e1; font-size: .98rem; line-height: 1.65;
    opacity: 0; transition: opacity .3s ease;
}
.carousel-cap.is-active { position: relative; opacity: 1; }
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.carousel-dots button {
    width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0;
    background: rgba(255, 255, 255, .22); cursor: pointer; transition: all .25s ease;
}
.carousel-dots button.is-active { width: 24px; border-radius: 4px; background: var(--primary-green); }
.carousel-hint { margin-top: 12px; font-size: .78rem; color: #64748b; font-family: 'JetBrains Mono', monospace; }
.carousel-hint i { color: var(--primary-green); margin-right: 4px; }

.case-list.one { columns: 1; }
.ver-mas {
    margin-top: .25rem; padding: 8px 0;
    background: none; border: 0; cursor: pointer;
    color: var(--primary-green); font-weight: 600; font-size: .92rem;
}
.ver-mas i { font-size: .75rem; margin-left: 4px; transition: transform .25s ease; }
.ver-mas.open i { transform: rotate(180deg); }
.tech-badge.sm { font-size: .78rem; padding: 6px 12px; }

@media (max-width: 640px) {
    .carousel-stage { height: clamp(220px, 52vh, 420px); border-radius: 12px; }
    .carousel-btn { width: 40px; height: 40px; }
    .carousel-btn.prev { left: 8px; } .carousel-btn.next { right: 8px; }
    .carousel-cap { font-size: .9rem; }
    .case-kpis li { padding: .45rem .75rem; } .case-kpis b { font-size: 1rem; }
}


/* =========================================
   CONVERSIÓN: confianza pegada al CTA, opiniones, nav
   ========================================= */
.trust-line {
    margin-top: 1.1rem; font-size: .84rem; color: var(--text-gray);
    font-family: 'JetBrains Mono', monospace; letter-spacing: .01em;
}
.trust-line i { color: #fbbf24; margin-right: 4px; }

.nav-cta {
    padding: 8px 16px !important; border-radius: 999px;
    border: 1px solid rgba(16, 185, 129, .55); color: var(--primary-green) !important;
    transition: background .2s ease, color .2s ease;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--primary-green); color: #04301a !important; }

.testi { padding: 1.75rem; display: flex; flex-direction: column; gap: .9rem; }
.testi .stars { color: #fbbf24; font-size: .85rem; letter-spacing: 2px; }
.testi blockquote { margin: 0; color: #e2e8f0; font-size: 1.02rem; line-height: 1.7; }
.testi figcaption { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.testi figcaption b { color: var(--text-light); font-size: .95rem; }
.testi figcaption span { color: #64748b; font-size: .8rem; font-family: 'JetBrains Mono', monospace; }

@media (max-width: 768px) {
    .trust-line { text-align: center; font-size: .78rem; }
    .hero-txt > .trust-line { order: 8; }
    .hero-txt > div:nth-of-type(3) { order: 9; }
}


/* celular: la ficha del proyecto ocupa lo mínimo para llegar rápido a las capturas */
@media (max-width: 640px) {
    .case-title { font-size: 2.2rem; margin: .9rem 0 .8rem; }
    .case-lede { font-size: .97rem; line-height: 1.6; }
    .case-meta { margin-top: 1.25rem; padding-top: .9rem; gap: 0; display: block; }
    .case-meta li { width: auto; display: flex; gap: .6rem; align-items: baseline; padding: .3rem 0; }
    .case-meta span { margin: 0; min-width: 4.6rem; font-size: .62rem; }
    .case-meta b { font-size: .88rem; font-weight: 600; }
    .case-kpis { margin-top: 1rem; gap: .5rem; }
    .case-kpis li { padding: .35rem .65rem; gap: .35rem; }
    .case-kpis b { font-size: .95rem; } .case-kpis span { font-size: .72rem; }
    .case-nota { font-size: .72rem; }
    .volver { margin-bottom: 1rem; }
}

.btn-primary, .btn-secondary { white-space: nowrap; }
@media (max-width: 400px) { .btn-primary, .btn-secondary { white-space: normal; } }

@media (max-width: 768px) { .hero-grid { gap: 1.1rem; } .hero-txt > h1 { margin-bottom: .5rem; } }


/* stack en filas: ocupa 4 veces menos y se lee de un vistazo */
.stack-rows { margin: 0; }
.stack-rows > div {
    display: grid; grid-template-columns: 190px 1fr; gap: 1.5rem;
    padding: 1.1rem 0; border-top: 1px solid var(--glass-border);
}
.stack-rows > div:last-child { border-bottom: 1px solid var(--glass-border); }
.stack-rows dt {
    font-family: 'JetBrains Mono', monospace; font-size: .74rem;
    letter-spacing: .08em; text-transform: uppercase; color: var(--primary-green);
    padding-top: 5px;
}
.stack-rows dd { margin: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.stack-rows dd span {
    padding: 4px 11px; border-radius: 7px; font-size: .82rem;
    color: #cbd5e1; background: var(--glass-bg); border: 1px solid var(--glass-border);
}
@media (max-width: 700px) {
    .stack-rows > div { grid-template-columns: 1fr; gap: .65rem; padding: .95rem 0; }
    .stack-rows dt { padding-top: 0; }
    .stack-rows dd span { font-size: .76rem; padding: 3px 9px; }
}

/* aparición al scrollear, con red de seguridad: si el observer falla, se ve igual */
.anim { opacity: 0; transform: translateY(22px); }
.js-anim .anim { transition: opacity .55s cubic-bezier(.16,1,.3,1), transform .55s cubic-bezier(.16,1,.3,1); }
.anim.in, .no-anim .anim { opacity: 1; transform: none; }
.anim.d1 { transition-delay: .07s; } .anim.d2 { transition-delay: .14s; }
.anim.d3 { transition-delay: .21s; } .anim.d4 { transition-delay: .28s; }
@media (prefers-reduced-motion: reduce) { .anim { opacity: 1 !important; transform: none !important; } }

/* microinteracciones */
.project-card { transition: transform .35s cubic-bezier(.16,1,.3,1), border-color .35s ease, box-shadow .35s ease; }
.project-card:hover { transform: translateY(-6px); border-color: rgba(16,185,129,.35); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.service-card { transition: transform .35s cubic-bezier(.16,1,.3,1), border-color .35s ease; }
.service-card:hover { transform: translateY(-4px); }
.btn-primary, .btn-secondary { transition: transform .2s ease, box-shadow .25s ease, background .25s ease; }
.btn-primary:active, .btn-secondary:active { transform: scale(.97); }
.proof-bar > div strong { transition: transform .3s ease; display: block; }
.proof-bar > div:hover strong { transform: scale(1.06); }


/* antes y después */
.ba {
    display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: stretch;
    margin-top: 1.75rem;
}
.ba > div:not(.ba-flecha) {
    padding: 1rem 1.1rem; border-radius: 12px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
}
.ba span {
    display: block; margin-bottom: .45rem;
    font-family: 'JetBrains Mono', monospace; font-size: .66rem;
    letter-spacing: .1em; text-transform: uppercase;
}
.ba-antes span { color: #f87171; }
.ba-despues span { color: var(--primary-green); }
.ba-antes { opacity: .78; }
.ba-despues { border-color: rgba(16, 185, 129, .3) !important; }
.ba p { margin: 0; font-size: .88rem; line-height: 1.6; color: #cbd5e1; }
.ba-flecha { display: flex; align-items: center; color: var(--primary-green); font-size: 1.1rem; }
@media (max-width: 700px) {
    .ba { grid-template-columns: 1fr; gap: .6rem; }
    .ba-flecha { justify-content: center; transform: rotate(90deg); padding: .1rem 0; }
}

/* formulario */
.form-contacto { display: flex; flex-direction: column; gap: 1rem; }
.form-contacto label {
    display: flex; flex-direction: column; gap: .4rem;
    font-size: .82rem; color: var(--text-gray);
    font-family: 'JetBrains Mono', monospace; letter-spacing: .02em;
}
.form-contacto input[type="text"], .form-contacto input[type="email"], .form-contacto input[type="tel"], .form-contacto textarea {
    width: 100%; padding: 12px 14px;
    background: rgba(15, 23, 42, .6);
    border: 1px solid var(--glass-border); border-radius: 10px;
    color: var(--text-light); font-family: inherit; font-size: .95rem;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.form-contacto input::placeholder, .form-contacto textarea::placeholder { color: #475569; }
.form-contacto input:focus, .form-contacto textarea:focus, .form-contacto select:focus {
    outline: none; border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .13);
}
.form-contacto textarea { resize: vertical; min-height: 96px; }
.form-contacto .btn-primary { justify-content: center; text-align: center; margin-top: .25rem; }
.form-nota { margin-top: .5rem; font-size: .74rem; color: #64748b; text-align: center; line-height: 1.5; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-contacto label em { font-style: normal; color: #475569; text-transform: none; }
.form-contacto select {
    width: 100%; padding: 12px 14px;
    background: rgba(15, 23, 42, .6);
    border: 1px solid var(--glass-border); border-radius: 10px;
    color: var(--text-light); font-family: inherit; font-size: .95rem;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
    padding-right: 38px; cursor: pointer;
}
.form-contacto select:focus { outline: none; border-color: var(--primary-green); box-shadow: 0 0 0 3px rgba(16,185,129,.13); }
.form-contacto select option { background: #0f172a; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

/* la columna de contacto y el formulario, del mismo alto */
#contacto .grid { align-items: stretch; }
#contacto .space-y-6 { display: flex; flex-direction: column; }
#contacto .space-y-6 > .glass-card { flex: 1; display: flex; align-items: center; }
.form-card { display: flex; flex-direction: column; }


/* accesibilidad y páginas simples */
.skip {
    position: absolute; left: -9999px; top: 0; z-index: 200;
    padding: 12px 20px; background: var(--primary-green); color: #04301a;
    font-weight: 700; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--primary-green); outline-offset: 3px; border-radius: 6px; }
.ok-icon {
    width: 76px; height: 76px; margin: 0 auto 1.5rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 2rem; color: #04301a;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
}


/* ---- tarjetas de proyecto: el CTA siempre al fondo ---- */
.project-card > .p-6 { display: flex; flex-direction: column; }
.project-card > .p-6 > a:last-child { margin-top: auto; padding-top: 1rem; }
.project-card > .p-6 > .flex.flex-wrap { margin-bottom: 0 !important; }

/* etiqueta de tipo de trabajo (reemplaza los chips de tecnología) */
.tipo-tag {
    padding: 5px 12px; border-radius: 999px;
    font-size: .76rem; font-weight: 600; letter-spacing: .01em;
    color: #a5f3e4;
    background: rgba(16, 185, 129, .1);
    border: 1px solid rgba(16, 185, 129, .28);
}

/* ---- carrusel automático horizontal ---- */
.marquee {
    position: relative; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 17%, #000 83%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 17%, #000 83%, transparent 100%);
}
.marquee-track {
    display: flex; gap: 1.25rem; width: max-content;
    animation: marquee 70s linear infinite;
}
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee .testi { width: 380px; flex: none; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
    .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
    .marquee-track { animation: none; }
}
@media (max-width: 640px) {
    .marquee .testi { width: 300px; }
    .marquee-track { animation-duration: 50s; }
}

/* fila de tecnologías en movimiento */
.tech-marquee { margin-top: 2.5rem; }
.tech-marquee .marquee-track { gap: .6rem; animation-duration: 55s; }
.tech-marquee .tm {
    flex: none; padding: 8px 16px; border-radius: 10px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    color: #cbd5e1; font-size: .85rem; white-space: nowrap;
}


/* ---- fondo: orbes muy difuminados con los colores de la marca ---- */
body { position: relative; }
body::before {
    content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background:
      radial-gradient(44rem 44rem at 10% 6%,   rgba(16, 185, 129, .26), transparent 60%),
      radial-gradient(40rem 40rem at 90% 20%,  rgba(59, 130, 246, .24), transparent 60%),
      radial-gradient(36rem 36rem at 72% 74%,  rgba(45, 212, 191, .19), transparent 62%),
      radial-gradient(34rem 34rem at 16% 88%,  rgba(99, 102, 241, .17), transparent 62%),
      radial-gradient(26rem 26rem at 50% 45%,  rgba(56, 189, 248, .10), transparent 65%);
    animation: orbDrift 34s ease-in-out infinite alternate;
}
body::after {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .35;
    background-image:
      linear-gradient(rgba(148, 163, 184, .045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(148, 163, 184, .045) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 75%);
    mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 75%);
}
/* las secciones con fondo propio dejan ver los orbes */
section.bg-gray-800.bg-opacity-50, footer.bg-gray-800.bg-opacity-50 { background-color: rgba(30, 41, 59, .38) !important; }
nav { background-color: rgba(17, 24, 39, .82) !important; }

.form-contacto input { color-scheme: dark; }
.form-contacto input:-webkit-autofill { -webkit-text-fill-color: var(--text-light); -webkit-box-shadow: 0 0 0 40px #0f172a inset; }


/* los dos campos de la fila, siempre alineados */
.form-row { align-items: end; }
.form-contacto .lbl { display: block; white-space: nowrap; }
.form-contacto .lbl em { font-style: normal; color: #475569; font-size: .92em; }
.form-contacto label { min-width: 0; }
.form-contacto input, .form-contacto select, .form-contacto textarea { min-width: 0; }
@media (max-width: 560px) { .form-contacto .lbl { white-space: normal; } }


/* nada puede empujar la página a lo ancho */
html { overflow-x: hidden; }
body { overflow-x: clip; }
.marquee { max-width: 100%; }
.marquee-track { will-change: transform; }


/* ============ chips de tecnología con color por familia ============ */
.tech-badge.c-lang,  .stack-rows dd span.c-lang,  .tm.c-lang  { color:#93c5fd; border-color:rgba(59,130,246,.42);  background:rgba(59,130,246,.13); }
.tech-badge.c-front, .stack-rows dd span.c-front, .tm.c-front { color:#67e8f9; border-color:rgba(34,211,238,.42);  background:rgba(34,211,238,.12); }
.tech-badge.c-back,  .stack-rows dd span.c-back,  .tm.c-back  { color:#6ee7b7; border-color:rgba(16,185,129,.42);  background:rgba(16,185,129,.13); }
.tech-badge.c-data,  .stack-rows dd span.c-data,  .tm.c-data  { color:#fcd34d; border-color:rgba(245,158,11,.40);  background:rgba(245,158,11,.12); }
.tech-badge.c-infra, .stack-rows dd span.c-infra, .tm.c-infra { color:#c4b5fd; border-color:rgba(139,92,246,.42);  background:rgba(139,92,246,.13); }
.tech-badge.c-ia,    .stack-rows dd span.c-ia,    .tm.c-ia    { color:#f9a8d4; border-color:rgba(236,72,153,.40);  background:rgba(236,72,153,.12); }
.tech-badge.sm:hover { transform: translateY(-2px); box-shadow: none; }
.tech-badge.sm.c-lang:hover  { background:rgba(59,130,246,.24);  color:#bfdbfe; border-color:rgba(59,130,246,.7); }
.tech-badge.sm.c-front:hover { background:rgba(34,211,238,.24);  color:#a5f3fc; border-color:rgba(34,211,238,.7); }
.tech-badge.sm.c-back:hover  { background:rgba(16,185,129,.24);  color:#a7f3d0; border-color:rgba(16,185,129,.7); }
.tech-badge.sm.c-data:hover  { background:rgba(245,158,11,.24);  color:#fde68a; border-color:rgba(245,158,11,.7); }
.tech-badge.sm.c-infra:hover { background:rgba(139,92,246,.24);  color:#ddd6fe; border-color:rgba(139,92,246,.7); }
.tech-badge.sm.c-ia:hover    { background:rgba(236,72,153,.24);  color:#fbcfe8; border-color:rgba(236,72,153,.7); }

/* ============ cola de la página de caso: stack + verlo en vivo ============ */
.case-tail { display: grid; grid-template-columns: 1fr 21rem; gap: 2.5rem; align-items: center; }
.case-tail.solo { grid-template-columns: 1fr; }
.live-card {
    background: rgba(17, 24, 39, .55); border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 1.4rem 1.4rem 1.2rem;
}
.live-links { display: flex; flex-direction: column; gap: .6rem; }
.live-btn {
    display: flex; align-items: center; gap: .6rem; justify-content: flex-start;
    padding: .7rem 1rem; border-radius: 10px; font-weight: 600; font-size: .88rem; white-space: nowrap;
    color: #d1fae5; background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.38);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.live-btn:hover { background: rgba(16,185,129,.24); border-color: var(--primary-green); transform: translateX(3px); }
.live-btn i { font-size: .82rem; opacity: .85; }
.live-card .case-nota { margin-top: .9rem; }
@media (max-width: 860px) { .case-tail { grid-template-columns: 1fr; gap: 2rem; } }

/* ============ línea de criterio bajo la barra de datos ============ */
.criterio {
    margin: 1.6rem auto 0; max-width: 46rem; text-align: center;
    color: #94a3b8; font-size: 1.02rem; line-height: 1.65;
}
.criterio strong { color: #e2e8f0; font-weight: 600; }
@media (max-width: 640px) { .criterio { font-size: .92rem; margin-top: 1.2rem; } }

/* ============ barra de progreso de lectura (páginas de caso) ============ */
.read-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-blue));
    z-index: 60; pointer-events: none; transition: width .08s linear;
}

/* ============ brillo que sigue al mouse en las tarjetas ============ */
.project-card { position: relative; }
.project-card::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    pointer-events: none; opacity: 0; transition: opacity .3s ease; z-index: 1;
    background: radial-gradient(16rem 16rem at var(--mx, 50%) var(--my, 50%), rgba(16,185,129,.16), transparent 65%);
}
.project-card:hover::after { opacity: 1; }
.project-card > * { position: relative; z-index: 2; }

/* ============ números que suben ============ */
.proof-bar strong { font-variant-numeric: tabular-nums; }

@keyframes orbDrift {
    from { transform: translate3d(0,0,0) scale(1); }
    to   { transform: translate3d(-2.5%, 2%, 0) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

/* ============ chips de tipo de trabajo, con color ============ */
.tipo-tag.t-ia  { color:#f9a8d4; background:rgba(236,72,153,.11); border-color:rgba(236,72,153,.34); }
.tipo-tag.t-app { color:#67e8f9; background:rgba(34,211,238,.11); border-color:rgba(34,211,238,.34); }
.tipo-tag.t-sys { color:#c4b5fd; background:rgba(139,92,246,.12); border-color:rgba(139,92,246,.34); }
.tipo-tag.t-ok  { color:#6ee7b7; background:rgba(16,185,129,.11); border-color:rgba(16,185,129,.32); }

/* ============ viñetas de servicios: sangría al cortar línea ============ */
.service-card ul li { display: flex; align-items: flex-start; gap: .5rem; line-height: 1.55; }
.service-card ul li i { margin: .3rem 0 0 0 !important; flex: none; }

/* ============ contacto: las 3 tarjetas repartidas, sin huecos ============ */
.contacto-col { display: flex; flex-direction: column; justify-content: space-between; gap: 1.25rem; }
.contacto-col > .glass-card { flex: 0 0 auto; }

/* ============ los anclajes no quedan bajo la barra ============ */
section[id] { scroll-margin-top: 92px; }

/* ============ contacto: bloque de disponibilidad ============ */
.dispo {
    display: flex; align-items: flex-start; gap: .8rem;
    padding: 1.1rem 1.25rem; border-radius: 14px;
    background: rgba(16,185,129,.07); border: 1px solid rgba(16,185,129,.24);
}
.dispo-dot {
    width: 10px; height: 10px; border-radius: 50%; margin-top: .35rem; flex: none;
    background: var(--primary-green); box-shadow: 0 0 0 4px rgba(16,185,129,.16);
}
.dispo p { margin: 0; font-size: .86rem; color: #94a3b8; line-height: 1.5; }
.dispo p strong { color: #a7f3d0; font-weight: 600; font-size: .92rem; }

/* el botón flotante se va cuando aparece el pie */
.wa-float.oculto { opacity: 0; visibility: hidden; transform: translateY(12px); pointer-events: none; }
.wa-float { transition: opacity .25s ease, transform .25s ease, visibility .25s; }

/* ============ orden del hero en celular (con las 3 líneas nuevas) ============ */
@media (max-width: 768px) {
    .hero-txt > div:nth-of-type(1) { order: 1; }
    .hero-txt > h1 { order: 2; }
    .hero-txt > h2 { order: 3; }
    .hero-foto { order: 4; }
    .hero-txt > p:nth-of-type(1) { order: 5; }
    .hero-txt > p:nth-of-type(2) { order: 6; }
    .hero-txt > p:nth-of-type(3) { order: 7; }
    .hero-txt > div:nth-of-type(2) { order: 8; width: 100%; }
    .hero-txt > .trust-line { order: 9; }
    .hero-txt > div:nth-of-type(3) { order: 10; }
}

/* ============ barra de datos: sin celda huérfana en celular ============ */
@media (max-width: 700px) {
    .proof-bar { grid-template-columns: 1fr 1fr; }
    .proof-bar > div:last-child { grid-column: 1 / -1; }
    .proof-bar > div { padding: 18px 12px; }
    .proof-bar strong { font-size: 1.5rem; }
}

/* ============ contacto en celular: que nada se salga de la tarjeta ============ */
@media (max-width: 520px) {
    .contacto-col .glass-card { padding: 1.1rem 1rem; }
    .contacto-col a { font-size: .95rem !important; line-height: 1.35; word-break: break-word; overflow-wrap: anywhere; }
    .contacto-col .w-12 { width: 2.5rem; height: 2.5rem; }
    .contacto-col .w-12 i { font-size: 1rem; }
}

/* ============ link a la copia archivada ============ */
.live-par { display: flex; align-items: stretch; gap: .4rem; }
.live-par .live-btn { flex: 1; }
.live-copia {
    display: flex; align-items: center; gap: .35rem;
    padding: 0 .7rem; border-radius: 10px;
    font-size: .72rem; font-weight: 600; color: #64748b;
    background: rgba(148,163,184,.06); border: 1px solid var(--glass-border);
    transition: color .2s ease, border-color .2s ease;
}
.live-copia:hover { color: #cbd5e1; border-color: rgba(148,163,184,.4); }
.live-copia i { font-size: .7rem; }

/* ============ la línea de criterio, más pegada a los números ============ */
.criterio { margin: 1.1rem auto 0; }

/* ============ botón de descarga del CV ============ */
.btn-cv {
    display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
    padding: .85rem 1.5rem; border-radius: 12px; font-weight: 600;
    color: #94a3b8; background: transparent; border: 1px solid var(--glass-border);
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.btn-cv:hover { color: #e2e8f0; border-color: rgba(148,163,184,.45); background: rgba(148,163,184,.06); }
.dispo-cv {
    display: inline-flex; align-items: center; gap: .45rem; margin-top: .6rem;
    font-size: .84rem; font-weight: 600; color: #6ee7b7;
}
.dispo-cv:hover { color: #a7f3d0; text-decoration: underline; }
.dispo-cv i { font-size: .78rem; }

/* ============ links en las tarjetas de otros trabajos ============ */
.otros-links { margin-top: .7rem; display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.otros-links a { font-size: .8rem; font-weight: 600; color: #6ee7b7; display: inline-flex; align-items: center; gap: .35rem; }
.otros-links a i { font-size: .7rem; opacity: .8; }
.otros-links a:hover { color: #a7f3d0; text-decoration: underline; }
