/* ==========================================================================
   BRUTALISMO DINÁMICO - EXTENSIÓN MAGNET IMPACT
   ========================================================================== */

:root {
    --mi-orange: #ff9900;
    --mi-orange-glow: rgba(255, 153, 0, 0.4);
    --mi-navy: #131921;
    --mi-dark: #000000;
    --mi-font-syne: 'Zen Dots', sans-serif;
    --mi-font-space: 'Space Grotesk', sans-serif;
}

/* Contenedor Principal para evitar conflictos con el estilo Amazon */
.magnet-impact-page {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: var(--mi-dark);
    color: #ffffff;
    font-family: var(--mi-font-space);
    overflow: clip;
    /* clip evita scroll lateral sin crear nuevo scroll-container, permitiendo sticky en hijos */
    position: relative;
    margin-top: -20px;
    /* Compensa márgenes de WordPress si es necesario */
}

/* Canvas de fondo (Efecto rejilla/humo de diseño.html) */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
}

.magnet-impact-page section {
    position: relative;
    z-index: 2;
    padding: 100px 5%;
}

/* Títulos Brutalistas */
.hero-title {
    font-family: var(--mi-font-syne);
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 1000;
    line-height: 0.9;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
}

.orange-text {
    color: var(--mi-orange);
    text-shadow: 0 0 30px var(--mi-orange-glow);
}

/* Ícono de servicio (usado dentro de .arsenal-card-inner) */
.service-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--mi-orange);
}

/* Cursores Personalizados */
.cursor-dot,
.cursor-outline,
.cursor-blur {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--mi-orange);
    opacity: 1;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--mi-orange);
    opacity: 1;
}

.cursor-blur {
    width: 80px;
    height: 80px;
    background: rgba(255, 153, 0, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 153, 0, 0.2);
    transform: translate(-50%, -50%) scale(0);
}

/* Estados del Cursor */
body.is-moving .cursor-outline {
    transform: translate(-50%, -50%) scale(1);
}

body.is-stopped .cursor-outline {
    transform: translate(-50%, -50%) scale(1.8);
    border-color: rgba(255, 153, 0, 0.5);
    box-shadow: 0 0 30px var(--mi-orange-glow);
}

body.is-stopped .cursor-blur {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Responsivo */
@media (max-width: 768px) {
    .hero-title {
        font-size: 4rem;
    }
}

/* ==========================================================================
   SECCION PROCESO - FUTURISTA
   ========================================================================== */
#process {
    padding: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh;
    overflow: hidden !important;
    background: #000;
    position: relative;
}

.process-wrapper {
    display: flex;
    height: 100%;
    width: 400vw;
    /* 4 pasos = 400vw */
    margin: 0;
    padding: 0;
    position: relative;
    left: 0;
    will-change: transform;
}

.process-step {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0 5%;
    text-align: center;
    box-sizing: border-box;
}

.step-number {
    position: absolute;
    font-family: var(--mi-font-syne);
    font-size: 40vw;
    font-weight: 400; /* Zen Dots solo trae peso 400: el 900 fuerza negrita sintética
                         en Chrome/Firefox y rompe los empalmes del stroke a 40vw */
    line-height: 1;
    z-index: -1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 153, 0, 0.18);
    pointer-events: none;
    transition: all 0.5s ease;
}

/* Modo oscuro: mantener el número hueco como en claro, pero trazo gris claro.
   El dark-mode global (style.css:8232, spec 0,3,2 !important) pinta spans de blanco;
   este override sube specificity (0,4,1) y fuerza relleno 100% transparente. */
body.dark-mode .process-wrapper .process-step .step-number,
body.dark-mode .process-wrapper .process-step .step-number::before,
body.dark-mode .process-wrapper .process-step .step-number::after {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    background: transparent !important;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.15) !important;
}

.step-title {
    font-family: var(--mi-font-syne);
    font-size: clamp(4rem, 10vw, 8rem);
    text-transform: uppercase;
    margin-bottom: 20px;
    color: #fff;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.step-desc {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
}

/* ============================================================
   ACCESIBILIDAD - MOTION REDUCIDO
   ============================================================ */
