@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&display=swap');

:root {
    --primary-color: #007bff; /* Bright Blue */
    --secondary-color: #00d4ff; /* Cyan accent */
    --dark-bg: #121212;
    --darker-bg: #0a0a0a;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--dark-bg);
    position: relative;
    z-index: 0; /* stacking context para los pseudoelementos animados */
}

/* === Capa 1: GRID INFINITO ANIMADO — desliza muy lento dando profundidad === */
body::before {
    content: '';
    position: fixed;
    inset: -2px;
    pointer-events: none;
    z-index: -2;
    background-color: var(--dark-bg);
    background-image:
        /* Grid principal 64×64 */
        linear-gradient(rgba(122,166,255,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(122,166,255,.06) 1px, transparent 1px),
        /* Grid secundario más fino 16×16 — refuerza textura tech */
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size: 64px 64px, 64px 64px, 16px 16px, 16px 16px;
    /* Máscara radial: el grid se ve más denso en el centro y se desvanece a los bordes */
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, #000 30%, transparent 100%);
            mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, #000 30%, transparent 100%);
    animation: xv-grid-drift 60s linear infinite;
}

/* === Capa 2: BLOBS azules corporativos con drift independiente y muy fluido === */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        /* 4 destellos en distintos tonos de azul corporativo */
        radial-gradient(circle, rgba(77, 124, 255, .26) 0%, transparent 65%),  /* azul base */
        radial-gradient(circle, rgba(122, 166, 255, .18) 0%, transparent 65%), /* azul claro */
        radial-gradient(circle, rgba(51, 97, 224, .22) 0%, transparent 65%),   /* azul profundo */
        radial-gradient(circle, rgba(163, 193, 255, .14) 0%, transparent 65%); /* azul muy claro */
    background-size: 70% 65%, 55% 55%, 60% 55%, 45% 45%;
    background-position: 15% 20%, 80% 65%, 45% 92%, 90% 15%;
    background-repeat: no-repeat;
    filter: blur(40px);
    /* Cada blob deriva independientemente con curva fluida — animación casi imperceptible (54s) */
    animation: xv-blobs-flow 54s ease-in-out infinite;
}

@keyframes xv-grid-drift {
    0%   { background-position: 0 0, 0 0, 0 0, 0 0; }
    100% { background-position: 64px 64px, 64px 64px, 16px 16px, 16px 16px; }
}

@keyframes xv-blobs-flow {
    0%   { background-position: 15% 20%, 80% 65%, 45% 92%, 90% 15%; }
    25%  { background-position: 28% 35%, 68% 52%, 58% 80%, 78% 28%; }
    50%  { background-position: 22% 48%, 88% 72%, 38% 95%, 95% 10%; }
    75%  { background-position: 10% 28%, 74% 60%, 52% 85%, 82% 22%; }
    100% { background-position: 15% 20%, 80% 65%, 45% 92%, 90% 15%; }
}

@media (prefers-reduced-motion: reduce) {
    body::before, body::after { animation: none !important; }
}

/* En mobile reducimos la intensidad del blur para no consumir GPU */
@media (max-width: 768px) {
    body::after { filter: blur(30px); opacity: .85; }
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background-color: rgba(10, 10, 10, 0.95);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 42px;
    width: auto;
    display: block;
}
@media (max-width: 768px) {
    .logo img { height: 34px; }
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-color);
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--card-bg);
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    padding: 10px 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.dropdown-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-contact {
    border: 2px solid var(--primary-color);
    padding: 8px 20px;
    border-radius: 50px;
    color: var(--primary-color) !important;
}

.btn-contact:hover {
    background-color: var(--primary-color);
    color: var(--white) !important;
}

/* Hero Section — alto controlado por el contenido (ver regla refinada más abajo) */
.hero {
    display: flex;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    /* Background handled by video */
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 0;
    /* CRÍTICO: el vídeo no debe interceptar eventos (wheel/touch) — todos pasan al body */
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Regla legacy de .hero h1 .highlight — desactivada.
   Ver regla unificada de .text-grad / .highlight más abajo. */

.hero-image {
    margin: 20px 0 30px;
    display: flex;
    justify-content: center;
}

.hero-device-wrapper {
    max-width: 99%;
    width: 1286px;
    height: auto;
    /* Combines floating movement with dynamic glow */
    animation: float-image 4s ease-in-out infinite, breathe 6s ease-in-out infinite;
    display: flex;
    justify-content: center;
}

.hero-device-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

/* Glitch Animation Classes */
.glitch-active {
    animation: glitch-anim 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
}

@keyframes glitch-anim {
    0% { transform: translate(0); }
    20% { transform: translate(-5px, 5px); filter: hue-rotate(90deg); }
    40% { transform: translate(-5px, -5px); filter: hue-rotate(180deg); }
    60% { transform: translate(5px, 5px); filter: invert(0.8); }
    80% { transform: translate(5px, -5px); filter: hue-rotate(-90deg); }
    100% { transform: translate(0); }
}

@keyframes float-image {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

@keyframes breathe {
    0%, 100% {
        filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.9)) 
                drop-shadow(0 0 60px rgba(30, 144, 255, 0.8));
    }
    40% {
        filter: drop-shadow(0 0 30px rgba(30, 144, 255, 0.9)) 
                drop-shadow(0 0 70px rgba(255, 255, 255, 0.8));
    }
    75%, 85% {
        filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
    }
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--darker-bg);
}

/* Background Shapes */
.hero-background .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 1;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -50px;
    left: -100px;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary-color);
    bottom: 50px;
    right: -50px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

/* Sections */
.section {
    padding: 80px 0;
}

