/* ============================================================
   H&E PROYECTOS E INVERSIONES S.A.S.
   STYLES.CSS — FASE 2
   Arquitecto UI/UX: White Mode Sofisticado "Autoridad & Cero Riesgo"
   ============================================================ */

/* ============================================================
   1. VARIABLES GLOBALES (:root)
   ============================================================ */
:root {
    /* —— PALETA PRINCIPAL —— */
    --blue-900:     #1E3A8A;   /* Azul naval profundo */
    --blue-800:     #1D4ED8;   /* Azul Rey Corporativo (PRIMARIO) */
    --blue-700:     #2563EB;   /* Azul activo / hover */
    --blue-600:     #3B82F6;   /* Azul claro / acento */
    --blue-100:     #DBEAFE;   /* Azul tinte / fondos sutiles */
    --blue-050:     #EFF6FF;   /* Azul ultra claro */

    --gray-900:     #000000;   /* Negro Profundo */
    --gray-800:     #111111;   /* Casi negro */
    --gray-700:     #1F2937;   /* Gris muy oscuro (footer) */
    --gray-600:     #374151;   /* Gris oscuro (textos secundarios oscuros) */
    --gray-500:     #616160;   /* Gris Corporativo */
    --gray-400:     #9CA3AF;   /* Gris medio */
    --gray-300:     #D1D5DB;   /* Gris borde */
    --gray-200:     #E5E7EB;   /* Gris separador */
    --gray-100:     #F3F4F6;   /* Gris muy claro */
    --gray-050:     #F8F9FA;   /* Gris Ultra Claro (fondos alternos) */
    --white:        #FFFFFF;   /* Blanco Puro */

    /* —— SEMÁNTICOS —— */
    --color-primary:          var(--blue-800);
    --color-primary-hover:    var(--blue-700);
    --color-primary-light:    var(--blue-100);
    --color-primary-glow:     rgba(29, 78, 216, 0.25);
    --color-primary-glow-lg:  rgba(29, 78, 216, 0.15);

    --color-text-primary:     var(--gray-900);
    --color-text-secondary:   var(--gray-600);
    --color-text-muted:       var(--gray-500);
    --color-border:           var(--gray-200);
    --color-border-strong:    var(--gray-300);
    --color-surface:          var(--white);
    --color-surface-alt:      var(--gray-050);
    --color-surface-card:     var(--white);

    /* —— TIPOGRAFÍA —— */
    --font-display:   'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-body:      'Inter', system-ui, -apple-system, sans-serif;

    --text-xs:    0.75rem;     /* 12px */
    --text-sm:    0.875rem;    /* 14px */
    --text-base:  1rem;        /* 16px */
    --text-lg:    1.125rem;    /* 18px */
    --text-xl:    1.25rem;     /* 20px */
    --text-2xl:   1.5rem;      /* 24px */
    --text-3xl:   1.875rem;    /* 30px */
    --text-4xl:   2.25rem;     /* 36px */
    --text-5xl:   3rem;        /* 48px */
    --text-6xl:   3.75rem;     /* 60px */
    --text-7xl:   4.5rem;      /* 72px */

    --weight-light:      300;
    --weight-regular:    400;
    --weight-medium:     500;
    --weight-semibold:   600;
    --weight-bold:       700;
    --weight-extrabold:  800;

    /* —— ESPACIADO —— */
    --space-1:    0.25rem;   /* 4px */
    --space-2:    0.5rem;    /* 8px */
    --space-3:    0.75rem;   /* 12px */
    --space-4:    1rem;      /* 16px */
    --space-5:    1.25rem;   /* 20px */
    --space-6:    1.5rem;    /* 24px */
    --space-8:    2rem;      /* 32px */
    --space-10:   2.5rem;    /* 40px */
    --space-12:   3rem;      /* 48px */
    --space-16:   4rem;      /* 64px */
    --space-20:   5rem;      /* 80px */
    --space-24:   6rem;      /* 96px */
    --space-32:   8rem;      /* 128px */

    /* —— BORDES Y RADIOS —— */
    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   12px;
    --radius-xl:   16px;
    --radius-2xl:  24px;
    --radius-3xl:  32px;
    --radius-full: 9999px;

    /* —— SOMBRAS —— */
    --shadow-xs:   0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md:   0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg:   0 10px 30px rgba(0, 0, 0, 0.10), 0 4px 8px rgba(0, 0, 0, 0.05);
    --shadow-xl:   0 20px 50px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.06);
    --shadow-blue: 0 8px 30px rgba(29, 78, 216, 0.25), 0 2px 8px rgba(29, 78, 216, 0.15);
    --shadow-blue-lg: 0 16px 50px rgba(29, 78, 216, 0.35), 0 4px 16px rgba(29, 78, 216, 0.20);

    /* —— TRANSICIONES —— */
    --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out:    cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce:    cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast:   150ms var(--ease-in-out);
    --transition-base:   300ms var(--ease-in-out);
    --transition-slow:   500ms var(--ease-out);
    --transition-reveal: 700ms var(--ease-out);

    /* —— CONTENEDOR —— */
    --container-max:  1280px;
    --container-pad:  var(--space-6);

    /* —— NAVBAR —— */
    --navbar-h: 80px;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--navbar-h);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-regular);
    line-height: 1.7;
    color: var(--color-text-primary);
    background-color: var(--color-surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    cursor: none; /* Cursor oculto — CSS cursor override */
}

/* Cursor accesible en móviles */
@media (hover: none) {
    body { cursor: auto; }
}

img, video, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul, ol { list-style: none; }

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: var(--weight-bold);
}

/* ============================================================
   3. UTILIDADES GLOBALES
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* —— SCROLL REVEAL ANIMATIONS —— */
/* Estado inicial: oculto */
.reveal-item {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity    var(--transition-reveal),
        transform  var(--transition-reveal);
}

/* Estado activo: visible (activado por JS con IntersectionObserver) */
.reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay entre elementos hermanos */
.reveal-item:nth-child(1) { transition-delay: 0ms; }
.reveal-item:nth-child(2) { transition-delay: 80ms; }
.reveal-item:nth-child(3) { transition-delay: 160ms; }
.reveal-item:nth-child(4) { transition-delay: 240ms; }
.reveal-item:nth-child(5) { transition-delay: 320ms; }
.reveal-item:nth-child(6) { transition-delay: 400ms; }

