/*
 * Capa visual de la landing de myCatalogo (/): gradient mesh, glassmorphism, kinetic type,
 * isometricos y logos flotantes. Usa la paleta corporativa definida en la vista:
 * --naranja (#4B8521), --naranja-claro (#6FAE3D), --naranja-oscuro (#2F5A1B), --negro y --crema.
 */

:root {
    --lfx-v: var(--naranja);
    --lfx-v-claro: var(--naranja-claro);
    --lfx-v-oscuro: var(--naranja-oscuro);
    --lfx-v-50: color-mix(in oklab, var(--naranja) 8%, white);
    --lfx-v-100: color-mix(in oklab, var(--naranja) 16%, white);
    --lfx-noche: #0b120a;
    --lfx-glass: rgba(255, 255, 255, 0.6);
    --lfx-glass-borde: rgba(255, 255, 255, 0.8);
    --lfx-sombra: 0 14px 44px -18px color-mix(in oklab, var(--naranja) 45%, transparent);
    --lfx-sombra-hover: 0 30px 60px -22px color-mix(in oklab, var(--naranja) 60%, transparent);
    --lfx-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html,
body {
    overflow-x: clip;
}

body {
    background: var(--crema);
}

/* ============ GRADIENT MESH DE FONDO ============ */
.lfx-mesh {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(180deg, var(--crema), #fff 50%, var(--crema));
}

.lfx-mesh span {
    position: absolute;
    width: 50vmax;
    height: 50vmax;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.3;
    will-change: transform;
}

.lfx-mesh span:nth-child(1) { background: var(--lfx-v-claro); top: -20vmax; right: -16vmax; animation: lfxDeriva1 28s ease-in-out infinite alternate; }
.lfx-mesh span:nth-child(2) { background: var(--lfx-v-100); top: 35%; left: -20vmax; opacity: 0.9; animation: lfxDeriva2 34s ease-in-out infinite alternate; }
.lfx-mesh span:nth-child(3) { background: var(--lfx-v); bottom: -28vmax; right: 10%; opacity: 0.16; animation: lfxDeriva3 40s ease-in-out infinite alternate; }

@keyframes lfxDeriva1 { to { transform: translate(-16vmax, 14vmax) scale(1.15); } }
@keyframes lfxDeriva2 { to { transform: translate(14vmax, -10vmax) scale(0.9); } }
@keyframes lfxDeriva3 { to { transform: translate(-12vmax, -14vmax) scale(1.2); } }

/* ============ NAV: VIDRIO ============ */
.nav {
    /* Sobre el hero oscuro un vidrio mas transparente se ve gris: va casi blanco */
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    border-bottom: 1px solid var(--lfx-glass-borde);
    box-shadow: 0 10px 40px -28px color-mix(in oklab, var(--naranja) 60%, transparent);
}

.btn-demo-nav {
    background: linear-gradient(135deg, var(--lfx-v-claro), var(--lfx-v-oscuro));
    box-shadow: 0 8px 22px -10px color-mix(in oklab, var(--naranja) 80%, transparent);
}

/* ============ HERO OSCURO: MESH + PARTICULAS + ISOMETRICO ============ */
.hero {
    background: var(--lfx-noche);
    color: #fff;
    isolation: isolate;
    padding-bottom: 120px;
}

.hero-bg {
    background: none;
    animation: none;
    overflow: hidden;
}

.hero-bg i {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    will-change: transform;
}

.hero-bg i:nth-child(1) { width: 55%; height: 75%; left: -12%; top: -18%; background: var(--lfx-v); opacity: 0.55; animation: lfxHero1 18s ease-in-out infinite alternate; }
.hero-bg i:nth-child(2) { width: 45%; height: 65%; right: -6%; top: 12%; background: var(--lfx-v-oscuro); opacity: 0.85; animation: lfxHero2 22s ease-in-out infinite alternate; }
.hero-bg i:nth-child(3) { width: 40%; height: 55%; left: 30%; bottom: -28%; background: var(--lfx-v-claro); opacity: 0.35; animation: lfxHero3 26s ease-in-out infinite alternate; }
.hero-bg i:nth-child(4) { width: 28%; height: 38%; right: 22%; top: -14%; background: #1d3b12; opacity: 0.9; animation: lfxHero1 20s ease-in-out infinite alternate-reverse; }

@keyframes lfxHero1 { to { transform: translate(22%, 16%) scale(1.2); } }
@keyframes lfxHero2 { to { transform: translate(-20%, -10%) scale(0.85); } }
@keyframes lfxHero3 { to { transform: translate(-14%, -22%) scale(1.25); } }

.lfx-logos {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Texto a la izquierda y escena isometrica a la derecha */
.lfx-hero-grid {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 40px;
}

.lfx-hero-grid .hero-content {
    text-align: left;
    margin: 0;
    max-width: none;
}

.lfx-hero-grid .hero-actions,
.lfx-hero-grid .hero-stats {
    justify-content: flex-start;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #d9f2c8;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.badge-dot { background: var(--lfx-v-claro); box-shadow: 0 0 12px var(--lfx-v-claro); }

.hero h1 {
    color: #fff;
    font-size: clamp(2.6rem, 5.4vw, 4.9rem);
    animation: none;
}

/* Reparte las lineas para que ninguna palabra quede sola */
.hero h1,
.section-title,
.cta-section h2 {
    text-wrap: balance;
}

.hero h1 .highlight {
    background: linear-gradient(110deg, var(--lfx-v-claro) 0%, #c9f0a8 30%, #fff 50%, #c9f0a8 70%, var(--lfx-v-claro) 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: lfxBrillo 5s linear infinite;
}

.hero h1 .highlight::after { background: linear-gradient(90deg, var(--lfx-v-claro), transparent); }

@keyframes lfxBrillo { to { background-position: -250% 0; } }

.typewriter-text { color: var(--lfx-v-claro); }

/* En dos columnas el titulo y la frase que se escribe sola van mas compactos */
.lfx-hero-grid .hero h1,
.lfx-hero-grid h1 {
    font-size: clamp(2.4rem, 4.4vw, 4.1rem);
}

@media (min-width: 1101px) {
    .lfx-hero-grid .hero-content p { margin-left: 0; }
}

.lfx-hero-grid .typewriter-container {
    font-size: clamp(1.5rem, 2.5vw, 2.3rem);
    min-height: 1.2em;
    white-space: nowrap;
}

.hero p { color: rgba(255, 255, 255, 0.72); }

.btn-cta {
    background: linear-gradient(135deg, var(--lfx-v-claro), var(--lfx-v-oscuro));
    box-shadow: 0 14px 34px -12px color-mix(in oklab, var(--naranja-claro) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.8s var(--lfx-out);
}

.btn-cta:hover::before { transform: translateX(120%); }

.hero .btn-secondary {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.hero-stats {
    border-top-color: rgba(255, 255, 255, 0.12);
}

.hero .stat-item {
    padding: 12px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hero .stat-num { color: var(--lfx-v-claro); }
.hero .stat-label { color: rgba(255, 255, 255, 0.6); }

/* Escena isometrica */
.lfx-escena {
    position: relative;
    width: 100%;
    max-width: 540px;
    justify-self: center;
    filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.55));
}

.lfx-escena svg { width: 100%; height: auto; display: block; overflow: visible; }

.lfx-escena .i-base-top { fill: rgba(255, 255, 255, 0.1); stroke: rgba(255, 255, 255, 0.28); }
.lfx-escena .i-base-izq { fill: rgba(255, 255, 255, 0.05); }
.lfx-escena .i-base-der { fill: rgba(255, 255, 255, 0.02); }
.lfx-escena .i-top { fill: #a8dc7e; }
.lfx-escena .i-izq { fill: var(--lfx-v-claro); }
.lfx-escena .i-der { fill: var(--lfx-v-oscuro); }
.lfx-escena .i-oscuro { fill: #14240f; }
.lfx-escena .i-pantalla { fill: #f4fbef; }
.lfx-escena .i-tarjeta { fill: var(--lfx-v-100); }
.lfx-escena .i-tarjeta-foto { fill: var(--lfx-v-claro); opacity: 0.85; }
.lfx-escena .i-blanco { fill: #fff; }
.lfx-escena .i-wa { fill: #25d366; }
.lfx-escena .i-sombra { fill: rgba(111, 174, 61, 0.35); filter: blur(10px); }
.lfx-escena .i-anillo { fill: none; stroke: var(--lfx-v-claro); stroke-width: 1.5; stroke-dasharray: 4 6; opacity: 0.6; }

.lfx-flota { animation: lfxFlotar 5s ease-in-out infinite; }
.lfx-flota.d1 { animation-delay: -1.5s; animation-duration: 6s; }
.lfx-flota.d2 { animation-delay: -3s; animation-duration: 7s; }

@keyframes lfxFlotar {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* El anillo queda plano bajo la escena; lo que se mueve son sus puntos a lo largo del borde */
.lfx-gira { animation: lfxGirar 14s linear infinite; }

@keyframes lfxGirar { to { stroke-dashoffset: -200; } }

/* ============ KINETIC TYPE ============ */
.lfx-palabra {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding: 0.04em 0.03em 0.1em;
    margin: -0.04em -0.03em -0.1em;
}

.lfx-palabra > span {
    display: inline-block;
    transform: translateY(110%) rotate(7deg);
    transform-origin: left bottom;
    opacity: 0;
    transition: transform 0.9s var(--lfx-out), opacity 0.6s ease;
    transition-delay: calc(var(--i, 0) * 70ms + var(--retraso, 0ms));
}

.lfx-kinetic.lfx-visible .lfx-palabra > span { transform: none; opacity: 1; }

/* Banda de texto en movimiento */
.lfx-banda {
    position: relative;
    z-index: 4;
    overflow: hidden;
    margin-top: -46px;
    padding: 20px 0;
    background: linear-gradient(90deg, var(--lfx-v-oscuro), var(--lfx-v) 50%, var(--lfx-v-oscuro));
    transform: rotate(-1.4deg) scale(1.03);
    box-shadow: 0 24px 60px -28px color-mix(in oklab, var(--naranja) 90%, transparent);
}

.lfx-banda-pista { display: flex; width: max-content; animation: lfxBanda 40s linear infinite; }
.lfx-banda:hover .lfx-banda-pista { animation-play-state: paused; }

.lfx-banda-grupo { display: flex; align-items: center; gap: 36px; padding-right: 36px; flex-shrink: 0; }

.lfx-banda-item {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(1.3rem, 2.8vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
    color: #fff;
}

.lfx-banda-item:nth-child(4n + 3) { color: transparent; -webkit-text-stroke: 1.2px rgba(255, 255, 255, 0.9); }

.lfx-banda-sep {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
    background: #c9f0a8;
    transform: rotate(45deg);
    box-shadow: 0 0 18px var(--lfx-v-claro);
}

@keyframes lfxBanda { to { transform: translateX(-50%); } }

/* ============ SECCIONES ============ */
/* Caracteristicas: vidrio con icono propio e inclinacion 3D */
.features-grid { perspective: 1400px; }

.feature-card {
    background: var(--lfx-glass);
    border: 1px solid var(--lfx-glass-borde);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: var(--lfx-sombra);
    transform-style: preserve-3d;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.78);
    border-color: var(--lfx-glass-borde);
    box-shadow: var(--lfx-sombra-hover);
}

.feature-card::after,
.modulo-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), color-mix(in oklab, var(--naranja-claro) 22%, transparent), transparent 50%);
}

.feature-card.lfx-inclinada::after,
.modulo-card.lfx-inclinada::after { opacity: 1; }

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--lfx-v-claro), var(--lfx-v-oscuro));
    box-shadow: 0 12px 24px -10px color-mix(in oklab, var(--naranja) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    position: relative;
}

/* Brillo de vidrio sobre el icono */
.feature-icon::before {
    content: '';
    position: absolute;
    inset: 1px 1px 50% 1px;
    border-radius: 15px 15px 40% 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent);
}

.feature-icon svg { width: 26px; height: 26px; position: relative; }

.feature-card:hover .feature-icon { transform: translateZ(30px) scale(1.08) rotate(-6deg); }

.feature-title { color: var(--lfx-v-oscuro); }

/* Como funciona: cada numero es un cubo isometrico */
.como-section {
    background: transparent;
    border-color: transparent;
}

.steps-container::before {
    top: 44px;
    height: 2px;
    opacity: 0.5;
    background: linear-gradient(90deg, transparent, var(--lfx-v-claro), var(--lfx-v), var(--lfx-v-claro), transparent);
    background-size: 200% 100%;
    animation: lfxLinea 4s linear infinite;
}

@keyframes lfxLinea { to { background-position: -200% 0; } }

.step {
    padding: 0 14px 26px;
    border-radius: 22px;
    background: var(--lfx-glass);
    border: 1px solid var(--lfx-glass-borde);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--lfx-sombra);
    transition: transform 0.5s var(--lfx-out), box-shadow 0.5s var(--lfx-out);
}

.step:hover { transform: translateY(-8px); box-shadow: var(--lfx-sombra-hover); }

/* Hexagono con tres caras (arriba clara, derecha oscura, izquierda media) = cubo isometrico */
.step-num {
    width: 76px;
    height: 88px;
    margin: -28px auto 18px;
    border-radius: 0;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    background: conic-gradient(from -60deg at 50% 50%, #c9f0a8 0 120deg, var(--lfx-v-oscuro) 120deg 240deg, var(--lfx-v-claro) 240deg 360deg);
    box-shadow: none;
    color: var(--lfx-v-oscuro);
    font-size: 1.3rem;
    align-items: flex-start;
    padding-top: 14px;
    filter: drop-shadow(0 14px 16px color-mix(in oklab, var(--naranja) 45%, transparent));
    animation: lfxFlotar 5s ease-in-out infinite;
}

.step:nth-child(2) .step-num { animation-delay: -1.2s; }
.step:nth-child(3) .step-num { animation-delay: -2.4s; }
.step:nth-child(4) .step-num { animation-delay: -3.6s; }

/* Modulos: vidrio con icono */
.modulo-card {
    position: relative;
    overflow: hidden;
    background: var(--lfx-glass);
    border: 1px solid var(--lfx-glass-borde);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    box-shadow: var(--lfx-sombra);
}

.modulo-card:hover {
    background: rgba(255, 255, 255, 0.78);
    border-color: var(--lfx-glass-borde);
    box-shadow: var(--lfx-sombra-hover);
}

.modulo-emoji {
    width: 46px;
    height: 46px;
    margin-top: 0;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--lfx-v-oscuro);
    background: var(--lfx-v-100);
    border: 1px solid color-mix(in oklab, var(--naranja) 18%, transparent);
    transition: transform 0.4s var(--lfx-out), background 0.3s, color 0.3s;
}

.modulo-emoji svg { width: 22px; height: 22px; }

.modulo-card:hover .modulo-emoji {
    color: #fff;
    background: linear-gradient(135deg, var(--lfx-v-claro), var(--lfx-v-oscuro));
    transform: rotate(-8deg) scale(1.06);
}

.modulo-title { color: var(--lfx-v-oscuro); }

/* CTA final: mesh oscuro + logos flotantes */
.cta-section {
    margin: 40px 24px 0;
    border-radius: 36px;
    background: var(--lfx-noche);
    color: #fff;
    isolation: isolate;
}

.cta-bg {
    background:
        radial-gradient(50% 70% at 15% 20%, color-mix(in oklab, var(--naranja) 70%, transparent), transparent 70%),
        radial-gradient(45% 65% at 85% 85%, color-mix(in oklab, var(--naranja-claro) 45%, transparent), transparent 70%),
        radial-gradient(35% 50% at 70% 10%, #1d3b12, transparent 70%);
    animation: lfxCta 16s ease-in-out infinite alternate;
}

@keyframes lfxCta { to { transform: scale(1.12) rotate(2deg); } }

/* La palabra resaltada trae color en linea (el verde oscuro no se lee sobre fondo oscuro) */
.cta-section h2 .lfx-acento { color: var(--lfx-v-claro) !important; }
.cta-section p { color: rgba(255, 255, 255, 0.7); }

/* Footer */
footer {
    border-top: 0;
    margin-top: 0;
}

.footer-logo span { color: var(--lfx-v); }

/* ============ RESPONSIVE ============ */
/* Una columna (celulares y tablets): la escena isometrica va en lugar del parrafo, entre la
   frase que se escribe sola y los botones. El texto del hero se "abre" (display: contents)
   para poder ordenar sus piezas junto con la escena */
@media (max-width: 1100px) {
    .lfx-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; text-align: center; }
    /* display: contents no corta la herencia: el centrado se pone aqui para que lo tomen sus piezas */
    .lfx-hero-grid .hero-content { display: contents; text-align: center; }
    .lfx-hero-grid h1 { order: 1; }
    .lfx-hero-grid .lfx-maquina { order: 2; margin-bottom: 0 !important; }
    .lfx-hero-grid .lfx-escena { order: 3; width: 100%; max-width: 440px; margin: 0 auto 22px; }
    .lfx-hero-grid .hero-actions { order: 4; justify-content: center; }
    .lfx-hero-grid .hero-stats { order: 5; justify-content: center; }

    /* Fuera de la vista, pero lo siguen leyendo Google y los lectores de pantalla */
    .lfx-hero-grid .lfx-descripcion {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    /* La sombra grande de la escena se recorta mejor en pantallas angostas */
    .lfx-escena { filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.5)); }
}

@media (max-width: 900px) {
    .lfx-banda { margin-top: -30px; padding: 12px 0; }
    .step { margin-top: 26px; }
    .cta-section { margin: 24px 12px 0; border-radius: 26px; }
}

@media (max-width: 600px) {
    .lfx-hero-grid .lfx-escena { max-width: 360px; margin-bottom: 16px; }

    /* Las cuatro cifras en 2 x 2 en vez de una debajo de otra */
    .hero .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        width: 100%;
    }

    .hero .stat-item { padding: 12px 10px; }
}

/* Quien pide menos movimiento ve el mismo diseno, quieto */
@media (prefers-reduced-motion: reduce) {
    .lfx-mesh span,
    .hero-bg i,
    .hero h1 .highlight,
    .lfx-flota,
    .lfx-gira,
    .lfx-banda-pista,
    .steps-container::before,
    .step-num,
    .cta-bg {
        animation: none !important;
    }

    .lfx-palabra > span {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }
}

/* ============ CLIENTES: VITRINA 3D (public/js/clientes-3d.js) ============ */
/* El color del cliente elegido se anima entre uno y otro */
@property --c3d-color { syntax: '<color>'; inherits: true; initial-value: #6FAE3D; }
@property --c3d-color2 { syntax: '<color>'; inherits: true; initial-value: #2F5A1B; }

/* Fondo oscuro a todo el ancho con anillos de color detras del vidrio (como un glassmorphism
   clasico): por fuera del recuadro se ven nitidos y a traves de el, borrosos */
.c3d-fondo {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-top: 24px;
    padding: 70px 24px;
    /* Verde institucional de myCatalogo; solo los anillos llevan el color del cliente */
    background:
        radial-gradient(60% 80% at 50% 45%, color-mix(in oklab, var(--lfx-v) 55%, transparent), transparent 75%),
        linear-gradient(160deg, var(--lfx-v-oscuro), #142b0c);
    transition: --c3d-color 0.9s ease, --c3d-color2 0.9s ease;
}

.c3d-forma {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
}

/* Anillo grueso arriba a la izquierda */
.c3d-forma.anillo-a {
    width: 380px;
    height: 380px;
    left: 4%;
    top: -60px;
    border: 70px solid color-mix(in oklab, var(--c3d-color) 55%, #ffffff);
    animation: c3dFlotar 14s ease-in-out infinite;
}

/* Anillo grueso abajo a la derecha */
.c3d-forma.anillo-b {
    width: 460px;
    height: 460px;
    right: 6%;
    bottom: -120px;
    border: 90px solid color-mix(in oklab, var(--c3d-color) 70%, var(--c3d-color2));
    animation: c3dFlotar 18s ease-in-out -6s infinite;
}

/* Circulos de linea fina */
.c3d-forma.linea-a {
    width: 560px;
    height: 560px;
    left: -240px;
    top: 30%;
    border: 2px solid color-mix(in oklab, var(--c3d-color) 80%, #ffffff);
}

.c3d-forma.linea-b {
    width: 640px;
    height: 640px;
    right: -180px;
    top: -120px;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

@keyframes c3dFlotar {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(24px, 18px); }
}

.c3d {
    position: relative;
    z-index: 1;
    isolation: isolate;
    overflow: hidden;
    max-width: 1340px;
    margin: 0 auto;
    padding: 60px 48px 44px;
    border-radius: 36px;
    color: #fff;
    /* Vidrio casi transparente y muy borroso */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 40px 90px -40px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 0 40px rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
}

/* El texto lleva una sombra suave para leerse sobre los anillos borrosos */
.c3d-cabecera { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35); }

/* Reflejo de vidrio en la parte de arriba del recuadro */
.c3d::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 45%;
    z-index: -1;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
}

.c3d-cabecera { max-width: 640px; margin: 0 auto 24px; text-align: center; }

/* Antetitulo de la seccion: 14px (2px mas que las antiguas etiquetas de 12px) */
.c3d-antetitulo {
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #d9f2c8;
}
.c3d .section-title { color: #fff; }
.c3d .section-subtitle { color: rgba(255, 255, 255, 0.72); margin: 0 auto; max-width: 560px; }

.c3d-marco {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    max-width: 1240px;
    margin: 0 auto;
    align-items: center;
}

.c3d-escenario {
    position: relative;
    height: clamp(380px, 38vw, 500px);
    border-radius: 28px;
    background: radial-gradient(70% 60% at 50% 60%, rgba(255, 255, 255, 0.05), transparent 70%);
}

.c3d-lienzo {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    /* El arrastre vertical en el celular sigue moviendo la pagina */
    touch-action: pan-y;
}

.c3d-arrastrando .c3d-lienzo { cursor: grabbing; }

.c3d-cargando {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 14px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.c3d-cargando span {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--c3d-color);
    animation: c3dGirar 0.9s linear infinite;
}

@keyframes c3dGirar { to { transform: rotate(360deg); } }

.c3d-listo .c3d-cargando { opacity: 0; }

.c3d-pista {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease 0.4s;
}

.c3d-listo .c3d-pista { opacity: 1; }
.c3d-pista-movil { display: none; }

/* Panel de vidrio con los clientes */
/* Vidrio oscuro y mas borroso: el texto contrasta sobre cualquier color del fondo */
.c3d-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
}

.c3d-clientes { display: grid; gap: 7px; }

.c3d-cliente {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 12px;
    border-radius: 14px;
    text-align: left;
    font: inherit;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s, border-color 0.3s, transform 0.35s var(--lfx-out);
}

.c3d-cliente:hover { transform: translateX(4px); background: rgba(255, 255, 255, 0.08); }

.c3d-cliente[aria-pressed='true'] {
    background: color-mix(in oklab, var(--cliente) 22%, transparent);
    border-color: color-mix(in oklab, var(--cliente) 70%, transparent);
}

.c3d-cliente strong { display: block; font-size: 0.98rem; }
.c3d-cliente small { display: block; font-size: 0.76rem; color: rgba(255, 255, 255, 0.6); }

.c3d-punto {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--cliente);
    box-shadow: 0 0 0 4px color-mix(in oklab, var(--cliente) 25%, transparent);
}

.c3d-recorrido { display: grid; gap: 4px; font-size: 0.82rem; color: rgba(255, 255, 255, 0.72); }

.c3d-recorrido input {
    width: 100%;
    accent-color: var(--c3d-color);
    cursor: pointer;
}

.c3d-visitar {
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95rem;
    background: linear-gradient(135deg, var(--c3d-color), var(--c3d-color2));
    box-shadow: 0 14px 34px -14px var(--c3d-color);
}

/* Respaldo sin 3D: tarjetas con la captura de cada tienda */
.c3d-respaldo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
}

.c3d-js .c3d-respaldo { display: none; }
.c3d:not(.c3d-js) .c3d-marco { display: none; }

.c3d-tarjeta {
    overflow: hidden;
    border-radius: 20px;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.c3d-tarjeta img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.c3d-tarjeta span { display: block; padding: 14px 16px; }
.c3d-tarjeta strong { display: block; }
.c3d-tarjeta small { color: rgba(255, 255, 255, 0.6); }

@media (max-width: 1024px) {
    .c3d-marco { grid-template-columns: minmax(0, 1fr); }
    .c3d-panel { max-width: 640px; width: 100%; margin: 0 auto; }
}

@media (max-width: 900px) {
    .c3d-fondo { margin-top: 16px; padding: 40px 12px; }
    .c3d { padding: 48px 16px 24px; border-radius: 26px; }
    .c3d-forma.anillo-a { width: 220px; height: 220px; border-width: 42px; left: -40px; top: -30px; }
    .c3d-forma.anillo-b { width: 260px; height: 260px; border-width: 50px; right: -60px; bottom: -60px; }
    .c3d-forma.linea-a, .c3d-forma.linea-b { width: 340px; height: 340px; }
    .c3d-escenario { height: 400px; }
    .c3d-pista-pc { display: none; }
    .c3d-pista-movil { display: inline; }
    .c3d-panel { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .c3d-fondo { transition: none; }
    .c3d-forma { animation: none !important; }
    .c3d-cargando span { animation-duration: 2.5s; }
}