.dark-bg {
    background-color: var(--darker-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.grid-5 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Cards */
.service-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Image Container for Hover Effect */
.card-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* Override styles for images inside container to fit perfectly */
.service-card .card-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
    transition: opacity 0.3s ease;
}

/* Standard styles for non-container images (like IA card) */
.service-card > img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Force square aspect ratio */
    height: auto;
    object-fit: cover;
    border-radius: 10px; /* Slight rounded corners instead of full circle */
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.hover-gif {
    opacity: 0;
    z-index: 2;
}

.static-img {
    z-index: 1;
}

.service-card:hover .hover-gif {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.icon-box {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.service-list {
    margin-bottom: 25px;
}

.service-list li {
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.service-list li a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

.service-list li a:hover {
    color: #fff;
    background-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
    transform: translateX(5px);
}

.service-list li::before {
    content: '•';
    color: var(--secondary-color);
    margin-right: 10px;
    font-size: 1.2rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    gap: 10px;
}

/* Projects */
.project-item {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
}

.project-item:hover {
    transform: scale(1.02);
}

/* Áreas de Especialización — hover suave pero visible */
.area-especializacion-item {
    transition: transform .5s cubic-bezier(.2,.8,.2,1),
                box-shadow .5s cubic-bezier(.2,.8,.2,1),
                border-color .4s ease;
    position: relative;
    z-index: 1;
    will-change: transform;
}

.area-especializacion-item:hover {
    transform: translateY(-10px) scale(1.14);
    box-shadow: 0 30px 70px -14px rgba(77, 124, 255, .5),
                0 0 0 1px rgba(122, 166, 255, .35);
    z-index: 10;
}

/* La imagen de fondo respira un poco más que la card para dar profundidad */
.area-especializacion-item .project-img {
    transition: transform .7s cubic-bezier(.2,.8,.2,1), background-image .4s ease;
}
.area-especializacion-item:hover .project-img {
    transform: scale(1.18);
}

.project-img {
    height: 200px;
    width: 100%;
    background: #333;
}

.placeholder-gradient {
    background: linear-gradient(45deg, #2a2a2a, #3a3a3a);
}

.project-info {
    padding: 20px;
}

.project-info h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.project-info span {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
    margin-top: 10px;
}

/* Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Timeline Process */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 0;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
    z-index: 1; /* Push the line to the background */
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    background: inherit;
    width: 50%;
    box-sizing: border-box;
    z-index: 2; /* Keep items above the line */
}
.timeline-item:nth-child(odd) {
    left: 0;
}
.timeline-item:nth-child(even) {
    left: 50%;
}
.timeline-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    right: -25px;
    background-color: var(--bg-color, #0a0a0a); /* Ensure solid background color */
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    top: 15px;
    z-index: 3; /* Highest z-index to stay above the line */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, background-color 0.4s ease;
}
.timeline-item:nth-child(even) .timeline-icon {
    left: -25px;
}
.timeline-content {
    padding: 20px 30px;
    background: var(--card-bg);
    position: relative;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.2);
    border-color: var(--primary-color);
}
.timeline-item:hover .timeline-icon {
    transform: scale(1.3) rotate(360deg);
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 20px var(--primary-color);
}
.timeline-item:hover .timeline-icon i {
    animation: icon-bounce 0.5s ease infinite alternate;
}

@keyframes icon-bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-3px); }
}
.timeline-content h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}
@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    .timeline-icon {
        left: 6px;
        right: auto;
    }
    .timeline-item:nth-child(even) .timeline-icon {
        left: 6px;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    background: var(--dark-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--white);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: #050505;
    padding: 60px 0 20px;
    margin-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
/* Cuando la sección anterior es la CTA con vídeo, se pega al footer sin línea ni separación */
.cta-final + footer,
.cta-final--video + footer {
    border-top: 0;
}
.cta-final,
.cta-final--video {
    margin-bottom: 0 !important;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    /* Logo nativo 1825×561 (ratio 3.25). Para no deformarlo nunca,
       fijamos solo el ancho y dejamos que la altura sea automática. */
    width: 100%;
    max-width: 320px;
    height: auto;
    aspect-ratio: 3.25;
    display: block;
    margin-bottom: 22px;
    filter: brightness(0) invert(1) drop-shadow(0 4px 24px rgba(77, 124, 255, .15));
    cursor: pointer;
    transition: transform .4s cubic-bezier(.2,.8,.2,1),
                filter .4s ease;
    will-change: transform, filter;
}
.footer-logo:hover {
    transform: scale(1.08);
    filter: brightness(0) invert(1)
            drop-shadow(0 0 20px rgba(122, 166, 255, .7))
            drop-shadow(0 0 40px rgba(0, 224, 211, .4));
    animation: xv-footer-logo-glitch .55s ease-in-out infinite;
}
@keyframes xv-footer-logo-glitch {
    0%,100% { transform: scale(1.08) translate(0, 0); }
    20%     { transform: scale(1.08) translate(-1.5px, 1px); }
    40%     { transform: scale(1.08) translate(2px, -1px); }
    60%     { transform: scale(1.08) translate(-1px, -1.5px); }
    80%     { transform: scale(1.08) translate(1px, 1.5px); }
}
@media (max-width: 768px) {
    .footer-logo { max-width: 240px; }
}
@media (prefers-reduced-motion: reduce) {
    .footer-logo:hover { animation: none !important; }
}

/* === Easter egg: tooltip flotante sobre el logo === */
.xv-egg-tooltip {
    position: fixed;
    z-index: 99998;
    background: rgba(13, 15, 23, .95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(122, 166, 255, .35);
    color: var(--xv-ink-0);
    padding: 10px 18px;
    border-radius: 999px;
    font-family: var(--xv-display);
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .01em;
    box-shadow: 0 14px 40px -10px rgba(77, 124, 255, .55),
                0 0 0 1px rgba(122, 166, 255, .15);
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, -90%);
    transition: opacity .25s ease, transform .35s cubic-bezier(.2,.8,.2,1);
}
.xv-egg-tooltip.is-in {
    opacity: 1;
    transform: translate(-50%, -100%);
}

/* === Easter egg: lluvia de emojis al hover número 5 === */
.xv-egg-fly {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    user-select: none;
    will-change: transform, opacity;
    animation: xv-egg-fly 2.2s cubic-bezier(.4, 0, .2, 1) forwards;
}
@keyframes xv-egg-fly {
    0%   { transform: translate(0, 0) scale(.4) rotate(0deg);     opacity: 0; }
    12%  { transform: translate(0, -30px) scale(1.1) rotate(20deg); opacity: 1; }
    100% { transform: translate(var(--xv-egg-x, 40px), -340px) scale(.7) rotate(360deg); opacity: 0; }
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.footer-social {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.footer-social a {
    color: var(--white);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations for Stats */
.typewriter-text {
    overflow: hidden; /* Ensures the content is not revealed until the animation */
    border-right: .15em solid var(--primary-color); /* The typwriter cursor */
    white-space: nowrap; /* Keeps the content on a single line */
    margin: 0 auto; /* Gives that scrolling effect as the typing happens */
    letter-spacing: .05em; /* Adjust as needed */
    display: inline-block;
    max-width: 0;
    opacity: 0;
}

.typewriter-text.typing {
    opacity: 1;
    animation: 
      typing 2s steps(40, end) forwards,
      blink-caret .75s step-end 2s forwards; /* Blink only for 2s, then stop transparent */
}

@keyframes typing {
    from { max-width: 0 }
    to { max-width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-color); }
    100% { border-color: transparent; } /* Ensure it ends transparent */
}

.stat-item {
    min-width: 200px;
}

/* Mobile Nav */
.page-header {
    background: linear-gradient(rgba(10, 10, 10, 0.8), rgba(10, 10, 10, 0.8)), url('https://images.unsplash.com/photo-1617802690992-1ce567c142b5?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    padding: 150px 0 80px;
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--white);
}

.page-header p {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.line {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.toggle .line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line:nth-child(2) {
    opacity: 0;
}

.toggle .line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    .nav-links {
        position: fixed;
        right: 0;
        height: 100vh;
        top: 0;
        background-color: var(--darker-bg); /* Fondo más oscuro y sólido */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start; /* Alinear al principio para permitir scroll */
        padding-top: 80px; /* Espacio para el header */
        width: 100%; /* Ancho completo para evitar solapamientos raros */
        transform: translateX(100%);
        transition: transform 0.5s ease-in-out;
        z-index: 999; /* Por debajo del botón hamburguesa pero encima del contenido */
        overflow-y: auto; /* Permitir scroll si el menú es muy alto */
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .nav-links li {
        opacity: 0; /* Animación de entrada para los items */
        margin: 15px 0;
    }

    .nav-links.nav-active li {
        opacity: 1;
        transition: opacity 0.5s ease-in-out 0.2s;
    }

    .hamburger {
        display: block;
        z-index: 1001; /* Asegurar que esté por encima del menú desplegado */
        position: relative;
    }

    /* Estilo para los dropdowns en móvil */
    .dropdown-menu {
        position: static; /* Flujo normal en móvil */
        background-color: rgba(255, 255, 255, 0.02);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        text-align: center;
        padding: 10px 0;
        display: block; /* Cambiado a block para que se vea en móvil */
        width: 100%;
        margin-top: 10px;
        border-radius: 8px;
    }
    
    .dropdown-menu li a {
        padding: 8px 20px;
        font-size: 0.9rem;
        color: var(--text-muted);
    }

    /* Mostrar dropdowns en móvil siempre o al hacer click (requeriría JS extra), 
       por simplicidad los haremos visibles pero diferenciados o ajustaremos el JS si fuera necesario.
       Para esta versión simple, los haremos aparecer debajo del item padre. */
    .dropdown:hover .dropdown-menu,
    .dropdown .dropdown-menu { /* Forzar visibilidad o ajustar */
        display: block;
        opacity: 1;
        visibility: visible;
    }
    
    .dropdown-menu li a {
        padding: 10px;
        color: var(--text-muted);
    }

    .hero {
        background-attachment: scroll;
        min-height: auto;
        padding: 120px 0 60px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }

    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .page-header {
        padding: 100px 0 50px;
    }
    
    .page-header h1 {
        font-size: 2.2rem !important;
    }
    
    .page-header p {
        font-size: 1rem !important;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .grid-2, .grid-3, .grid-4, .grid-5 {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-device-wrapper {
        width: 100%;
        max-width: 300px; /* Reducir imagen en móvil */
        margin: 0 auto;
    }

    /* Ajustes específicos para el Blog en móvil */
    .blog-layout {
        flex-direction: column !important;
    }
    
    .blog-sidebar {
        width: 100% !important;
        position: relative !important;
        height: auto !important;
        top: 0 !important;
        margin-bottom: 30px;
    }
    
    .blog-post {
        padding: 25px !important;
    }
    
    .blog-post h2 {
        font-size: 1.8rem !important;
    }
    
    .blog-post .subtitle {
        font-size: 1.1rem !important;
    }
    
.blog-post .content h3 {
        font-size: 1.5rem !important;
    }
    
    blockquote.pull-quote {
        font-size: 1.3rem !important;
        max-width: 100% !important;
        padding: 20px !important;
        margin: 40px auto !important;
    }

    /* Fix for XR/IA cards on mobile to prevent duplication and roundness */
    .card-image-container {
        position: relative;
        width: 100%;
        aspect-ratio: 1 / 1;
        border-radius: 10px;
        overflow: hidden;
    }

    .service-card .card-image-container img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
    }

    .service-card {
        padding: 30px 20px;
    }
    
    .project-item > div:last-child {
        padding: 20px !important;
    }
}

/* Tipografía de firma / manuscrita */
.signature-font {
    font-family: 'Caveat', cursive;
    font-size: 1.8rem;
    line-height: 1.4;
    color: var(--primary-color);
    letter-spacing: 1px;
    margin: 20px 0;
    padding: 10px 20px;
    border-left: 4px solid var(--primary-color);
    background-color: rgba(0, 123, 255, 0.05);
    border-radius: 0 10px 10px 0;
}

/* Floating Action Buttons (FAB) */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    z-index: 9999;
}

.fab-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 15px;
    background-color: var(--card-bg);
    color: var(--text-muted);
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    width: 240px;
    box-sizing: border-box;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
    border: 1px solid rgba(255,255,255,0.05);
    pointer-events: none;
}

.fab-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 16px;
    width: 12px;
    height: 12px;
    background-color: var(--card-bg);
    border-right: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transform: rotate(45deg);
}

.fab-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 22px;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
    border: none;
    opacity: 0.6;
}

.floating-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
    color: white;
    opacity: 1;
}

.fab-whatsapp {
    background-color: #25D366;
}

.fab-whatsapp:hover {
    background-color: #128C7E;
}

.fab-contact {
    background-color: var(--primary-color);
}

.fab-contact:hover {
    background-color: var(--secondary-color);
}

/* FAB Animation */
@keyframes fab-pulse-invite {
    0% { transform: scale(1); opacity: 0.6; }
    10% { transform: scale(1.2) rotate(-10deg); opacity: 1; }
    20% { transform: scale(1.2) rotate(10deg); opacity: 1; }
    30% { transform: scale(1.2) rotate(-10deg); opacity: 1; }
    40% { transform: scale(1.2) rotate(10deg); opacity: 1; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.6; }
}

.floating-btn.invite-anim {
    animation: fab-pulse-invite 2s ease-in-out;
}

/* Popup Form */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 500px;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.popup-overlay.active .popup-content {
    transform: translateY(0);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.popup-close:hover {
    color: var(--white);
}

.popup-content h3 {
    margin-bottom: 20px;
    color: var(--white);
    font-size: 1.5rem;
    text-align: center;
}

/* =====================================================================
   XV · DESIGN SYSTEM 2.0 — accesibilidad, performance, identidad
   Reescritura quirúrgica encima del CSS legacy. Tokens, focus-visible,
   reduce-motion, banner cookies, footer extendido, hero refinado,
   tarjetas <a> accesibles, tipografía display, formularios con estado.
   ===================================================================== */

:root {
    --xv-display: 'Space Grotesk', 'Montserrat', system-ui, sans-serif;
    --xv-body: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --xv-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --xv-ink-0: #f5f7fb;
    --xv-ink-1: #e6e9f2;
    --xv-ink-2: #b8bdcf;
    --xv-ink-3: #8a90a6;

    --xv-bg-0: #07080d;
    --xv-bg-1: #0d0f17;
    --xv-bg-2: #131623;
    --xv-bg-3: #1a1e2e;

    --xv-accent: #4d7cff;
    --xv-accent-hi: #7aa6ff;
    --xv-accent-2: #00e0d3;
    --xv-accent-3: #b388ff;

    --xv-grad-hero: radial-gradient(60% 80% at 80% 20%, rgba(77,124,255,.35) 0%, transparent 60%),
                    radial-gradient(50% 60% at 10% 90%, rgba(0,224,211,.28) 0%, transparent 60%),
                    radial-gradient(40% 50% at 50% 50%, rgba(179,136,255,.20) 0%, transparent 70%);
    --xv-grad-text: linear-gradient(95deg, var(--xv-accent-hi) 0%, var(--xv-accent-2) 50%, var(--xv-accent-3) 100%);

    --xv-radius-sm: 8px;
    --xv-radius: 14px;
    --xv-radius-lg: 22px;
    --xv-radius-xl: 32px;

    --xv-shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
    --xv-shadow-2: 0 12px 40px -12px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04);
    --xv-shadow-glow: 0 0 0 1px rgba(122,166,255,.25), 0 14px 50px -10px rgba(77,124,255,.35);

    --xv-ring: 0 0 0 3px rgba(122,166,255,.55), 0 0 0 5px rgba(0,0,0,.65);
    --xv-ease: cubic-bezier(.2,.8,.2,1);
}

/* === Skip link (a11y) === */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: var(--xv-accent);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    z-index: 10001;
    font-weight: 600;
    transition: top .2s ease;
}
.skip-link:focus { top: 16px; outline: 2px solid #fff; }

/* === Focus visible global === */
:where(a, button, [role="button"], input, select, textarea, [tabindex]):focus-visible {
    outline: none;
    box-shadow: var(--xv-ring);
    border-radius: var(--xv-radius-sm);
}

/* === Tipografía display y refinamientos === */
body {
    font-feature-settings: "ss01", "cv11", "kern";
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, .display {
    font-family: var(--xv-display);
    letter-spacing: -0.02em;
    font-weight: 600;
}
.eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--xv-accent-hi);
    padding: 6px 12px;
    border: 1px solid rgba(122,166,255,.25);
    border-radius: 999px;
    background: rgba(122,166,255,.06);
    margin-bottom: 16px;
}
.text-grad,
.hero h1 .highlight,
.stat-item h3 .counter,
.stat-item h3 .suffix {
    /* Degradado animado en bucle (colores complementarios suaves) */
    background-image: linear-gradient(
        110deg,
        #7aa6ff 0%,
        #00e0d3 25%,
        #b388ff 50%,
        #7aa6ff 75%,
        #00e0d3 100%
    ) !important;
    background-size: 220% 100% !important;
    background-position: 0% 50%;
    background-color: transparent !important;
    -webkit-background-clip: text !important;
            background-clip: text !important;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: xv-grad-shift 9s ease-in-out infinite;
}