/* Variantes de dirección */
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition:
        opacity    var(--transition-reveal),
        transform  var(--transition-reveal);
}
.reveal-left.is-visible { opacity: 1; transform: translateX(0); }

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition:
        opacity    var(--transition-reveal),
        transform  var(--transition-reveal);
}
.reveal-right.is-visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition:
        opacity    var(--transition-reveal),
        transform  var(--transition-reveal);
}
.reveal-scale.is-visible { opacity: 1; transform: scale(1); }

/* —— TEXTO ACENTO —— */
.text-accent {
    color: var(--color-primary);
    position: relative;
}

/* ============================================================
   4. CURSOR PERSONALIZADO
   ============================================================ */
.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 80ms linear, opacity var(--transition-fast);
    will-change: transform;
}

.cursor-ring {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(29, 78, 216, 0.5);
    border-radius: var(--radius-full);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 200ms var(--ease-out), width 200ms var(--ease-out), height 200ms var(--ease-out), opacity var(--transition-base);
    will-change: transform;
}

.cursor-ring.is-hovering {
    width: 56px;
    height: 56px;
    border-color: rgba(29, 78, 216, 0.3);
    background: rgba(29, 78, 216, 0.04);
}

.cursor-ring.is-clicking {
    transform: translate(-50%, -50%) scale(0.8);
}

/* ============================================================
   5. BOTONES
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition:
        transform    var(--transition-base),
        box-shadow   var(--transition-base),
        filter       var(--transition-base),
        background   var(--transition-base),
        border-color var(--transition-base);
    position: relative;
    overflow: hidden;
    will-change: transform;
}

/* Efecto ripple sobre botones */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background var(--transition-fast);
}
.btn:hover::after { background: rgba(255,255,255,0.06); }
.btn:active::after { background: rgba(255,255,255,0.12); }

/* —— PRIMARIO (Azul Rey con Glow) —— */
.btn-primary {
    background: var(--color-primary);
    color: var(--white);
    box-shadow:
        0 0 0 0 var(--color-primary-glow),
        var(--shadow-blue);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 0 0 6px var(--color-primary-glow),
        var(--shadow-blue-lg);
    filter: brightness(1.05);
}

.btn-primary:active {
    transform: translateY(0) scale(0.99);
    box-shadow: var(--shadow-blue);
}

/* —— GHOST / OUTLINE —— */
.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-strong);
}
.btn-ghost:hover {
    background: var(--gray-050);
    border-color: var(--gray-400);
    color: var(--color-text-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}
.btn-outline:hover {
    background: var(--color-primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-blue);
}

/* —— TAMAÑOS —— */
.btn-sm {
    padding: 10px 20px;
    font-size: var(--text-xs);
    border-radius: var(--radius-md);
}

.btn-lg {
    padding: 18px 36px;
    font-size: var(--text-base);
    border-radius: var(--radius-xl);
}

.btn-full { width: 100%; }

/* Botón nav (más compacto) */
.btn-nav {
    padding: 10px 22px;
    font-size: var(--text-sm);
}

/* —— BOTÓN MAGNÉTICO (JS agrega anim de cursor follow) —— */
.magnetic-btn {
    will-change: transform;
    /* JS override inline transform para el efecto magnético */
}

/* —— ICONO EN BOTÓN —— */
.btn i {
    font-size: 0.85em;
    transition: transform var(--transition-base);
}
.btn:hover i { transform: translateX(3px); }
.btn .fa-arrow-right { font-size: 0.8em; }

/* ============================================================
   6. ETIQUETA DE SECCIÓN
   ============================================================ */
.section-label {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: var(--space-5);
}

.section-label.light { color: rgba(255,255,255,0.7); }

.label-line {
    width: 32px;
    height: 2px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}
.label-line.light { background: rgba(255,255,255,0.5); }

/* —— TÍTULOS DE SECCIÓN —— */
.section-title {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    font-weight: var(--weight-extrabold);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--color-text-primary);
    margin-bottom: var(--space-6);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: 1.7;
    max-width: 62ch;
    margin-bottom: var(--space-12);
}

.section-header {
    margin-bottom: var(--space-12);
}

/* ============================================================
   7. GLASS CARD (White Mode)
   ============================================================ */
.glass-card-white {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
}

/* ============================================================
   8. NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--navbar-h);
    display: flex;
    align-items: center;
    transition:
        background   var(--transition-slow),
        box-shadow   var(--transition-slow),
        height       var(--transition-slow),
        border-color var(--transition-slow);
    border-bottom: 1px solid transparent;
}

/* Estado por defecto: transparente sobre el hero */
.navbar:not(.is-scrolled) {
    background: transparent;
}

/* Estado scrolled: fondo glassmorphism */
.navbar.is-scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border-color: var(--color-border);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.08);
    height: 68px;
}

.nav-container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
}

/* —— LOGO —— */
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    flex-shrink: 0;
}
.nav-logo:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

/* —— IMAGEN DEL LOGO —— */
.nav-logo-img {
    /* Tamaño base en navbar abierta sobre hero */
    height: 48px;
    width: auto;
    display: block;
    object-fit: contain;
    /* Filtro para que el logo sea visible sobre el fondo oscuro del hero */
    filter: brightness(0) invert(1);
    transition:
        height     var(--transition-slow),
        filter     var(--transition-slow),
        opacity    var(--transition-fast);
}

/* Navbar scrolled: reducir tamaño, quitar filtro (fondo blanco) */
.navbar.is-scrolled .nav-logo-img {
    height: 38px;
    filter: none;     /* logo en sus colores originales */
}

/* Footer: logo sobre fondo oscuro → invertido + algo de brillo */
.footer-logo-img {
    height: 44px;
    filter: brightness(0) invert(1);
    opacity: 0.92;
}
.footer-logo-img:hover { opacity: 1; }

/* —— LINKS —— */
.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    list-style: none;
}

.nav-link {
    display: block;
    padding: var(--space-2) var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    position: relative;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.navbar:not(.is-scrolled) .nav-link {
    color: rgba(255,255,255,0.85);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: var(--space-4);
    right: var(--space-4);
    height: 2px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.nav-link:hover { color: var(--color-text-primary); }
.nav-link:hover::after { transform: scaleX(1); }
.navbar:not(.is-scrolled) .nav-link:hover { color: var(--white); }
.navbar:not(.is-scrolled) .nav-link::after { background: var(--white); }

/* State activo de la sección en viewport */
.nav-link.is-active {
    color: var(--color-primary);
    font-weight: var(--weight-semibold);
}
.nav-link.is-active::after { transform: scaleX(1); }

/* —— ACCIONES NAV —— */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

/* —— TOGGLE HAMBURGUESA —— */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}
.mobile-menu-toggle:hover { background: var(--gray-100); }

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text-primary);
    border-radius: var(--radius-full);
    transition: transform 300ms var(--ease-out), opacity 200ms;
}