@media (prefers-reduced-motion: reduce) {

    /* Proceso: apilar pasos verticalmente en lugar de scroll horizontal */
    #process {
        height: auto !important;
        overflow: visible !important;
    }

    .process-wrapper {
        width: 100%;
        height: auto;
        flex-direction: column;
        transform: none !important;
    }

    .process-step {
        flex: none;
        width: 100%;
        height: 100vh;
        padding: 0 5%;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
    }

    .step-number {
        font-size: 20vw;
    }

    /* Arsenal: tarjetas siempre visibles (GSAP no las apila) */
    .arsenal-card {
        opacity: 1 !important;
        transform: none !important;
    }

    /* Sin animaciones de transición */
    .char-inner,
    .faq-answer-wrapper {
        transition: none !important;
    }
}

/* ============================================================
   PROCESS SECTION - MOBILE CINEMATIC STAGE
   Managed by GSAP in brutalismo.js (mobile branch)
   ============================================================ */
@media (max-width: 768px) {

    /* The section becomes a full-viewport stage, pinned by GSAP */
    #process {
        height: 100vh !important;
        overflow: hidden !important;
        padding: 0 !important;
        position: relative;
    }

    /* Wrapper clips to single viewport, no flex column stacking */
    .process-wrapper {
        position: relative;
        width: 100%;
        height: 100%;
        flex-direction: row; /* keep flex so desktop calc still works for any non-mobile */
    }

    /* Each step occupies the full stage absolutely */
    .process-step {
        position: absolute !important;
        inset: 0;
        width: 100% !important;
        height: 100% !important;
        flex: none !important;
        padding: 0 !important;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
        border: none !important;
        /* All hidden at start; GSAP controls visibility */
        opacity: 0;
        pointer-events: none;
    }

    /* ---- Number: giant right-side accent ---- */
    .step-number {
        position: absolute;
        top: 50%;
        right: -6vw;                /* anchor slightly off right edge */
        left: auto;
        /* Use margin-top instead of transform so GSAP can own transform freely */
        margin-top: -27.5vw;        /* half of font-size (55vw / 2) */
        font-family: var(--mi-font-syne);
        font-size: 55vw;
        font-weight: 900;
        line-height: 1;
        color: transparent;
        -webkit-text-stroke: 1px rgba(255, 153, 0, 0.18);
        z-index: 0;
        opacity: 0;                 /* GSAP will fade in */
        transform: scale(0.6);     /* GSAP will scale up */
    }

    /* ---- Title: slides in from off-screen left to top-left ---- */
    .step-title {
        position: absolute;
        top: 32%; /* Bajamos de 18% a 32% para librar el header Amazon */
        left: 5%;
        right: 5%;
        font-family: var(--mi-font-syne);
        font-size: clamp(2rem, 9vw, 4rem);
        font-weight: 900;
        text-transform: uppercase;
        line-height: 1.1;
        letter-spacing: -0.02em;
        white-space: nowrap;
        color: #fff;
        z-index: 10; /* Subimos z-index para estar sobre el número */
        text-align: left;
        opacity: 0;                    /* GSAP will fade in */
        transform: translateX(-100vw); /* GSAP will slide in */
        text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8); /* Refuerzo de lectura */
    }

    /* ---- Description: centered, appears after title ---- */
    .step-desc {
        position: absolute;
        bottom: 18%; /* Ajuste de 14% a 18% para mejor balance */
        left: 0;
        right: 0;
        padding: 0 8%;
        text-align: center;
        font-size: 1.05rem;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.8);
        z-index: 10;
        opacity: 0;                  /* GSAP will fade in */
        transform: translateY(40px); /* GSAP will slide up */
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }
}

/* =========================================================
   MIGRATED FROM STYLE.CSS - SERVICIOS ELITE SECTIONS
   ========================================================= */

.hero-services-content {
    /* Override base .hero-services-content which has position:absolute + left:50px */
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    z-index: 20;
    font-family: 'Zen Dots', sans-serif;
    text-align: center;
    pointer-events: none;
    padding: 60px 20px !important;
    margin: 0 auto !important;
    width: 90% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    animation: none !important;
    opacity: 1 !important;
}

.hero-three-container .hero-title {
    margin-top: 70px;
    font-size: clamp(3.2rem, 12vw, 7rem);
    line-height: 1.1;
    margin-bottom: 10px;
    color: #fff;
    text-transform: uppercase;
    font-weight: 1000;
}

.hero-three-container .blue-text {
    color: #ff9900;
}