@keyframes xv-grad-shift {
    0%   { background-position:   0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position:   0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .text-grad, .hero h1 .highlight, .stat-item h3 .counter, .stat-item h3 .suffix {
        animation: none !important;
    }
}

/* === HERO ROTATIVO — 10 frases con typewriter + tipografías diversas === */
.hero-rotator {
    display: inline-block;
    min-height: 1.2em;
    max-width: 100%;
    position: relative;
    line-height: 1.18;
    white-space: nowrap;
    /* Si una frase fuera más ancha que el contenedor, la fuente se reduce
       gracias al clamp del h1 y a max-width 100% (no se rompe en líneas extra). */
}
.hero-rotator-text {
    display: inline-block;
    white-space: nowrap;
}
.hero-rotator-cursor {
    display: inline-block;
    width: 3px;
    height: .9em;
    background: var(--xv-accent-2);
    margin-left: 6px;
    vertical-align: -0.05em;
    animation: xv-cursor-blink 1s steps(2) infinite;
    border-radius: 2px;
}
@keyframes xv-cursor-blink { 50% { opacity: 0; } }

/* Variantes tipográficas para cada frase */
/* Tipografías del rotator: TODAS deben mantener font-size: 1em para que el alto
   del h1 NUNCA varíe entre frases (sólo cambian familia, peso, estilo y tracking). */
.hf-display    { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -.025em; }
.hf-serif      { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-style: italic; letter-spacing: -.01em; }
.hf-handwrite  { font-family: 'Caveat', cursive; font-weight: 700; letter-spacing: 0; }
.hf-mono       { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 600; letter-spacing: -.02em; }
.hf-condensed  { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-stretch: 75%; letter-spacing: -.04em; }
.hf-elegant    { font-family: 'Playfair Display', Georgia, serif; font-weight: 400; letter-spacing: 0; }
.hf-bold       { font-family: 'Montserrat', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.hf-light      { font-family: 'Montserrat', sans-serif; font-weight: 300; letter-spacing: .01em; }
.hf-italic     { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-style: italic; }
.hf-script     { font-family: 'Caveat', cursive; font-weight: 400; }

/* === Variable altura navbar === */
:root { --xv-nav-h: 78px; }

/* === Hero — altura fija para que no varíe con la tipografía del rotator === */
.hero {
    height: auto !important;
    /* Min-height calculada para reservar el alto del contenido completo
       (eyebrow + h1[2 líneas] + p + dispositivo + botones + proof bar) */
    min-height: 760px !important;
    padding-top: calc(var(--xv-nav-h) + 24px);
    padding-bottom: 24px;
    align-items: flex-start !important;
    background: var(--xv-bg-0);
}
@media (max-width: 1100px) {
    .hero { min-height: 700px !important; }
}
@media (max-width: 768px) {
    .hero { min-height: auto !important; } /* en móvil dejamos que se adapte */
}
/* En desktop: reducir el dispositivo y márgenes para que TODO el hero entre en viewport sin ocultar el h1 */
@media (min-width: 1100px) {
    .hero-device-wrapper {
        width: 798px !important;
        max-width: 77% !important;
    }
    .hero-image { margin: 14px 0 22px !important; }
    .hero h1 { margin-bottom: 14px; }
    .hero p { margin-bottom: 22px; max-width: 720px; margin-left: auto; margin-right: auto; }
}
@media (min-width: 1500px) {
    .hero-device-wrapper { width: 927px !important; }
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--xv-grad-hero);
    z-index: 1;
    pointer-events: none;
}
.hero-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(180deg,
                rgba(7,8,13,.78) 0%,
                rgba(7,8,13,.62) 40%,
                rgba(7,8,13,.78) 75%,
                rgba(7,8,13,.95) 100%) !important;
    z-index: 1 !important;
}
/* Aseguramos que nada del vídeo escape del contenedor del hero */
.hero { overflow: hidden !important; }
.hero-video { z-index: 0 !important; }
.hero h1 {
    font-size: clamp(1.5rem, 3.2vw, 2.8rem);
    letter-spacing: -0.02em;
    line-height: 1.18;
    /* Altura FIJA de exactamente 2 líneas — nunca cambia con la tipografía del rotador */
    height: calc(2 * 1.18em);
    min-height: calc(2 * 1.18em);
    max-height: calc(2 * 1.18em);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero h1 br + .hero-rotator,
.hero h1 .hero-rotator {
    display: inline-block;
    line-height: 1.18;
}
.hero h1 .hero-rotator {
    overflow: hidden; /* por seguridad ante frases muy largas */
    max-width: 100%;
}
.hero p {
    color: var(--xv-ink-1);
    font-size: clamp(1rem, 1.4vw, 1.2rem);
}

/* === Botones modernizados === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: .01em;
    transition: transform .25s var(--xv-ease), box-shadow .25s var(--xv-ease), background .25s var(--xv-ease);
    will-change: transform;
}
.btn-primary {
    background: linear-gradient(95deg, var(--xv-accent) 0%, var(--xv-accent-2) 100%);
    box-shadow: var(--xv-shadow-glow);
    color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 50px -8px rgba(77,124,255,.55); }
.btn-outline {
    border: 1.5px solid rgba(255,255,255,.35);
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,.04);
}
.btn-outline:hover { background: #fff; color: var(--xv-bg-0); border-color: #fff; }
.btn-ghost {
    background: transparent;
    color: var(--xv-ink-1);
    padding: 10px 18px;
}
.btn-ghost:hover { color: var(--xv-accent-hi); }

/* === Cards <a> accesibles (sustituyen onclick) === */
a.project-item,
a.area-especializacion-item {
    color: inherit;
    display: block;
    text-decoration: none;
    cursor: pointer;
    background: var(--xv-bg-2);
    border-radius: var(--xv-radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.05);
    transition: transform .55s cubic-bezier(.2,.8,.2,1),
                box-shadow .55s cubic-bezier(.2,.8,.2,1),
                border-color .4s ease;
    will-change: transform;
}
a.project-item:hover,
a.area-especializacion-item:hover {
    transform: translateY(-10px) scale(1.14);
    border-color: rgba(122,166,255,.5);
    box-shadow: 0 30px 70px -14px rgba(77, 124, 255, .5),
                0 0 0 1px rgba(122, 166, 255, .35);
}
a.project-item:focus-visible {
    transform: translateY(-10px) scale(1.14);
    box-shadow: var(--xv-ring), var(--xv-shadow-2);
}

/* === Hamburguesa accesible === */
button.hamburger {
    background: transparent;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    padding: 10px;
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}
button.hamburger .line {
    width: 22px; height: 2px;
    background: var(--xv-ink-0);
    transition: transform .3s var(--xv-ease), opacity .2s ease;
    margin: 0;
}
@media (max-width: 768px) {
    button.hamburger { display: flex; }
}
button.hamburger[aria-expanded="true"] .line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
button.hamburger[aria-expanded="true"] .line:nth-child(2) { opacity: 0; }
button.hamburger[aria-expanded="true"] .line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* === Formulario con estados === */
.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: #ff5577;
}
.form-group input:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
    border-color: var(--xv-accent-2);
}
.form-status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--xv-radius-sm);
    font-size: .9rem;
    display: none;
}
.form-status.is-success {
    display: block;
    background: rgba(0,224,211,.1);
    border: 1px solid rgba(0,224,211,.3);
    color: var(--xv-accent-2);
}
.form-status.is-error {
    display: block;
    background: rgba(255,85,119,.1);
    border: 1px solid rgba(255,85,119,.3);
    color: #ff8da3;
}
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    font-size: .85rem;
    color: var(--xv-ink-2);
    line-height: 1.5;
}
.form-checkbox input { width: auto; margin-top: 3px; }
.form-checkbox a { color: var(--xv-accent-hi); text-decoration: underline; }

/* === Footer extendido (legal) === */
.footer-legal-row {
    border-top: 1px solid rgba(255,255,255,.06);
    margin-top: 30px;
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: .85rem;
    color: var(--xv-ink-3);
}
.footer-legal-row nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}
.footer-legal-row a { color: var(--xv-ink-2); }
.footer-legal-row a:hover { color: var(--xv-accent-hi); }

/* === Banner Cookies === */
.cookie-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    max-width: 720px;
    margin: 0 auto;
    background: rgba(13,15,23,.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--xv-radius-lg);
    padding: 22px 26px;
    box-shadow: var(--xv-shadow-2);
    z-index: 9998;
    display: none;
    transform: translateY(20px);
    opacity: 0;
    transition: transform .4s var(--xv-ease), opacity .4s var(--xv-ease);
}
.cookie-banner.is-open {
    display: block;
    transform: translateY(0);
    opacity: 1;
}
.cookie-banner h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    color: #fff;
}
.cookie-banner p {
    font-size: .85rem;
    color: var(--xv-ink-2);
    margin-bottom: 14px;
    line-height: 1.55;
}
.cookie-banner p a { color: var(--xv-accent-hi); text-decoration: underline; }
.cookie-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.cookie-actions .btn { padding: 10px 20px; font-size: .85rem; }

/* === Page header refinado === */
.page-header {
    background: var(--xv-bg-0);
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--xv-grad-hero);
    opacity: .8;
    z-index: 0;
}
.page-header > .container { position: relative; z-index: 1; }
.page-header h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
}

/* Sombras intensas sobre el texto de la cabecera para que se lea
   bien aunque haya imagen o vídeo de fondo (mismo enfoque que las
   tarjetas de "Lo que hacemos") */
.page-header h1 {
    text-shadow:
        0 0 6px   rgba(0, 0, 0, 1),
        0 0 14px  rgba(0, 0, 0, 1),
        0 2px 4px rgba(0, 0, 0, 1),
        0 4px 14px rgba(0, 0, 0, .95),
        0 8px 32px rgba(0, 0, 0, .9);
}
/* En las palabras con degradado el text-shadow rompe el background-clip:text.
   Usamos filter: drop-shadow() que sí respeta el gradiente. */
.page-header h1 .text-grad,
.page-header h1 .highlight {
    text-shadow: none;
    filter:
        drop-shadow(0 0 6px rgba(0, 0, 0, .95))
        drop-shadow(0 2px 6px rgba(0, 0, 0, .9))
        drop-shadow(0 4px 14px rgba(0, 0, 0, .8));
}
.page-header p {
    text-shadow:
        0 0 6px   rgba(0, 0, 0, 1),
        0 0 12px  rgba(0, 0, 0, 1),
        0 2px 4px rgba(0, 0, 0, 1),
        0 4px 18px rgba(0, 0, 0, .95);
}
.page-header .eyebrow {
    text-shadow:
        0 0 6px   rgba(0, 0, 0, 1),
        0 0 12px  rgba(0, 0, 0, 1),
        0 2px 4px rgba(0, 0, 0, 1);
}

/* === Stat card hover (cifras alineadas durante la animación) === */
.stat-item {
    min-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.stat-item .counter-container {
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    min-width: 5ch;
    line-height: 1.1;
}
.stat-item .counter {
    font-variant-numeric: tabular-nums;
    display: inline-block;
    text-align: right;
    min-width: 4ch;
}
.stat-item .suffix {
    display: inline-block;
    text-align: left;
}
.stat-item .typewriter-text {
    text-align: center;
}

/* === Sección oscura más sutil === */
.dark-bg { background-color: var(--xv-bg-1); }

/* === Mejor scroll === */
html { scroll-behavior: smooth; }

/* === Reduce motion (a11y CRÍTICO) === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .hero-device-wrapper { animation: none !important; filter: none !important; }
    .glitch-active { animation: none !important; }
    .area-especializacion-item:hover { transform: none !important; }
    .typewriter-text { max-width: 100%; opacity: 1; border-right: 0; animation: none; }
    .typewriter-text.typing { animation: none; }

    /* Excepciones: animaciones decorativas que NO interfieren con la lectura
       y son vitales para la identidad del sitio — se mantienen activas
       (muchos móviles activan reduced-motion en Low Power Mode sin que
       el usuario lo haya solicitado realmente). */
    .clients-track {
        animation: marquee 50s linear infinite !important;
        animation-duration: 50s !important;
        animation-iteration-count: infinite !important;
    }
    .hero-video { display: block !important; }
}

/* === Print === */
@media print {
    .navbar, .floating-buttons, .cookie-banner, .hero-video { display: none !important; }
    body { background: #fff; color: #000; }
    .section { padding: 20px 0; }
}

/* === Selección === */
::selection { background: var(--xv-accent); color: #fff; }

/* === Móvil — refinamientos extra === */
@media (max-width: 768px) {
    .footer-legal-row { flex-direction: column; align-items: flex-start; }
    .cookie-banner { padding: 18px 20px; }
    .area-especializacion-item:hover { transform: translateY(-4px) !important; }
}

/* =====================================================================
   COMPONENTES NUEVOS (hero-proof, clients-strip, service-tile,
   process-steps, cta-final, dropdown-group)
   ===================================================================== */

/* Hero — barra de prueba social */
.hero-proof {
    list-style: none;
    margin: 36px auto 0;
    padding: 16px 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px 40px;
    max-width: 720px;
    background: rgba(13,15,23,.55);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}
.hero-proof li {
    color: var(--xv-ink-2);
    font-size: .92rem;
    letter-spacing: .01em;
}
.hero-proof strong {
    display: inline-block;
    margin-right: 4px;
    color: var(--xv-ink-0);
    font-family: var(--xv-display);
    font-weight: 700;
    font-size: 1.05rem;
}

/* Stats bar discreta — siempre una sola línea, sin wrap */
.stats-bar {
    list-style: none;
    margin: 0 auto;
    padding: 18px 32px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: clamp(18px, 3vw, 44px);
    max-width: min(1100px, 96vw);
    width: max-content;
    background: rgba(13,15,23,.6);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    overflow: hidden;
}
.stats-bar li {
    color: var(--xv-ink-2);
    font-size: clamp(.78rem, 1.05vw, .98rem);
    letter-spacing: .01em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    /* Cada cifra es interactiva: padding + radio para que el hover tenga "caja" */
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: default;
    transition: transform .45s cubic-bezier(.2,.8,.2,1),
                background-color .35s ease,
                border-color .35s ease,
                box-shadow .45s cubic-bezier(.2,.8,.2,1),
                color .35s ease;
    will-change: transform;
}
.stats-bar li:hover {
    transform: scale(1.12) translateY(-2px);
    background: rgba(77,124,255,.10);
    border-color: rgba(122,166,255,.45);
    color: var(--xv-ink-0);
    box-shadow: 0 12px 32px -10px rgba(77,124,255,.55),
                0 0 0 1px rgba(122,166,255,.25);
    z-index: 2;
}
.stats-bar li:hover strong {
    /* La cifra se ilumina con el degradado animado */
    background-image: linear-gradient(110deg, #7aa6ff 0%, #00e0d3 50%, #b388ff 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: xv-grad-shift 3s ease-in-out infinite;
}
.stats-bar strong {
    display: inline-block;
    margin-right: 6px;
    color: var(--xv-ink-0);
    font-family: var(--xv-display);
    font-weight: 700;
    font-size: clamp(.92rem, 1.2vw, 1.15rem);
    font-variant-numeric: tabular-nums;
}
.stats-bar .counter {
    display: inline-block;
    text-align: right;
    font-variant-numeric: tabular-nums;
    min-width: 1.5ch;
}
/* En pantallas estrechas la barra se desborda en horizontal con scroll suave */
@media (max-width: 768px) {
    .stats-bar {
        border-radius: 999px;
        padding: 14px 20px;
        gap: 18px;
        max-width: 100vw;
        width: max-content;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .stats-bar::-webkit-scrollbar { display: none; }
}
@media (max-width: 768px) {
    .hero-proof { border-radius: 18px; gap: 14px 24px; padding: 14px 18px; }
}

/* Tira de clientes */
.clients-eyebrow {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .75rem;
    color: var(--xv-ink-3);
    margin-bottom: 22px;
}
.clients-strip {
    text-align: center;
    opacity: .85;
    transition: opacity .3s ease;
}
.clients-strip:hover { opacity: 1; }
.clients-strip img {
    max-width: 100%;
    height: auto;
    filter: grayscale(.4) brightness(1.1);
    border-radius: 10px;
}

/* Servicios — tile minimalista */
.services-grid { gap: 20px; }
.service-tile {
    background: var(--xv-bg-2);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--xv-radius-lg);
    padding: 30px 26px;
    transition: transform .5s cubic-bezier(.2,.8,.2,1),
                border-color .5s cubic-bezier(.2,.8,.2,1),
                box-shadow .5s cubic-bezier(.2,.8,.2,1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
    will-change: transform;
}
.service-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 100% at 0% 0%, rgba(122,166,255,.12) 0%, transparent 50%);
    opacity: 0;
    transition: opacity .35s var(--xv-ease);
    pointer-events: none;
}
.service-tile:hover {
    transform: translateY(-10px) scale(1.06);
    border-color: rgba(122,166,255,.5);
    box-shadow: 0 30px 70px -14px rgba(77, 124, 255, .5),
                0 0 0 1px rgba(122, 166, 255, .35);
    z-index: 5;
}
.service-tile:hover::before { opacity: 1; }
.service-tile-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(77,124,255,.18), rgba(0,224,211,.12));
    border: 1px solid rgba(122,166,255,.22);
    color: var(--xv-accent-hi);
    font-size: 1.4rem;
    margin-bottom: 4px;
}
.service-tile h3 {
    font-size: 1.22rem;
    color: var(--xv-ink-0);
}
.service-tile p {
    font-size: .92rem;
    color: var(--xv-ink-2);
    line-height: 1.55;
    flex: 1;
}
.tile-link {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--xv-accent-hi);
    transition: gap .25s ease;
}
.tile-link:hover { gap: 14px; color: var(--xv-accent-2); }