.navbar:not(.is-scrolled) .hamburger-line { background: var(--white); }

/* Estado abierto */
.mobile-menu-toggle.is-open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.is-open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-menu-toggle.is-open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   9. MENÚ MOBILE OVERLAY
   ============================================================ */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slow);
}

.mobile-menu-overlay:not([hidden]) {
    display: flex;
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-overlay[hidden] {
    display: none;
}

/* JS quitará hidden y añadirá clase .is-open */
.mobile-menu-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-close {
    position: absolute;
    top: var(--space-6);
    right: var(--space-6);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--color-text-primary);
    font-size: var(--text-xl);
    transition: background var(--transition-fast), transform var(--transition-fast);
}
.mobile-menu-close:hover {
    background: var(--gray-200);
    transform: rotate(90deg);
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-10);
}

.mobile-nav-link {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    transition: color var(--transition-fast), background var(--transition-fast);
}
.mobile-nav-link:hover {
    color: var(--color-primary);
    background: var(--blue-050);
}

/* ============================================================
   10. HERO SECTION
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(
        145deg,
        var(--gray-900) 0%,
        #0F1724 40%,
        #0A0E1A 70%,
        var(--blue-900) 100%
    );
    overflow: hidden;
    padding-top: var(--navbar-h);
}

/* Canvas de fondo (partículas — JS) */
.hero-bg-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Orbes de gradiente de fondo */
.hero-gradient-orb {
    position: absolute;
    border-radius: var(--radius-full);
    pointer-events: none;
    filter: blur(80px);
}

.orb-1 {
    width: 600px;
    height: 600px;
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(29, 78, 216, 0.25) 0%, transparent 70%);
    animation: orb-float 12s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    bottom: -60px;
    left: -60px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    animation: orb-float 16s ease-in-out infinite reverse;
}

@keyframes orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%    { transform: translate(30px, -40px) scale(1.05); }
    66%    { transform: translate(-20px, 20px) scale(0.97); }
}

/* —— HERO CONTAINER —— */
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
    padding-block: var(--space-24);
    position: relative;
    z-index: 1;
}

/* —— CONTENIDO IZQUIERDO —— */
.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

/* Badge superior */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(29, 78, 216, 0.12);
    border: 1px solid rgba(29, 78, 216, 0.25);
    color: var(--blue-600);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    width: fit-content;
}

.badge-dot {
    width: 7px;
    height: 7px;
    background: var(--blue-600);
    border-radius: var(--radius-full);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
    50%       { opacity: 0.9; transform: scale(1.2); box-shadow: 0 0 0 5px rgba(59,130,246,0); }
}

/* H1 Hero */
.hero-title {
    font-size: var(--text-7xl);
    font-weight: var(--weight-extrabold);
    line-height: 1.0;
    letter-spacing: -0.04em;
    color: var(--white);
}

.title-highlight {
    color: var(--blue-600);
    position: relative;
    display: inline-block;
}

/* Línea decorativa bajo "Visiones" */
.title-highlight::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--blue-800), var(--blue-600));
    border-radius: var(--radius-full);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.8s 0.6s var(--ease-out);
}

.hero-title.is-visible .title-highlight::after { transform: scaleX(1); }

/* Subtítulo Hero */
.hero-subtitle {
    font-size: var(--text-xl);
    font-weight: var(--weight-regular);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.65;
    max-width: 48ch;
}

/* —— CTAs Hero —— */
.hero-cta-group {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* Botón ghost en hero */
.hero-cta-group .btn-ghost {
    color: rgba(255,255,255,0.8);
    border-color: rgba(255,255,255,0.2);
}
.hero-cta-group .btn-ghost:hover {
    background: rgba(255,255,255,0.08);
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}
.hero-cta-group .btn-ghost i { font-size: 1.1em; margin-right: 2px; }

/* —— STATS Hero —— */
.hero-stats {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.stat-number {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: var(--weight-extrabold);
    color: var(--white);
    letter-spacing: -0.04em;
    line-height: 1;
}

/* Sufijos como "+" y "%" se añaden vía CSS pseudo para no romper el JS counter */
.stat-number[data-target]::after {
    content: '+';
    font-size: 0.7em;
    color: var(--blue-600);
    font-weight: var(--weight-bold);
}
/* Stats especiales sin "+" */
[data-target="100"].stat-number::after { display: none; }

.stat-label {
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.5);
    font-weight: var(--weight-medium);
    line-height: 1.4;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background: rgba(255,255,255,0.12);
    flex-shrink: 0;
}

/* —— VISUAL DERECHO (Blueprint Card) —— */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual-card {
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1;
    padding: var(--space-8);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.12) !important;
    background: rgba(255,255,255,0.04) !important;
    box-shadow:
        0 25px 80px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

/* —— BLUEPRINT ANIMADO —— */
.visual-blueprint {
    width: 100%;
    height: 100%;
    position: relative;
    border: 1px solid rgba(29, 78, 216, 0.2);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: rgba(29, 78, 216, 0.04);
}

.blueprint-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(29, 78, 216, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(29, 78, 216, 0.12) 1px, transparent 1px);
    background-size: 30px 30px;
}

.blueprint-structure {
    position: absolute;
    inset: var(--space-8);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: var(--space-4);
}

/* Columnas estructurales */
.bp-column {
    position: absolute;
    bottom: 60px;
    width: 16px;
    background: linear-gradient(to top, var(--blue-800), var(--blue-600));
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    opacity: 0.85;
}
.bc-1 { left: 15%; height: 120px; animation: bp-grow 1.5s 0.2s var(--ease-out) both; }
.bc-2 { left: 45%; height: 180px; animation: bp-grow 1.5s 0.4s var(--ease-out) both; }
.bc-3 { left: 75%; height: 100px; animation: bp-grow 1.5s 0.6s var(--ease-out) both; }

@keyframes bp-grow {
    from { transform: scaleY(0); transform-origin: bottom; }
    to   { transform: scaleY(1); transform-origin: bottom; }
}