.hero-three-container .hero-sub {
    margin-top: 80px !important;
    max-width: 900px !important;
    font-size: clamp(1.5rem, 3vw, 1.2rem) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    line-height: 1.8 !important;
    text-align: center !important;
    z-index: 30 !important;
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif !important; /* Body font del tema, legible en tamano pequeno */
}

#hero-three-canvas {
    pointer-events: auto !important;
    font-family: 'Zen Dots', sans-serif !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* INGENIERÍA REVEAL SECTION - Sav1n Style */
#faq-tecnico {
    padding: 150px 0 100px;
    background: #000;
    position: relative;
    overflow: hidden;
}

/* =========================================================
   FAQ ACCORDION — Premium Design
   ========================================================= */
.faq-container {
    max-width: 780px;
    margin: 4rem auto 0;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

.faq-item {
    border: 1px solid rgba(255, 153, 0, 0.15);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.faq-item:hover {
    border-color: rgba(255, 153, 0, 0.45);
    background: rgba(255, 153, 0, 0.04);
    box-shadow: 0 0 30px rgba(255, 153, 0, 0.08);
}

.faq-item.is-open {
    border-color: rgba(255, 153, 0, 0.6);
    background: rgba(255, 153, 0, 0.06);
    box-shadow: 0 0 40px rgba(255, 153, 0, 0.12);
}

/* Button / Question row */
.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.6rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    color: #ffffff;
    font-family: 'Zen Dots', 'Space Grotesk', sans-serif;
    font-size: clamp(0.9rem, 2.2vw, 1.05rem);
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.01em;
    transition: color 0.25s ease;
}

.faq-question:hover {
    color: #ff9900;
}

.faq-question:focus-visible {
    outline: 2px solid #ff9900;
    outline-offset: 2px;
    border-radius: 8px;
}

.faq-item.is-open .faq-question {
    color: #ff9900;
}

.faq-question-text {
    flex: 1;
}

/* Icon circle */
.faq-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 153, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff9900;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.3s ease,
                border-color 0.3s ease;
}

.faq-item.is-open .faq-icon {
    background: rgba(255, 153, 0, 0.15);
    border-color: #ff9900;
    transform: rotate(45deg);
}

/* Vertical line of the + icon (hidden when open) */
.faq-icon-v {
    transition: opacity 0.3s ease;
}

/* Collapsible answer area */
.faq-answer-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.is-open .faq-answer-wrapper {
    max-height: 400px; /* Lo suficientemente grande para cualquier respuesta */
}

.faq-answer {
    padding: 0 1.6rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(0.875rem, 2vw, 0.975rem);
    line-height: 1.75;
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
    font-weight: 400;
    border-top: 1px solid rgba(255, 153, 0, 0.1);
    padding-top: 1.2rem;
    margin: 0;
    transition: color 0.3s ease;
}

/* Divider line between question and answer */
.faq-item.is-open .faq-answer {
    color: rgba(255, 255, 255, 0.85);
}

/* --- Modo claro --- */
body:not(.dark-mode) .faq-item {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(255, 153, 0, 0.2);
}

body:not(.dark-mode) .faq-question {
    color: #ffffff;
}

body:not(.dark-mode) .faq-item.is-open .faq-question {
    color: #ff9900;
}

body:not(.dark-mode) .faq-answer {
    color: rgba(255, 255, 255, 0.75);
}

body:not(.dark-mode) .faq-item.is-open .faq-answer {
    color: rgba(255, 255, 255, 0.92);
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .faq-container {
        padding: 0 1rem;
        margin-top: 2.5rem;
    }

    .faq-question {
        padding: 1.2rem 1.1rem;
        font-size: 0.88rem;
    }

    .faq-icon {
        width: 30px;
        height: 30px;
    }

    .faq-icon svg {
        width: 16px;
        height: 16px;
    }

    .faq-answer {
        padding: 0 1.1rem 1.2rem;
        padding-top: 1rem;
        font-size: 0.855rem;
    }

    .faq-item {
        border-radius: 12px;
        margin-bottom: 0.75rem;
    }
}

/* The 3D Three.js background canvas */
#ingenieria-reveal-container {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 600px;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}

/* Title wrapper */
.reveal-title {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    pointer-events: none;
    overflow: visible;
}

/* Each line of text */
.reveal-line {
    display: block;
    overflow: hidden;
    line-height: 0.95;
    padding-top: 0.1em;
    margin-top: -0.1em;
    white-space: nowrap !important; /* Forzar una sola línea */
}