/* Proceso de trabajo */
.process-steps {
    list-style: none;
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    padding: 0;
    margin: 0;
}
.process-steps li {
    position: relative;
    padding: 28px 24px;
    background: var(--xv-bg-2);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--xv-radius-lg);
    transition: transform .5s cubic-bezier(.2,.8,.2,1),
                border-color .5s cubic-bezier(.2,.8,.2,1),
                box-shadow .5s cubic-bezier(.2,.8,.2,1);
    will-change: transform;
}
.process-steps li:hover {
    transform: translateY(-10px) scale(1.06);
    border-color: rgba(122,166,255,.5);
    box-shadow: 0 30px 70px -14px rgba(77, 124, 255, .5),
                0 0 0 1px rgba(122, 166, 255, .35);
    z-index: 5;
}
.process-number {
    display: inline-block;
    font-family: var(--xv-display);
    font-weight: 700;
    font-size: 2rem;
    background: var(--xv-grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 8px;
    letter-spacing: -0.04em;
}
.process-steps h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}
.process-steps p {
    font-size: .9rem;
    color: var(--xv-ink-2);
    line-height: 1.55;
}

/* CTA final */
.cta-final {
    background:
        radial-gradient(60% 80% at 50% 0%, rgba(77,124,255,.18) 0%, transparent 60%),
        radial-gradient(40% 60% at 50% 100%, rgba(0,224,211,.14) 0%, transparent 60%),
        var(--xv-bg-1);
    text-align: center;
    border-top: 1px solid rgba(255,255,255,.05);
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.cta-final-inner {
    max-width: 720px;
    text-align: center;
}
.cta-final-inner h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 14px;
}
.cta-final-inner p {
    color: var(--xv-ink-2);
    margin-bottom: 30px;
    font-size: 1.05rem;
}
.cta-final-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Dropdown — separador de grupos */
.dropdown-menu .dropdown-group {
    padding: 10px 20px 4px;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--xv-ink-3);
    pointer-events: none;
    border-top: 1px solid rgba(255,255,255,.04);
    margin-top: 4px;
}
.dropdown-menu .dropdown-group:first-child { border-top: 0; margin-top: 0; }
.dropdown-menu { min-width: 240px; max-height: 80vh; overflow-y: auto; }

/* Móvil para los nuevos */
@media (max-width: 768px) {
    .services-grid { grid-template-columns: 1fr; }
    .process-steps { grid-template-columns: 1fr; }
    .cta-final-actions { flex-direction: column; align-items: stretch; }
    .cta-final-actions .btn { width: 100%; }
}

/* =====================================================================
   CASE CARDS (ejemplos de mejora IA)
   ===================================================================== */
.case-card {
    background: var(--xv-bg-2);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--xv-radius-lg);
    padding: 28px 26px;
    transition: transform .5s cubic-bezier(.2,.8,.2,1),
                border-color .5s cubic-bezier(.2,.8,.2,1),
                box-shadow .5s cubic-bezier(.2,.8,.2,1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    will-change: transform;
}
.case-card:hover {
    transform: translateY(-10px) scale(1.06);
    border-color: rgba(122,166,255,.5);
    box-shadow: 0 30px 70px -14px rgba(77, 124, 255, .5),
                0 0 0 1px rgba(122, 166, 255, .35);
    z-index: 5;
}
.case-tag {
    display: inline-block;
    align-self: flex-start;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0,224,211,.1);
    color: var(--xv-accent-2);
    border: 1px solid rgba(0,224,211,.25);
}
.case-card h3 {
    font-size: 1.15rem;
    color: var(--xv-ink-0);
    line-height: 1.35;
    margin-top: 4px;
}
.case-card p {
    font-size: .9rem;
    color: var(--xv-ink-2);
    line-height: 1.55;
}
.case-impact {
    color: var(--xv-accent-hi) !important;
    font-weight: 600;
    font-size: .85rem !important;
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,.06);
    margin-top: 6px;
}

/* =====================================================================
   TECH TILES (stack)
   ===================================================================== */
.tech-grid {
    gap: 16px;
    margin-top: 30px;
}
.tech-tile {
    background: rgba(13,15,23,.5);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--xv-radius);
    padding: 22px 18px;
    text-align: center;
    transition: transform .3s var(--xv-ease), border-color .3s var(--xv-ease), background .3s var(--xv-ease);
}
.tech-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(122,166,255,.3);
    background: rgba(77,124,255,.06);
}
.tech-tile i {
    font-size: 2rem;
    background: var(--xv-grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 10px;
}
.tech-tile h4 {
    font-size: .95rem;
    color: var(--xv-ink-0);
    margin-bottom: 4px;
}
.tech-tile p {
    font-size: .78rem;
    color: var(--xv-ink-3);
    line-height: 1.4;
}

/* =====================================================================
   CLIENTS MARQUEE (sustituye al PNG aplastado)
   ===================================================================== */
.clients-marquee {
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    padding: 10px 0;
}
.clients-track {
    display: flex;
    gap: 60px;
    width: max-content;
    animation: marquee 50s linear infinite;
}
.clients-track > span {
    flex-shrink: 0;
    font-family: var(--xv-display);
    font-weight: 500;
    font-size: 1.6rem;
    letter-spacing: .04em;
    color: var(--xv-ink-2);
    opacity: .75;
    transition: opacity .3s ease, color .3s ease;
    white-space: nowrap;
    padding: 6px 0;
}
.clients-track > span.italic { font-style: italic; }
.clients-track > span.serif { font-family: 'Playfair Display', Georgia, serif; }
.clients-track > span.bold { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 1.4rem; }
.clients-track > span:hover { opacity: 1; color: var(--xv-ink-0); }
.clients-marquee:hover .clients-track { animation-play-state: paused; }

/* Logo SVG real (Mercedes, Real Madrid, MINI, Barcelona) */
.clients-track > span.logo-svg {
    display: inline-flex;
    align-items: center;
    height: 50px;
    padding: 0;
}
.clients-track > span.logo-svg img {
    height: 100%;
    width: auto;
    max-width: 130px;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(.78);
    transition: filter .3s ease;
}
.clients-track > span.logo-svg:hover img {
    filter: brightness(0) invert(1) opacity(1);
}

/* === Logos PNG (todos con altura visual unificada — 20% más pequeños) === */
.clients-track > span.logo-png {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Caja unificada (otro -20%): todos los logos en el MISMO rectángulo */
    height: 70px;
    width: 115px;
    padding: 0;
    overflow: visible;
}
.clients-track > span.logo-png img {
    height: 100%;
    width: 100%;
    object-fit: contain;
    object-position: center;
    /* Los logos vienen ya en blanco — sólo damos opacidad y transición */
    opacity: .72;
    filter: brightness(1.05);
    transition: opacity .3s ease, transform .3s ease, filter .3s ease;
}
.clients-track > span.logo-png:hover img {
    opacity: 1;
    transform: scale(1.06);
    filter: brightness(1.15);
}

@media (max-width: 768px) {
    .clients-track > span.logo-png {
        height: 50px;
        width: 82px;
    }
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* (Excepción de marquee gestionada arriba en la regla global de
   prefers-reduced-motion para garantizar que sigue moviéndose) */

@media (max-width: 768px) {
    .clients-track { gap: 36px; }
    .clients-track > span { font-size: 1.2rem; }
    .case-card { padding: 22px 20px; }
}



/* =====================================================================
   MOBILE & WEBAPP NATIVA — solo aplica a ≤ 768px (no toca tablet/desktop)
   + safe-area iOS, momentum scroll, tap highlights, standalone mode
   ===================================================================== */

/* Variables base para safe-area iOS (notch / home indicator) */
:root {
    --safe-top:    env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left:   env(safe-area-inset-left, 0px);
    --safe-right:  env(safe-area-inset-right, 0px);
}

/* Webapp UX — momentum scroll, sin selección accidental, tap highlight controlado */
html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(122, 166, 255, 0.18);
    scroll-padding-top: calc(var(--xv-nav-h) + 12px);
}
body {
    -webkit-overflow-scrolling: touch;
    /* IMPORTANTE: NO usar overscroll-behavior-y: none ni touch-action restrictivo
       a nivel global — algunos navegadores móviles (Chrome Android, Edge Mobile)
       interpretan estos valores de forma que bloquean el scroll vía wheel/touch.
       Dejamos el comportamiento por defecto. */
    text-size-adjust: 100%;
}

/* Scrollbars discretas en mobile/webview */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(122, 166, 255, .3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(122, 166, 255, .55); }

/* Modo standalone (PWA instalada) — quitar elementos de browser feel */
html.is-standalone .skip-link { display: none; }
html.is-standalone .navbar {
    padding-top: calc(15px + var(--safe-top));
}

/* Imágenes y vídeos sensibles al tap */
img, video { -webkit-user-drag: none; user-select: none; }

/* === MÓVIL ≤ 768px ============================================== */
@media (max-width: 768px) {
    /* Navbar respeta safe-area top */
    .navbar {
        padding-top: calc(15px + var(--safe-top));
        padding-left: max(15px, var(--safe-left));
        padding-right: max(15px, var(--safe-right));
    }

    /* Hero: usa la --vh dinámica (corrige iOS) y ajusta padding */
    .hero {
        padding-top: calc(var(--xv-nav-h) + var(--safe-top) + 24px);
        padding-bottom: 50px;
    }
    .hero-content { padding: 0 6px; }
    .hero h1 {
        font-size: clamp(1.4rem, 7vw, 2rem);
        min-height: calc(2 * 1.18em);
    }
    .hero p { font-size: .98rem; padding: 0 4px; }

    /* Hero rotator — caja un poco más generosa para que ningún wordmark se corte */
    .hero-rotator { font-size: .96em; }

    /* Hero proof (chip de cifras del hero) — más compacto */
    .hero-proof {
        gap: 10px 18px;
        padding: 12px 18px;
        margin-top: 22px;
        font-size: .82rem;
    }
    .hero-proof strong { font-size: .95rem; }

    /* Botones: 48px de altura mínima — tap target nativo */
    .btn { min-height: 48px; padding: 12px 22px; font-size: .95rem; }
    .btn-contact { min-height: 40px; padding: 8px 18px; }
    .floating-btn { width: 52px; height: 52px; font-size: 24px; opacity: .9; }
    .floating-buttons {
        bottom: max(20px, var(--safe-bottom));
        right: max(16px, var(--safe-right));
    }

    /* Stats bar: en mobile mantiene scroll horizontal sin scrollbar visible */
    .stats-bar {
        margin: 0 16px;
        max-width: calc(100vw - 32px);
    }

    /* Section headers más compactos */
    .section { padding: 50px 0; }
    .section-header { margin-bottom: 36px; }
    .section-header h2 { font-size: clamp(1.5rem, 5.5vw, 2rem); }

    /* Service tiles, case cards, process steps — un toque más estrechos */
    .service-tile, .case-card, .process-steps li { padding: 24px 20px; }
    .service-tile-icon { width: 44px; height: 44px; font-size: 1.2rem; }

    /* Project items: mejor uso del ancho */
    .grid-3, .grid-4 { gap: 18px; }
    a.project-item, a.area-especializacion-item { border-radius: 16px; }

    /* CTA final */
    .cta-final-inner h2 { font-size: clamp(1.5rem, 5.5vw, 2rem); }
    .cta-final-inner p { font-size: .98rem; }

    /* Form: inputs grandes, anti-zoom iOS (font-size ≥ 16px) */
    .contact-form { padding: 28px 22px; }
    .form-group input, .form-group textarea, .form-group select {
        font-size: 16px; /* CRÍTICO: <16px provoca zoom en iOS al focus */
        padding: 14px;
        min-height: 48px;
    }
    .form-group textarea { min-height: 120px; }
    .form-group label { font-size: .92rem; }

    /* Footer en mobile más respirado */
    footer { padding: 40px 0 calc(20px + var(--safe-bottom)); }
    .footer-content { gap: 28px; }
    .footer-col h4 { margin-bottom: 14px; }

    /* Cookies banner — pegar al borde inferior con safe-area */
    .cookie-banner {
        bottom: max(12px, var(--safe-bottom));
        left: 12px; right: 12px;
        padding: 18px 20px;
    }
    .cookie-actions { flex-direction: column; }
    .cookie-actions .btn { width: 100%; }

    /* Menú abierto — full-screen friendly + safe-area */
    .nav-links {
        padding-top: calc(var(--xv-nav-h) + var(--safe-top) + 16px);
        padding-bottom: calc(var(--safe-bottom) + 30px);
    }

    /* Reduce el blur del fondo para no sobrecargar GPU móvil */
    body::after { filter: blur(28px); }

    /* Logos del marquee: tamaño aún más compacto en mobile (-20% extra) */
    .clients-track > span.logo-png {
        height: 45px;
        width: 74px;
    }
    .clients-marquee { padding: 4px 0; }
    .clients-track { gap: 28px; }
}

/* === MÓVIL muy estrecho (iPhone SE, ≤ 380px) ====================== */
@media (max-width: 380px) {
    .hero h1 { font-size: 1.3rem; }
    .stats-bar { gap: 14px; padding: 12px 16px; }
    .hero-proof { gap: 8px 14px; padding: 10px 14px; font-size: .78rem; }
    .container { padding: 0 14px; }
}

/* === LANDSCAPE en móvil — evitar hero gigante ==================== */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
    .hero { min-height: 0; padding-top: calc(var(--xv-nav-h) + 16px); padding-bottom: 30px; }
    .hero-image { display: none; } /* la imagen del dispositivo no aporta en landscape corto */
    .hero h1 { font-size: 1.4rem; }
}