.bp-beam-h {
    position: absolute;
    left: 8%;
    right: 8%;
    height: 4px;
    background: linear-gradient(90deg, var(--blue-800), var(--blue-600));
    bottom: 55px;
    border-radius: var(--radius-full);
    opacity: 0.7;
}
.bp-beam-v {
    position: absolute;
    bottom: 55px;
    left: 50%;
    width: 2px;
    height: 80px;
    background: var(--blue-700);
    transform: translateX(-50%);
    opacity: 0.4;
}

/* Stats overlay sobre el blueprint */
.bp-stats-overlay {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.bp-stat-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(29, 78, 216, 0.12);
    border: 1px solid rgba(29, 78, 216, 0.2);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    font-size: var(--text-xs);
    color: var(--blue-600);
    font-weight: var(--weight-medium);
}

.bp-stat-row i { font-size: 10px; }

/* —— BADGES FLOTANTES —— */
.floating-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-lg);
    white-space: nowrap;
}

.floating-badge i { color: var(--color-primary); }

.badge-top {
    top: -20px;
    left: -20px;
    animation: badge-float 8s ease-in-out infinite;
}

.badge-bottom {
    bottom: 20px;
    right: -20px;
    animation: badge-float 8s ease-in-out infinite 4s;
}

@keyframes badge-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

/* —— FLOATING (animación de la card principal) —— */
.floating {
    animation: float-main 7s ease-in-out infinite;
}

@keyframes float-main {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%  { transform: translateY(-12px) rotate(0.5deg); }
    75%  { transform: translateY(-6px) rotate(-0.5deg); }
}

/* —— SCROLL INDICATOR —— */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color var(--transition-base);
}
.scroll-indicator:hover { color: rgba(255,255,255,0.8); }

.scroll-wheel {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    padding-top: 6px;
    transition: border-color var(--transition-base);
}
.scroll-indicator:hover .scroll-wheel { border-color: rgba(255,255,255,0.6); }

.scroll-dot {
    width: 4px;
    height: 8px;
    background: rgba(255,255,255,0.6);
    border-radius: var(--radius-full);
    animation: scroll-anim 2s ease-in-out infinite;
}

@keyframes scroll-anim {
    0%, 100% { transform: translateY(0); opacity: 1; }
    70%       { transform: translateY(12px); opacity: 0; }
}

.scroll-label {
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ============================================================
   11. TRUST BAND (Logos / Social Proof)
   ============================================================ */
.trust-band {
    padding-block: var(--space-10);
    background: var(--color-surface-alt);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
}

.trust-label {
    text-align: center;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
}

.trust-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    flex-wrap: wrap;
}

.trust-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--gray-400);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color var(--transition-base), transform var(--transition-base);
    cursor: default;
}
.trust-logo-item i { font-size: var(--text-2xl); }

.trust-logo-item:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* ============================================================
   12. ABOUT / QUIÉNES SOMOS
   ============================================================ */
.about {
    padding-block: var(--space-32);
    background: var(--color-surface);
}

.about-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: var(--space-20);
    align-items: center;
}

/* —— VISUAL —— */
.about-visual { position: relative; }

.about-image-wrap {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    aspect-ratio: 3/4;
    /* min-height garantiza que height:100% en el hijo tenga referencia
       incluso en navegadores donde aspect-ratio solo no es suficiente */
    min-height: 320px;
}

.about-image {
    position: absolute;         /* ← sale del flujo: llena el wrap exacto */
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top; /* ← centra verticalmente, prioriza la parte superior */
    transition: transform 0.8s var(--ease-out);
    display: block;
}
.about-image-wrap:hover .about-image { transform: scale(1.04); }

/* Acento decorativo */
.about-image-accent {
    position: absolute;
    inset: 0;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-2xl);
    transform: translate(12px, 12px);
    z-index: -1;
    opacity: 0.3;
}

/* Fallback para cuando no hay imagen real */
.about-image-wrap:not(:has(img[src*="about-team"])) {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-050));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tarjeta flotante sobre la imagen */
.about-floating-card {
    position: absolute;
    bottom: -24px;
    right: -24px;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
    background: var(--white) !important;
}

.afc-icon {
    width: 44px;
    height: 44px;
    background: var(--blue-050);
    color: var(--color-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    flex-shrink: 0;
}

.afc-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.afc-content strong {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    color: var(--color-text-primary);
}
.afc-content span {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* —— CONTENIDO —— */
.about-text {
    color: var(--color-text-secondary);
    font-size: var(--text-base);
    line-height: 1.75;
    margin-bottom: var(--space-5);
}
.about-text:last-of-type { margin-bottom: var(--space-8); }
.about-text strong { color: var(--color-text-primary); font-weight: var(--weight-semibold); }

/* —— LÍDERES —— */
.leaders-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.leader-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-surface-alt);
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}
.leader-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 20px var(--color-primary-glow);
    transform: translateY(-2px);
}

.leader-avatar {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.leader-avatar img {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--color-primary);
}

/* Fallback iniciales cuando no hay foto */
.leader-avatar-fallback {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
}

/* Si la imagen carga OK, ocultar fallback */
.leader-avatar img:not([src=""]) + .leader-avatar-fallback { display: none; }
/* Si no carga, mostrar fallback (se controla vía JS también) */

.leader-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.leader-name {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-text-primary);
    line-height: 1.3;
}
.leader-title {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* ============================================================
   13. PARALLAX DIVIDERS
   ============================================================ */
.parallax-divider {
    position: relative;
    overflow: hidden;
    height: 320px;
    display: flex;
    align-items: center;
}

.parallax-inner {
    position: absolute;
    inset: -60px 0;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
}

/* Divider 1: cita */
.divider-1 .parallax-inner {
    background: linear-gradient(
        135deg,
        var(--gray-900) 0%,
        #0F1724 50%,
        var(--blue-900) 100%
    );
}

.parallax-content {
    text-align: center;
    padding-inline: var(--container-pad);
    max-width: 800px;
}

.parallax-quote {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    color: var(--white);
    letter-spacing: -0.02em;
    line-height: 1.3;
    font-style: italic;
    margin-bottom: var(--space-4);
}

.parallax-cite {
    font-size: var(--text-sm);
    color: rgba(255,255,255,0.5);
    font-style: normal;
    font-weight: var(--weight-medium);
    letter-spacing: 0.04em;
}

/* Divider 2: números */
.divider-2 .parallax-inner {
    background: var(--color-primary);
}

.numbers-band {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-20);
    padding-inline: var(--container-pad);
}