/* Each character mask - acts as the clipping box */
.char-mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    line-height: 1;
}

/* The actual character that slides up */
.char-inner {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Triggered state */
.char-inner.is-revealed {
    transform: translateY(0);
}

/* INGENIERÍA line styles */
#line-ingenieria,
#line-nuestro,
#line-arquitectos {
    font-family: 'Zen Dots', sans-serif;
    font-size: clamp(2.5rem, 8vw, 8rem); /* Reducido de 12vw a 8vw para evitar cortes */
    font-weight: 400; /* Zen Dots is heavy by default */
    color: #fff;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

/* SIN FILTROS line styles */
#line-filtros,
#line-arsenal,
#line-vida {
    font-family: 'Zen Dots', sans-serif;
    font-size: clamp(1rem, 3.8vw, 3.5rem); /* Reducido de 7vw a 3.8vw para frases largas */
    font-weight: 400;
    color: #ff9900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Space character for "SIN FILTROS" */
#line-filtros .char-mask:nth-child(4) {
    width: 0.35em;
}

/* LOS ARQUITECTOS - Space at 4th */
#line-arquitectos .char-mask:nth-child(4) {
    width: 0.35em;
}

/* DAMOS VIDA A LO INTANGIBLE - Spaces at 6, 11, 13, 16 */
#line-vida .char-mask:nth-child(6),
#line-vida .char-mask:nth-child(11),
#line-vida .char-mask:nth-child(13),
#line-vida .char-mask:nth-child(16) {
    width: 0.35em;
}

@media (max-width: 768px) {

    #line-ingenieria,
    #line-nuestro {
        font-size: clamp(2.5rem, 12vw, 5rem);
        letter-spacing: -0.01em;
    }

    #line-arquitectos {
        font-size: clamp(1.8rem, 7.8vw, 4rem);
        letter-spacing: -0.01em;
    }

    #line-filtros,
    #line-arsenal {
        font-size: clamp(1.5rem, 7vw, 3rem);
    }

    #line-vida {
        font-size: clamp(1rem, 4.2vw, 2rem);
    }
}

/* =========================================================
NUESTRO ARSENAL — Stack Scroll Effect (GSAP Ready)
========================================================= */

#services {
    padding: 0;
    overflow: visible;
    background: #000;
}

.arsenal-header {
    text-align: center;
    padding: 120px 40px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.arsenal-header .section-title {
    margin-bottom: 20px;
}

.arsenal-stack-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 15vh;
}

.arsenal-card {
    width: 100%;
    margin-bottom: 12vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    position: relative;
}

.arsenal-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Colores de fondo de tarjeta (Navy profundos) */
.arsenal-card {
    --card-bg: #0d0d14;
}

.arsenal-card[data-index="1"] {
    --card-bg: #0e0e18;
}

.arsenal-card[data-index="2"] {
    --card-bg: #0f0f1c;
}

.arsenal-card[data-index="3"] {
    --card-bg: #10101f;
}

.arsenal-card[data-index="4"] {
    --card-bg: #111122;
}

.arsenal-card[data-index="5"] {
    --card-bg: #121226;
}

.arsenal-card[data-index="6"] {
    --card-bg: #131329;
}

.arsenal-card[data-index="7"] {
    --card-bg: #14142c;
}

.arsenal-card[data-index="8"] {
    --card-bg: #15152f;
}

.arsenal-card {
    background: var(--card-bg);
}

/* Borde de acento izquierdo (AMARILLO THEME #ffd814) - suavizado para no ser un "tell" de IA */
.arsenal-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(255, 217, 20, 0.5), rgba(255, 153, 0, 0.15));
}

.arsenal-card-inner {
    display: grid;
    grid-template-columns: 72px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 12px 20px;
    padding: 24px 30px;
    min-height: 120px;
    /* Ensure there's space for the stacking */
}