/* === iPad pro / tablet horizontal — pequeños retoques no destructivos === */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-device-wrapper { width: 670px !important; max-width: 77% !important; }
    .nav-links { gap: 14px; }
}

/* =====================================================================
   MOBILE — fix de descuadres y overflow horizontal
   ===================================================================== */
@media (max-width: 768px) {
    /* GLOBAL: ningún elemento puede romper el viewport */
    html, body { max-width: 100%; overflow-x: hidden; }
    main, section, header, footer, .container { max-width: 100%; }
    .container { padding-left: 16px; padding-right: 16px; }

    /* Tagline / eyebrow del hero — que se ajuste sin overflow */
    .eyebrow { font-size: .68rem; padding: 5px 10px; letter-spacing: .12em; }

    /* HERO: contenido bien centrado, sin paddings inline rebeldes */
    .hero-content { padding: 0 !important; max-width: 100%; }
    .hero h1 { padding: 0 4px; }
    .hero p { padding: 0 6px; }
    .hero-buttons {
        flex-direction: column !important;
        width: 100%;
        gap: 12px;
        margin: 0 auto;
        max-width: 320px;
    }
    .hero-buttons .btn { width: 100%; }
    .hero-image { margin: 18px 0 22px !important; }
    .hero-device-wrapper {
        width: 100% !important;
        max-width: 280px !important;
    }

    /* HERO ROTATOR: que nunca cause overflow horizontal */
    .hero h1 .hero-rotator {
        max-width: 100%;
        display: inline-block;
        vertical-align: top;
    }

    /* STATS BAR: que se vea entera sin scroll horizontal — wrap en 2 líneas */
    .stats-bar {
        flex-wrap: wrap !important;
        width: auto !important;
        max-width: calc(100vw - 24px) !important;
        margin: 0 auto !important;
        gap: 8px 14px !important;
        padding: 14px 18px !important;
        border-radius: 22px !important;
        overflow: visible !important;
        justify-content: center;
    }
    .stats-bar li {
        padding: 5px 10px !important;
        font-size: .78rem !important;
    }
    .stats-bar strong { font-size: .92rem !important; }

    /* HERO PROOF chip: igual tratamiento */
    .hero-proof {
        max-width: 100%;
        margin-left: 8px;
        margin-right: 8px;
        border-radius: 22px;
    }

    /* CARDS / GRIDS: 1 columna en móvil siempre */
    .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr !important; gap: 16px !important; }

    /* Service tiles / case cards: hover scale más suave en mobile (no salirse) */
    .service-tile:hover, .case-card:hover, .process-steps li:hover,
    a.project-item:hover, a.area-especializacion-item:hover {
        transform: translateY(-4px) scale(1.02) !important;
    }
    .area-especializacion-item:hover .project-img { transform: scale(1.04) !important; }

    /* Container de cards: padding interno coherente */
    a.project-item, a.area-especializacion-item { border-radius: 14px; }
    .project-img { height: 200px !important; }

    /* Section headers: sin desbordamiento del view-all */
    .section-header { flex-direction: column; gap: 12px; text-align: center; }
    .section-header .view-all { margin-top: 4px; }

    /* Footer: 1 col en mobile y centrado */
    .footer-content { grid-template-columns: 1fr !important; text-align: center; }
    .footer-content .footer-col { display: flex; flex-direction: column; align-items: center; }
    .footer-social { justify-content: center; }
    .footer-legal-row { flex-direction: column; align-items: center !important; gap: 10px; text-align: center; }
    .footer-legal-row nav { justify-content: center; }

    /* Contact info iconos: alineados a la izquierda con buen espacio */
    .info-item { flex-wrap: wrap; }

    /* Background mesh blobs: contener para que no se salgan del viewport */
    body::after { left: -10%; right: -10%; }

    /* (sin override de font-size en hf-* para no descuadrar la altura del h1) */

    /* Form labels y status: tipografía cómoda */
    .form-status { font-size: .85rem; padding: 10px 14px; }
    .form-checkbox { font-size: .82rem; }

    /* Tabla cookies (legal): scroll horizontal limpio si no cabe */
    .cookies-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Page header (subpáginas): padding más sensato */
    .page-header {
        padding-top: calc(var(--xv-nav-h) + var(--safe-top) + 30px) !important;
        padding-bottom: 36px !important;
    }
    .page-header h1 { font-size: clamp(1.7rem, 6vw, 2.4rem) !important; }

    /* CTA final: paddings moderados */
    .cta-final-actions { width: 100%; max-width: 320px; margin: 0 auto; }
}

/* =====================================================================
   SERVICE-TILE con BG IMAGE — fondo estático, animado al hover,
   overlay oscuro + degradado para legibilidad del texto
   ===================================================================== */
.service-tile--media {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    /* Fuerza color de texto siempre legible sobre la imagen */
    color: var(--xv-ink-0);
}
.service-tile--media .service-tile-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: var(--tile-still);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    transition: transform .8s cubic-bezier(.2,.8,.2,1),
                background-image .25s ease,
                opacity .4s ease;
    opacity: .55; /* mucha opacidad → la imagen queda muy atenuada */
    filter: saturate(.85) brightness(.85);
}
/* Capa de degradado oscuro encima de la imagen para legibilidad */
.service-tile--media::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(180deg,
            rgba(7, 8, 13, .55) 0%,
            rgba(7, 8, 13, .65) 45%,
            rgba(7, 8, 13, .92) 100%),
        radial-gradient(120% 90% at 0% 0%, rgba(77,124,255,.18) 0%, transparent 60%);
}
/* Hover: la imagen se ilumina ligeramente y pasa al GIF animado */
.service-tile--media:hover .service-tile-bg {
    background-image: var(--tile-anim);
    opacity: .8;
    transform: scale(1.10);
    filter: saturate(1) brightness(1);
}
/* El icono y los textos quedan SIEMPRE encima del background */
.service-tile--media .service-tile-icon,
.service-tile--media h3,
.service-tile--media p,
.service-tile--media .tile-link {
    position: relative;
    z-index: 1;
}
.service-tile--media h3 {
    color: #fff;
    text-shadow:
        0 0 6px   rgba(0, 0, 0, 1),
        0 0 14px  rgba(0, 0, 0, 1),
        0 2px 4px rgba(0, 0, 0, 1),
        0 4px 14px rgba(0, 0, 0, .95),
        0 8px 32px rgba(0, 0, 0, .9);
}
.service-tile--media p {
    color: #f5f7fb;
    text-shadow:
        0 0 6px   rgba(0, 0, 0, 1),
        0 0 12px  rgba(0, 0, 0, 1),
        0 2px 4px rgba(0, 0, 0, 1),
        0 4px 18px rgba(0, 0, 0, .95);
}
.service-tile--media .service-tile-icon {
    background: linear-gradient(135deg, rgba(77, 124, 255, .32), rgba(0, 224, 211, .2));
    border-color: rgba(122, 166, 255, .55);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .7);
}
.service-tile--media .service-tile-icon i {
    text-shadow:
        0 0 4px rgba(0, 0, 0, 1),
        0 2px 6px rgba(0, 0, 0, 1);
}
.service-tile--media .tile-link {
    color: var(--xv-ink-0);
    text-shadow:
        0 0 6px   rgba(0, 0, 0, 1),
        0 0 12px  rgba(0, 0, 0, 1),
        0 2px 4px rgba(0, 0, 0, 1),
        0 4px 14px rgba(0, 0, 0, .9);
}

/* En mobile, opacidad inicial menor para no oscurecer demasiado */
@media (max-width: 768px) {
    .service-tile--media .service-tile-bg { opacity: .6; }
    .service-tile--media:hover .service-tile-bg { opacity: .85; }
}
/* En dispositivos táctiles (sin hover) mostramos siempre el GIF animado en
   las tarjetas de servicios para que se vea movimiento como en desktop */
@media (hover: none) and (pointer: coarse) {
    .service-tile--media .service-tile-bg {
        background-image: var(--tile-anim) !important;
        opacity: .8 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-tile--media .service-tile-bg { transform: none !important; transition: none !important; }
}

/* =====================================================================
   CTA FINAL CON VIDEO DE FONDO
   ===================================================================== */
.cta-final--video {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
    /* Fondo de respaldo si el vídeo no carga */
    background:
        radial-gradient(60% 80% at 50% 0%, rgba(77,124,255,.18) 0%, transparent 60%),
        radial-gradient(40% 60% at 50% 100%, rgba(0,224,211,.14) 0%, transparent 60%),
        var(--xv-bg-1) !important;
}
.cta-final-video {
    position: absolute;
    /* Más alto que la sección para tener "carrera" generosa de parallax sin bordes vacíos */
    top: -25%;
    left: 0;
    width: 100%;
    height: 150%;
    object-fit: cover;
    z-index: -2;
    /* Saturación reducida + brillo bajo para que el texto destaque */
    filter: saturate(.85) brightness(.7);
    pointer-events: none;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}
.cta-final-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        /* Tinte oscuro general para legibilidad */
        linear-gradient(180deg,
            rgba(7, 8, 13, .65) 0%,
            rgba(7, 8, 13, .55) 50%,
            rgba(7, 8, 13, .80) 100%),
        /* Toque azul corporativo para coherencia con la paleta */
        radial-gradient(70% 60% at 50% 50%, rgba(77, 124, 255, .18) 0%, transparent 70%);
}
.cta-final--video .cta-final-inner {
    position: relative;
    z-index: 1;
}
/* Refuerzo de sombras de texto para garantizar legibilidad sobre el video */
.cta-final--video h2 {
    color: #fff;
    text-shadow:
        0 0 6px   rgba(0, 0, 0, 1),
        0 0 14px  rgba(0, 0, 0, .9),
        0 4px 18px rgba(0, 0, 0, .8);
}
.cta-final--video p {
    color: #f0f3fa;
    text-shadow:
        0 0 6px   rgba(0, 0, 0, 1),
        0 2px 10px rgba(0, 0, 0, .85);
}