.number-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--white);
    text-align: center;
}

.nh-value {
    font-family: var(--font-display);
    font-size: var(--text-6xl);
    font-weight: var(--weight-extrabold);
    letter-spacing: -0.04em;
    line-height: 1;
}

.nh-label {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    opacity: 0.75;
    max-width: 12ch;
    text-align: center;
    line-height: 1.4;
}

/* ============================================================
   14. VALORES / ADN — GRID INTERACTIVO
   ============================================================ */
.values {
    padding-block: var(--space-32);
    background: var(--color-surface-alt);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

/* —— TARJETA DE VALOR —— */
.value-card {
    background: var(--white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    cursor: default;
    transition:
        transform      var(--transition-slow),
        box-shadow     var(--transition-slow),
        border-color   var(--transition-slow);
    position: relative;
    overflow: hidden;
}

/* Brillo azul en la parte superior */
.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue-800), var(--blue-600));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-slow);
    border-radius: var(--radius-full) var(--radius-full) 0 0;
}

/* HOVER: elevación + sombra teñida de azul + borde azul + barra superior */
.value-card:hover {
    transform: translateY(-8px);
    border-color: rgba(29, 78, 216, 0.25);
    box-shadow:
        0 20px 60px rgba(29, 78, 216, 0.12),
        0 8px 24px rgba(29, 78, 216, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.05);
}
.value-card:hover::before { transform: scaleX(1); }

/* Icono */
.value-icon-wrap {
    width: 56px;
    height: 56px;
    background: var(--blue-050);
    color: var(--color-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    transition: background var(--transition-base), color var(--transition-base), transform var(--transition-base);
}
.value-card:hover .value-icon-wrap {
    background: var(--color-primary);
    color: var(--white);
    transform: scale(1.08) rotate(-3deg);
}

.value-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    color: var(--color-text-primary);
    line-height: 1.2;
}

.value-desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.7;
    flex: 1;
}

.value-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--blue-050);
    color: var(--color-primary);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--blue-100);
    width: fit-content;
}
.value-tag i { font-size: 9px; }

/* ============================================================
   15. SERVICIOS — SPLIT INTERACTIVO
   ============================================================ */
.services {
    padding-block: var(--space-32);
    background: var(--color-surface);
}

.services-interactive {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: var(--space-8);
    align-items: start;
    min-height: 540px;
}

/* —— TABS (izquierda) —— */
.services-tabs {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    position: sticky;
    top: calc(var(--navbar-h) + var(--space-8));
}

.service-tab {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-6);
    border: 1px solid transparent;
    border-radius: var(--radius-xl);
    text-align: left;
    background: transparent;
    cursor: pointer;
    transition:
        background     var(--transition-base),
        border-color   var(--transition-base),
        box-shadow     var(--transition-base),
        transform      var(--transition-base);
    width: 100%;
}

.service-tab:hover {
    background: var(--color-surface-alt);
    border-color: var(--color-border);
    transform: translateX(3px);
}

.service-tab.active {
    background: var(--white);
    border-color: rgba(29, 78, 216, 0.25);
    box-shadow:
        0 4px 20px rgba(29, 78, 216, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.04);
}

.service-tab-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: var(--gray-100);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    flex-shrink: 0;
    transition: background var(--transition-base), color var(--transition-base);
}
.service-tab.active .service-tab-icon {
    background: var(--color-primary);
    color: var(--white);
}

.service-tab-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.service-tab-text strong {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--color-text-secondary);
    line-height: 1.2;
    transition: color var(--transition-fast);
}
.service-tab-text span {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    line-height: 1.3;
}
.service-tab.active .service-tab-text strong { color: var(--color-text-primary); }

.service-tab-arrow {
    color: var(--gray-400);
    font-size: var(--text-sm);
    transition: color var(--transition-fast), transform var(--transition-base);
}
.service-tab.active .service-tab-arrow { color: var(--color-primary); }
.service-tab:hover .service-tab-arrow { transform: translateX(3px); }

/* —— PANEL (derecha) —— */
.services-panel-wrap {
    position: relative;
}

.service-panel {
    display: grid;
    grid-template-rows: auto auto;
    gap: 0;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity   var(--transition-slow),
        transform var(--transition-slow);
    pointer-events: none;
    position: absolute;
    inset: 0;
    height: 100%;
}

.service-panel.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    position: relative;
    inset: auto;
}

/* Imagen del panel */
.panel-image-wrap {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.panel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease-out);
}

/* Fallback si no hay imagen */
.panel-image-wrap:not(:has(img[src*="service"])) {
    background: linear-gradient(135deg, var(--blue-900), var(--gray-800));
}

.service-panel:hover .panel-image { transform: scale(1.04); }

.panel-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}

/* Contenido del panel */
.panel-content {
    padding: var(--space-8);
    background: var(--white);
    border-radius: 0 !important;
}

.panel-content h3 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

.panel-content p {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: 1.75;
    margin-bottom: var(--space-6);
}

.panel-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    list-style: none;
}

.panel-features li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.panel-features li i {
    color: var(--color-primary);
    font-size: 11px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    background: var(--blue-050);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   16. PORTAFOLIO / OBRAS — MASONRY GRID
   ============================================================ */
.portfolio {
    padding-block: var(--space-32);
    background: var(--color-surface-alt);
}

/* —— FILTROS —— */
.portfolio-filters {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-10);
}

.filter-btn {
    padding: 9px 20px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    background: var(--white);
    cursor: pointer;
    transition:
        background    var(--transition-fast),
        color         var(--transition-fast),
        border-color  var(--transition-fast),
        box-shadow    var(--transition-fast),
        transform     var(--transition-fast);
}
.filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.filter-btn.active {
    background: var(--color-primary);
    color: var(--white);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-blue);
}
.filter-btn:active { transform: scale(0.97); }

/* ============================================================
   FIX: MASONRY GRID — CONTENCIÓN ABSOLUTA DE IMÁGENES
   Toda foto —vertical, horizontal, cuadrada— queda perfectamente
   encuadrada sin deformar ni romper el grid.
   ============================================================ */

/* —— GRID BASE —— */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Altura base de celda: fija en px → ningún img puede estirar la fila */
    grid-auto-rows: 260px;
    gap: 14px;
    /* Aislar el stacking context para que z-index del hover no escape */
    isolation: isolate;
}