.arsenal-card-inner .service-icon {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    width: 62px;
    height: 62px;
    background: rgba(255, 216, 20, 0.1);
    border: 1px solid rgba(255, 216, 20, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #ffd814;
    transition: all 0.4s ease;
}

.arsenal-card:hover .service-icon {
    background: rgba(255, 216, 20, 0.2);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 20px rgba(255, 216, 20, 0.2);
}

.arsenal-card-inner .service-title {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    font-family: var(--mi-font-syne, sans-serif);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #ffffff;
    margin: 0;
    text-transform: uppercase;
}

.arsenal-card-inner .service-desc {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.6;
    padding-bottom: 24px;
    max-width: 800px;
    margin-top: 10px;
}

/* Desktop Grid Layout (Snake Pattern) */
@media (min-width: 992px) {
    .arsenal-stack-wrapper {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        align-items: stretch;
        max-width: 1200px;
    }

    .arsenal-card {
        margin-bottom: 0;
        height: 100%;
    }

    .arsenal-card-inner {
        padding: 30px 25px;
        height: 100%;
        gap: 15px 20px;
        align-content: flex-start;
    }

    .arsenal-card-inner .service-icon {
        margin-bottom: 0;
    }

    .arsenal-card-inner .service-title {
        font-size: 1.2rem;
        margin-top: 0;
    }

    .arsenal-card-inner .service-desc {
        padding-bottom: 0;
    }

    /* Snake Layout mapping */
    .arsenal-stack-wrapper>div:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }

    .arsenal-stack-wrapper>div:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }

    .arsenal-stack-wrapper>div:nth-child(3) {
        grid-column: 3;
        grid-row: 1;
    }

    .arsenal-stack-wrapper>div:nth-child(4) {
        grid-column: 3;
        grid-row: 2;
    }

    .arsenal-stack-wrapper>div:nth-child(5) {
        grid-column: 2;
        grid-row: 2;
    }

    .arsenal-stack-wrapper>div:nth-child(6) {
        grid-column: 1;
        grid-row: 2;
    }

    .arsenal-stack-wrapper>div:nth-child(7) {
        grid-column: 1;
        grid-row: 3;
    }

    .arsenal-stack-wrapper>div:nth-child(8) {
        grid-column: 2;
        grid-row: 3;
    }

    .arsenal-stack-wrapper>div:nth-child(9) {
        grid-column: 3;
        grid-row: 3;
    }

}

/* Responsive */
@media (max-width: 768px) {
    .arsenal-card-inner {
        grid-template-columns: 48px 1fr;
        gap: 6px 16px;
        padding: 16px 20px;
        min-height: 80px;
    }

    .arsenal-header {
        padding: 60px 15px 30px;
    }

    .arsenal-card-inner .service-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
        border-radius: 12px;
    }

    .arsenal-card-inner .service-title {
        font-size: 1.1rem;
    }

    .arsenal-card-inner .service-desc {
        font-size: 0.9rem;
        padding-bottom: 16px;
    }
}

/* =========================================================
   UNSEEN STUDIO 2025 INSPIRED BACKGROUND
========================================================= */

.unseen-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    background: #000;
}

.bg-paths-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.bg-paths-line {
    stroke-dasharray: 1200 1600;
    animation: bgPathsFlow 22s linear infinite;
}

.bg-paths-line:nth-child(2) {
    animation-duration: 28s;
    animation-delay: -4s;
}

.bg-paths-line:nth-child(3) {
    animation-duration: 34s;
    animation-delay: -9s;
}

.bg-paths-line:nth-child(4) {
    animation-duration: 25s;
    animation-delay: -14s;
}

.bg-paths-line:nth-child(5) {
    animation-duration: 31s;
    animation-delay: -18s;
}

@keyframes bgPathsFlow {
    to {
        stroke-dashoffset: -2800;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bg-paths-line {
        animation: none;
    }
}

/* =========================================================
   ELITE CONTACT FORM GLASS EFFECT
   ========================================================= */

.elite-form-glass {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 24px !important;
    padding: 60px !important;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8) !important;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 10;
}

.elite-form-glass:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-8px);
}

@media (max-width: 768px) {
    .elite-form-glass {
        padding: 30px 20px !important;
        border-radius: 16px !important;
    }
}

/* Checkbox visibility optimization (usa el patrón .checkmark del tema sobre fondo oscuro) */
.elite-form-glass .privacy-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 20px;
    cursor: pointer;
}

.elite-form-glass .checkbox-container {
    padding-left: 32px;
    margin-bottom: 0;
}

.elite-form-glass .checkmark {
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    transition: background-color 0.3s, border-color 0.3s;
}

.elite-form-glass .checkbox-container:hover input~.checkmark {
    background: rgba(255, 255, 255, 0.22);
}