@media (prefers-reduced-motion: reduce) {
    .cta-final-video { display: none; }
}
@media (max-width: 768px) {
    /* En móvil, opcional: bajar resolución de filtros para no exigir GPU */
    .cta-final-video { filter: saturate(.85) brightness(.65); }
}

/* =====================================================================
   EVENTOS — pilares + timeline animada al scroll
   ===================================================================== */

/* Pilares (banner de "qué incluye el alquiler") */
.event-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
}
.event-pillar {
    text-align: center;
    padding: 26px 22px;
    background: rgba(13, 15, 23, .55);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--xv-radius-lg);
    transition: transform .5s cubic-bezier(.2,.8,.2,1),
                border-color .4s ease,
                box-shadow .5s cubic-bezier(.2,.8,.2,1);
    will-change: transform;
}
.event-pillar:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: rgba(122, 166, 255, .45);
    box-shadow: 0 22px 50px -14px rgba(77, 124, 255, .35),
                0 0 0 1px rgba(122, 166, 255, .25);
}
.event-pillar i {
    font-size: 2rem;
    background: var(--xv-grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 12px;
    display: inline-block;
}
.event-pillar h3 {
    font-size: 1.05rem;
    color: var(--xv-ink-0);
    margin-bottom: 8px;
}
.event-pillar p {
    font-size: .88rem;
    color: var(--xv-ink-2);
    line-height: 1.55;
    margin: 0;
}

/* ============================
   EVENT STEPS — timeline scroll-triggered
   Línea vertical central + 6 pasos que aparecen alternando
   ============================ */
.event-steps {
    list-style: none;
    counter-reset: event-step;
    padding: 0;
    margin: 60px auto 0;
    max-width: 1000px;
    position: relative;
}
.event-steps::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    margin-left: -1.5px;
    background: linear-gradient(180deg,
        rgba(77, 124, 255, .15) 0%,
        rgba(122, 166, 255, .35) 50%,
        rgba(77, 124, 255, .15) 100%);
    border-radius: 3px;
    z-index: 0;
}
.event-step {
    position: relative;
    width: 50%;
    padding: 28px 50px;
    box-sizing: border-box;
    /* Estado inicial: invisible y un poco desplazado */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .8s cubic-bezier(.2,.8,.2,1),
                transform  .8s cubic-bezier(.2,.8,.2,1);
}
.event-step:nth-child(odd)  { left: 0; transform: translate(-30px, 40px); }
.event-step:nth-child(even) { left: 50%; transform: translate(30px, 40px); }

/* Cuando entra en viewport → visible y centrado */
.event-step.is-in {
    opacity: 1;
    transform: translate(0, 0);
}

/* Punto/icono central */
.event-step-icon {
    position: absolute;
    top: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--xv-bg-1);
    border: 3px solid var(--xv-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--xv-accent-hi);
    font-size: 1.3rem;
    box-shadow: 0 0 0 6px rgba(13, 15, 23, .9), 0 8px 24px -6px rgba(77, 124, 255, .35);
    z-index: 2;
    transition: transform .5s cubic-bezier(.2,.8,.2,1), background .4s ease, color .4s ease;
}
.event-step:nth-child(odd)  .event-step-icon { right: -28px; }
.event-step:nth-child(even) .event-step-icon { left: -28px; }
.event-step.is-in .event-step-icon {
    background: linear-gradient(135deg, var(--xv-accent), var(--xv-accent-2));
    color: #fff;
    transform: scale(1.05);
}

/* Tarjeta de contenido */
.event-step-content {
    background: var(--xv-bg-2);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--xv-radius-lg);
    padding: 24px 28px;
    transition: transform .5s cubic-bezier(.2,.8,.2,1),
                border-color .4s ease,
                box-shadow .5s cubic-bezier(.2,.8,.2,1);
    position: relative;
}
.event-step-content::before {
    /* Número grande tipo watermark */
    content: attr(data-num);
    position: absolute;
    top: -10px;
    right: 16px;
    font-family: var(--xv-display);
    font-size: 4rem;
    font-weight: 700;
    background: var(--xv-grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    opacity: .18;
    line-height: 1;
    pointer-events: none;
}
/* Inyectamos el número del data-step-num del <li> */
.event-step:nth-child(1) .event-step-content::before { content: '01'; }
.event-step:nth-child(2) .event-step-content::before { content: '02'; }
.event-step:nth-child(3) .event-step-content::before { content: '03'; }
.event-step:nth-child(4) .event-step-content::before { content: '04'; }
.event-step:nth-child(5) .event-step-content::before { content: '05'; }
.event-step:nth-child(6) .event-step-content::before { content: '06'; }

.event-step-content h3 {
    color: var(--xv-ink-0);
    font-size: 1.15rem;
    margin-bottom: 10px;
}
.event-step-content p {
    color: var(--xv-ink-2);
    font-size: .93rem;
    line-height: 1.6;
    margin: 0;
}
.event-step:hover .event-step-content {
    border-color: rgba(122, 166, 255, .35);
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -16px rgba(77, 124, 255, .35);
}

/* Móvil: stack vertical, línea pegada al borde izquierdo */
@media (max-width: 768px) {
    .event-steps::before { left: 24px; margin-left: 0; }
    .event-step {
        width: 100%;
        padding: 18px 0 18px 64px;
        transform: translateY(40px) !important;
    }
    .event-step:nth-child(odd),
    .event-step:nth-child(even) { left: 0; }
    .event-step.is-in { transform: translate(0,0) !important; }
    .event-step:nth-child(odd) .event-step-icon,
    .event-step:nth-child(even) .event-step-icon {
        left: -4px;
        right: auto;
    }
    .event-step-icon {
        width: 56px; height: 56px; top: 18px;
    }
    .event-step-content { padding: 20px 22px; }
    .event-step-content::before { font-size: 3rem; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .event-step { opacity: 1 !important; transform: none !important; }
}

/* =====================================================================
   INVENTORY LIST — formato discreto, icono + texto en línea
   ===================================================================== */
.inventory-list {
    list-style: none;
    padding: 0;
    margin: 40px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}
.inventory-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: rgba(13, 15, 23, .45);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--xv-radius);
    transition: border-color .35s ease, background-color .35s ease, transform .35s var(--xv-ease);
}
.inventory-item:hover {
    border-color: rgba(122, 166, 255, .35);
    background: rgba(13, 15, 23, .7);
    transform: translateY(-2px);
}
.inventory-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(77, 124, 255, .14), rgba(0, 224, 211, .08));
    border: 1px solid rgba(122, 166, 255, .22);
    color: var(--xv-accent-hi);
    font-size: 1.15rem;
}
.inventory-text {
    min-width: 0; /* permite truncado */
}
.inventory-text h4 {
    font-size: .98rem;
    color: var(--xv-ink-0);
    margin: 0 0 3px;
    font-family: var(--xv-display);
    font-weight: 600;
}
.inventory-text span {
    font-size: .82rem;
    color: var(--xv-ink-3);
    line-height: 1.45;
    display: block;
}

@media (max-width: 768px) {
    .inventory-list { grid-template-columns: 1fr; gap: 10px; }
    .inventory-item { padding: 14px 16px; }
    .inventory-icon { width: 38px; height: 38px; font-size: 1rem; }
    .inventory-text h4 { font-size: .92rem; }
    .inventory-text span { font-size: .78rem; }
}

/* =====================================================================
   EVENTOS — page-header pegado a la sección de pilares (sin franja)
   ===================================================================== */
.page-header.eventos-hero {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-bottom: 0;
}
.page-header.eventos-hero + .eventos-pillars-section {
    margin-top: 0 !important;
    border-top: 0;
}
/* En el hero de eventos compactamos el padding inferior interno para que las cifras no queden tan separadas del corte */
.page-header.eventos-hero .container { padding-bottom: 50px; }

/* =====================================================================
   NAV — item activo (sólo color plano, sin subrayado)
   ===================================================================== */
.nav-links > li > a.is-active,
.nav-links > li > a[aria-current="page"] {
    color: var(--xv-accent-hi) !important;
    font-weight: 600;
}
/* Botón Contacto activo: relleno azul corporativo plano */
.nav-links > li > a.btn-contact.is-active {
    background: var(--xv-accent) !important;
    border-color: var(--xv-accent) !important;
    color: #fff !important;
}

/* === Item activo DENTRO del dropdown (subpágina actual) === */
.dropdown-menu li a.is-active,
.dropdown-menu li a[aria-current="page"] {
    color: var(--xv-accent-hi) !important;
    background: rgba(77, 124, 255, .14);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--xv-accent);
}
.dropdown-menu li a.is-active:hover {
    background: rgba(77, 124, 255, .22);
}

/* =====================================================================
   Logo del navbar — hint de "ir a inicio" al hover (icono casa que sale por la izquierda)
   ===================================================================== */
.navbar .logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    overflow: visible;
}
.logo-home-icon {
    position: absolute;
    right: 100%;          /* situado a la izquierda del logo */
    top: 50%;
    margin-right: 0;       /* en reposo, pegado al borde del logo (oculto detrás) */
    transform: translate(15px, -50%);
    opacity: 0;
    color: var(--xv-accent-hi);
    font-size: 1.05rem;
    pointer-events: none;
    transition: opacity .35s ease,
                transform .45s cubic-bezier(.2,.8,.2,1),
                margin-right .45s cubic-bezier(.2,.8,.2,1);
    text-shadow: 0 0 12px rgba(122, 166, 255, .55);
    z-index: 0;            /* queda por detrás del logo en el stack */
}
.navbar .logo:hover .logo-home-icon,
.navbar .logo:focus-visible .logo-home-icon {
    opacity: 1;
    transform: translate(0, -50%);
    margin-right: 12px;
}
.navbar .logo img { position: relative; z-index: 1; }

/* En móvil reducimos el icono y lo separamos un poco menos */
@media (max-width: 768px) {
    .logo-home-icon { font-size: .9rem; }
    .navbar .logo:hover .logo-home-icon { margin-right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .logo-home-icon { transition: opacity .2s ease !important; transform: translate(0, -50%) !important; }
}

/* =====================================================================
   CLIENTS MARQUEE — interactivo conservando la animación CSS original
   ===================================================================== */
.clients-marquee.is-interactive {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    /* pan-y: deja que el NAVEGADOR maneje el scroll vertical de la página
       (clave en Android Chrome). El JS captura el swipe horizontal sobre el marquee. */
    touch-action: pan-y;
}
.clients-marquee.is-interactive.is-grabbing { cursor: grabbing; }
.clients-marquee.is-interactive .clients-track { will-change: transform; }
.clients-marquee.is-interactive .clients-track > * {
    pointer-events: none;       /* evita que un click sobre un logo arrastre su imagen */
}

/* =====================================================================
   SOBRE NOSOTROS — manifiesto + 4 pilares premium
   ===================================================================== */

/* Sección manifiesto: declaración central destacada */
.about-manifesto {
    position: relative;
    padding: 90px 0;
}
.about-manifesto::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 80% at 50% 50%, rgba(77,124,255,.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}
.about-manifesto h2 strong {
    color: var(--xv-ink-0);
    font-weight: 700;
}

/* Grid de 4 pilares 2x2 */
.about-pillars {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 24px;
}

/* Tarjeta de pilar — layout horizontal con número grande */
.pillar-card {
    position: relative;
    padding: 36px 32px 32px;
    background: linear-gradient(155deg,
                rgba(77, 124, 255, .06) 0%,
                rgba(13, 15, 23, .55) 35%,
                rgba(13, 15, 23, .65) 100%);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: var(--xv-radius-lg);
    overflow: hidden;
    isolation: isolate;
    transition: transform .55s cubic-bezier(.2,.8,.2,1),
                border-color .4s ease,
                box-shadow .55s cubic-bezier(.2,.8,.2,1);
    will-change: transform;
}
.pillar-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(77, 124, 255, .25) 0%, transparent 60%);
    filter: blur(40px);
    z-index: -1;
    opacity: .6;
    transition: opacity .5s ease, transform .8s cubic-bezier(.2,.8,.2,1);
}
.pillar-card:hover {
    transform: translateY(-6px);
    border-color: rgba(122, 166, 255, .4);
    box-shadow: 0 30px 70px -18px rgba(77, 124, 255, .35),
                0 0 0 1px rgba(122, 166, 255, .25);
}
.pillar-card:hover::before {
    opacity: 1;
    transform: scale(1.15) rotate(8deg);
}