/* Variantes de tamaño */
.masonry-item-tall  { grid-row: span 2; }    /* ~532px = 260*2 + 12 gap */
.masonry-item-wide  { grid-column: span 2; } /* ancho doble */

/* —— ITEM (contenedor raíz) ——
   display:flex garantiza que el img-wrap hijo con height:100%
   siempre reciba la altura completa del track del grid,
   sin depender de propagación implícita (que varía por navegador). */
.masonry-item {
    border-radius: var(--radius-2xl);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    display: flex;              /* ← KEY: hijo img-wrap recibe 100% de altura */
    flex-direction: column;
    will-change: transform;
    transition:
        transform  var(--transition-slow),
        box-shadow var(--transition-slow);
}

.masonry-item:hover {
    transform: scale(1.01) translateY(-3px);
    box-shadow: var(--shadow-xl);
    z-index: 2;
}

/* —— WRAPPER DE IMAGEN ——
   flex:1 hace que el wrapper ocupe TODO el espacio disponible
   del masonry-item (que a su vez ocupa el track del grid). */
.masonry-img-wrap {
    flex: 1 1 0%;               /* ← expande para llenar el item */
    min-height: 0;              /* ← necesario en flex para evitar overflow */
    position: relative;
    overflow: hidden;
    background: var(--gray-800);
}

/* —— IMAGEN ——
   object-fit:cover encuadra cualquier proporción sin deformar. */
.masonry-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: grayscale(20%) brightness(0.85);
    transition:
        transform 600ms cubic-bezier(0.4, 0, 0.2, 1),
        filter    600ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, filter;
}

/* HOVER PREMIUM: zoom interno + revelado de color */
.masonry-item:hover .masonry-img {
    transform: scale(1.07);
    filter: grayscale(0%) brightness(1);
}

/* Overlay info que aparece en hover */
.masonry-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.4) 40%,
        transparent 75%
    );
    display: flex;
    align-items: flex-end;
    padding: var(--space-6);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.masonry-item:hover .masonry-overlay { opacity: 1; }

.masonry-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    transform: translateY(10px);
    transition: transform var(--transition-slow);
}
.masonry-item:hover .masonry-info { transform: translateY(0); }

.masonry-category {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-600);
    background: rgba(29, 78, 216, 0.15);
    border: 1px solid rgba(29, 78, 216, 0.3);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    width: fit-content;
}

.masonry-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    color: var(--white);
    line-height: 1.2;
}

.masonry-location {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.65);
    font-weight: var(--weight-medium);
}
.masonry-location i { font-size: 10px; }

/* Items ocultos por filtro */
.masonry-item.is-hidden {
    display: none;
}

/* CTA del portafolio */
.portfolio-cta {
    display: flex;
    justify-content: center;
    margin-top: var(--space-12);
}

/* ============================================================
   17. CTA SECTION / CONTACTO
   ============================================================ */
.cta-section {
    padding-block: var(--space-32);
    background: linear-gradient(
        145deg,
        var(--gray-900) 0%,
        #0F1724 50%,
        var(--blue-900) 100%
    );
    position: relative;
    overflow: hidden;
}

/* Patrón de fondo decorativo */
.cta-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(29, 78, 216, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.10) 0%, transparent 50%);
    pointer-events: none;
}

/* Grid lines decorativos */
.cta-bg-pattern::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(29, 78, 216, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(29, 78, 216, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin-inline: auto;
    text-align: center;
}

.cta-title {
    font-family: var(--font-display);
    font-size: var(--text-6xl);
    font-weight: var(--weight-extrabold);
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: var(--white);
    margin-bottom: var(--space-6);
}

.cta-highlight {
    color: var(--blue-600);
    position: relative;
}

.cta-subtitle {
    font-size: var(--text-lg);
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
    max-width: 56ch;
    margin-inline: auto;
    margin-bottom: var(--space-12);
}

/* —— FORMULARIO DE CONTACTO —— */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    text-align: left;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-3xl);
    padding: var(--space-10);
    margin-bottom: var(--space-10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.form-field-full { grid-column: 1 / -1; }

.form-label {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
}

.form-input {
    padding: 14px 18px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
    color: var(--white);
    font-size: var(--text-sm);
    font-family: var(--font-body);
    transition:
        border-color  var(--transition-fast),
        background    var(--transition-fast),
        box-shadow    var(--transition-fast);
    outline: none;
    width: 100%;
}

.form-input::placeholder { color: rgba(255,255,255,0.25); }

.form-input:focus {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(255,255,255,0.08);
    box-shadow:
        0 0 0 3px rgba(29, 78, 216, 0.2),
        0 0 20px rgba(29, 78, 216, 0.1);
}

.form-input.has-error {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.4)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.form-select option {
    background: var(--gray-900);
    color: var(--white);
}

.form-textarea { resize: vertical; min-height: 120px; }

.form-error {
    font-size: var(--text-xs);
    color: #FC8181;
    font-weight: var(--weight-medium);
    min-height: 16px;
    display: block;
}

.form-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-2);
}

.form-disclaimer {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.4);
}
.form-disclaimer i { color: rgba(255,255,255,0.3); }

/* —— CONTACTO DIRECTO —— */
.contact-direct {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.contact-direct-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition:
        background     var(--transition-fast),
        border-color   var(--transition-fast),
        transform      var(--transition-fast);
}
.contact-direct-item:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.cdi-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: rgba(29, 78, 216, 0.2);
    color: var(--blue-600);
    font-size: var(--text-lg);
    flex-shrink: 0;
}
.cdi-wa  { background: rgba(37, 211, 102, 0.15); color: #25D366; }
.cdi-ig  { background: rgba(225, 48, 108, 0.15);  color: #E1306C; }

.cdi-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cdi-label {
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.4);
    font-weight: var(--weight-medium);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.cdi-text strong {
    font-size: var(--text-sm);
    color: var(--white);
    font-weight: var(--weight-semibold);
}

/* ============================================================
   18. FOOTER
   ============================================================ */
.footer {
    background: var(--gray-900);
    position: relative;
}

/* Línea superior decorativa */
.footer::before {
    content: '';
    display: block;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.footer-main {
    padding-block: var(--space-20);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-12);
}

/* —— COLUMNA MARCA —— */
.footer-brand {}

.footer-logo {
    margin-bottom: var(--space-5);
    display: inline-flex;
}

.footer-logo .logo-name { color: var(--white); }
.footer-logo .logo-type { color: rgba(255,255,255,0.4); }

.footer-brand-desc {
    font-size: var(--text-sm);
    color: var(--gray-300);
    line-height: 1.75;
    margin-bottom: var(--space-6);
    max-width: 32ch;
}

/* —— REDES SOCIALES —— */
.footer-social {
    display: flex;
    gap: var(--space-3);
}

.social-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: var(--text-base);
    text-decoration: none;
    transition:
        background    var(--transition-fast),
        color         var(--transition-fast),
        border-color  var(--transition-fast),
        transform     var(--transition-fast);
}
.social-btn:hover {
    background: var(--color-primary);
    color: var(--white);
    border-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-blue);
}