.elite-form-glass .checkbox-container input:checked~.checkmark {
    background: #ff9900;
    border-color: #ff9900;
}

.elite-form-glass .checkbox-container input:checked~.checkmark:after {
    display: block;
}

.elite-form-glass .checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #000;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.elite-form-glass .checkbox-container input:focus-visible~.checkmark {
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.3);
}

.elite-form-glass .label-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.5;
}

 /* Circular Testimonials - Elite Dark Theme */
            .circular-testimonials {
                padding: 100px 20px;
                background: #000;
                position: relative;
                overflow: hidden;
            }

            .circular-testimonials-container {
                max-width: 1200px;
                margin: 0 auto;
                text-align: center;
            }

            .circular-testimonials-title {
                margin-bottom: 1.5rem;
            }

            .circular-testimonials-title .section-title {
                color: #ffd814;
            }

            .circular-testimonials-carousel {
                height: 250px;
                position: relative;
                margin: 0.5rem 0 2rem;
                perspective: 1000px;
            }

            .circular-testimonials-images {
                position: relative;
                width: 100%;
                height: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .testimonial-image {
                position: absolute;
                width: 120px;
                height: 120px;
                border-radius: 50%;
                object-fit: cover;
                box-shadow: 0 10px 30px rgba(0,0,0,0.5);
                transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
                cursor: pointer;
                border: 2px solid rgba(255,255,255,0.1);
            }

            .testimonial-image.active {
                width: 160px;
                height: 160px;
                z-index: 10;
                box-shadow: 0 0 50px rgba(255, 153, 0, 0.4);
                border-color: #ff9900;
            }

            .circular-testimonials-content {
                max-width: 750px;
                margin: 0 auto 3rem;
                padding: 2.5rem;
                background: rgba(255,255,255,0.03);
                border-radius: 24px;
                backdrop-filter: blur(10px);
                border: 1px solid rgba(255,255,255,0.05);
                min-height: 220px;
                display: flex;
                flex-direction: column;
                justify-content: center;
            }

            .circular-testimonials-quote {
                font-size: 1.4rem;
                font-style: italic;
                color: #fff;
                line-height: 1.6;
                margin-bottom: 1.5rem;
                transition: all 0.3s ease;
            }

            .circular-testimonials-name {
                font-size: 1.2rem;
                font-weight: 700;
                color: #ff9900;
                margin-bottom: 0.25rem;
                text-transform: uppercase;
                letter-spacing: 1px;
            }

            .circular-testimonials-designation {
                color: #888;
                font-size: 0.9rem;
            }

            .circular-testimonials-nav {
                display: flex;
                gap: 1.5rem;
                justify-content: center;
            }

            .circular-nav-btn {
                width: 50px;
                height: 50px;
                border-radius: 50%;
                border: 1px solid rgba(255,255,255,0.1);
                background: rgba(255,255,255,0.05);
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                transition: all 0.3s ease;
                color: #fff;
            }

            .circular-nav-btn:hover {
                border-color: #ff9900;
                color: #ff9900;
                background: rgba(255, 153, 0, 0.1);
                transform: translateY(-2px);
            }

            .circular-nav-btn:focus-visible {
                outline: 2px solid #ff9900;
                outline-offset: 2px;
            }

            /* Desktop Layout Adjustment */
            @media (min-width: 992px) {
                .circular-testimonials-flex {
                    display: flex;
                    align-items: center;
                    gap: 4rem;
                    text-align: left;
                    margin-bottom: 4rem;
                    max-width: 1100px;
                    margin-left: auto;
                    margin-right: auto;
                }

                .circular-testimonials-carousel {
                    flex: 0 0 45%;
                    margin: 0;
                    height: 450px;
                }

                .testimonial-image {
                    width: 180px;
                    height: 180px;
                }

                .testimonial-image.active {
                    width: 250px;
                    height: 250px;
                }

                .circular-testimonials-content {
                    flex: 1;
                    margin: 0;
                    text-align: left;
                    align-items: flex-start;
                }

                .circular-testimonials-title {
                    text-align: center;
                    margin-bottom: 1.5rem;
                }
            }


/* ==========================================================================
   PORTFOLIO SCROLL (MAC CONTAINER & ACETERNITY EFFECT)
   ========================================================================== */

.hero-scroll-section {
    min-height: 160vh;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 1000px;
    padding-top: 8vh;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.hero-scroll-section .title-container {
    text-align: center;
    z-index: 10;
    /* Margen superior que despega el título de la barra de menú cuando la
       sección queda pinnada bajo la navbar sticky (desktop y móvil) */
    margin-top: clamp(4rem, 10vh, 8rem);
    margin-bottom: 2rem;
    transform: translateY(0);
}

.hero-scroll-section .title-container h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-family: var(--mi-font-space);
    color: #ffffff;
}

/* Modo claro: el fondo de la sección es oscuro, el título en amarillo Amazon */
body:not(.dark-mode) .hero-scroll-section .title-container h1 {
    color: #ffd814 !important;
}

body:not(.dark-mode) .hero-scroll-section .title-container h2 {
    color: #ffd814 !important;
}

body:not(.dark-mode) .hero-scroll-section .title-container p {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Team: glassmorphism sobre el bloque de texto "En LoConsigues.Online" */
.team-text-glass {
    background: rgba(18, 18, 18, 0.65) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px;
    padding: 24px 30px;
    text-align: left;
    color: #aaa;
    line-height: 1.7;
    position: relative;
    z-index: 2;
}

/* Team: inferior en 2 columnas (texto glass + wireframe 3D) */
.team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 50px auto 40px;
}

.team-wireframe {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

/* Squish Cube (three.js): the canvas is absolute-sized by the lib */
.squish-cube {
    position: relative;
    width: 280px;
    height: 280px;
    overflow: hidden;
}

/* Desktop: número fantasma — stroke más grueso pero casi invisible */
@media (min-width: 769px) {
    .step-number {
        -webkit-text-stroke: 10px rgba(255, 153, 0, 0.10);
    }
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .team-wireframe {
        display: none;
    }
}

/* Desktop: escala el título h2 a un ancho fluido similar al del subtítulo,
   sin tocar la escala móvil (max-width: 768px). */
@media (min-width: 1024px) {
    .hero-scroll-section .title-container {
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-scroll-section .title-container h2 {
        font-size: clamp(2.2rem, 2.8vw, 3.2rem) !important;
        line-height: 1.15;
        letter-spacing: -0.02em;
        font-family: var(--mi-font-space);
        font-weight: 800;
    }
}

/* Efecto en "destacar." - gradiente animado (shimmer), identidad Amazon del tema */
.hero-scroll-section .highlight {
    background-image: linear-gradient(90deg, #ff9900, #ffd814, #ff9900, #ffb74d);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: highlight-shimmer 4s linear infinite;
}

@keyframes highlight-shimmer {
    to { background-position: 200% center; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-scroll-section .highlight {
        animation: none;
        background-image: linear-gradient(90deg, #ff9900, #ffd814);
    }
}

.hero-scroll-section .mac-container {
    width: 90vw;
    max-width: 1200px;
    min-height: 750px;
    height: auto;
    overflow: hidden;
    background: #0f1115;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    box-shadow: 0 -20px 60px rgba(0,0,0,0.8), 0 0 40px rgba(59, 130, 246, 0.2);
    transform: rotateX(30deg) scale(0.7) translateY(100px);
    transform-origin: top center;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 4rem;
}

.hero-scroll-section .card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.25rem 1.25rem 1rem;
    transition: background 0.3s;
}

.hero-scroll-section .card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.hero-scroll-section .card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #ff9900;
}

.hero-scroll-section .card p {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.hero-scroll-section .card-image {
    width: 100%;
    height: 160px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.04);
}

.hero-scroll-section .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-scroll-section .card a {
    display: inline-block;
    margin-top: 0.25rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.hero-scroll-section .card a:hover {
    color: #ffd814;
}

.hero-scroll-section .card a:focus-visible {
    outline: 2px solid #ff9900;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .hero-scroll-section {
        height: auto;
        min-height: 160vh;
        padding: 6rem 1rem 2rem;
    }
    
    .hero-scroll-section .title-container {
        margin-top: 7rem;
        margin-bottom: 1.5rem;
    }

    .hero-scroll-section .title-container h1 {
        font-size: clamp(2.2rem, 9vw, 3.2rem);
    }
    
    .hero-scroll-section .card {
        padding: 1.25rem 1.25rem 1rem;
    }
    
    .hero-scroll-section .mac-container {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        height: auto;
    }
}

/* ==========================================================================
   GLASS ICON — Liquid Glass effect (hero móvil, vanilla WebGL)
   ========================================================================== */

/* Glass Icon dentro del hero: oculto en desktop, visible en móvil */
.glass-icon-hero {
    display: none;
}

@media (max-width: 768px) {
    /* Hero móvil: flujo vertical secuencial — vidrio arriba, subtítulo debajo */
    .hero-three-container {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }

    /* Canvas del Glass: altura fija (no vh) para que el header sticky al
       aparecer/desaparecer no altere sus dimensiones DOM y no dispare resize */
    .glass-icon-hero {
        display: block;
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        height: 300px;
        min-height: 0;
        z-index: 30;
        pointer-events: none;
        cursor: grab;
    }

    .glass-icon-hero canvas {
        pointer-events: none;
    }

    /* En móvil solo queda el canvas del Glass Icon: ocultamos el three.js de
       fondo y el texto HTML del título (el vidrio ya muestra su placa) */
    #hero-three-canvas {
        display: none !important;
    }

    .hero-three-container .hero-title {
        display: none !important;
    }

    /* Subtítulo: debajo del canvas del Glass, en flujo, sin traslaparse */
    .hero-services-content {
        z-index: 40 !important;
        justify-content: flex-start !important;
        padding: 12px 20px 40px !important;
    }

    .hero-three-container .hero-sub {
        position: relative !important;
        margin: 8px auto 0 auto !important;
        padding: 0 !important;
        z-index: 40 !important;
        font-size: clamp(1.15rem, 4.2vw, 1.4rem) !important;
        pointer-events: none;
    }
}

/* ==========================================================================
   FALLBACKS POR CAPACIDADES — Progressive Enhancement
   html.caps-low-gpu (sin WebGL, renderer por software, motion reducido o
   deviceMemory <= 2GB) / html.caps-no-webgl
   ========================================================================== */

/* Ocultar todos los canvas WebGL y el cubo jelly */
html.caps-low-gpu #hero-three-canvas,
html.caps-low-gpu .glass-icon-hero,
html.caps-low-gpu #team-waves-canvas,
html.caps-low-gpu .squish-cube {
    display: none !important;
}

/* Hero sin WebGL: degradado + título visible en TODOS los tamaños
   (en móvil el CSS base oculta el título porque el vidrio lo reemplazaba) */
html.caps-low-gpu .hero-three-container {
    background: radial-gradient(ellipse at 50% 30%, #1a2332 0%, #000 70%) !important;
    min-height: 70vh;
}

html.caps-low-gpu .hero-three-container .hero-title {
    display: block !important;
    position: relative !important;
    z-index: 2 !important;
    text-align: center !important;
}

html.caps-low-gpu .hero-three-container .hero-sub {
    position: relative !important;
    z-index: 2 !important;
}

html.caps-low-gpu .hero-services-content {
    justify-content: center !important;
    padding: 80px 20px !important;
    text-align: center !important;
}

/* Arsenal: tarjetas visibles y en flujo vertical (sin apilado de pins) */
html.caps-low-gpu .arsenal-card {
    opacity: 1 !important;
    transform: none !important;
}

/* Proceso: pasos apilados verticalmente en lugar de scroll horizontal/pinned */
html.caps-low-gpu #process {
    height: auto !important;
    overflow: visible !important;
}

html.caps-low-gpu .process-wrapper {
    width: 100%;
    height: auto;
    flex-direction: column;
    transform: none !important;
}

html.caps-low-gpu .process-step {
    flex: none;
    width: 100%;
    height: 100vh;
    padding: 0 5%;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
}

html.caps-low-gpu .step-number {
    font-size: 20vw;
}

/* ==========================================================================
   CUBO 3D LOADER — fondo decorativo de #process (solo desktop)
   Port del loader-3 de 21st.dev (ravikatiyar162): cubo dorado central sobre
   plataforma triangular isométrica (WebGL three.js, ver js/cubes-bg.js).
   Paleta del tema: amarillo #ffd814 + naranja #ff9900.
   ========================================================================== */
.loconsigues-cubes {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* El contenido del proceso queda por encima */
#process .process-wrapper {
    z-index: 1;
}

/* Solo desktop + respetar reduced-motion y GPU débil */
@media (max-width: 991px) {
    .loconsigues-cubes {
        display: none;
    }
}

html.caps-low-gpu .loconsigues-cubes {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .loconsigues-cubes {
        display: none;
    }
}