/* Número grande tipo watermark */
.pillar-num {
    position: absolute;
    top: 16px;
    right: 24px;
    font-family: var(--xv-display);
    font-weight: 700;
    font-size: 5.5rem;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(180deg,
                rgba(122, 166, 255, .18) 0%,
                rgba(122, 166, 255, .04) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    pointer-events: none;
    user-select: none;
}

/* Icono del pilar */
.pillar-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(77, 124, 255, .22), rgba(0, 224, 211, .14));
    border: 1px solid rgba(122, 166, 255, .35);
    color: var(--xv-accent-hi);
    font-size: 1.4rem;
    margin-bottom: 18px;
    box-shadow: 0 6px 20px -6px rgba(77, 124, 255, .35);
}

/* Texto del pilar */
.pillar-card h3 {
    font-family: var(--xv-display);
    font-size: 1.4rem;
    color: var(--xv-ink-0);
    margin-bottom: 12px;
    letter-spacing: -0.015em;
}
.pillar-card p {
    color: var(--xv-ink-2);
    font-size: .96rem;
    line-height: 1.65;
    margin-bottom: 18px;
}
.pillar-card p strong { color: var(--xv-ink-0); font-weight: 600; }
.pillar-card p em { color: var(--xv-accent-hi); font-style: normal; font-weight: 600; }

/* Lista de bullets dentro del pilar */
.pillar-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, .06);
    padding-top: 16px;
}
.pillar-bullets li {
    position: relative;
    padding: 6px 0 6px 24px;
    color: var(--xv-ink-2);
    font-size: .87rem;
    line-height: 1.5;
}
.pillar-bullets li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--xv-accent), var(--xv-accent-2));
    box-shadow: 0 0 8px rgba(122, 166, 255, .55);
}

@media (max-width: 768px) {
    .about-pillars { grid-template-columns: 1fr; }
    .pillar-card { padding: 28px 22px 24px; }
    .pillar-num { font-size: 4rem; top: 12px; right: 18px; }
    .pillar-card h3 { font-size: 1.2rem; }
    .about-manifesto { padding: 60px 0; }
    .about-manifesto h2 br { display: none; }
}

/* =====================================================================
   SOBRE NOSOTROS — manifiesto rico (statement + curva exponencial)
   ===================================================================== */
.about-manifesto {
    position: relative;
    padding: 90px 0;
    overflow: hidden;
}
.about-manifesto::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(50% 60% at 80% 30%, rgba(0, 224, 211, .08) 0%, transparent 70%),
        radial-gradient(50% 60% at 20% 80%, rgba(77, 124, 255, .10) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Grid 2 columnas: texto / visualización */
.manifesto-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
    gap: 64px;
    align-items: center;
}

/* === IZQUIERDA: declaración tipográfica === */
.manifesto-text { max-width: 560px; }
.manifesto-statement {
    font-family: var(--xv-display);
    font-size: clamp(1.8rem, 3.6vw, 2.9rem);
    line-height: 1.18;
    letter-spacing: -0.025em;
    color: var(--xv-ink-0);
    margin: 14px 0 22px;
}
/* Palabra "exponencialmente" con highlight tipo marker */
.manifesto-word {
    position: relative;
    display: inline-block;
    padding: 0 8px;
    z-index: 1;
}
.manifesto-word-text {
    position: relative;
    z-index: 2;
    background: linear-gradient(95deg, #4d7cff 0%, #00e0d3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 700;
}
/* Subrayado animado tipo trazo a mano detrás de la palabra */
.manifesto-word-bg {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    height: .55em;
    background: linear-gradient(95deg, rgba(77, 124, 255, .25), rgba(0, 224, 211, .35));
    border-radius: 3px;
    transform: skewX(-6deg) scaleX(0);
    transform-origin: left center;
    animation: manifestoUnderline 1.4s cubic-bezier(.65, 0, .35, 1) .4s forwards;
    z-index: 1;
}
@keyframes manifestoUnderline {
    to { transform: skewX(-6deg) scaleX(1); }
}

.manifesto-lead {
    color: var(--xv-ink-2);
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 18px;
}
.manifesto-lead strong { color: var(--xv-ink-0); font-weight: 600; }
.manifesto-lead em { color: var(--xv-accent-hi); font-style: normal; font-weight: 600; }
.manifesto-lead--alt {
    padding: 18px 22px;
    border-left: 3px solid var(--xv-accent);
    background: rgba(77, 124, 255, .06);
    border-radius: 0 12px 12px 0;
    font-family: var(--xv-display);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--xv-ink-1);
}

/* === DERECHA: visualización SVG === */
.manifesto-viz {
    position: relative;
    padding: 30px 24px 24px;
    background: linear-gradient(155deg, rgba(13, 15, 23, .55), rgba(7, 8, 13, .8));
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--xv-radius-lg);
    box-shadow: 0 24px 60px -20px rgba(77, 124, 255, .25);
}
.exp-curve {
    width: 100%;
    height: auto;
    display: block;
}

/* Animación: la línea se dibuja al entrar en viewport */
.exp-curve-line {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: drawCurve 2.2s cubic-bezier(.4, 0, .2, 1) .6s forwards;
}
.exp-curve-area {
    opacity: 0;
    animation: fadeArea 1.8s ease 1.5s forwards;
}
.exp-curve-dot {
    opacity: 0;
    animation: popDot 0.6s cubic-bezier(.34, 1.56, .64, 1) 2.6s forwards;
}
.exp-curve-dot--halo {
    animation: popDot 0.8s cubic-bezier(.34, 1.56, .64, 1) 2.6s forwards,
               haloPulse 2s ease-in-out 3.4s infinite;
}
@keyframes drawCurve { to { stroke-dashoffset: 0; } }
@keyframes fadeArea  { to { opacity: 1; } }
@keyframes popDot    { to { opacity: 1; } }
@keyframes haloPulse {
    0%, 100% { transform-origin: 380px 30px; transform: scale(1); opacity: .9; }
    50%      { transform-origin: 380px 30px; transform: scale(1.4); opacity: .3; }
}

.manifesto-viz-caption {
    margin-top: 16px;
    font-size: .82rem;
    color: var(--xv-ink-3);
    line-height: 1.7;
    text-align: center;
}
.dot-blue, .dot-grey {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.dot-blue { background: linear-gradient(135deg, #4d7cff, #00e0d3); box-shadow: 0 0 10px rgba(0, 224, 211, .5); }
.dot-grey { background: rgba(160, 168, 200, .5); }

/* === Footer del manifiesto: 3 pactos numéricos === */
.manifesto-pacts {
    list-style: none;
    margin: 70px auto 0;
    padding: 26px 36px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 32px 64px;
    max-width: 880px;
    background: rgba(13, 15, 23, .55);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: var(--xv-radius-lg);
    backdrop-filter: blur(8px);
}
.manifesto-pacts li {
    display: flex;
    align-items: center;
    gap: 14px;
}
.manifesto-pacts strong {
    font-family: var(--xv-display);
    font-size: 2.6rem;
    line-height: 1;
    background: linear-gradient(135deg, #4d7cff, #00e0d3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 700;
    letter-spacing: -0.04em;
}
.manifesto-pacts span {
    color: var(--xv-ink-2);
    font-size: .85rem;
    line-height: 1.4;
}

/* === Móvil === */
@media (max-width: 900px) {
    .manifesto-grid { grid-template-columns: 1fr; gap: 40px; }
    .manifesto-viz { max-width: 480px; margin: 0 auto; }
}
@media (max-width: 768px) {
    .about-manifesto { padding: 60px 0; }
    .manifesto-statement { font-size: clamp(1.4rem, 6vw, 2rem); }
    .manifesto-pacts {
        margin-top: 50px;
        padding: 20px 24px;
        gap: 18px 28px;
        border-radius: var(--xv-radius);
    }
    .manifesto-pacts strong { font-size: 2rem; }
    .manifesto-pacts span { font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
    .exp-curve-line, .exp-curve-area, .exp-curve-dot,
    .manifesto-word-bg { animation: none !important; }
    .exp-curve-line { stroke-dashoffset: 0; }
    .exp-curve-area, .exp-curve-dot { opacity: 1; }
    .manifesto-word-bg { transform: skewX(-6deg) scaleX(1); }
}

/* Manifiesto — título del bloque de cifras de IA + tipografía interna */
.manifesto-pacts-title {
    margin: 70px auto 16px;
    text-align: center;
    color: var(--xv-ink-3);
    font-family: var(--xv-display);
    font-size: .82rem;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.manifesto-pacts-title + .manifesto-pacts { margin-top: 0; }
.manifesto-pacts span b {
    color: var(--xv-ink-0);
    font-weight: 600;
}
.manifesto-pacts span small {
    display: block;
    margin-top: 2px;
    font-size: .72rem;
    color: var(--xv-ink-3);
    line-height: 1.3;
    font-weight: 400;
}
@media (max-width: 768px) {
    .manifesto-pacts-title { margin-top: 50px; font-size: .72rem; }
}

/* =====================================================================
   SOBRE NOSOTROS — timeline de Recorrido (hitos 2014 → 2026)
   ===================================================================== */
.about-recorrido { position: relative; }

.recorrido-timeline {
    list-style: none;
    counter-reset: recorrido;
    margin: 30px 0 0;
    padding: 0;
    position: relative;
}
/* Línea vertical conectora */
.recorrido-timeline::before {
    content: '';
    position: absolute;
    left: 90px;
    top: 18px;
    bottom: 18px;
    width: 2px;
    background: linear-gradient(180deg,
                rgba(77, 124, 255, .05) 0%,
                rgba(77, 124, 255, .35) 12%,
                rgba(77, 124, 255, .35) 88%,
                rgba(0, 224, 211, .05) 100%);
    border-radius: 2px;
}

.recorrido-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 36px;
    padding: 22px 0;
}
.recorrido-item + .recorrido-item { margin-top: 8px; }

/* Año tipo display + dot conector */
.recorrido-year {
    flex-shrink: 0;
    width: 90px;
    text-align: right;
    padding-right: 28px;
    position: relative;
    font-family: var(--xv-display);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--xv-ink-2);
    letter-spacing: -0.02em;
    transition: color .35s ease;
    line-height: 1.1;
    padding-top: 2px;
}
/* Dot azul-cian que marca el hito sobre la línea */
.recorrido-year::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--xv-bg-1);
    border: 3px solid var(--xv-accent);
    box-shadow: 0 0 0 4px rgba(13, 15, 23, .9), 0 0 12px rgba(77, 124, 255, .35);
    transition: transform .4s cubic-bezier(.2,.8,.2,1), background .35s ease, border-color .35s ease;
    z-index: 2;
}

/* Tarjeta de contenido */
.recorrido-content {
    flex: 1;
    padding: 22px 26px;
    background: linear-gradient(135deg, rgba(13, 15, 23, .55), rgba(13, 15, 23, .35));
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--xv-radius-lg);
    transition: transform .45s cubic-bezier(.2,.8,.2,1),
                border-color .35s ease,
                box-shadow .45s cubic-bezier(.2,.8,.2,1);
    will-change: transform;
}

.recorrido-tag {
    display: inline-block;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(77, 124, 255, .12);
    color: var(--xv-accent-hi);
    border: 1px solid rgba(122, 166, 255, .25);
    margin-bottom: 10px;
}
.recorrido-tag--now {
    background: linear-gradient(95deg, rgba(77, 124, 255, .22), rgba(0, 224, 211, .18));
    border-color: rgba(0, 224, 211, .4);
    color: #fff;
    animation: recorrido-now-pulse 2.4s ease-in-out infinite;
}
@keyframes recorrido-now-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 224, 211, .4); }
    50%      { box-shadow: 0 0 0 6px rgba(0, 224, 211, 0); }
}