/* —— NAV FOOTER —— */
.footer-nav-title {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: var(--space-6);
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-link {
    font-size: var(--text-sm);
    color: var(--gray-300);
    text-decoration: none;
    transition: color var(--transition-fast), transform var(--transition-fast);
    display: inline-block;
}
.footer-link:hover {
    color: var(--white);
    transform: translateX(3px);
}

/* —— CONTACTO FOOTER —— */
.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--gray-300);
}

.footer-contact-list i {
    color: var(--color-primary);
    margin-top: 3px;
    flex-shrink: 0;
    width: 14px;
}

/* —— FOOTER BOTTOM —— */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-block: var(--space-6);
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.footer-copy {
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.3);
}

.footer-sep { margin-inline: var(--space-2); opacity: 0.4; }

.footer-legal {
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.25);
}

.footer-link-sm {
    color: rgba(255,255,255,0.35);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.footer-link-sm:hover { color: rgba(255,255,255,0.7); }

/* —— BACK TO TOP —— */
.back-to-top {
    position: fixed;
    bottom: var(--space-8);
    right: var(--space-8);
    z-index: 500;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-base);
    box-shadow: var(--shadow-blue);
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity    var(--transition-slow),
        transform  var(--transition-slow),
        box-shadow var(--transition-base);
    pointer-events: none;
}

.back-to-top:not([hidden]) {
    display: flex;
}

.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.back-to-top:hover {
    box-shadow: var(--shadow-blue-lg);
    transform: translateY(-3px);
}

/* ============================================================
   19. ESTADOS DE FILTRO (Portafolio)
   ============================================================ */
.masonry-item {
    transition:
        transform  var(--transition-slow),
        box-shadow var(--transition-slow),
        opacity    400ms var(--ease-in-out);
}

.masonry-item.filter-hidden {
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
}

/* ============================================================
   20. ESTADO DE ÉXITO DEL FORMULARIO
   ============================================================ */
.form-success-overlay {
    display: none;
    position: absolute;
    inset: 0;
    border-radius: var(--radius-3xl);
    background: rgba(15, 23, 36, 0.97);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
    z-index: 10;
}

.form-success-overlay.is-shown { display: flex; }

.form-success-icon {
    width: 80px;
    height: 80px;
    background: rgba(34, 197, 94, 0.15);
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-4xl);
    color: #22C55E;
}

/* ============================================================
   21. PARTÍCULAS DE FONDO HERO (generadas por JS)
   ============================================================ */
.hero-particle {
    position: absolute;
    border-radius: var(--radius-full);
    background: rgba(59, 130, 246, var(--opacity, 0.4));
    pointer-events: none;
    animation: particle-drift var(--duration, 20s) var(--delay, 0s) infinite ease-in-out;
    will-change: transform, opacity;
}

@keyframes particle-drift {
    0%, 100% {
        transform: translate(0, 0);
        opacity: var(--opacity, 0.3);
    }
    25% {
        transform: translate(var(--x1, 40px), var(--y1, -60px));
        opacity: calc(var(--opacity, 0.3) * 1.8);
    }
    50% {
        transform: translate(var(--x2, -30px), var(--y2, -120px));
        opacity: var(--opacity, 0.3);
    }
    75% {
        transform: translate(var(--x3, 60px), var(--y3, -80px));
        opacity: calc(var(--opacity, 0.3) * 1.5);
    }
}

/* ============================================================
   22. RESPONSIVE BREAKPOINTS
   ============================================================ */

/* —— DESKTOP XL (≥ 1440px) —— */
@media (min-width: 1440px) {
    :root { --container-max: 1360px; }

    .hero-title { font-size: clamp(var(--text-7xl), 5.5vw, 88px); }
    .section-title { font-size: clamp(var(--text-5xl), 3.5vw, var(--text-6xl)); }
    .cta-title { font-size: clamp(var(--text-6xl), 4vw, 72px); }

    .values-grid { grid-template-columns: repeat(4, 1fr); }
    .masonry-grid { grid-auto-rows: 320px; }
}

/* —— DESKTOP ESTÁNDAR (1024px – 1439px) —— */
@media (min-width: 1024px) and (max-width: 1439px) {
    .hero-title { font-size: clamp(56px, 4.5vw, var(--text-7xl)); }
    .services-interactive { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: var(--space-8); }
}

/* —— TABLET (768px – 1023px) —— */
@media (max-width: 1023px) {
    :root {
        --container-pad: var(--space-5);
        --navbar-h: 68px;
    }

    /* NAVBAR */
    .nav-links { display: none; }
    .mobile-menu-toggle { display: flex; }

    /* HERO */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-block: var(--space-20);
        gap: var(--space-12);
    }
    .hero-title { font-size: clamp(42px, 6vw, 64px); }
    .hero-subtitle { margin-inline: auto; }
    .hero-badge { margin-inline: auto; }
    .hero-cta-group { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual {
        max-width: 440px;
        margin-inline: auto;
    }
    .hero-visual-card { aspect-ratio: auto; height: 360px; }

    /* ABOUT */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }
    .about-visual {
        max-width: 480px;
        margin-inline: auto;
    }
    .about-floating-card { right: 0; }
    .leaders-grid { grid-template-columns: 1fr 1fr; }

    /* VALORES */
    .values-grid { grid-template-columns: repeat(2, 1fr); }

    /* SERVICIOS */
    .services-interactive {
        grid-template-columns: 1fr;
    }
    .services-tabs {
        flex-direction: row;
        overflow-x: auto;
        gap: var(--space-2);
        position: static;
        padding-bottom: var(--space-2);
    }
    .service-tab {
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-width: 140px;
        padding: var(--space-4);
    }
    .service-tab-arrow { display: none; }
    .service-tab-text span { display: none; }

    /* MASONRY */
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 240px;
    }
    .masonry-item-wide { grid-column: span 2; }

    /* CONTACTO */
    .contact-direct { grid-template-columns: 1fr; }

    /* NÚMEROS PARALLAX */
    .numbers-band {
        flex-direction: column;
        gap: var(--space-10);
        text-align: center;
    }

    /* FOOTER */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-10);
    }
    .footer-brand { grid-column: 1 / -1; }

    /* CTA */
    .cta-title { font-size: clamp(36px, 5vw, 52px); }
    .section-title { font-size: clamp(32px, 4.5vw, var(--text-5xl)); }
}

/* —— MOBILE (< 768px) —— */
@media (max-width: 767px) {
    :root {
        --container-pad: var(--space-4);
        --navbar-h: 60px;
    }

    /* TIPOGRAFÍA */
    .hero-title  { font-size: clamp(36px, 9vw, 48px); letter-spacing: -0.03em; }
    .section-title { font-size: var(--text-3xl); }
    .section-subtitle { font-size: var(--text-base); }
    .cta-title   { font-size: var(--text-4xl); letter-spacing: -0.025em; }
    .parallax-quote { font-size: var(--text-xl); }
    .nh-value    { font-size: var(--text-5xl); }

    /* SECCIONES */
    .about, .values, .services, .portfolio { padding-block: var(--space-20); }
    .cta-section { padding-block: var(--space-20); }
    .footer-main { padding-block: var(--space-16); }

    /* HERO */
    .hero-container { padding-block: var(--space-16); gap: var(--space-10); }
    .hero-visual-card { height: 280px; }
    .stat-number { font-size: var(--text-3xl); }
    .hero-stats { gap: var(--space-4); }

    /* BLUEPRINT: ocultar en móvil pequeño */
    .bp-stats-overlay { display: none; }

    /* VALORES: 1 columna */
    .values-grid { grid-template-columns: 1fr; gap: var(--space-4); }

    /* MASONRY: 1 columna */
    .masonry-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
    }
    .masonry-item-tall  { grid-row: span 1; }
    .masonry-item-wide  { grid-column: span 1; }

    /* LÍDERES: 1 columna */
    .leaders-grid { grid-template-columns: 1fr; }

    /* FORMULARIO */
    .form-row { grid-template-columns: 1fr; }
    .contact-form { padding: var(--space-6); }

    /* FOOTER */
    .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
    .footer-bottom-inner { flex-direction: column; text-align: center; }

    /* ABOUT VISUAL */
    .about-image-wrap { aspect-ratio: 4/3; }
    .about-floating-card { right: var(--space-4); bottom: var(--space-4); }

    /* BTN NAV: ocultar en mobile */
    .btn-nav { display: none; }

    /* PARALLAX: deshabilitar attachment fixed para performance */
    .parallax-inner {
        background-attachment: scroll;
    }

    /* PARTÍCULAS: reducir en móvil */
    .hero-particle:nth-child(n+15) { display: none; }

    /* CURSOR: desactivar en móvil */
    .cursor-dot, .cursor-ring { display: none; }

    /* BACK TO TOP */
    .back-to-top { bottom: var(--space-5); right: var(--space-5); }

    /* SERVICIOS TABS: scroll horizontal */
    .services-tabs {
        padding-bottom: var(--space-3);
        scrollbar-width: none;
    }
    .services-tabs::-webkit-scrollbar { display: none; }
    .service-tab { min-width: 120px; font-size: var(--text-xs); }

    /* FILTROS: scroll horizontal */
    .portfolio-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: var(--space-2);
        scrollbar-width: none;
    }
    .portfolio-filters::-webkit-scrollbar { display: none; }
    .filter-btn { white-space: nowrap; }
}

/* —— MOBILE XS (< 400px) —— */
@media (max-width: 399px) {
    .hero-title { font-size: 32px; }
    .hero-cta-group { flex-direction: column; width: 100%; }
    .hero-cta-group .btn { width: 100%; justify-content: center; }
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2);
        text-align: center;
    }
    .stat-divider { display: none; }
}

/* ============================================================
   23. PREFERENCIAS DE ACCESIBILIDAD
   ============================================================ */

/* Sin movimiento si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .floating, .orb-1, .orb-2, .badge-top, .badge-bottom, .scroll-dot, .badge-dot {
        animation: none !important;
    }
    .reveal-item { opacity: 1; transform: none; }
    .reveal-left  { opacity: 1; transform: none; }
    .reveal-right { opacity: 1; transform: none; }
    .reveal-scale { opacity: 1; transform: none; }
}

/* Focus visible para navegación por teclado */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Para texto seleccionado */
::selection {
    background: var(--blue-100);
    color: var(--blue-900);
}

/* ============================================================
   24. UTILIDADES ADICIONALES
   ============================================================ */

/* Evitar que imágenes sin src muestren borde dañado */
img[src=""], img:not([src]) {
    visibility: hidden;
}

/* Scroll bar personalizado (navegadores Chromium) */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-050); }
::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* Placeholder para imágenes del portafolio (cuando no hay fotos reales aún) */
.masonry-img-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Placeholder visual con gradientes para el portafolio */
.masonry-item:nth-child(1) .masonry-img-wrap { background: linear-gradient(160deg, #0A1628 0%, #1D4ED8 100%); }
.masonry-item:nth-child(2) .masonry-img-wrap { background: linear-gradient(160deg, #1F2937 0%, #374151 100%); }
.masonry-item:nth-child(3) .masonry-img-wrap { background: linear-gradient(160deg, #0A1628 0%, #1E3A8A 100%); }
.masonry-item:nth-child(4) .masonry-img-wrap { background: linear-gradient(160deg, #1F2937 0%, #111827 100%); }
.masonry-item:nth-child(5) .masonry-img-wrap { background: linear-gradient(160deg, #0F172A 0%, #1D4ED8 100%); }
.masonry-item:nth-child(6) .masonry-img-wrap { background: linear-gradient(160deg, #111827 0%, #1E3A8A 100%); }

/* ============================================================
   25. JUSTIFICACIÓN DE TEXTOS (Solicitud Especial)
   ============================================================ */
.about-desc,
.value-desc,
.panel-desc,
.contact-desc,
.footer-brand-desc,
.g-cta-desc,
.about-text {
    text-align: justify;
}