.recorrido-content h3 {
    font-family: var(--xv-display);
    font-size: 1.2rem;
    color: var(--xv-ink-0);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.recorrido-content p {
    color: var(--xv-ink-2);
    font-size: .94rem;
    line-height: 1.6;
    margin: 0;
}
.recorrido-content p strong { color: var(--xv-ink-0); font-weight: 600; }

/* Hover: el año se ilumina y el dot crece */
.recorrido-item:hover .recorrido-year {
    color: var(--xv-accent-hi);
}
.recorrido-item:hover .recorrido-year::after {
    transform: scale(1.25);
    background: linear-gradient(135deg, var(--xv-accent), var(--xv-accent-2));
    border-color: var(--xv-accent-2);
}
.recorrido-item:hover .recorrido-content {
    transform: translateY(-3px);
    border-color: rgba(122, 166, 255, .3);
    box-shadow: 0 18px 40px -16px rgba(77, 124, 255, .35);
}

/* El último hito (HOY) destaca en estado por defecto */
.recorrido-item--now .recorrido-year { color: var(--xv-accent-2); }
.recorrido-item--now .recorrido-year::after {
    background: linear-gradient(135deg, var(--xv-accent), var(--xv-accent-2));
    border-color: var(--xv-accent-2);
    box-shadow: 0 0 0 4px rgba(13, 15, 23, .9), 0 0 18px rgba(0, 224, 211, .55);
}
.recorrido-item--now .recorrido-content {
    background: linear-gradient(135deg, rgba(77, 124, 255, .12), rgba(13, 15, 23, .45));
    border-color: rgba(0, 224, 211, .25);
}

/* MÓVIL */
@media (max-width: 768px) {
    .recorrido-timeline::before { left: 14px; }
    .recorrido-item {
        gap: 16px;
        padding: 16px 0;
    }
    .recorrido-year {
        width: auto;
        padding-right: 0;
        padding-left: 32px;
        text-align: left;
        font-size: 1.2rem;
        align-self: flex-start;
    }
    .recorrido-year::after {
        right: auto;
        left: -1px;
        top: 6px;
    }
    .recorrido-item {
        flex-direction: column;
        align-items: stretch;
    }
    .recorrido-content { padding: 16px 18px; }
    .recorrido-content h3 { font-size: 1.05rem; }
    .recorrido-content p { font-size: .88rem; }
}

/* =====================================================================
   RECORRIDO — versión compacta horizontal (sustituye a la timeline larga)
   ===================================================================== */
.recorrido-strip {
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    align-items: flex-start;
    position: relative;
    gap: 0;
}
/* Línea horizontal que conecta los hitos */
.recorrido-strip::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 7%;
    right: 7%;
    height: 2px;
    background: linear-gradient(90deg,
                rgba(77, 124, 255, .05) 0%,
                rgba(77, 124, 255, .35) 8%,
                rgba(77, 124, 255, .35) 92%,
                rgba(0, 224, 211, .55) 100%);
    border-radius: 2px;
    z-index: 0;
}

.recorrido-dot {
    position: relative;
    text-align: center;
    padding: 0 8px;
    cursor: default;
}
/* Punto sobre la línea */
.recorrido-dot::before {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--xv-bg-1);
    border: 3px solid rgba(122, 166, 255, .5);
    box-shadow: 0 0 0 4px rgba(13, 15, 23, .9);
    transition: transform .35s cubic-bezier(.2,.8,.2,1),
                background .35s ease,
                border-color .35s ease,
                box-shadow .35s ease;
    position: relative;
    z-index: 1;
}
.recorrido-dot-year {
    display: block;
    font-family: var(--xv-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--xv-ink-1);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    transition: color .3s ease;
}
.recorrido-dot-title {
    display: block;
    font-size: .95rem;
    color: var(--xv-ink-2);
    line-height: 1.45;
    transition: color .3s ease;
}

/* Hover: el dot crece y se ilumina */
.recorrido-dot:hover::before {
    transform: scale(1.4);
    background: linear-gradient(135deg, var(--xv-accent), var(--xv-accent-2));
    border-color: var(--xv-accent-2);
    box-shadow: 0 0 0 4px rgba(13, 15, 23, .9), 0 0 14px rgba(0, 224, 211, .6);
}
.recorrido-dot:hover .recorrido-dot-year { color: var(--xv-accent-hi); }
.recorrido-dot:hover .recorrido-dot-title { color: var(--xv-ink-1); }

/* Hito "Hoy" destacado por defecto */
.recorrido-dot--now::before {
    background: linear-gradient(135deg, var(--xv-accent), var(--xv-accent-2));
    border-color: var(--xv-accent-2);
    box-shadow: 0 0 0 4px rgba(13, 15, 23, .9), 0 0 16px rgba(0, 224, 211, .55);
    animation: recorrido-now-pulse 2.4s ease-in-out infinite;
}
.recorrido-dot--now .recorrido-dot-year {
    color: var(--xv-accent-2);
}
.recorrido-dot--now .recorrido-dot-title {
    color: var(--xv-ink-0);
    font-weight: 600;
}
@keyframes recorrido-now-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(13, 15, 23, .9), 0 0 0 0 rgba(0, 224, 211, .5); }
    50%      { box-shadow: 0 0 0 4px rgba(13, 15, 23, .9), 0 0 0 8px rgba(0, 224, 211, 0); }
}

/* MÓVIL: scroll horizontal con snap */
@media (max-width: 768px) {
    .recorrido-strip {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        scrollbar-width: none;
        gap: 0;
    }
    .recorrido-strip::-webkit-scrollbar { display: none; }
    .recorrido-strip::before {
        left: 36px;
        right: 36px;
        top: 14px;
    }
    .recorrido-dot {
        flex: 0 0 130px;
        scroll-snap-align: center;
        padding: 0 6px;
    }
    .recorrido-dot-year { font-size: 1rem; }
    .recorrido-dot-title { font-size: .82rem; }
}

/* =====================================================================
   PROYECTOS — filtros por categoría
   ===================================================================== */
.project-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 40px;
    max-width: 900px;
}
.project-filter {
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(122, 166, 255, .06);
    border: 1px solid rgba(122, 166, 255, .22);
    color: var(--xv-ink-1);
    font-family: inherit;
    font-size: .88rem;
    font-weight: 500;
    letter-spacing: .02em;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.project-filter:hover {
    background: rgba(122, 166, 255, .14);
    border-color: rgba(122, 166, 255, .5);
    color: var(--xv-ink-0);
    transform: translateY(-2px);
}
.project-filter.active {
    background: linear-gradient(135deg, var(--xv-accent-1), var(--xv-accent-2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 18px rgba(77, 124, 255, .35);
}
#projects-grid .project-item.is-hidden { display: none; }
@media (max-width: 640px) {
    .project-filters { gap: 8px; }
    .project-filter { padding: 8px 14px; font-size: .8rem; }
}

/* =====================================================================
   PÁGINAS DE PROYECTO — lead + tarjetas de fase + galería
   ===================================================================== */
.project-lead {
    max-width: 860px;
    margin: 0 auto;
    padding: 34px 40px;
    background: linear-gradient(135deg, rgba(122,166,255,.08), rgba(0,224,211,.04));
    border: 1px solid rgba(122,166,255,.18);
    border-left: 4px solid var(--xv-accent-2);
    border-radius: var(--xv-radius-lg);
    box-shadow: 0 12px 40px rgba(0,0,0,.28);
    position: relative;
    overflow: hidden;
}
.project-lead::before {
    content: '\201C';   /* comilla decorativa */
    position: absolute;
    top: -20px;
    right: 24px;
    font-family: 'Space Grotesk', serif;
    font-size: 8rem;
    font-weight: 700;
    color: rgba(122,166,255,.08);
    line-height: 1;
    pointer-events: none;
}
.project-lead .eyebrow { margin-bottom: 10px; }
.project-lead h2 {
    font-size: clamp(1.5rem, 3.2vw, 2.05rem);
    line-height: 1.25;
    margin-bottom: 20px;
}
.project-lead-body p {
    color: var(--xv-ink-1);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 14px;
}
.project-lead-body p:last-child { margin-bottom: 0; }

/* Grid de fases — 5 tarjetas en distribución 3+2 en desktop */
.project-phases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 30px;
}
@media (max-width: 960px)  { .project-phases-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .project-phases-grid { grid-template-columns: 1fr; } }

.project-phase-card {
    background: var(--xv-bg-2);
    border: 1px solid rgba(122,166,255,.14);
    border-radius: var(--xv-radius-lg);
    padding: 26px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform .35s cubic-bezier(.2,.8,.2,1),
                border-color .35s cubic-bezier(.2,.8,.2,1),
                box-shadow .35s cubic-bezier(.2,.8,.2,1);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.project-phase-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 100% at 100% 0%, rgba(122,166,255,.10) 0%, transparent 55%);
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
    z-index: -1;
}
.project-phase-card:hover {
    transform: translateY(-6px);
    border-color: rgba(122,166,255,.45);
    box-shadow: 0 20px 55px -10px rgba(77, 124, 255, .35),
                0 0 0 1px rgba(122, 166, 255, .30);
}
.project-phase-card:hover::after { opacity: 1; }
.project-phase-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}
.project-phase-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--xv-accent-1), var(--xv-accent-2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 6px 18px rgba(77, 124, 255, .35);
}
.project-phase-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--xv-accent-2);
    padding: 5px 10px;
    border: 1px solid rgba(0,224,211,.28);
    border-radius: 999px;
    background: rgba(0,224,211,.08);
    white-space: nowrap;
}
.project-phase-card h3 {
    font-size: 1.18rem;
    line-height: 1.3;
    color: var(--xv-ink-0);
    margin: 4px 0 8px;
    font-weight: 600;
}
.project-phase-card p {
    color: var(--xv-ink-2);
    font-size: .93rem;
    line-height: 1.65;
    margin: 0 0 10px;
}
.project-phase-card p:last-child { margin-bottom: 0; }

@media (max-width: 620px) {
    .project-lead { padding: 26px 22px; }
    .project-lead h2 { font-size: 1.35rem; }
    .project-lead-body p { font-size: .98rem; }
    .project-phase-card { padding: 22px 20px; }
    .project-phase-icon { width: 40px; height: 40px; }
}

/* =====================================================================
   POPUP de confirmación de formulario
   ===================================================================== */
.xv-success-popup {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.xv-success-popup.is-open { opacity: 1; pointer-events: auto; }

.xv-success-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 8, 13, .82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.xv-success-box {
    position: relative;
    background: linear-gradient(135deg, rgba(122,166,255,.10), rgba(0,224,211,.06)), var(--xv-bg-2);
    border: 1px solid rgba(122,166,255,.30);
    border-radius: var(--xv-radius-lg);
    box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(0,224,211,.15);
    padding: 44px 40px 30px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    color: var(--xv-ink-0);
    transform: translateY(30px) scale(.94);
    transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.xv-success-popup.is-open .xv-success-box { transform: translateY(0) scale(1); }

.xv-success-close {
    position: absolute;
    top: 14px; right: 18px;
    background: transparent;
    border: none;
    color: var(--xv-ink-2);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 8px;
    transition: color .2s ease, background .2s ease;
}
.xv-success-close:hover { color: var(--xv-ink-0); background: rgba(255,255,255,.06); }

.xv-success-icon {
    width: 76px; height: 76px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--xv-accent-1), var(--xv-accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0,224,211,.35);
    animation: xv-success-pop .5s cubic-bezier(.2,1.6,.4,1) .1s both;
}
@keyframes xv-success-pop {
    0%   { transform: scale(0);   opacity: 0; }
    60%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1);    opacity: 1; }
}

.xv-success-box h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--xv-ink-0);
}
.xv-success-box p {
    color: var(--xv-ink-1);
    line-height: 1.55;
    margin: 0 0 14px;
    font-size: .98rem;
}

.xv-success-progress {
    height: 3px;
    background: rgba(255,255,255,.08);
    border-radius: 999px;
    overflow: hidden;
    margin: 20px auto 12px;
    max-width: 240px;
}
.xv-success-progress span {
    display: block;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--xv-accent-1), var(--xv-accent-2));
    transform-origin: right center;
    animation: xv-progress-shrink 10s linear forwards;
}
@keyframes xv-progress-shrink {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

.xv-success-hint {
    font-size: .82rem !important;
    color: var(--xv-ink-2) !important;
    margin: 0 !important;
}
.xv-success-hint strong { color: var(--xv-accent-2); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
    .xv-success-popup, .xv-success-box, .xv-success-icon, .xv-success-progress span {
        transition: none !important;
        animation: none !important;
    }
}
@media (max-width: 480px) {
    .xv-success-box { padding: 36px 24px 24px; }
    .xv-success-icon { width: 64px; height: 64px; font-size: 2rem; }
    .xv-success-box h3 { font-size: 1.25rem; }
}
